Skip to main content
Version: 5.0.1.0

Configuring OAuth authentication

Solution Hub has the possibility to use the OpenID protocol for the log in process. OpenID is an open, decentralized protocol for authentication on the internet, allowing users to sign in to multiple websites using a single identity. It leverages the concept of single sign-on, where a user gains access to multiple services after a single authentication. OpenID utilizes URLs as identifiers and enables users to verify their identity through OpenID providers. OpenID is an extension to the OAuth protocol and is used by Solution Hub. In the further Documentation the term OAuth will be used more often as it is the more common name and often used as synonym for OpenID.

Difference between OAuth and OpenID​

OAuth and OpenID are two distinct protocols commonly used together to enable authentication and authorization in web application. OAuth is an authorization protocol that allows an application to access resources on behalf of a user without needing to know the user's password. It facilitates secure and standardized authorization between different services.

On the other hand, OpenID is an authentication protocol that allows a user to sign in to a website or application using their existing credentials, without creating a new user account. It enables the use of a single identity (Single Sign-On) across different services. OAuth focuses on granting access to protected resources, while OpenID focuses on verifying the user's identity.

Together, OAuth and OpenID provide a comprehensive solution for both authorization and authentication, ensuring secure access to resources while simplifying the user experience across multiple services.

Configuration of the authentication mode​

The settings for this configuration can be found in the file config/environment_settings.xml within the group oauth

OAuth Attributes​

AttributeDescription
authflow.grantTypeThe Grant Type defines the actual OAuth flow.
PASSWORD (legacy): User enters credentials in Solution Hub, which are forwarded to the authorization server. Not recommended due to vulnerabilities.
AUTHORIZATION_CODE: Recommended. Redirects to Identity Provider for login. Authorization code is exchanged for JWT.
authflow.authenticationEndpointURL to an authentication endpoint of the identity provider. If empty, OAuth is disabled.
authflow.tokenEndpointURL to a token endpoint of the identity provider. If empty, OAuth is disabled.
authflow.logoutEndpointURL to log out from the identity provider.
authflow.userName.attributeAttribute that carries the username.
authflow.clientIDIdentifier of the client at the identity provider.
authflow.clientSecretSecret generated by the identity provider.
authflow.clientScopeLimits application's access to a user's account.
authflow.localRedirectUrlRedirect URL after successful authorization code flow.
authflow.additionalPropertiesComma-separated key-value pairs added to the auth server URL.
authflow.proxy.hostProxy host name. Empty value disables proxy mode.
authflow.proxy.portProxy port.
authflow.proxy.authTypeProxy authentication scheme.
authflow.proxy.userUsername for proxy auth.
authflow.proxy.passwordPassword for proxy auth.
authflow.http.connectTimeoutTimeout for connecting to remote peer.
authflow.http.readTimeoutTimeout for socket read operations.
authflow.http.ciphersCipher Suites for TLS (comma separated).
authflow.http.certificateX509-certificate in Base64 or file reference format file:/absolute-path.
authflow.http.checkValidityValidity check for certificate expiration.
authflow.http.checkCertChainVerifies certificate chain signatures.
authflow.http.checkSignersAgainstTrustStoreVerifies signer is in the trust store.
authflow.http.checkPeerAgainstTrustStoreVerifies remote peer certificate is in trust store.

Configuration for validation of a JWT token​

AttributeDescription
verify.plainAuthenticationServerUrlURL to the certificate endpoint of an identity provider. Used to obtain public key.
verify.keyIdentityProviderKey for JWT validation. Supports JWK, Base64 X509, public-keys, and file references.
verify.jwtKeyAlgorithmAlgorithm used for JWT token verification.
verify.http.connectTimeoutTimeout for connecting to remote peer.
verify.http.readTimeoutTimeout for socket read operations.
verify.http.ciphersCipher Suites for TLS (comma separated).
verify.http.certificateX509-certificate in Base64 or file reference format file:/absolute-path.
verify.http.checkValidityValidity check for certificate expiration.
verify.http.checkCertChainVerifies certificate chain signatures.
verify.http.checkSignersAgainstTrustStoreVerifies signer is in the trust store.
verify.http.checkPeerAgainstTrustStoreVerifies remote peer certificate is in trust store.

Solution Hub OAuth-Servlets​

In the OAuth authentication flow, the service represents the client and must provide two endpoints used to exchange information between the service and the identity provider. These URLs require proper IP configuration.

URLDescription
*/oauth/redirectSends the code request to the identity provider. Invoke this URL to begin authorization flow.
*/oauth/callbackCallback URL that receives the authorization code and requests the JWT.
info

* stands for the monitor URL, e.g., http://localhost:8090/monitor