The most recent patch for this version is 2.2.3.  Learn more  

Skip to main content
Version: 2.2

Additional authentication properties

To secure communications and manage access permissions, the Access Decision Service (ADS) offers a mechanism for authenticating with the Axiomatics Services Manager (ASM) or any other authorization server. This authentication process involves sending client credentials to request a domain configuration file from an authorization server.

Authentication using an authorization server

To configure ADS to use an authorization server for authentication, you need to define specific properties for domain retrieval under the domain section of the deployment.yaml file.

Configure ADS for domain retrieval

Locate the domain section in the deployment.yaml file and add the following properties to configure ADS for domain retrieval:

PropertiesDescription
authenticationThis sub-section defines the authentication method that will be used for retrieving the domain.
├─ usernameUsername for Basic authentication when retrieving the domain. Only use this if oauth2ClientId is not set.
├─ passwordPassword associated with the username for Basic Authentication. Only use this if oauth2ClientId is not set.
├─ oauth2ClientIdOAuth2 Client ID for OAuth2-based authentication. Only use this if username/password is not set.
└─ tlsConfigurationIdSpecifies the TLS configuration ID to be used for secure connections, referring to a tlsConfigurationId.
note

Only one of username/password or oauth2ClientId should be set in the authentication section.

Example Configuration

domain:
path: https://remote-endpoint.com/domain
refreshInterval: 10 seconds
reportNotReadyOnDomainRefreshError: true
authentication:
username: ${DOMAIN_USER} # Set this if using Basic Authentication
password: ${DOMAIN_PASSWORD} # Set this if using Basic Authentication
oauth2ClientId: hub-adm-client # Set this if using OAuth2
tlsConfigurationId: admBundle # Refers to the TLS configuration (see TLS section)

Retrieve a domain using a remote HTTP/HTTPS endpoint

ADS can retrieve an authorization domain from a remote HTTP/HTTPS endpoint using one of the following authentication methods.

*:first-child]:mt-0>

Retrieve a domain using Basic authentication

To retrieve a domain using basic authentication, enter a value in the username and password properties under domain.authentication in your deployment.yaml file as shown in the sample above.

*:first-child]:mt-0 hidden>

Retrieve a domain using OAuth2 authentication

To retrieve a domain using OAuth2 authentication, add the following properties under spring.security.oauth2.client in your deployment.yaml file.

info

For more information on Spring Security with OAuth2 refer to Spring documentationOpens in a new tab.

PropertiesDescription
registrationContains settings for the OAuth2 client registration under a specific client (e.g., hub-adm-client). This defines how the client interacts with the authorization server to request tokens.
└─hub-adm-clientConfiguration settings for the OAuth2 client registration under hub-adm-client. These settings define how the application authenticates with the authorization server and requests tokens.
├─client-idSpecifies the client identifier, uniquely identifying the client registered with the authorization server (e.g., ads).
├─client-secretThe secret key used in conjunction with the client-id for authenticatIning the client to the authorization server. It is highly recommended to use a secure, unique value.
├─scopeDefines the scope of access requested by the client. In this example, it is set to openid, specifying OpenID Connect authentication.
├─authorization-grant-typeIndicates the grant type used for authentication. Here, client_credentials is specified, where the client itself, rather than a user, requests access.
└─providerPoints to the provider configuration (e.g., hub-adm-client) that supplies the endpoint details needed for authentication.
providerDefines the provider settings.
└─ hub-adm-clientDefines the URL endpoints for token retrieval.
└─token-uriThe URI to the token endpoint for retrieving access tokens. In this case, it is https://test.axiomatics.dev/auth/realms/asm/protocol/openid-connect/token, which the client uses to obtain tokens.
note

Before adding these properties to the deployment configuration file, ensure they are properly set up in the authorization server.

warning

Axiomatics recommends using environmental variables to protect sensitive information, such as clientSecret. This approach minimizes the risk of exposing critical data in configuration files.

spring:
security:
oauth2:
client:
registration:
hub-adm-client:
client-id: ads
client-secret: {SECRET}
scope: openid
authorization-grant-type: client_credentials
provider: hub-adm-client
provider:
hub-adm-client:
token-uri: https://<hostname>/auth/realms/asm/protocol/openid-connect/token

Authorization server configuration using environment variables

TLS options

To enhance the security of your ADS configuration when communicating with any authorization server, you can incorporate Transport Layer Security (TLS). Add, the following properties under spring.ssl.bundle.jks in your deployment.yaml file.

note

ADS can be configured with either basic TLS with KeyStore for client authentication or TLS with client certificates.

PropertiesDescription
admBundleConfiguration settings for TLS, where the tlsConfigurationId is set to admBundle and provides secure connection settings including keystore and truststore configurations.
├─keystore.locationSpecifies the file system path to the keystore file containing the server’s private key and certificate, required for TLS connections (e.g., file:server_keystore.p12).
├─keystore.passwordThe password used to access the keystore. It is recommended to change the default with a secure password.
└─keystore.typeSpecifies the format or type of the keystore, for example, PKCS12.
├─truststore.locationSpecifies the path to the truststore file containing trusted certificates required for TLS.
├─truststore.passwordThe password used to access the truststore. It is recommended to change the default with a secure password.
└─truststore.typeSpecifies the format or type of the truststore, for example, PKCS12.

Example:

spring:
ssl:
bundle:
jks:
admBundle:
keystore:
location: "file:server_keystore.p12"
password: {KEYSTORE_PASSWORD}
type: "PKCS12"
truststore:
location: "file:server_truststore.p12"
password: {TRUSTSTORE_PASSWORD}
type: "PKCS12"

Authorization server configuration using TLS with client certificate