Skip to content

feat: add support to define custom oidc scopes #9

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

Conversation

sydefz
Copy link
Contributor

@sydefz sydefz commented Feb 29, 2024

Allow customisation on oidc scopes, users can now use druid.auth.oidc.customScopes=["scope_name"] to define a list of scopes to request from idp. The implementation also ensures a default openid scope is always included.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@van-vothanh
Copy link
Member

@sydefz how are you going to define the custom oidc scopes? We'd probably want to expose this as a cdk.json property so we could keep track of all the changes in cdk/cloudformation

@van-vothanh van-vothanh self-requested a review February 29, 2024 23:54
@sydefz
Copy link
Contributor Author

sydefz commented Mar 6, 2024

@van-vothanh I have added the ability define custom oidc scopes in cdk.json under oidcIdpConfig.

And the following cases are tested:

  1. not setting oidcIdpConfig.customScopes, oidc extension will use default email+profile+openid scopes
  2. setting oidcIdpConfig.customScopes=[new_scope], oidc extension will add openid scope to remain compliant to the oidc spec, the request will have new_scope+openid scopes
  3. setting oidcIdpConfig.customScopes=[new_scope, other_scope], oidc extension will add openid scope to remain compliant to the oidc spec, the request will have new_scope+openid scopes
  4. setting oidcIdpConfig.customScopes=[new_scope, openid], oidc extension will use new_scope+openid scopes

@van-vothanh van-vothanh merged commit ef48216 into aws-solutions:main Mar 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants