-
Notifications
You must be signed in to change notification settings - Fork 197
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
Migrate authentication to OIDC #4387
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
abompard
force-pushed
the
oidc
branch
8 times, most recently
from
February 17, 2022 16:16
4369cfc
to
477a701
Compare
Well well well, it looks like authlib 1.0rc1 has changed the API a bit, and we want to be compatible with 1.0 when it's out, so I'll make some additional changes to support it. |
abompard
force-pushed
the
oidc
branch
15 times, most recently
from
March 2, 2022 11:30
d9f28f8
to
e8de42e
Compare
LenkaSeg
approved these changes
Mar 2, 2022
ryanlerch
approved these changes
Mar 2, 2022
We're using authlib to handle most of the OpenID Connect workflow. The login and logout views have been moved to the `bodhi.server.auth` module. The old OpenID authentication can be accessed by using `/login?method=openid` as the login URL. The OIDC support has been split into two modules: - `oauth.py`, which contains the Pyramid integration of Authlib, and has nothing specific to Fedora (this should be sent to Authlib upstream to add Pyramid integration to Authlib) - `fedora.py` which contains the Fedora-specific (actually Ipsilon-specific) extensions. Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
The implementation uses the authlib integration for `requests`. There are two modes for authentication, depending on the OIDC provider's capability to do OOB (Out Of Band). If the provider cannot do OOB, it will spawn a temporary HTTP server to receive the redirect, so it only works if bodhi-client is running in the same machine as the browser. Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
The hard part is to register bodhi-client and bodhi-server with Ipsilon, and to distribute Ipsilon's self-signed certificate to the bodhi container. Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a gigantic pull request, please look at the commits one after the other.
This add support authentication for OpenID Connect authentication in the server in addition to OpenID. The old OpenID authentication can be accessed by using
/login?method=openid
as the login URL.The bodhi client is switched to OIDC entirely, plain OpenID support has been dropped.
Depending on the OIDC provider's capabilities, users may have to run the bodhi client on a host that has a browser.
Hopefully Fedora's OIDC provider (Ipsilon) will soon be updated to enable the OOB feature, that lets user just copy and paste the authentication code from their login browser window to the bodhi client, wherever it runs. See the OOB feature request.
Fixes: #1180, #4356