OpenID Connect
Introduction
Before configuring OpenID Connect, you must have a user created in Any whose identity matches the one returned by your identity provider (most often the email address). If no user matches, the connection is refused. Those users can be redirected to a page of your choosing (see identity mapping below).
Configuration
Any ships with a preconfigured OpenID Connect configuration file named "shiro-oidc.ini". To use it, just rename it to "shiro.ini".
Below is the part to change in the "shiro.ini" file to configure your OpenID Connect connection.
oidcConfig.clientId = <client_id>
oidcConfig.secret = <client_secret>
oidcConfig.discoveryURI = https://login.microsoftonline.com/<tenant_id>/v2.0/.well-known/openid-configuration
oidcConfig.scope = openid email profile
clients.callbackUrl = <url de any>/callback
clientId: identifier of the application declared with your identity provider.
secret: client secret generated by your identity provider for this application. To encrypt this value, see generating encrypted passwords.
discoveryURI: discovery URL of the identity provider, which exposes the endpoints and the keys of the protocol. The example above matches Microsoft Entra ID, where <tenant_id> stands for your directory.
scope: list of the requested scopes, separated by spaces. The openid scope is mandatory, email and profile supply the attributes used to identify the user in Any.
Callback URL
The URL the identity provider sends the browser back to after authentication. It must be declared identically in the application created with your identity provider.
clients.callbackUrl = <url de any>/callback
Identity mapping
These entries determine which attribute of the profile returned by the identity provider is used to find the user in Any.
c6SsoAuthorizer.identityAttribute = email
# Identity type : login | username | email
c6SsoAuthorizer.identityType = email
# If the user does not exist in Any, it is redirected to the following page
# c6SsoAuthorizer.redirectionUrl = https://<server>?user=${user}&message=${message}
identityAttribute: name of the attribute to read in the profile returned by the identity provider. When it is left empty, the identifier of the profile is used.
identityType: field of the Any user the value is compared to, among login, username and email.
redirectionUrl: page the user is redirected to when their account cannot be found, is disabled or has expired. The ${user} and ${message} tokens are replaced with the identity presented and the reason for the refusal. This entry is commented out by default, in which case the user stays on an error page.