Must-share information (formatted with Markdown): Using SonarQube Enterprise 7.3, SAML 2.0 Authentication for SonarQube 1.1
We are trying to get SAML configured (using ADFS) on our SonarQube Enterprise instance. We believe we are close to getting it working but have a couple of errors we’re trying to work through.
What is the expected format for the following fields?
SAML user login attribute
SAML user name attribute
We are passing “login” and “Name” to match our claims but are seeing the error below.
018.12.13 15:46:43 ERROR web[AWeeKRsSggugAZApAB7Y][o.s.s.a.AuthenticationError] Fail to callback authentication with ‘saml’
java.lang.NullPointerException: Name is missing
at java.util.Objects.requireNonNull(Objects.java:228)
at org.sonarsource.auth.saml.SamlIdentityProvider.getNonNullFirstAttribute(SamlIdentityProvider.java:154)
at org.sonarsource.auth.saml.SamlIdentityProvider.callback(SamlIdentityProvider.java:118)
at
One more question – we’d really like to get this working with SSO (and not have to click the login button to authenticate with SAML). From my preliminary googling the only way to make SSO work with SonarQube is via advanced nginx config (at which point one would be bypassing the SAML plugin essentially). Is there an alternative way to do this? Perhaps by pointing at the login url directly or setting up redirects? Any documentation around such an approach would be greatly appreciated.
I’m happy that you’ve been able to solve your issue !
About the fact users still need to click on the “SAML” button to authenticate on SonarQube, it won’t be possible as to change that when using SAML authentication.
Can anyone please confirm what exactly needs to be given in below two fileds of SAML configuration -
sonar.auth.saml.user.login
sonar.auth.saml.user.name
Glad to know that SAML with ADFS is working for you. Can you please share the configuration if possible? Basically, looking for below configuration details -
Identifier Name
Endpoint
Claims - This one I believe is the screenshot you have shared above.