MaxTrax 8 for developers

Server settings

Settings that the server's administrator sets outside MaxTrax, before the site starts. Settings a Corporate Administrator changes inside MaxTrax are on Site settings.

How MaxTrax reads them

Every setting has a name starting MAXTRAX_. The site reads it from an environment variable first, then from an appSettings entry in Web.config. A setting you do not set keeps its default.

Required

Email (SMTP)

MaxTrax sends email for subscriptions, scheduled reports, NDE requests and account messages such as password resets. There is no built-in mail server: without yours, no email goes out.

When MAXTRAX_SMTP_SERVER is set, these win over the Email (SMTP) screen in Site settings, which then shows them read-only, and the password never reaches the database. If you leave them unset, a Corporate Administrator enters the mail server on that screen instead.

A relay that accepts the web server by its address and needs no password is simplest. Users can type outside addresses into subscriptions and scheduled reports, so limit relaying on the mail server if your policy needs it.

Other email settings

Sign-in and security

The new view

The new view opens at the site's address for everyone, and the classic view is at /legacy. No setting changes that.

Operations

Where secrets are kept

The secrets are the connection strings (when they hold a SQL password), MAXTRAX_SMTP_PASSWORD, each MAXTRAX_OIDC_…CLIENT_SECRET, MAXTRAX_TELEMETRY_CONNECTION and MAXTRAX_TELEMETRY_HEADERS if used, and MAXTRAX_SUPPORT_PASSWORD if it is ever set. MaxTrax reads each as a plain value from its environment when it starts. Never send one to CSDS, and never put one in a file the site serves.

Azure App Service: Key Vault

Azure Key Vault is supported on App Service only.

  1. Turn on a managed identity for the app. A user-assigned identity survives the app being re-created.
  2. Give that identity the Key Vault Secrets User role on the vault.
  3. Store each value as a secret, for example maxtrax-main-db holding the whole connection string.
  4. Set the application setting to a reference instead of the value: MAXTRAX_MAIN_DB = @Microsoft.KeyVault(VaultName=your-vault;SecretName=maxtrax-main-db). With a user-assigned identity, also set the app's Key Vault reference identity to it.
  5. Restart the app. App Service reads the vault before MaxTrax starts, and the Environment variables page shows a green tick beside each reference it resolved. If a database reference does not resolve, MaxTrax refuses to start and its log names the setting.

To rotate a secret, add a new version in the vault and restart the app.

Your own Windows server with IIS

Azure Blob Storage for documents (App Service only)

By default, uploaded documents and photos are kept in the site's database. On App Service you can send new uploads to Azure Blob Storage instead: set MAXTRAX_DOCUMENT_STORE to blob and MAXTRAX_DOCUMENT_BLOB_URL to the container's address, and give the app's managed identity read and write access to the container (the Storage Blob Data Contributor role). With a user-assigned identity, set MAXTRAX_DOCUMENT_BLOB_CLIENT_ID to its client ID. No secret is needed. Keep MAXTRAX_DOCUMENT_BLOB_URL set once any file is in Blob Storage, because reading those files needs it too.