You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Allow to hide client scopes from scopes_supported in discovery endpoint #10388
Keycloak need to be extended in order to be able to hide client scopes from discovery( OpenID Provider Metadata).
We propose to add ClientScopeAttributeEntity with name hideFromOpenIDProviderMetadata (label = Hide from OpenID Provider Metadata) with default value as false. If this value become true, this scope will not listed in OpenID Provider Metadata.
Finally, with this implementation no change is needed during migration.
The server MUST support the openid scope value. Servers MAY choose not to advertise some supported scope values even when this parameter is used, although those defined in OpenID.Core SHOULD be listed, if supported.
Details
No response
Reacted by Thorsten Pohl, albsol, miraculixx, Damiano Albani, Marc Nuri and Alexander Schwartz
In our project we have a similar requirement and I am keen on helping to complete this feature. That said, we are migrating from a different product in which scopes are classified in two categories:
scopes that are available by default to all clients and advertised in the discovery document and
scopes that are available only to clients when explicitly assigned and not advertised in the discovery document.
This seems similar to how scopes can be assigned on realm level versus client level in Keycloak.
With this in mind, I would prefer to also (or instead) have the option of hiding all scopes that are only assigned on client level (i.e. where type == none on realm level) from the discovery document. Wdyt?
In our project we have a similar requirement and I am keen on helping to complete this feature. That said, we are migrating from a different product in which scopes are classified in two categories:
scopes that are available by default to all clients and advertised in the discovery document and
scopes that are available only to clients when explicitly assigned and not advertised in the discovery document.
This seems similar to how scopes can be assigned on realm level versus client level in Keycloak.
With this in mind, I would prefer to also (or instead) have the option of hiding all scopes that are only assigned on client level (i.e. where type == none on realm level) from the discovery document. Wdyt?
Do not confuse settings. type == none is for not being default scope in new creating clients.
I have proposed hideFromOpenIDProviderMetadata field for this.
My PR needs to be rebased and opened again. @remcojansen@manusa
Activity
remcojansen commentedon Oct 22, 2025
In our project we have a similar requirement and I am keen on helping to complete this feature. That said, we are migrating from a different product in which scopes are classified in two categories:
This seems similar to how scopes can be assigned on realm level versus client level in Keycloak.
With this in mind, I would prefer to also (or instead) have the option of hiding all scopes that are only assigned on client level (i.e. where
type == noneon realm level) from the discovery document. Wdyt?cgeorgilakis commentedon Oct 22, 2025
Do not confuse settings.
type == noneis for not being default scope in new creating clients.I have proposed hideFromOpenIDProviderMetadata field for this.
My PR needs to be rebased and opened again. @remcojansen @manusa
manusa commentedon Oct 22, 2025
For more context, this is currently required to make kubernetes-mcp-server work with VSCode and DCR.
The solution we have at the moment is to overwrite the response when proxying the request to the keycloak server:
https://github.com/containers/kubernetes-mcp-server/blob/49afbad502e5d97248f3c0d4b7b324311a91d021/pkg/http/wellknown.go#L71-L77
10 remaining items
hide scopes from scopes_supported in discovery endpoint
hide scopes from scopes_supported in discovery endpoint