Define the Startup Configuration

This document explains how to define the Semarchy xDM startup configuration.

Introduction

The Startup Configuration is the bootstrap configuration required for Semarchy xDM to start. It includes:

  • The Setup Token, that is required for the first login.

  • The Repository Datasources configuration, required for Semarchy xDM to access the repository database.

Startup Configuration Contents

Setup Token

The Setup Token is a value required the first time you connect to Semarchy xDM to create or upgrade the repository. This token is used as an authentication method to let you configure the administrator login and password.

The Setup Token must be defined as a SEMARCHY_SETUP_TOKEN System Environment Variable.

After the initial installation or upgrade, the setup token is no longer used and can be removed from the configuration

Repository Connections

The repository requires two connections:

  • The Repository Datasource, with credentials allowing to read from and write into the repository schema.

  • The Repository Read-Only Datasource, with credentials allowing to read a subset of the tables stored in the repository schema. This datasource is used mainly by xDM Discovery to browse the profiles.

Repository connections are set using the following Startup Configuration Methods:

The properties used to configure these datasources are listed in the Startup Configuration Reference

The startup configuration may also include the secrets management configuration for:

  • Multiple Key Management Services (KMS) to encrypt secrets stored in the repository, with one of them set as the Current KMS.

  • Multiple Secrets Managers to access secrets (passwords, keys, etc) stored in external secrets managers such as AWS Secrets Manager, Azure Key Vault, or Google Cloud Secret Manager.

Define Startup Configuration using Environment Variables

This section explains how to quickly create a simple startup configuration using system environment variables. For simplicity, the examples below are made for Windows instances running Tomcat as a service.

To create a startup configuration:

  • Copy the sample corresponding to your database technology below.

  • Adapt the variable values to your configuration, using the database name, user names, and passwords that you entered when configuring the database schemas.

  • Execute the commands with a command prompt on the application server.

System environment variables can be set using the Windows Control Panel if you prefer a graphical interface.

In the following examples the instruction SET can be replaced by SETX if you want to set the Environment variables permanently.

Startup Configuration for PostgreSQL

Example 1. Sample configuration for a PostgreSQL repository (Windows).
rem Repository datasource
set XDM_REPOSITORY_DRIVER=org.postgresql.Driver
set XDM_REPOSITORY_URL=jdbc:postgresql://localhost:5432/postgres
set XDM_REPOSITORY_USERNAME=repository_user
set XDM_REPOSITORY_PASSWORD=repository_password
rem Repository read-only datasource credentials
set XDM_REPOSITORY_READONLY_USERNAME=repository_readonly_user
set XDM_REPOSITORY_READONLY_PASSWORD=repository_readonly_password
rem Setup Token
set SEMARCHY_SETUP_TOKEN=mySecretValue

Startup Configuration for SQL Server

Example 2. Sample configuration for a SQL Server repository (Windows).
rem Repository datasource
set XDM_REPOSITORY_DRIVER=com.microsoft.sqlserver.jdbc.SQLServerDriver
set XDM_REPOSITORY_URL=jdbc:sqlserver://localhost:1433;databaseName=REPOSITORY
set XDM_REPOSITORY_USERNAME=repository_user
set XDM_REPOSITORY_PASSWORD=repository_password
rem Repository read-only datasource credentials
set XDM_REPOSITORY_READONLY_USERNAME=repository_readonly_user
set XDM_REPOSITORY_READONLY_PASSWORD=repository_readonly_password
rem Setup Token
set SEMARCHY_SETUP_TOKEN=mySecretValue

Startup Configuration for Oracle

Example 3. Sample configuration for an Oracle repository (Windows).
rem Repository datasource
set XDM_REPOSITORY_DRIVER=oracle.jdbc.OracleDriver
set XDM_REPOSITORY_URL=jdbc:oracle:thin:@localhost:1521:XE
set XDM_REPOSITORY_USERNAME=repository_user
set XDM_REPOSITORY_PASSWORD=repository_password
rem Repository read-only datasource credentials
set XDM_REPOSITORY_READONLY_USERNAME=repository_readonly_user
set XDM_REPOSITORY_READONLY_PASSWORD=repository_readonly_password
rem Set the current schema of the readonly user to the repository
set XDM_REPOSITORY_READONLY_CONNECTIONINITSQL='ALTER SESSION SET CURRENT_SCHEMA = repository_user'
rem Setup Token
set SEMARCHY_SETUP_TOKEN=mySecretValue

You can simply set startup parameters using environment variables. The use of a configuration file or Java system properties provides additional flexibility. Details about using these Startup Configuration Methods are included in the next section.

When the startup configuration is defined, you can move to the next step and deploy Semarchy xDM.