Control Center Config File
Configuring Secure Storage
For the purpose of this guide, a Simple vault type is used in our examples to securely store
database information. The Simple vault type makes use of the secrets.txt file mentioned later. The Simple vault type is not recommended for use in production.
- Open the cc-config.yaml file in a text editor. This file is normally found in the root directory of the AMT Java environment.
- find the secureStorages section.
- Add a configuration, for example - id: config1. Multiple configurations can be added and used simultaneously.
- Set the value of vaultType to the vault implementation of your choice (Azure, GCP, HashiCorp, or Custom).
- Set the value of vaultFilePath to the file location of the previously made Key Vault file, called secrets.txt.
- Continue to Defining the System Database.
Defining the System Database
The System Database needs to be defined using the cc-config.yaml file. By default, a PostgreSQL database is used, and this guide also assumes the use of a PostgreSQL database.
Extra information |
---|
Visit this page for documentation about all database settings available in the config file. |
A dollar sign $ is used to denote the use of a key stored in the Key Vault file. The values for these keys were defined on the previous page.
Follow the instructions below to add the System Database:
- Open the cc-config.yaml file in a text editor.
- Find the systemDatabase section.
- Configure the following database settings:
- The Name of the database. warning This value must be exactly the same as the name of the PostgreSQL database.
- The Schema name of the database.
- Enter the previously defined values of your choosing for the Username,
Password, and URL, prefixed by a dollar sign $. The values are:
$systemDatabaseUser
$systemDatabasePassword
$systemDatabaseURL
- Save the file.
An example of securely storing credentials:
cc-config.yaml | : username: $systemDatabaseUser |
secrets.txt | : systemDatabaseUser=bob |
secrets.txt (encrypted) | : systemDatabaseUser=Mhxv7HNUQpYejrsKiATZUrsb1GFWQbbizurfXe+nqAwnEXBQNw== |
This makes it possible for the Control Center to access the system database. To access the Control Center, authentication for the administrator needs to be configured in the cc-config.yaml file as well.
Access to the Control Center
Authentication
- Find the authentication section in the cc-config.yaml file.
- The server needs to be configured with the same ID used by the identity provider. Configure the following
settings:
- issuerURL: The URL of the OpenID Connect authentication provider.
- clientID: The ID used for authentication on the OIDC server.
authentication:
type: OIDC
settings:
issuerURL: https://login.microsoftonline.com/<Server ID Key>/v2.0
clientID: <Client ID Key>
- Save the file.
OpenID Connect Configuration
Configure the following settings for the client:
- Navigate to the following directory: ..\<AMT Environment>\Binaries\control-center\frontend\assets.
- Open the oidcconfig.json file in a text editor.
- Configure the following settings:
- "issuer": The URL of the OpenID Connect (OIDC) authentication provider.
- "clientId": The ID used for authentication on the OIDC server.
"AuthenticationConfig": {
"issuer": https://login.microsoftonline.com/<ID key>/v2.0,
"redirectUri": http://localhost:4200/control-center,
"clientId": "<ID key>",
"scope": "openid profile email offline_access",
"responseType": "code",
"claimUserName": "preferred_username",
"tokenRefreshTreshold": 15,
"loginButtonLogo": "assets/image/<image>.png"
}
- Save the file.