-
Notifications
You must be signed in to change notification settings - Fork 44
PROJQUAY-10283: update Entra OIDC server example #1626
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
Open
JoeAldinger
wants to merge
1
commit into
quay:master
Choose a base branch
from
JoeAldinger:jira/PROJQUAY-10283-oidc-entra-update
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -33,7 +33,7 @@ You can configure {productname} to authenticate users through any OpenID Connect | |
| | **{nbsp}{nbsp}{nbsp}.OIDC_SERVER** + | ||
| (Required) | String | The address of the OIDC server that is being used for authentication. + | ||
| + | ||
| **Example:** `\https://sts.windows.net/6c878.../` | ||
| **Example:** `\https://login.microsoftonline.com/<tenant_id>/v2.0/` | ||
| | **{nbsp}{nbsp}{nbsp}.PREFERRED_USERNAME_CLAIM_NAME** |String |Sets the preferred username to a parameter from the token. | ||
| | **{nbsp}{nbsp}{nbsp}.SERVICE_ICON** | String | Changes the icon on the login screen. | ||
|
|
||
|
|
@@ -45,21 +45,21 @@ You can configure {productname} to authenticate users through any OpenID Connect | |
|
|
||
| | **{nbsp}{nbsp}{nbsp}.PREFERRED_GROUP_CLAIM_NAME** | String | The key name within the OIDC token payload that holds information about the user's group memberships. | ||
|
|
||
| | **{nbsp}{nbsp}{nbsp}.OIDC_DISABLE_USER_ENDPOINT** | Boolean | Whether to allow or disable the `/userinfo` endpoint. If using Azure Entra ID, this field must be set to `True` because Azure obtains the user's information from the token instead of calling the `/userinfo` endpoint. + | ||
| | **{nbsp}{nbsp}{nbsp}.OIDC_DISABLE_USER_ENDPOINT** | Boolean | Whether to allow or disable the `/userinfo` endpoint. If using Azure Entra ID, this field must be set to `true` because Azure obtains the user's information from the token instead of calling the `/userinfo` endpoint. + | ||
| + | ||
| **Default:** `False` | ||
| **Default:** `false` | ||
|
|
||
| | *USE_PKCE* | Boolean | Whether to enable support for Proof Key for Code Exchange. + | ||
| + | ||
| **Default:** `False` | ||
| **Default:** `false` | ||
|
|
||
| |*PKCE_METHOD* |Integer | The code challenge method used to generate the `code_challenge` sent in the initial authorization request. + | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In oidc-config-fields.adoc, PKCE_METHOD is listed with type Integer. The codebase (oauth/oidc.py:147-152) shows: It's a String, valid values are "S256" or "plain". The docs should also list "plain" as a valid option. |
||
| + | ||
| **Default:** `S256` | ||
|
|
||
| |*PUBLIC_CLIENT* |Boolean | Whether to omit `client_secret` during token request when the client is public. + | ||
| + | ||
| **Default:** `False` | ||
| **Default:** `false` | ||
| |=== | ||
|
|
||
| .OIDC example YAML | ||
|
|
@@ -90,8 +90,8 @@ AUTHENTICATION_TYPE: OIDC | |
| VERIFIED_EMAIL_CLAIM_NAME: <verified_email_claim> | ||
| PREFERRED_GROUP_CLAIM_NAME: <preferred_group_claim> | ||
| OIDC_DISABLE_USER_ENDPOINT: true | ||
| USE_PKCE: True | ||
| USE_PKCE: true | ||
| PKCE_METHOD: "S256" | ||
| PUBLIC_CLIENT: True | ||
| PUBLIC_CLIENT: true | ||
| # ... | ||
| ---- | ||
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"typically" is vague — it either works or it doesn't.
The v2.0 endpoint returns an issuer of https://login.microsoftonline.com/<tenant_id>/v2.0 in its discovery document, which matches the OIDC_SERVER value. The v1 endpoint returns issuer https://sts.windows.net/<tenant_id>/ — a different domain. The code at oauth/oidc.py:237 reads the issuer from the discovery document and loginmanager.py:55 compares it with rstrip("/"). So v2.0 works because the issuer matches. This should be stated explicitly, not hedged with "typically."
No mention of OIDC_ISSUER fallback — The codebase has an OIDC_ISSUER override field (oauth/oidc.py:240) specifically designed for issuer mismatch scenarios. If a customer must use the v1 endpoint for some reason, they can set OIDC_ISSUER: https://sts.windows.net/<tenant_id>/. This is undocumented in both the old and new docs.