OpenID Connect
To configure the Valsight application to use the OpenID Connect SSO, edit conf/config.yml and restart the server after making changes.
To enable OpenID Connect login configure the following value:
Configuration Key (loginMethodConfigurations → openIdConnect →) | Description | Example Value | Default Value |
---|---|---|---|
enabled | Whether OpenID Connect authentication should be used or not | true | false |
Then configure the OpenID Connection client values as follows:
Configuration Key (….registration.openIdConnect →) | Description | Example Value | Default Value |
---|---|---|---|
client-id | OAuth 2.0 Client Identifier valid at the Authorization Server | jmxDcfi1gEffVMktJ | n/a |
client-secret | Client Secret token, provided by the Authorization Server | aZWAuRZUSxT-Sh8-xDLdHI | n/a |
scope | List of comma separated scopes if we want fetch additional claims. | openid, email,profile | n/a |
provider | The name of an OpenID connect provider to use (see below). If there is no provider with the registration id “openIdConnect” a value must be specified. | openIdConnect | n/a |
valsightOpenIdConnectProperties → userProfileMapping →username | The claim used to uniquely identify an user. It must always be present in the provider's response and unique per user. Note: claim names are case sensitve, ensure that the configured string matches the IdP claim name exactly. | preferred_username | sub |
valsightOpenIdConnectProperties → userProfileMapping → email | The claim that contains the user's e-mail address. Note: claim names are case sensitve, ensure that the configured string matches the IdP claim name exactly. *Optional | n/a | |
valsightOpenIdConnectProperties → userProfileMapping → fullName | The claim that contains the user's full name. Note: claim names are case sensitve, ensure that the configured string matches the IdP claim name exactly. *Optional | name | n/a |
valsightOpenIdConnectProperties → loginSuccessfulUrl | The absolute URL (starting with http(s)) of the application's main page. The user will be redirected there after a successful login. | n/a | |
valsightOpenIdConnectProperties → forceGroupsOverage | Forces the application to always use the 'https://graph.microsoft.com/v1.0' API to fetch the user's groups. It has no effect if 'groupsClaim' is not enabled. *Optional | true | false |
valsightOpenIdConnectProperties → acr_values | Allows to pass additional authentication related information to the user service. *Optional | myvalue1:myvalue2:myvalue3:myvalue4 | n/a |
valsightOpenIdConnectProperties →mandatoryClaims → claim → claimValue | This is used to customize the requested presence and values of claims beyond the ones requested by the OpenID Connect specification. Each claim configured here must be present in the provider's response and also have the specified value. If claim has multiple values in the response (e. g. a list of groups the users belongs to) then one of the values in the response must be an exact match to the configured value. Note: claim names are case sensitve, ensure that the configured strings for ‘claim’ values matches the IdP claim name exactly. *Optional | Example Configuration
CODE
| n/a |
valsightOpenIdConnectProperties → groupsClaim | This configuration option enables OpenID Connect to determine which groups users belong to. If this field is not present or if it is empty, the groups must be managed internally in the application. If we set a value of 'groupsClaim' we turn this functionality on. The value of 'groupsClaim' should be a claim name that contains the by OpenID Connect provided groups. The group matching happens as follows:
Important: this functionality never automatically deletes groups in the application Note: claim names are case sensitve, ensure that the configured string matches the IdP claim name exactly. *Optional | groupsInOpenIDConnectResponse | n/a |
valsightOpenIdConnectProperties → requiredGroupNamePrefix | REMOVED This field determines if group names must have a specified prefix to be recognised by the application. If this value is set then any group names within the OpenID Connect response that do not start with value will be treated as if they were not present in the response. Note: If a value for loginMethodConfigurations → commonSSOOptions → mandatoryGroupName has been set then the mandatory group name must have the required prefix value. See https://valsight.atlassian.net/wiki/spaces/RND/pages/4988010533 for further details on this setting. *Optional *Available since 5.9.1 *Removed and replaced by ‘loginMethodConfigurations → commonSSOOptions → requiredGroupNamePrefixes’ in version 6.0.0 for details see: https://valsight.atlassian.net/wiki/spaces/RND/pages/4988010533 | AcceptedGroup_ | n/a |
valsightOpenIdConnectProperties → userInfoEndpointScopes | Allows for the configuration of a list of scopes that are accessible only from the user info endpoint, not from the token. If you never want the user info endpoint to be invoked populate this list with none of the scopes listed in the ‘scope’ configuration key (see above). Setting this key to an empty list means the user info endpoint will always be invoked. *Available since 6.0.26 | Example Configuration
CODE
| profile, email, address, phone |
Then configure the OpenID Connection provider values as follows:
Configuration Key (….registration.openIdConnect →) | Description | Example Value | Default Value |
---|---|---|---|
issuer-uri | Identifier for the Issuer of the authorization response. | n/a | |
authorization-uri | The Authorization endpoint of the OpenID Connect flow | n/a | |
token-uri | The Token endpoint of the OpenID Connect flow | n/a | |
jwk-set-uri | The endpoint that contains certificates to verify the token | n/a |
Provider settings:
The OpenID Connect providers also have restrictions on which URLs are allowed to use the provider and where the provider is allowed to redirect to. The URL that the provider is redirecting to in our application is: <APPROOT>/v1/openIdConnect.
Logging:
For logging purpose, add in the log level view ( Configuration UI), the following package:
Logger: com.valsight.authentication.openidconnect
Logger: com.valsight.services.sso.SSOService (since 5.7.0)
Level: DEBUG