Skip to content
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

Make OIDC scope configurable #30

Closed
ricardojdsilva87 opened this issue Jan 30, 2020 · 2 comments
Closed

Make OIDC scope configurable #30

ricardojdsilva87 opened this issue Jan 30, 2020 · 2 comments
Assignees
Milestone

Comments

@ricardojdsilva87
Copy link

Hello,
I'm currently having an issue connecting to OIDC using the latest plugin version.

This is the request (URL and client_id hidden)
https://*******************?response_type=code&redirect_uri=https%3A%2F%2F*****************%2Foauth2%2Fcallback%2Foidc&state=kan17me88daf0t5rbh43s3btph&client_id=**************&scope=openid+email+profile

This is the response:
https://*******************/oauth2/callback/oidc?error_description=The+requested+scope+is+invalid%2C+unknown%2C+malformed%2C+or+exceeds+that+which+the+client+is+permitted+to+request.&state=kan17me88daf0t5rbh43s3btph&error=invalid_scope

I have looked into the configuration on the sonarqube plugin and there is no option to select only a few scopes. Currently the oidc I'm connecting to is configured to accept only iodc connections. Is there a way we can select which scopes would be called?
As I can see this scope is default in most of the source files:

assertEquals("invalid scope", Scope.parse("openid email profile"), request.getScope());

Thanks for the help

@tjuerge tjuerge changed the title invalid_scope error when connecting to OIDC server Make OIDC scope configurable Jan 30, 2020
@tjuerge tjuerge self-assigned this Mar 30, 2020
@tjuerge
Copy link
Contributor

tjuerge commented Mar 30, 2020

The additional scopes configuration (introduced in #16) was replaced by all scopes used in authorization request:
Screenshot 2020-03-30 at 23 25 00

In this scopes configuration you can remove all but the required 'openid' scope.

@tjuerge tjuerge added this to the 2.0.0 milestone Apr 4, 2020
@ricardojdsilva87
Copy link
Author

Thanks for the reply! Meanwhile we have integrated our application using a github plugin. The login uses OIDC via github that is already integrated. We'll have a 2nd option if meanwhile we have to take out Github out of the way.

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

No branches or pull requests

2 participants