-
-
Notifications
You must be signed in to change notification settings - Fork 382
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reverse proxy authentication to Woodpeck and Gitea #176
Conversation
This mod adds option to authenticate user using HTTP header set by reverse proxy. It forwards specified HTTP header with authenticated username in requests to Gitea. Requirements: * Gitea must be configured for reverse proxy authentication and must accept HTTP header auth in API calls (Gitea fix IB#1107572). * Woodpecker must use its external host address in status URL-s sent to Gitea (Woodpecker fix IB#1107596). To enable set the following variables in woodpecker server environment (woodpecker running behind reverse proxy): * internal woodpecker server URL, i.e.: WOODPECKER_HOST_INTERNAL=http://192.168.1.100:8000 * enable reverse proxy auth in woodpecker and forwarding auth header to gitea: WOODPECKER_GITEA_REV_PROXY_AUTH=true * set name of header with authenticated username (set by reverse proxy), i.e.: WOODPECKER_GITEA_REV_PROXY_AUTH_HEADER=X-Forward-Username Author-Change-Id: IB#1107569
Missing information about file changes added. Fixes: 66d8ff7 Author-Change-Id: IB#1107569
Company name fixed. Fixes: 3888838 Author-Change-Id: IB#1107569
@pboguslawski can you rebase this pull ontop of master? |
Master merged in 94a4624. |
ok now all gitea pulls are now merged :) @pboguslawski the heavy woodpecker refactoring is now mostly done - wana rebase? |
As Woodpecker is now supporting Gitea login via OAuth which is quite convenient IMO, I would close this for now. Please feel free to reopen if you still want to get this in. |
OAuth should be optional not mandatory. Think of authenticating gitea and woodpecker user using reverse proxy and http header. This PR was replaced with #837 (adjusted to current master). |
This mod adds option to authenticate user using HTTP header set by
reverse proxy. It forwards specified HTTP header with authenticated
username in requests to Gitea.
Requirements:
Gitea must be configured for reverse proxy authentication and
must accept HTTP header auth in API calls (Allow Token API calls be authorized using the reverse-proxy header go-gitea/gitea#15119).
Woodpecker must use its external host address in status URL-s
sent to Gitea (Using configured server URL instead of obtained from request #175).
To enable set the following variables in woodpecker server
environment (woodpecker running behind reverse proxy):
internal woodpecker server URL, i.e.:
WOODPECKER_HOST_INTERNAL=http://192.168.1.100:8000
enable reverse proxy auth in woodpecker and forwarding auth
header to gitea:
WOODPECKER_GITEA_REV_PROXY_AUTH=true
set name of header with authenticated username (set by
reverse proxy), i.e.:
WOODPECKER_GITEA_REV_PROXY_AUTH_HEADER=X-Forward-Username
Author-Change-Id: IB#1107569