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

Login always auto generated on 8.0 #31

Closed
lainosantos opened this issue Feb 19, 2020 · 6 comments · Fixed by #32
Closed

Login always auto generated on 8.0 #31

lainosantos opened this issue Feb 19, 2020 · 6 comments · Fixed by #32
Milestone

Comments

@lainosantos
Copy link
Contributor

In SonarQube version 8.0 the login property is restricted for internal use only, causing login from auth provider to be desconsidered.

https://github.com/SonarSource/sonarqube/blob/eacba88db0a44e34156e9e31d315ef31d61e726a/sonar-plugin-api/src/main/java/org/sonar/api/server/authentication/UserIdentity.java#L166

@gboor
Copy link

gboor commented Mar 11, 2020

Is this why, when I try to log in using my OIDC provider, I just get a page saying "you are not authorized" or something along those lines? And the user does not get created?

If this fixes that, then I would like to see it merged sooner rather than later. Right now, this plugin is useless to me if I cannot have it create users.

@gboor
Copy link

gboor commented Mar 23, 2020

I just tried pre-creating a user and then logging that user in through OIDC, but I still get the "you are not authorized" page - it appears as if this entire plugin is broken until this MR is merged.

Can someone please give this some attention? @tjuerge

@lainosantos
Copy link
Contributor Author

Is this why, when I try to log in using my OIDC provider, I just get a page saying "you are not authorized" or something along those lines? And the user does not get created?

If this fixes that, then I would like to see it merged sooner rather than later. Right now, this plugin is useless to me if I cannot have it create users.

Exactly, you get "you are not authorized" error

tjuerge added a commit that referenced this issue Mar 29, 2020
@tjuerge tjuerge added this to the 2.0.0 milestone Apr 4, 2020
@tjuerge
Copy link
Contributor

tjuerge commented Apr 4, 2020

Some technical details can be found in SonarQube 8.1 Jira ticket SONAR-12475 Drop login generation strategy when using an Identity Provider.

tjuerge added a commit that referenced this issue Apr 4, 2020
@tjuerge
Copy link
Contributor

tjuerge commented Apr 4, 2020

This SonarQube API change brings a challenge to the user's SCM account - it defaults to the auto-generated SonarQube user login and can't be changed by the user:
image

@tjuerge
Copy link
Contributor

tjuerge commented Oct 24, 2020

Btw. the reasoning behind the change SONAR-12475 Drop login generation strategy when using an Identity Provider introduced in SQ 8.1 can be found in the SQ community forum entry User login not deterministic after update to 8.1 with SAML authentication:

The reason why logins are now automatically generated is that in case multiple ALMs are used, we want to prevent any situation where 2 identical logins could be generated.

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 a pull request may close this issue.

3 participants