Skip to main content
Atoti Market Risk offers two levels of DirectQuery database support. Native support provides a fully tested implementation with reference data, SQL scripts, and documentation. Non-native databases can connect through Atoti Server’s DirectQuery framework but require self-managed configuration.

Native support

These databases are natively supported by Atoti Market Risk. The Solution provides a fully tested standard implementation, with reference data and documentation for connecting to these databases. With a natively supported database, Atoti Market Risk provides:
  • Documentation on required configuration properties to connect to the remote database.
  • Reference SQL queries to create the database tables (these are available in mr-directquery/src/test/resources/databases).
  • Reference data in a format compatible with the specific database (for Databricks this is available in mr-directquery/src/test/resources/databases/databricks/data. For Microsoft SQL Server and Snowflake you can use the primary dataset in mr-application/src/main/resources/data).
  • Databases tested for computational accuracy.

Natively supported databases

Atoti Market Risk provides a fully tested standard implementation, with reference data and documentation for the following databases: For detailed steps on how to connect to one of these databases, see Getting started.

Non-native support

Atoti Server supports connecting to other compatible databases, but Atoti Market Risk currently does not. You can manage these databases yourself, but we do not document the implementation steps required. If your chosen Database isn’t natively supported, you can contact us for implementation support or refer to the Atoti Server DirectQuery documentation to customize with a different database.
Your chosen database must be one supported by Atoti Server DirectQuery

Snowflake key-pair authentication

Snowflake is deprecating single-factor password authentication. Atoti Market Risk therefore connects to Snowflake using key-pair authentication, available from Atoti Market Risk 6.0.9, instead of a password. The base64-encoded private key is supplied through the directquery.database.snowflake.additional-options.private-key-base64 property. The profile sets no password property, and SNOWFLAKE_PASSWORD is unused and can be removed from the deployment environment:

Prerequisites

  • OpenSSL 1.1.1 or later, available on the command line.
  • The Snowflake user that Atoti Market Risk connects with, the value of SNOWFLAKE_USERNAME.
  • A Snowflake role that can run ALTER USER on that user, such as SECURITYADMIN.
  • Write access to the environment of the Atoti Market Risk process, to set SNOWFLAKE_PRIVATE_KEY_BASE64.

Set up the key pair

The private key grants full access to the Snowflake user. Supply it only through the SNOWFLAKE_PRIVATE_KEY_BASE64 environment variable or a secret store. Never commit rsa_key.p8 or its base64 encoding to source control.
  1. Generate an unencrypted PKCS#8 RSA private key and its matching public key. The following commands create the rsa_key.p8 private key and the rsa_key.pub public key in the current directory.
    To protect the key at rest instead, generate an encrypted PKCS#8 key with openssl genrsa 2048 | openssl pkcs8 -topk8 -inform PEM -v2 aes-256-cbc -out rsa_key.p8, and supply the passphrase through the directquery.database.snowflake.additional-options.private-key-pwd property.
  2. Register the public key on the Snowflake user. The key value is the contents of rsa_key.pub without the PEM header, the PEM footer, and the line breaks, which the following command prints.
    Run the following statement under a role that can alter the user, such as SECURITYADMIN.
    Verify that Snowflake stored the key:
    The RSA_PUBLIC_KEY_FP row holds a SHA256: fingerprint. An empty value means the key was not registered.
  3. Base64-encode the private key and expose it to Atoti Market Risk. The following command encodes the entire rsa_key.p8 file. The resulting value feeds the directquery.database.snowflake.additional-options.private-key-base64 property.

Verify the connection

Start Atoti Market Risk with the snowflake profile. That profile sets directquery.schema.validation.fail-startup-on-bad-schema: true, so a successful startup means the connection to Snowflake was established and the schema was validated. A failure to authenticate is reported in the startup logs.

Rotate the key pair

ALTER USER … SET RSA_PUBLIC_KEY replaces the registered public key immediately, so rotating in place makes every query fail while the running application still signs with the old private key. Use Snowflake’s second key slot to avoid that window.
  1. Generate a new key pair, following the steps above.
  2. Register the new public key as the user’s second key:
  3. Update SNOWFLAKE_PRIVATE_KEY_BASE64 with the new base64-encoded private key and restart Atoti Market Risk.
  4. Confirm the connection succeeds, then retire the old key: