8000 Support for configuring claims supported in Keycloak OP metadata by cgeorgilakis · Pull Request #10905 · keycloak/keycloak · GitHub
[go: up one dir, main page]

Skip to content

Support for configuring claims supported in Keycloak OP metadata - #10905

Closed
cgeorgilakis wants to merge 1 commit into
keycloak:mainfrom
eosc-kc:RCIAM-899-claims_supported
Closed

cgeorgilakis wants to merge 1 commit into
keycloak:mainfrom
eosc-kc:RCIAM-899-claims_supported

Conversation

@cgeorgilakis
Copy link
Copy Markdown
Contributor

closes #9047

We have added separate tab in realm settings for configuring claims supported. If you believe that we can put this configuration inside other realm settings tab, I could change it.

@cypress
cypress Bot commented Oct 20, 2023
Copy link
Copy Markdown

2 failed and 1 flaky tests on run #9525 ↗︎

2 525 48 0 Flakiness 1

Details:

Merge 30241762a7e68918be61a0c7ccd8bcc7a841f750 into 21b2de4...
Project: Keycloak Admin UI Commit: f586671248 ℹ️
Status: Failed Duration: 12:52 💡
Started: Oct 20, 2023 2:35 PM Ended: Oct 20, 2023 2:48 PM
Failed  cypress/e2e/realm_settings_general_tab_test.spec.ts • 2 failed tests • chrome

View Output Video

Test Artifacts
Realm settings general tab tests > Check Access Endpoints OpenID Endpoint Configuration link Test Replay Output Screenshots
Realm settings general tab tests > Access Endpoints OpenID Endpoint Configuration link Test Replay Output Screenshots
Flakiness  cypress/e2e/clients_test.spec.ts • 1 flaky test • chrome

View Output Video

Test Artifacts
Clients test > Keys tab test > Generate new keys Test Replay Output Screenshots

Review all test suite changes for PR #10905 ↗︎

@cgeorgilakis
Copy link
Copy Markdown
Contributor Author

We have rebased this PR in current main and we have added support for new admin console.
Could you review it?

Configuring claims_supported parameter in Keycloak OP metadata is useful because we are not 8000 able now to show claims supported by our instance – which are different than the default. This can lead to client misconfigurations. Moreover, take into account that documentation mentioned "Note that for privacy or other reasons, this might not be an exhaustive list.”

@linathedog
linathedog force-pushed the RCIAM-899-claims_supported branch 2 times, most recently from 8a44660 to 9060eb0 Compare October 23, 2023 14:32
@cgeorgilakis
cgeorgilakis force-pushed the RCIAM-899-claims_supported branch from 9060eb0 to 952a08e Compare October 25, 2023 09:56
@cgeorgilakis
Copy link
Copy Markdown
Contributor Author

@jonkoops my co-worker @linathedog have done requested changes.

@cgeorgilakis
cgeorgilakis requested a review from jonkoops October 31, 2023 13:54
@pedroigor pedroigor left a comment
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be simpler if we could leverage the same set of claims across all the realms and add a provider property instead.

But I guess you really want to make this realm-specific, right?

Trying to figure out if we can start small by enabling this at the provider level instead of changing UIs and storage. I did not find any discussion about this, that is why I'm asking.

@cgeorgilakis
Copy link
Copy Markdown
Contributor Author

It would be simpler if we could leverage the same set of claims across all the realms and add a provider property instead.

But I guess you really want to make this realm-specific, right?

Trying to figure out if we can start small by enabling this at the provider level instead of changing UIs and storage. I did not find any discussion about this, that is why I'm asking.

We could open a discussion for this.
However, we believe that configuration must be inside realm.
Some of our instnces have only one extra realm and other instances is based on multirealm with some different configuration including claims supported.

@pedroigor
pedroigor commented Nov 1, 2023 •
Copy link
Copy Markdown
Contributor

@cgeorgilakis I'm sorry for pointing this but as you know we don't have good support for multiple realms. Yeah, kinda of an old issue/request/problem/discussion ....

Another problem I see here is that the provider is already handling customizations to the metadata but using a different approach. For instance, you can override any metadata by setting the openid-configuration-override property as you can see here https://github.com/keycloak/keycloak/blob/main/services/src/main/java/org/keycloak/protocol/oidc/OIDCWellKnownProviderFactory.java#L55. To solve this particular problem, we could probably add support for prefixing files so that we read them on a per-realm basis. It should work if you know your realms beforehand but yeah, not as good as your proposal.

If we accept the changes you are proposing we are adding a different behavior (better, for sure) to override the default metadata and, IMO, we should choose one or another. I'm in favor of your solution but we need to also consider the other settings we have in the current implementation of the provider:

  • Possibility to enable/disable client scopes. Perhaps we can do even better here and actually configure which scopes we want to expose.
  • Possibility to override any other metadata. Not sure if we want settings for each and every metadata in that document but perhaps the possibility to upload a JSON.

@mposolda @rmartinc Wdyt ?

@linathedog
linathedog force-pushed the RCIAM-899-claims_supported branch from 952a08e to 0b6333f Compare November 2, 2023 14:06
@jonkoops jonkoops left a comment
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Front-end changes LGTM

@stianst
stianst commented Apr 29, 2026
Copy link
Copy Markdown
Contributor

I'm not really in favour of adding this; it shouldn't be required to manually configure the supported claims. That should really be something Keycloak can figure out based on client scopes in the realm.

@stianst stianst left a comment
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-1 To adding this - we should generate this from client scopes instead

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Mutable claims_supported

5 participants

0