AMT Help Files

Application Config File

Configuring Secure Storage

For the purpose of this guide, a Simple vault type is used to securely store database information.

  1. Open the app-config.yaml file in a text editor. This file is normally found in the root directory of the AMT Java environment.
  2. find the secureStorage section.
  3. Configure the following Secure Storage settings:
    1. Set the value of vaultType to Simple.
    2. Set the value of vaultFilePath to the file location of the previously made Key Vault file, called secrets.txt.
  4. Continue to Defining the Application Database.

Defining an Application Database

The Application Database needs to be defined using the app-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 previously.

Follow the instructions below to add the Application Database:

  1. Open the app-config.yaml file in a text editor.
  2. Find the applicationDatabase section.
  3. Configure the following database settings:
    1. The Name of the database. warning This value must be exactly the same as the name of the PostgreSQL database.
    2. The Schema name of the database.
    3. Enter the previously defined values of your choosing for the Username, Password, and URL, prefixed by a dollar sign $. The values are:
      $applicationDatabaseUser
      $applicationDatabasePassword
      $applicationDatabaseURL
  4. Save the file.

An example of securely storing credentials:

app-config.yaml : username: $applicationDatabaseUser
secrets.txt : applicationDatabaseUser=tom
secrets.txt (encrypted) : applicationDatabaseUser=VNTyz/GCytvX0sm/gGnaq6DuTk8ZHkOPjey2PyNQtN7OanuXEg==

This makes it possible for the application to access the application database. To access the Application, authentication for the administrator needs to be configured in the app-config.yaml file as well.

Access to Applications

The Control Center's configuration file must contain connection information to all applications available in the environment.

Configure the application server connection settings:

  1. Find the applications section in the Control Center's cc-config.yaml file.
  2. Add the name of the application under the applications section. warning The name of the application must equal the value of applicationName found in the Application's app-config.yaml file.
  3. Add the server name of the application as the host value.
  4. Add the port of the application as the gRPCPort value. warning The port of the application must be equal to the value of gRPCPort found in the Application's app-config.yaml file.
    applications:
      <application name>:
        host: <server>
        gRPCPort: <port>
  5.  Multiple applications can be added by making another entry with the application's name with host and gRPCPort values.
  6. Save the file.

Authentication

 This information is incomplete.

  1. Find the authentication section in the app-config.yaml file.
  2. The server needs to be configured with the same ID used by the identity provider. Configure the following settings:
      authentication:
        type: OIDC
        settings:
          issuerURL: https://login.microsoftonline.com/<Server ID Key>/v2.0
          clientID: <Client ID Key>
  3. Save the file.

The clientid needs to be provided with an ID used to authenticate and successfully access the server.

Configure the following settings for the client:

  1. Open the configuration.json file in a text editor.
  2. Configure the following settings:
      "AuthenticationConfig": {
        "issuer": https://login.microsoftonline.com/<ID key>/v2.0,
        "redirectUri": http://localhost:4200/,
        "clientId": "<ID key>",
        "scope": "openid profile email offline_access",
        "responseType": "code",
        "claimUserName": "preferred_username"
      }
  3. Save the file.