Skip to content

Ability to modify OIDC provider configuration #616

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

Closed
tcchambers-els opened this issue Feb 3, 2022 · 7 comments
Closed

Ability to modify OIDC provider configuration #616

tcchambers-els opened this issue Feb 3, 2022 · 7 comments
Assignees
Labels
type: enhancement A general enhancement
Milestone

Comments

@tcchambers-els
Copy link

Expected Behavior
When enabling OIDC it would be good to be able to customise /.well-known/openid-configuration information. In my case I would like to modify the scopes_supported claim

Current Behavior
I can see how I can create an instance of OidcProviderConfiguration but I can't see how I can modify the one used here

in the filter without completely creating a new one (unless I've missed something)

Context
We would like the ability to modify some of the optional OIDC provider information to accurately reflect the actual provider.

@tcchambers-els tcchambers-els added the type: enhancement A general enhancement label Feb 3, 2022
@sjohnr
Copy link
Member

sjohnr commented Feb 4, 2022

@tcchambers-els currently I believe you are correct, you would need to implement your own filter to replace this one. It looks like scopes_supported is a RECOMMENDED metadata value for this endpoint, so it could be a candidate for addition at some point.

Since the server supports multiple clients, how would you envision filling in this field? Would it just be hard-coded to openid and possibly other standard scope values? Or would it need to be a setting in ProviderSettings for your use case?

@sjohnr sjohnr self-assigned this Feb 4, 2022
@tcchambers-els
Copy link
Author

Hi @sjohnr, I think either of those solutions would work - as you say openid needs to be mandatory but we would also need to add other standard OIDC scopes like profile plus custom scopes. So adding the config to ProviderSettings would satisfy our use case, with either openid hardcoded as it is or an exception thrown if it's missing.
Thanks for your time in taking a look at this.

@jgrandja
Copy link
Collaborator

jgrandja commented Feb 8, 2022

@tcchambers-els @sjohnr I'm not sure adding the config to ProviderSettings is going to give us the flexibility for all potential use cases.

I think what we'll need to do is expose a setter for OidcProviderConfigurationEndpointFilter.providerConfigurationHttpMessageConverter, which allows a custom Converter to be set via OidcProviderConfigurationHttpMessageConverter.setProviderConfigurationParametersConverter().

@ghost
Copy link

ghost commented Feb 22, 2022

hi @jgrandja. I can start working on this issue.

@jgrandja jgrandja assigned ghost Feb 22, 2022
ghost pushed a commit to ovidiupopa07/spring-authorization-server that referenced this issue Feb 22, 2022
ghost pushed a commit to ovidiupopa07/spring-authorization-server that referenced this issue Feb 23, 2022
@its-felix
Copy link

Maybe it's already a bit too late poping up here, but I'd like to be able to completely disable the OIDC Part of the authorization server and only use oauth2.

Should I open another issue for this request?

@sjohnr
Copy link
Member

sjohnr commented Feb 25, 2022

@its-felix, the OAuth2AuthorizationServerConfigurer provides the ability to disable OIDC. However, I don't think this ticket is the appropriate place to discuss it, so it can remain focused on the issue at hand. Feel free to open a stackoverflow question if needed and we can take a look.

@jgrandja jgrandja added this to the 0.2.3 milestone Feb 25, 2022
ghost pushed a commit to ovidiupopa07/spring-authorization-server that referenced this issue Mar 1, 2022
@jgrandja jgrandja modified the milestones: 0.2.3, 0.3.0 Mar 24, 2022
@jgrandja jgrandja modified the milestones: 0.3.0, 0.3.1 May 5, 2022
@jgrandja jgrandja removed this from the 0.3.1 milestone Jun 15, 2022
@jgrandja jgrandja assigned jgrandja and unassigned ghost Aug 29, 2022
@jgrandja jgrandja added this to the 0.4.0-M2 milestone Aug 29, 2022
@jgrandja
Copy link
Collaborator

@tcchambers-els This is now merged via 0994a1e.

Please take a look at this test that demonstrates how to customize the OIDC provider configuration response.

doba16 pushed a commit to doba16/spring-authorization-server that referenced this issue Apr 21, 2023
doba16 pushed a commit to doba16/spring-authorization-server that referenced this issue Apr 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants