Wallet Admin API Application Config
The configuration details required under the walletapi.application.config parameter are as follows. 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.wallet.admin: DEBUG
org.springframework.web: DEBUG
org.hibernate.SQL: DEBUG
org.hibernate.type: TRACE
spring.jpa.properties.hibernate.format_sql: true
wallet-admin:
staticTokens:
- {{WS_ADMIN_STATIC_TOKEN}}
- {{ANOTHER_WS_ADMIN_STATIC_TOKEN}}
spring:
output.ansi.enabled: ALWAYS
jpa:
generate-ddl: false
hibernate:
ddl-auto: validate
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://localhost/wallet_admin?useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC
username: {{DATABASE_USERNAME}}
password: {{DATABASE_PASSWORD}}
elide:
modelPackage: 'com.identos.wallet.admin.entity'
pageSize: 1000
maxPageSize: 10000
json-api:
path: /json-api
enabled: true
graphql:
path: /graphql
enabled: false
swagger:
path: /json-api/openapi
enabled: true
name: 'Wallet Admin API'
version: "v1.0"
Spring Actuator Configuration
Make the following configurations to enable Spring Actuator and monitor the health of the Wallet Server.
| Parameter | Description | Suggested Value | Required |
|---|---|---|---|
| management.endpoint.health.livenessState.enabled | This parameter configures whether the liveness state health check is enabled or not. | true | No |
| management.endpoint.health.readinessState.enabled | This parameter configures whether the readiness state health check is enabled or not. | true | No |
| management.endpoint.health.probes.enabled | This 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. | true | No |
| endpoints.web.exposure.include | There 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. | health | No |
Logging and Response Output
These settings control what should be logged and at what level of detail, as well as the information returned in Wallet 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.
| Parameter | Description | Suggested Value | Required |
|---|---|---|---|
| server.error.include-binding-errors | The server will not be prevented from including binding errors in error response payloads | ALWAYS | No |
| server.error.include-exception | The server will not be prevented from including exceptions in error response payloads | true | No |
| server.error.include-message | The server will not be prevented from including messages in error response payloads | ALWAYS | No |
| server.error.include-stacktrace | The server will not be prevented from including stack traces in error response payloads | ALWAYS | No |
| logging.level.com.identos.wallet.admin | Controls the level at which the Wallet Admin API logs will be output | DEBUG | No |
| logging.level.org.springframework.web | Controls the level at which the Spring framework Web logs will be output | DEBUG | No |
| logging.level.org.hibernate.SQL | Controls the level at which the Hibernate framework SQL logs will be output | DEBUG | No |
| logging.level.org.hibernate.type | Controls the level at which the Hibernate framework SQL binding type logs will be output | DEBUG | No |
| spring.jpa.properties.hibernate.format_sql | This will format the SQL that is output to the logs to make it more readable | true | No |
Authentication Token Configuration
| Parameter | Description | Suggested Value | Required |
|---|---|---|---|
| wallet-admin.staticTokens | Defines an array of values for static authorization tokens. The Wallet Admin API will expect one of these values to be included as an Authorization header on all requests. | a UUID | Yes |
Database Configuration
NOTE: These values should match the values defined for the Wallet Server parameters in the previous section.
| Parameter | Description | Suggested Value | Required |
|---|---|---|---|
| spring.datasource.driver-class-name | MySQL Driver name. | com.mysql.cj.jdbc.Driver | Yes |
| spring.datasource.url | Driver to use for DB connections. | jdbc:mysql://dbhost/dbname | Yes |
| spring.datasource.username | Username for database connection. | dbusername | Yes |
| spring.datasource.password | Password for database connection. | dbpassword | Yes |
| spring.jpa.generate-ddl | Whether Hibernate is responsible for generating the database schema | false | Yes |
| spring.jpa.hibernate.ddl-auto | There 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) using the ddl.auto tool. 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. | validate | Yes |
| spring.output.ansi.enabled | Enables coloured log output when viewed with a terminal | true | No |
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.