Skip to content

Secrets and integrations

The chart does not create application Secrets by default. Workloads refer to oidc-secrets and sites-secrets by default; create them in the release namespace before the pods start. Use the names from the chart values if you change them. Use a secrets manager or another approved Secret controller where available.

Secret keys

Secret Keys Used for
oidc-secrets OIDC_CLIENT_ID, OIDC_CLIENT_SECRET OpenID Connect (OIDC) client credentials used by Hub and Operator.
sites-secrets HUB_MASTER_TOKEN, SESSION_SECRET_KEY, LDAP_PASSWORD, JIRA_API_TOKEN, JIRA_API_USERNAME, SPLUNK_API_PASSWORD, OPENSEARCH_API_PASSWORD, CACHE_REDIS_PASSWORD, and other configured integration secrets Application credentials used by Hub, Operator, and scheduled jobs. Add only keys needed by enabled settings.
<site-id>-oauth2 (one per site) cookie-secret The OAuth2 Proxy cookie secret of one site. The Operator creates and updates it; do not create it. The value is derived from SESSION_SECRET_KEY.
Registry pull Secret (optional) Docker config JSON Needed when a configured image repository requires authentication. Standard platform images use the sites-oss project in the ECMWF container registry (ECCR); confirm whether your cluster needs a pull Secret. Attach it with serviceAccount.imagePullSecretName.

Create the Secret from a protected file. Example:

kubectl -n sites-stage create secret generic sites-secrets \
  --from-env-file=/secure/path/sites.env

Avoid committing the file or sending credential values as command-line arguments. Restrict read access to Kubernetes Secrets and encrypt them at rest, based on your cluster policy.

The chart can create OIDC and application Secrets if their create values are true and you provide base64-encoded data in a private values file. This is not the preferred method. Helm stores release values and rendered manifests; do not put credentials in a values file unless your secret handling process is designed for this exposure.

Site OAuth2 Proxy secrets

Each site runs OAuth2 Proxy. It needs a cookie secret and the OIDC client secret. The files ConfigMap <site-id>-files does not contain them:

  • The Operator derives a different cookie secret for each site from SESSION_SECRET_KEY and writes it to the Secret <site-id>-oauth2.
  • The site pod mounts only the OIDC_CLIENT_SECRET key of oidc-secrets as a read-only file in the OAuth2 Proxy container. Store the value without a trailing newline. OAuth2 Proxy reads the file as it is.
  • The site proxy container gets only the OIDC_CLIENT_ID and OIDC_CLIENT_SECRET keys of oidc-secrets as environment variables. It also gets OIDC_EXTRA_AUDIENCES from the platform configuration (oidc.extra_audiences), which is not a Secret. The other site containers get no key of oidc-secrets. Other keys that you add to oidc-secrets are not given to site containers.

When you rotate SESSION_SECRET_KEY, restart the Hub and Operator, then use Force Upgrade All Sites (Upgrades) to write the new cookie secrets. Users of private sites must sign in again. To rotate all platform secrets together, see Rotate all platform secrets.

Upgrade from a release that stored these secrets in the ConfigMap

Releases before 2.7.1 wrote SESSION_SECRET_KEY and OIDC_CLIENT_SECRET into each <site-id>-files ConfigMap. Do these steps after you upgrade:

  1. Deploy the new Hub and Operator.
  2. Run Force Upgrade All Sites. The Operator creates <site-id>-oauth2 and writes the ConfigMaps again without the secret values.
  3. Rotate SESSION_SECRET_KEY in sites-secrets and the OIDC client secret at the identity provider and in oidc-secrets. Treat the earlier values as disclosed to every subject that could read ConfigMaps in the namespace.
  4. Restart the Hub and Operator, then run Force Upgrade All Sites again. Users sign in again one time.

Session secret key

SESSION_SECRET_KEY must contain 32 bytes or more. The Hub, the Operator and the scheduled jobs do not start when the key is missing or shorter. Generate a key with:

openssl rand -base64 48

All components must read the same value from sites-secrets.

Redis password

The chart Redis server accepts connections only from the Hub and Operator pods (NetworkPolicy). To also require a password, add CACHE_REDIS_PASSWORD to sites-secrets:

  1. Generate a value, for example with openssl rand -hex 32. The value must not contain ", \ or a line break. Redis does not start if it does.
  2. Add the key to sites-secrets.
  3. Restart Redis, the Hub and the Operator. The cache is empty after the Redis restart; this is normal.

When the key is absent, Redis starts without a password. The Hub, the Operator and the scheduled jobs read the same key as cache.redis_password. The Redis readiness probe reads it through REDISCLI_AUTH.

To change the password, use the same steps with a new value. See Rotate all platform secrets.

Platform administration token

The HUB_MASTER_TOKEN value is the platform administration token. The Hub API accepts it as a bearer credential:

Authorization: ******

A request with this token acts as a platform administrator, and the Hub records it under the user name api-administration-token in audit entries. Use it for the API calls in this guide and in automation. Browser users sign in with their OIDC session instead.

The Hub compares the presented token with the hub.master_token setting, which the application reads from sites-secrets at startup. Keep the value only in sites-secrets.

The token is optional at install. When HUB_MASTER_TOKEN is absent or empty, the platform runs and browser sign-in works, but the Hub API rejects every bearer master token, and an empty token is never accepted. The Hub logs a warning at startup when the value is empty. Set the value before you install when automation or monitoring calls the Hub API, or generate one after the install.

To create a token, open /hub/admin/generate/master-token/ while signed in as a platform administrator. The page returns a new token as text. The hub-settings page shows the current token and offers a regenerate action. The regenerate action fills the Master Token field; save the page to write the new value to sites-secrets. The field is optional: leaving it empty keeps the current value, so you can change the other settings before you have a token.

To rotate the token:

  1. Generate a new token.
  2. Update the HUB_MASTER_TOKEN key in sites-secrets. The in-band hub-settings editor can write the Secret for you, but the next helm upgrade restores the chart-managed value; see Configuration and branding changes.
  3. Restart the Hub and Operator Deployments. The chart restarts workloads only on a sites-config ConfigMap change, not on a Secret change:
kubectl -n sites-stage rollout restart deployment/sites-hub deployment/sites-operator
  1. Confirm the new token works and update your automation. The old token stops working when the Pods restart.

To rotate all platform secrets together, see Rotate all platform secrets.

Rotate all platform secrets

Use this procedure to replace all platform secrets together, for example after a suspected disclosure of sites-secrets or oidc-secrets, after a staff change, or for a periodic rotation.

This procedure does not change the master tokens of sites. Each site administrator is responsible for the master token of a site.

Generate new values

Obey these rules for each new value:

  • Use a cryptographic random source, for example openssl rand. Do not make a value by hand, and do not use a value again.
  • Use a different value for each secret and for each environment, for example stage and production.
  • Generate the values on a trusted host. Write them to a file that only you can read. Do not put them in command-line arguments or in the shell history.
  • Do not add a line break at the end of a value.
  • After the Secret update, delete the file, or keep the values only in your secrets manager.
Key Source Rules Command
SESSION_SECRET_KEY You 32 bytes or more. The Hub, the Operator, and the scheduled jobs do not start with a shorter value. openssl rand -base64 48
HUB_MASTER_TOKEN You, or the Hub page /hub/admin/generate/master-token/ Exactly 64 hexadecimal characters. The hub-settings page does not accept other values. openssl rand -hex 32
HUB_METRICS_SCRAPE_TOKEN You Only when you use it. The Secret key that serviceMonitor.hub.bearerTokenSecret refers to must have the same value. openssl rand -hex 32
CACHE_REDIS_PASSWORD You Only when you use it. No ", \, or line break. openssl rand -hex 32
OIDC_CLIENT_SECRET and, if it changes, OIDC_CLIENT_ID The identity provider No line break at the end. OAuth2 Proxy reads the value as it is. Identity provider console
LDAP_PASSWORD, JIRA_API_USERNAME, JIRA_API_TOKEN, SPLUNK_API_PASSWORD, OPENSEARCH_API_PASSWORD The related service The rules of that service. Service console

Example that writes the internal values to a protected file:

umask 077
{
  printf 'SESSION_SECRET_KEY=%s\n' "$(openssl rand -base64 48 | tr -d '\n')"
  printf 'HUB_MASTER_TOKEN=%s\n' "$(openssl rand -hex 32)"
  printf 'CACHE_REDIS_PASSWORD=%s\n' "$(openssl rand -hex 32)"
} > /secure/path/sites.env

Add the other keys of sites-secrets to the same file. The command below replaces all keys of the Secret, thus the file must contain all of them:

kubectl -n sites-stage create secret generic sites-secrets \
  --from-env-file=/secure/path/sites.env \
  --dry-run=client -o yaml | kubectl apply -f -

Effects

Key Effect after the rotation
SESSION_SECRET_KEY Hub users must sign in again. After the forced upgrade, users of private sites must sign in again. The Hub ignores the earlier Redis cache entries and fills the cache again.
HUB_MASTER_TOKEN The earlier token stops working when the Hub restarts. Update your automation and monitoring.
HUB_METRICS_SCRAPE_TOKEN Prometheus cannot scrape the Hub until the Hub and the ServiceMonitor Secret key have the same value.
OIDC_CLIENT_SECRET, OIDC_CLIENT_ID The Hub, the Operator, and the site OAuth2 Proxy and proxy containers use the new values after their restart.
CACHE_REDIS_PASSWORD Redis, the Hub, and the Operator must restart. The cache is empty after the Redis restart.
Other integration keys The related integration fails until the new value is in the Secret and the workloads restart.

Procedure

  1. Rotate the external credentials at the identity provider and at the other services. If a service accepts two valid credentials at the same time, keep the earlier one until step 6.
  2. Generate the internal values. See Generate new values.
  3. Update sites-secrets and oidc-secrets. If you use HUB_METRICS_SCRAPE_TOKEN, also update the Secret key that serviceMonitor.hub.bearerTokenSecret refers to. If the chart creates these Secrets (create: true), also update your private values file. If you do not, the next helm upgrade writes the earlier values again.
  4. Restart the workloads. The chart does not restart them when a Secret changes. Restart Redis only if CACHE_REDIS_PASSWORD changed:
kubectl -n sites-stage rollout restart deployment/redis
kubectl -n sites-stage rollout restart deployment/sites-hub deployment/sites-operator

The scheduled jobs read the new values at their next run. 5. Run Force Upgrade All Sites with the new HUB_MASTER_TOKEN. See Upgrades. The Operator writes the new cookie secret of each site and restarts the site pods, which then read the new OIDC client secret. 6. Disable the earlier credentials at the identity provider and at the other services.

Verify

  • A Hub API request with the new HUB_MASTER_TOKEN succeeds, and a request with the earlier token fails.
  • You can sign in to the Hub and to a private site.
  • The status of the sites is good.
  • Prometheus scrapes the Hub, if you use HUB_METRICS_SCRAPE_TOKEN.
  • The next run of each scheduled job succeeds.
  • The integrations on the Hub dependencies page are available.

Routing TLS

The routing TLS Secret is separate from the application Secrets in this section. When routing.tls.enabled is true, routing.tls.secretName names the Secret that the routing resource reads:

  • In Ingress mode, the master Ingress reads it in the release namespace.
  • A Gateway created by the chart reads it for its default HTTPS listener in the release namespace.
  • An existing Gateway does not use this value. Its owner configures the listener certificate in the Gateway namespace.

The chart does not create this Secret. Use cert-manager or another approved certificate process to create and renew it. For Ingress mode, put the certificate-controller annotations in routing.ingress.hubAnnotations. For a Gateway created by the chart, put them in routing.gateway.annotations when the controller supports Gateway certificate provisioning. For custom Gateway listeners, configure the certificate references required by the controller.

OIDC

If the identity provider supports OIDC discovery at <issuer_url>/.well-known/openid-configuration, set only the issuer, account page, and callback URL. Do not set the authorization, token, user-info, introspection, revocation, JSON Web Key Set (JWKS), or logout URLs. The platform reads them from the discovery document:

sitesConfig:
  oidc:
    # The provider must serve its standard discovery document here.
    issuer_url: https://accounts.example.org/realms/sites
    # Account management page shown to users.
    account_url: https://accounts.example.org/realms/sites/account
    # Must match a callback URL registered with the identity provider.
    redirect_uri: https://sites.example.org/oidc_callback

The platform supports two OIDC modes. In both modes, issuer_url is required.

  • Discovery (default). The platform derives the discovery URL from issuer_url as <issuer_url>/.well-known/openid-configuration. Use this mode when the identity provider supports .well-known discovery. No other endpoint URL is necessary. Set a single endpoint URL only to replace one discovered value.
  • Explicit endpoints. Use this mode only when the identity provider does not support .well-known discovery. Set all of authorization_url, token_url, user_info_url, introspection_url, revocation_url, and jwks_url. The platform then does not fetch the discovery document. logout_url is optional in this mode. If you do not set it, logout clears only the local session. If you set only some of these URLs, the platform uses discovery for the others.

Keep client credentials in oidc-secrets. Example of explicit endpoints:

sitesConfig:
  oidc:
    issuer_url: https://accounts.example.org/realms/sites
    authorization_url: https://accounts.example.org/realms/sites/protocol/openid-connect/auth
    token_url: https://accounts.example.org/realms/sites/protocol/openid-connect/token
    user_info_url: https://accounts.example.org/realms/sites/protocol/openid-connect/userinfo
    introspection_url: https://accounts.example.org/realms/sites/protocol/openid-connect/token/introspect
    revocation_url: https://accounts.example.org/realms/sites/protocol/openid-connect/revoke
    jwks_url: https://accounts.example.org/realms/sites/protocol/openid-connect/certs
    # Optional. Without it, the platform clears only the local session on logout.
    logout_url: https://accounts.example.org/realms/sites/protocol/openid-connect/logout

See configuration for OIDC settings and installation for chart deployment.

The metadata request verifies TLS and uses a five-second timeout. A returned issuer must match the configured issuer. Successful metadata is cached in memory and Redis; failed discovery does not bypass authentication. If you change effective OIDC endpoints, follow Clearing caches and restarting, then reconcile affected sites.

Directory and notifications

integrations.directory selects none or ldap. For LDAP, set the connection URL, bind identity, search bases, filter, and user attribute names under sitesConfig.ldap. Store the bind password in sites-secrets. sitesConfig.directory sets default users, username validation, and the roles or groups available in access filters.

Notifications can use email, jira, or both. Configure SMTP under sitesConfig.email, or Jira under sitesConfig.jira. Set jobs.notification_default_assignee when a notification needs an administrator assignee. Keep all API tokens and passwords in sites-secrets.

A provider's required value marks the integration as mission-critical for operators: a failed reachability probe logs as ERROR instead of WARNING, and the flag shows on the Hub dependencies page. It does not change response codes or degradation: dependent endpoints return HTTP 503 whenever the feature is off or unreachable, whether or not the flag is set. Configuration checks can reject missing endpoint or provider fields at startup.

Analytics and metrics

The chart supports analytics providers none, splunk, and opensearch. Set sitesConfig.integrations.analytics and the matching sitesConfig.splunk or sitesConfig.opensearch endpoint and query values. Put API passwords in sites-secrets. The analytics CronJob is rendered only when analytics is enabled.

Metrics can use none or prometheus. The chart's ServiceMonitor resources are separate: install a Prometheus Operator and enable serviceMonitor.enabled only if it selects these resources. Configure the scrape namespaces and site metrics integration together.

Example provider selection:

sitesConfig:
  integrations:
    analytics:
      providers: ["opensearch"]
      default: opensearch
      required: false
    metrics:
      providers: ["prometheus"]
      default: prometheus
      required: false
    directory:
      providers: ["ldap"]
      default: ldap
      required: true
    notifications:
      providers: ["email", "jira"]
      default: email
      required: false

Use provider IDs supported by the application. For each feature, set providers and select one of those IDs as default.