-
Notifications
You must be signed in to change notification settings - Fork 66
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
Add spec.claims.additionalClaimMappings
to OIDCIdentityProvider
#1294
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
cfryanr
changed the title
WIP: Proof of concept implementation of
WIP: Proof of concept implementation of Sep 20, 2022
OIDCIdentityProvider.spec.claims.additionalClaimMappings
spec.claims.additionalClaimMappings
on OIDCIdentityProvider
cfryanr
force-pushed
the
additional_claim_mapping
branch
from
November 10, 2022 21:56
6bcc071
to
3b55c80
Compare
joshuatcasey
force-pushed
the
additional_claim_mapping
branch
from
December 21, 2022 13:13
3b55c80
to
cd17bdb
Compare
joshuatcasey
force-pushed
the
additional_claim_mapping
branch
3 times, most recently
from
January 4, 2023 19:29
2692527
to
02ed2d9
Compare
joshuatcasey
changed the title
WIP: Proof of concept implementation of
Add Jan 4, 2023
spec.claims.additionalClaimMappings
on OIDCIdentityProviderspec.claims.additionalClaimMappings
to OIDCIdentityProvider
cfryanr
commented
Jan 5, 2023
apis/supervisor/idp/v1alpha1/types_oidcidentityprovider.go.tmpl
Outdated
Show resolved
Hide resolved
cfryanr
commented
Jan 5, 2023
cfryanr
commented
Jan 5, 2023
internal/controller/supervisorconfig/oidcupstreamwatcher/oidc_upstream_watcher.go
Show resolved
Hide resolved
cfryanr
commented
Jan 5, 2023
cfryanr
commented
Jan 5, 2023
cfryanr
commented
Jan 5, 2023
Before merging, this PR could also add test coverage for:
|
Codecov Report
@@ Coverage Diff @@
## main #1294 +/- ##
==========================================
- Coverage 76.77% 75.51% -1.27%
==========================================
Files 166 167 +1
Lines 14581 14855 +274
==========================================
+ Hits 11195 11218 +23
- Misses 3096 3347 +251
Partials 290 290
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
joshuatcasey
force-pushed
the
additional_claim_mapping
branch
4 times, most recently
from
January 13, 2023 22:45
d6e8530
to
c399bee
Compare
- Specify mappings on OIDCIdentityProvider.spec.claims.additionalClaimMappings - Advertise additionalClaims in the OIDC discovery endpoint under claims_supported Co-authored-by: Ryan Richard <richardry@vmware.com> Co-authored-by: Joshua Casey <joshuatcasey@gmail.com>
…s, and slices Co-authored-by: Ryan Richard <richardry@vmware.com> Co-authored-by: Joshua Casey <joshuatcasey@gmail.com> Co-authored-by: Benjamin A. Petersen <ben@benjaminapetersen.me>
…n ID Token Co-authored-by: Ryan Richard <richardry@vmware.com> Co-authored-by: Joshua Casey <joshuatcasey@gmail.com> Co-authored-by: Benjamin A. Petersen <ben@benjaminapetersen.me>
Co-authored-by: Ryan Richard <richardry@vmware.com> Co-authored-by: Joshua Casey <joshuatcasey@gmail.com>
cfryanr
force-pushed
the
additional_claim_mapping
branch
from
January 13, 2023 23:00
c399bee
to
2633d72
Compare
…xpected Co-authored-by: Ryan Richard <richardry@vmware.com> Co-authored-by: Benjamin A. Petersen <ben@benjaminapetersen.me>
Co-authored-by: Ryan Richard <richardry@vmware.com>
Co-authored-by: Ryan Richard <richardry@vmware.com> Co-authored-by: Joshua Casey <joshuatcasey@gmail.com>
cfryanr
force-pushed
the
additional_claim_mapping
branch
from
January 17, 2023 23:55
68b3a00
to
2f9b8b1
Compare
joshuatcasey
approved these changes
Jan 18, 2023
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 PR contains a new Supervisor feature requested in #1279. The new feature allows arbitrary upstream ID token claims to be mapped into a new top-level claim called
additionalClaims
in the ID tokens issued by the Supervisor. By pushing down the mapped claims under the new non-standardadditionalClaims
top-level claim, there is no possibility of those mapped claims accidentally overwriting (or otherwise being misinterpreted as) standard claims.ThisPR does not show what a similar feature would look like for LDAPIdentityProviders and ActiveDirectoryIdentityProviders. Custom claim mapping is not needed for those types of IDPs at this time, although the feature could potentially be extended to include those types someday.
Here is an example
spec
of anOIDCIdentityProvider
using this new feature:Here is an example of the claims in a Supervisor ID token created using the code on this branch. Note that both the original values and the original data types of those values are preserved from the upstream ID token.
And an example of some Supervisor Pod log warnings when the upstream ID token did not contain some of the requested claims:
NOTE: We also need to consider if all clients should have access to these claims, or if there should be a new scope which controls access to these claims for dynamic clients, similar to the recently added
username
andgroups
scopes.