Skip to main content

Configurations for RSA OIDC Adapter

RSA-OIDC Application Config

In the application Helm chart, the spec.values.application.config parameter is used to define the main elements for the RSA Admin API. Without clearly defining these parameters, the setup of the RSA Admin API will fail and limit the integration of the other parties with the RSA.

Below is a sample code block illustrating the common values defined in spec.values.application.config followed by tables that provide details and descriptions for each sub-parameter.

Note that the values shown for spring.datasource.username and spring.datasource.password are placeholders and should be replaced with credentials for the specific database used in your deployment.

Configuration Details

Configuration directives that are used for overall application configuration.

ParameterDescriptionSuggested ValueRequired
server.portApplication port to listen for client connections on.8080Yes
server.servlet.session.cookie.http-onlyWhether to use "HttpOnly" cookies for the cookie. Controls whether cookies issued by the server are accessible by scripts running on the user agent (browser). If this value is true, cookies are not accessible by scripts, and will only be used by the browser's HTTP routinesThis MUST be set to 'true' for security measures as it follows best practice principles.Yes
server.servlet.session.secureWhether to always mark the cookie as secure. This means the cookie will only be sent over HTTPS connectionsThis MUST be set to 'true' for security measures as it follows best practice principles.Yes

Logging

ParameterDescriptionSuggested ValueRequired
loggingSee https://docs.spring.io/spring-boot/docs/2.3.5.RELEASE/reference/html/spring-boot-features.html#boot-features-logging for logging customizations.No
logging.level.com.identosControls the level at which the application's configured loggers will be permitted to log.DEBUGNo. If not set, defaults to INFO level.
logging.configSets the configuration file for application logging. This value will output structured logs in compressed, single-line JSON format. To view the logs in a human-readable format (i.e. for development purposes), this value can be set to classpath:logback-dev.xmlclasspath:logback-spring.xmlNo. If not set, defaults to classpath:logback-spring.xml

OAuth2 Client Configuration

ParameterDescriptionSuggested ValueRequired
oauth2-config.client.auth_jwt_expiryThis is the client_assertion JWT expiry value in milliseconds. When generating a token request with private_key_jwt or client_secret_jwt authentication methods, a separate client_assertion JWT is needed to complete the token request. The expiry value defined here applies to this token and starts from the moment the token is created.6000 (default)No
oauth2-config.client.callback_endpointThe Callback URI is where the Federated Provider will redirect the flow after they authorize (or deny) the RSA, and therefore the part of the RSA that will handle authorization codes or access tokens./oidc/callback (default)No

OAuth2 Provider Configuration

ParameterDescriptionSuggested ValueRequired
oauth2-config.provider.issuerIssuer URL when acting as an OIDC providerThis should be the same as your server's ingress hostname. See ingress.host in the "Common Helm Chart Properties" section.Yes
oauth2-config.provider.registration_endpointPath to OIDC register endpoint./registerNo
oauth2-config.provider.authorize_endpointThe authorization endpoint is used to interact with the resource owner and get the authorization to access the protected resource. This endpoint is usually consumed by the Wallet in an FPX instance to enable users to kickstart creating a connection at the RSA/discover/authorizeNo
oauth2-config.provider.token_endpointThe token endpoint is used by the Wallet (an OIDC client) in order to get an access token or a refresh token. The access token contains details that denote who has authorized which permissions (scopes) to which application./discover/tokenNo
oauth2-config.provider.jwks_endpointThe endpoint where the RSA's JSON Web Key Set (JWKS) can be queried./jwksNo
oauth2-config.provider.introspection_endpointThe endpoint available for introspecting tokens generated by the RSA. Within the FPX ecosystem, the introspection_endpoint can be used if the Wallet Server introspects the access token received from the RSA when gaining access/connecting to the RSA./oauth2/introspectNo
oauth2-config.provider.user_info_issuerThis value should be set to the user-info issuer. In the RSA’s case, it is the same as the issuer_url.https://rsa-oidc.test.identos.caYes
oauth2-config.provider.userinfo_endpointA protected endpoint to retrieve the user info of the user who logged in to the RSA. This endpoint is used to retrieve the necessary user info requested by the Wallet Server. A Valid OAuth Access Token must be presented to the RSA before access can be gained to this endpoint./userinfoNo
oauth2-config.provider.fetch_and_attach_userinfoThis parameter is set when the RSA/implementer wants to include userInfo claims within the id_token that is generated.true (default)No
oauth2-config.provider.consent_endpointConsent endpoint enables the RSA to behave as an Authentication provider for the actual Resource Server it is abstracting in an FPX instance. In the case of OIDC, if the Resource Server is an OIDC provider, consent endpoint will not be used as OIDC would be federated over to the server itself./discover/consentNo
oauth2-config.provider.consent_view_pageThe name of the Thymeleaf HTML template page to display during the Consent flow. This page is where the explicit consent claims are requested, and prompts the user whether they would like to proceed with this information transfer.oidc_authorizeNo
oauth2-config.provider.custom_grant_typesThis value should be added when the RSA-OIDC needs to accommodate new grantTypes that are not in the default grantType. The application handles this and adds it to the existing default grant types.No (required if you need to specify custom grant types)

FPX Resource Management Properties

The following parameters are required to enable delegation of resources.

ParameterDescriptionSuggested ValueRequired
fpx.resourcemanagement.enabledWhether the Resource Management API is enabled.falseYes
fpx.resourcemanagement.userInfoUrlThe path for which the related field should be added to its response as an additional claim. This should be a userinfo response's path on the RSA./userinfoNo (required only when Resource Management API is enabled)
fpx.resourcemanagement.scopeThe scope which is required on the user's access token in order to acquire FPX resources, including the related field mentioned above.fpx_rotNo (required only when Resource Management API is enabled)
fpx.resourcemanagement.include_owned_resourcesThis parameter, when set to true, the /resources endpoint will also include entries for resources in the fpx_resource table owned by the user calling the endpoint.trueNo

FPX OIDC Provider Properties

ParameterDescriptionSuggested ValueRequired
fpx.oidc.client.pkce.enforcedWhether to enforce the use of proof key for code exchange in requests between the RSA and clients.false (default)No
fpx.oidc.provider.self-hosted.enabledA boolean value to enable/disable self-hosting of authentication and consent when managing a data-source connection. This should be set to false when OIDC is federated to the real Resource Server that the RSA is adapting.falseYes
fpx.oidc.provider.federated.enabledA boolean value to enable/disable federated OIDC. Used when the authentication and and consent handling is handled by the real Resource Server that the RSA is adapting.trueYes
fpx.oidc.provider.federated.client_idThe Client ID used by the RSA for the federated OIDC provider of the RSA (which behaves as a OAuth Client)identos-qaYes
fpx.oidc.provider.federated.federated_issuerThe base URL of the Federated OIDC provider.{OIDC Provider URL}Yes
fpx.oidc.provider.federated.useDownstreamTokenDetermines whether the RSA generated token or the RSA-stored token (the token the RSA received from the Federated Provider) should be used. When OIDC federation is enabled, this value will be set to true.trueYes
fpx.oidc.provider.pkce.enforcedWhether to enforce the use of proof key for code exchange in requests between the RSA and providers.falseYes
fpx.oidc.provider.JWT-token.enabledThis value determines if generated access tokens are JWTs or opaque strings. If set to true, then a JWT is generated. If set to false, an opaque token is generated.false (default)No

RSA Token Expiry Defaults

ParameterDescriptionSuggested ValueRequired
default.expiry-duration-params.accessTokenLifetimeSecondsAccess token expiry in seconds.600 (default)No
default.expiry-duration-params.refreshTokenLifetimeSecondsRefresh token expiry in seconds.3600 (default)No
default.expiry-duration-params.authorizationCodeLifeTimeInSecondsAuthorization Code expiry in seconds.600 (default)No

FPX Resource Owner Token Properties

ParameterDescriptionSuggested ValueRequired
rot.endpointThe endpoint where the Wallet will negotiate a Resource Server Token which essentially represents user permissions at the RSA. In other words, Resource Owners may delegate the ability to grant access to their resources to other entities (in this case, the RSA)/discover/completeYes
rot.rot_lengthThis determines the length of the Resource Owner Token.20Yes
rot.length15Yes
rot.hmac-jwt.numberOfPseudonymsDenotes the number of representation the RSA may provide to the Wallet to enable the Wallet to re-use the ROT. Applies only for the HMAC-JWT strategy.10
rot.implementation-strategyThe strategy that will be used to generate the ROT. Currently, only 'HMAC-JWT' and 'simple' are supported.HMAC-JWTYes
rot.hmac-jwt.expiryDurationInSecondsThe expiry duration of the HMAC-JWT Resource Owner Token, in seconds. Only applicable when HMAC-JWT is selected as the rot.implementation.strategy.1800Yes

Zuul Properties

Properties for configuration of the Zuul API Gateway framework.

ParameterDescriptionSuggested ValueRequired
zuul.routesTo forward requests from the RSA that behaves as a Gateway application abstracting the real RS, you need to tell Zuul the routes that it should watch and the services where it should forward requests that are made to those routes. We specify routes by setting properties under zuul.routesYes
zuul.routes.userinfo"userinfo" is an identifier for a Zuul route that we define. The value of this identifier is arbitrary, but should represent the resource or resource server that the route corresponds to. Several sub-properties must be provided beneath each route defined this way.Yes
zuul.routes.userinfo.pathThe path prefix that Zuul looks for in order to identify which requests arriving at the RSA shall be forwarded along this route/api/**Yes
zuul.routes.userinfo.urlThe location where Zuul will forward all requests that match the criteria set by "zuul.routes.userinfo.path", above.{OIDC Issuer URL}Yes
zuul.routes.userinfo.stripPrefixWhether to strip the prefix defined by "zuul.route.userinfo.path" before forwarding the requesttrueYes
zuul.routes.userinfo.sensitiveHeadersDefines which headers of the request should be deemed sensitive, and therefore should not be included in the forwarded request.Cookie,Set-CookieYes

User Restriction API Properties

ParameterDescriptionSuggested ValueRequired
userrestriction.birthdate.maximumAgeWhen birthdate is to be used as a restriction parameter, this defines the maximum age for the restriction to be appliedmaximumAgeNo
userrestriction.birthdate.maximumAgeWhen birthdate is to be used as a restriction parameter, this defines the minimum age for the restriction to be appliedminimumAgeNo
userrestriction.birthdate.afterafterNo
userrestriction.birthdate.beforebeforeNo
userrestriction.birthdate.equalequalNo
userrestriction.birthdate.typejava.util.DateNo
userrestriction.birthdate.dateCheckErrorMessageA string corresponding to a message variable to display when this restriction is not metage_requirement_not_metNo
modelViewName.dateRestrictionPageThe name of the Thymeleaf HTML template page to display when the requirements of a user restriction are not met.account-requirement-not-metNo

Spring Framework Properties

ParameterDescriptionSuggested ValueRequired
spring.thymeleaf.prefixLocation of template files for Wallet selection and error pages. Can use external sources such as https://classpath:./templates/Yes
spring.web.resources.static-locationsLocation of static files such as css/html/javascript for template files.classpath:./static/Yes
spring.main.allow-bean-definition-overridingWhether the Spring Framework allows existing Bean definitions to be overriden by new Beans with the same nametrueYes
spring.output.ansi.enabledWhether console output will be rendered in colour. This only applies if logging.config is set to classpath:logback-dev.xml. The default compressed JSON output is not coloured.ALWAYSNo

Database Configuration

ParameterDescriptionSuggested ValueRequired
spring.flyway.enabledEnable or disable automatic Flyway migrations.trueYes
spring.flyway.locationsLocation for DB migration scripts.classpath:db/migrationYes
spring.datasource.driverClassNameDriver to use for DB connections (only MySQL supported).com.mysql.cj.jdbc.DriverYes
spring.datasource.urlConnection string to use for DB connections.jdbc:mysql://database-host-domain/rsa_oidcYes
spring.datasource.usernameUsername for database connection.usernameYes
spring.datasource.passwordPassword for database connection.passwordYes
spring.jpa.hibernate.ddl-autoThere are two options to manage the underlying database schema when working with JPA and Hibernate (leveraged by all backend IDENTOS components):
1) You can encapsulate schema changes in migration scripts and use a tool, like Flyway, to apply the migration scripts upon starting the application. This is the method we will use to generate and update the schema for the RSA and the RSA Admin API.
2) You can generate or update the database schema from the JPA and Hibernate entity mappings (extrapolate the domain classes/entity mappings of the deployed server and auto generate the database schema). We will not use this method to generate the schema for any of the components. This is why the value for this field should be set to "validate" as this option instructs Hibernate to ONLY validate the underlying database schema against the entity mappings.
validateYes
spring.jpa.hibernate.naming.physical-strategyDefines how Java objects map to a database table. Refer to Sprint Boot documentation for more details.org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
Note: Identos recommends the usage of this default value. Avoid making changes to this parameter unless absolutely necessary.

"App" parameters

These allow customization of the error page displayed when the RSA encounters certain exceptions in its role as an OAuth client. Currently, only the error page uses these parameters but other pages rendered by the RSA may also make use of them.

ParameterDescriptionSuggested ValueRequired
app.nameThe name for the application, displayed in the error page headerIdentosYes
app.image_directoryThe directory where image resources are located within the /resources/static directory/images/Yes
app.logo.nameThe filename of the image to be used as the application logoidentos.pngYes

Sample Configuration file

server.port: 8080
server.servlet.session.cookie.http-only: true
server.servlet.session.cookie.secure: false

logging:
level:
com.identos: DEBUG
org.springframework.web: DEBUG
org.hibernate.SQL: DEBUG
org.springframework.context.support.PostProcessorRegistrationDelegate: OFF
config: classpath:logback-spring.xml

oauth2-config:
client:
auth_jwt_expiry: 6000
callback_endpoint: /oidc/callback
provider:
issuer: http://localhost:8086
registration_endpoint: /register
authorize_endpoint: /discover/authorize
token_endpoint: /discover/token
jwks_endpoint: /jwks
introspection_endpoint: /oauth2/introspect
user_info_issuer: http://localhost:8086
userinfo_endpoint: /userinfo
fetch_and_attach_userinfo: true
consent_endpoint: /discover/consent
consent_view_page: oidc_authorize
custom_grant_types:
- test
- test 2
fpx:
resourcemanagement:
enabled: false
userinfoUrl: /userinfo
scope: fpx_rot
include_owned_resources: true
oidc:
client:
pkce:
enforced:false
provider:
self-hosted:
enabled: false
federated:
enabled: true
client_id: identos-qa
federated_issuer: {OIDC Provider URL}
useDownstreamToken: true
pkce:
enforced: false
JWT-token:
enabled: true
default:
expiry-duration-params:
accessTokenLifetimeSeconds: 600 #will set access token to 10 mins
refreshTokenLifetimeSeconds: 3600 #will set refresh token to 1hr
authorizationCodeLifeTimeInSeconds: 600 #will set auth code to 10 mins

fpx.oauth.uma.introspection.introspect_locally: false

rot:
endpoint: /discover/complete
rot_length: 20
length: 15
implementation-strategy: HMAC-JWT
hmac-jwt:
expiryDurationInSeconds: 1800
numberOfPseudonyms: 10

zuul:
routes:
userinfo:
path: /api/**
url: {OIDC Issuer URL}
stripPrefix: true
sensitiveHeaders: Cookie,Set-Cookie

userrestriction:
birthdate:
maximumAge: maximumAge
minimumAge: minimumAge
after: after
before: before
equal: equal
type: java.util.Date
dateCheckErrorMessage: age_requirement_not_met

modelViewName:
dateRestrictionPage: account-requirement-not-met

spring:
output.ansi.enabled: ALWAYS
thymeleaf:
cache: false
prefix: classpath:./templates/
web:
resources:
static-locations: classpath:./static/
main:
allow-bean-definition-overriding: true
datasource:
driverName: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://database-host-domain:3306/rsa_oidc?useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC
username: {{DATABASE_USERNAME}}
password: {{DATABASE_PASSWORD}}
flyway:
enabled: true
locations: classpath:db/migration
repairMigrationStrategy:
enabled: true
baseline-on-migrate: true
jpa:
hibernate:
dialect: org.hibernate.dialect.MySQL5InnoDBDialect
ddl-auto: validate
naming.physical-strategy: org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl

app:
name: Identos
image_directory: /images/
logo:
name: identos.png

RSA-OIDC Admin API Application Config

The spec.values.application.config parameter contains multiple sub-parameters that are essential for the proper configuration and setup of the RSA. Below are tables that provide details and descriptions for each sub-parameter followed by a sample code block illustrating the common values defined in spec.values.application.config

Configuration Details

Spring Actuator Configuration

Make the following configurations to enable Spring Actuator and monitor the health of the Resource Server Adapter.

ParameterDescriptionSuggested ValueRequired
management.endpoint.health.livenessState.enabledThis parameter configures whether the liveness state health check is enabled or not.trueNo
management.endpoint.health.readinessState.enabledThis parameter configures whether the readiness state health check is enabled or not.trueNo
management.endpoint.health.probes.enabledThis parameter configures whether the liveness and readiness probes are enabled or disabled. The value should be in Boolean, which means when the value is set to "true", the health probes will be enabled. This parameter is inter-related to the management.endpoint.health.livenessState.enabled and management.endpoint.health.readinessState.enabled parameters described above which means that the value of one of these parameters along with the value of management.endpoint.health.probes.enabled must be set to true for the functionality to work.trueNo
endpoints.web.exposure.includeThere are various actuator endpoints that allow us to monitor and interact with the application. Each endpoint can be enabled and disabled individually. This parameter allows us to configure the specific actuator endpoint that we need enabled. In this case, the "health" endpoint is being enabled to get information on the health of the application.healthNo

Logging and Response Output

These settings control what should be logged and at what level of detail, as well as the information returned in RSA-OIDC Admin API error responses. Because this is an Admin API, we are not concerned with stack traces and application internals being returned in responses. Therefore, these can be left as default for the majority of use cases.

ParameterDescriptionSuggested ValueRequired
server.error.include-binding-errorsThe server will not be prevented from including binding errors in error response payloads.ALWAYSNo
server.error.include-exceptionThe server will not be prevented from including exceptions in error response payloads.trueNo
server.error.include-messageThe server will not be prevented from including messages in error response payloads.ALWAYSNo
server.error.include-stacktraceThe server will not be prevented from including stack traces in error response payloads.ALWAYSNo
logging.level.com.identos.rsadapteroidc.adminControls the level at which the RSA-OIDC Admin API logs will be output.DEBUGNo
logging.level.com.identos.rsatemplate.adminControls the level at which the underlying RSA Admin API library logs will be output.DEBUGNo
logging.level.org.springframework.webControls the level at which the Spring framework Web logs will be output.DEBUGNo
logging.level.org.hibernate.SQLControls the level at which the Hibernate framework SQL logs will be output.DEBUGNo
logging.level.org.hibernate.typeControls the level at which the Hibernate framework SQL binding type logs will be output.DEBUGNo
spring.jpa.properties.hibernate.format_sqlThis will format the SQL that is output to the logs to make it more readable.trueNo
spring.output.ansi.enabledEnables coloured log output when viewed with a terminaltrueNo

Authentication Token Configuration

ParameterDescriptionSuggested ValueRequired
rsa-admin.staticTokensDefines an array of values for static authorization tokens. The RSA Admin API will expect one of these values to be included as an Authorization header on all requests.a UUIDYes

Database Configuration

NOTE: These values should match the values defined for the RSA-OIDC Application Config in the previous section.

ParameterDescriptionSuggested ValueRequired
spring.datasource.driver-class-nameMySQL Driver name.com.mysql.cj.jdbc.DriverYes
spring.datasource.urlDriver to use for DB connections.jdbc:mysql://dbhost/dbname?createDatabaseIfNotExist=trueYes
spring.datasource.usernameUsername for database connection.dbusernameYes
spring.datasource.passwordPassword for database connection.dbpasswordYes
spring.jpa.generate-ddlWhether Hibernate is responsible for generating the database schemafalseYes
spring.jpa.hibernate.ddl-autoThere are two options to manage the underlying database schema when working with JPA and Hibernate (leveraged by all backend IDENTOS components):
1) You can encapsulate schema changes in migration scripts and use a tool, like Flyway, to apply the migration scripts upon starting the application. This is the method we will use to generate and update the schema for the authorization server and the Admin Server.
2) You can generate or update the database schema from the JPA and Hibernate entity mappings (extrapolate the domain classes/entity mappings of the deployed server and auto generate the database schema). We will not use this method to generate the schema for any of the components. This is why the value for this field should be set to "validate" as this option instructs Hibernate to ONLY validate the underlying database schema against the entity mappings.
validateYes

Sample Configuration File

In the application Helm chart, the spec.values.application.config parameter is used to define the main elements for the RSA Admin API. Without clearly defining these parameters, the setup of the RSA Admin API will fail and limit the integration of the other parties with the RSA.

Below is a sample code block illustrating the common values defined in spec.values.application.config followed by tables that provide details and descriptions for each sub-parameter. The most important configuration is to ensure that the RSA Admin API database section points to the same database as the RSA itself.

Note that the values shown for spring.datasource.username and spring.datasource.password are placeholders and should be replaced with credentials for the specific database used in your deployment.

server.port: 8080
server.error.include-binding-errors: ALWAYS
server.error.include-exception: true
server.error.include-message: ALWAYS
server.error.include-stacktrace: ALWAYS

management:
endpoint:
health:
livenessState.enabled: true
readinessState.enabled: true
probes:
enabled: true
endpoints:
web:
exposure:
include: "health"

logging:
level:
com.identos.rsadapteroidc.admin: DEBUG
com.identos.rsatemplate.admin: DEBUG
org.springframework.web: DEBUG
org.hibernate.SQL: DEBUG
org.hibernate.type: DEBUG

spring.jpa.properties.hibernate.format_sql: true

rsa-admin:
staticTokens:
- {{RSA_ADMIN_STATIC_TOKEN}}
- {{ANOTHER_RSA_ADMIN_STATIC_TOKEN}}

spring:
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://database-host-domain:3306/rsa_oidc?useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC
username: {{DATABASE_USERNAME}}
password: {{DATABASE_PASSWORD}}
output.ansi.enabled: ALWAYS
jpa:
generate-ddl: false
hibernate:
ddl-auto: validate
naming.physical-strategy: org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl

elide:
pageSize: 1000
maxPageSize: 10000
json-api:
path: /json-api
enabled: true
graphql:
path: /graphql
enabled: false
swagger:
path: /json-api/openapi
enabled: true
name: "RSA OIDC Admin API"
version: "v1.0"

JSON API Configuration

The parameters under the elide section are used to expose JSON APIs and configure their URL paths. IDENTOS recommends that these be left at the default values. For more information, refer to Elide Setup.