Secrets are Kubernetes objects that are used to store sensitive information.

Proper secret management is critical for maintaining the security of your SystemLink Enterprise deployment. You must create secrets before deploying SystemLink Enterprise. You should manage secrets according to your organization's security policies. This section describes the secrets SystemLink Enterprise requires and provides guidance on securely managing SystemLink Enterprise secrets.

The secrets listed in this topic are required and have the Opaque type unless otherwise specified.

Managing Secrets Securely

You can manage secrets using two primary approaches:

  • Helm-Managed Secrets: Define secrets in the systemlink-secrets.yaml file. You deploy secrets to the Kubernetes cluster as part of the Helm installation. This approach is simpler to configure but requires additional steps to encrypt the secrets file for secure storage in version control.
  • External Secret Management: Store and manage secrets in an external secret management system such as HashiCorp Vault, AWS Secrets Manager, or Azure Key Vault. The secrets are synchronized to the Kubernetes cluster using tools like the External Secrets Operator. This approach provides centralized secret management.
Note When you rotate secrets, Kubernetes pods that use secrets as environment variables may not automatically use the latest secret values. You must restart the pods to pick up updated environment variables. Secrets mounted as volumes will update automatically but may have a propagation delay.

Helm-Managed Secrets with Encrypted Values Files

When using Helm to manage secrets, configure the global.deploySecrets parameter to true in systemlink-values.yaml. Define secrets in the systemlink-secrets.yaml file and deployed to the cluster during Helm installation or upgrade.

To securely store the systemlink-secrets.yaml file in version control, you must encrypt it. One approach is to use the Helm Secrets plugin with Mozilla SOPS (Secrets OPerationS).

Using Helm Secrets and Mozilla SOPS:

The Helm Secrets plugin integrates with Mozilla SOPS to encrypt and decrypt Helm values files. SOPS supports multiple encryption backends including AWS KMS, Azure Key Vault, Google Cloud KMS, and PGP.

To use Helm Secrets:

  1. Install the Helm Secrets plugin:
    helm plugin install https://github.com/jkroepke/helm-secrets --version <version>
  2. Install Mozilla SOPS following the SOPS installation instructions.
  3. Configure your encryption backend (AWS KMS, Azure Key Vault, GCP KMS, or PGP). Refer to the SOPS documentation for configuration details.
  4. Encrypt your systemlink-secrets.yaml file:
    helm secrets encrypt systemlink-secrets.yaml
  5. Deploy SystemLink Enterprise using helm secrets upgrade instead of helm upgrade commands. The Helm Secrets plugin automatically decrypts the encrypted values file during deployment.

You can commit the encrypted systemlink-secrets.yaml file safely to version control.

Note When using Helm-managed secrets, the decrypted secrets are stored as Kubernetes Secret objects in the cluster. Consider enabling Kubernetes encryption at rest to protect secrets stored in etcd.

External Secret Management Tools

External secret management tools provide centralized storage and management of secrets outside of the Kubernetes cluster. Secrets are synchronized to Kubernetes using operators or agents. When using external secret management, set global.deploySecrets parameter to false in systemlink-values.yaml to prevent Helm from deploying secrets.

Note Set global.deploySecrets parameter to false if you want to manually manage secrets on the cluster outside of the Helm installation. Changing this value from true to false during an upgrade will delete existing secrets.
External Secrets Operator:

The External Secrets Operator is a Kubernetes operator that synchronizes secrets from external secret management systems to Kubernetes Secret objects. The operator supports multiple backends including HashiCorp Vault, AWS Secrets Manager, Azure Key Vault, Google Cloud Secret Manager, and others.

To use the External Secrets Operator:

  1. Install the External Secrets Operator in your Kubernetes cluster following the installation guide.
  2. Configure a SecretStore or ClusterSecretStore resource that defines the connection to your external secret management system. Refer to the provider-specific documentation for configuration details.
  3. Create ExternalSecret resources for each SystemLink Enterprise secret. The operator will synchronize the secrets from your external system to Kubernetes.
  4. Set global.deploySecrets: false in systemlink-values.yaml.
  5. Deploy SystemLink Enterprise using Helm.

Security Best Practices

For more information on Kubernetes secrets and security, refer to the Kubernetes Secrets documentation and the Kubernetes Good Practices for Secrets.

Secret Format Examples

This section provides examples of generating secrets and viewing secrets in Kubernetes. Secrets are stored in base64-encoded format in the cluster.

Generating Encryption Keys:

Use OpenSSL or similar tools to generate cryptographically secure random keys.

  • AES-256 Keys (32 bytes):
    openssl rand -base64 32

    Example output:

    h8F3mK9pL2nQ7vR4tY6uE1wX5zA8bC0dD2fG4hJ6k=
  • AES-128 Keys (16 bytes):
    openssl rand -base64 16
    

    Example output:

    mK9pL2nQ7vR4tY6u
  • AEAD Keys (32 bytes):
    openssl rand -base64 32
    

    Example output:

    p2sT4uV5wX8yA9bC0dD2fG4hJ6kL7mN9qR2sT5vW8=
  • SHA-256 Signature Keys (32-64 bytes):
    openssl rand -base64 48
    

    Example output:

    G4hJ6kL7mN9qR2sT4uV5wX8yA9bC0dD2fG4hJ6kL7mN9qR2sT4uV5wX8yA9b
  • Whitelisted API Keys (42 bytes):
    openssl rand -base64 42
    

    Example output:

    kL7mN9qR2sT4uV5wX8yA9bC0dD2fG4hJ6kL7mN9qR2sT4uV5w=
  • MongoDB Replica Set Key:

    MongoDB replica set keys are used to authenticate pods in the database cluster. Refer to the MongoDB documentation for key generation instructions.

  • RabbitMQ Erlang Cookie:
    openssl rand -hex 32
    

    Example output:

    a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2
  • RSA Keys for Salt Master:

    Used for Salt master communication with minions. Must be in PKCS1 format.

    # Generate RSA private key (4096-bit)
    openssl genrsa 4096
    # Generate RSA public key from private key
    openssl rsa -in private_key.pem -pubout -outform PEM
    

    Example private key:

    -----BEGIN RSA PRIVATE KEY-----
    MIIJKAIBAAKCAgEA1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKL
    ...
    -----END RSA PRIVATE KEY-----
    

    Example public key:

    -----BEGIN PUBLIC KEY-----
    MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA1234567890abcdefgh
    ...
    -----END PUBLIC KEY-----
  • MongoDB Connection String Format:

    Refer to Configuring MongoDB for SystemLink Enterprise for connection string examples and formats.

  • PostgreSQL Connection String Format:

    Refer to PostgreSQL for connection string examples and configuration details.

  • Viewing Secrets in Kubernetes:

    Use kubectl to view secrets deployed to the cluster. Secret data is base64-encoded:

    # View a secret in YAML format
    kubectl get secret webserver-session -n systemlink -o yaml
    

    Example output:

    apiVersion: v1
    kind: Secret
    metadata:
      name: webserver-apikey
      namespace: systemlink
    type: Opaque
    data:
      encryptionKey: aDhGM21LOXBMMm5RN3ZSNHRZNnVFMXdYNXpBOGJDMGQ=
      signatureKey: RDJmRzRoSjZrN21MOHBOOXFSMnNUNHVWNXdYOHlBOWI=
    

    Decode a secret value:

    kubectl get secret webserver-session -n systemlink -o jsonpath='{.data.encryptionKey}' | base64 -d
  • Creating Secrets Manually:

    When not using Helm-managed secrets, create secrets directly with kubectl:

    # Create a secret with multiple fields
    kubectl create secret generic oidc-secret \
      --from-literal=clientId='my-client-id' \
      --from-literal=clientSecret='my-client-secret' \
      --from-literal=jwks='' \
      -n systemlink

Image Pull Secrets

The NI container repository that hosts SystemLink Enterprise is private and requires authenticated access. You will have received credentials with access to SystemLink Enterprise. Configure image pull secrets for SystemLink Enterprise using the global.imagePullSecrets array in systemlink-values.yaml and systemlink-admin-values.yaml. Image pull secrets must conform to the kubernetes.io/dockerconfigjson format.

Table 80. Image Pull Secrets
Secret Details
niartifacts-secret

Authentication Secrets

Table 81. Authentication Secrets
Secret Details
oidc-secret Identifies SystemLink Enterprise with your OpenID Connect (OIDC) authentication provider and has the following fields.
  • clientId: An OIDC client ID.
  • clientSecret: The secret corresponding to clientId.
  • jwks: A JSON web key set. If none is required, set to an empty string value.

Whitelisted API Keys

SystemLink Enterprise uses Whitelisted API keys to authenticate inter-cluster service to service communication. The Whitelisted API keys are used for operations that do not execute in the context of a specific user. This secret contains a single field.
  • apiKey: A 42-byte random number sequence that is Base64-encoded.
If you are managing secrets with Helm, use the userservices.secrets.whitelistedApiKeys value in systemlink-secrets.yaml to define each secret and its corresponding hash. Use the generate_whitelisted_key.sh script to simplify key generation.
Table 82. Whitelisted API Keys
Secret Details
alarmservice-apikey
alarmserviceroutineexecutor-apikey
assetservice-apikey
comments-apikey
dashboardhost-apikey
jupyterhub-apikey
nbexec-argo-workflow-apikey
routineeventtrigger-apikey
routineexecutor-apikey
routinescheduletrigger-apikey
saltmaster-init-apikey
sessionmanagerservice-apikey
systemsmanagement-service-apikey
tageventprocessor-apikey
testmonitor-apikey
webserver-apikey
workorder-apikey

Whitelisted API Key Hashes

Table 83. Whitelisted API Key Hashes
Secret Details
userservices-apikey-whitelist Manages the list of authorized whitelisted API keys. This secret contains a single field.
  • whitelistedApiKeyHashes: An array of hexadecimal-encoded SHA-512 hashes, separated by commas, with no whitespace and no trailing delimiter.

Encryption Keys

Table 84. Encryption Keys
Secret Details
fileingestionservices-encryption-key

Field: encryptionKey

Key Type: AES-256

Encoding: Base64

fileingestionservices-download-encryption-key

Field: encryptionKey

Key Type: AES-256

Encoding: Base64

saltmaster-rsa-keys

Field: saltmaster-private-key

Type: RSA

Format: PKCS

Field: saltmaster-private-key

Type: RSA

Format: PKCS1

systemsmanagementservice-dataprotection

Field: aesKey

Key Type: AES-128

Encoding: Base64

systemsstateservice-dataprotection

Field: aesKey

Key Type: AES-128

Encoding: Base64

taghistorian-continuation-token

Field: encryptionKey

Key Type: AEAD

Key Length: 32 bytes

Encoding: Base64

userservices-continuation-token

Field: encryptionKey

Key Type: AEAD

Key Length: 32 bytes

Encoding: Base64

webappservices-continuation-token

Field: encryptionKey

Key Type: AEAD

Key Length: 32 bytes

Encoding: Base64

webserver-session

Field: encryptionKey

Key Type: AES-128

Encoding: Base64

Field: signatureKey

Key Type: SHA-256

Encoding: Base64

Elasticsearch Credentials

Note The following secret is required only when deploying Elasticsearch as part of SystemLink Enterprise installation.
Table 85. Elasticsearch Credentials
Secret Details
sl-elasticsearch-filescdc-secret Credentials for authenticating with the Elasticsearch instance. Used by fileingestion and fileingestioncdc services. This secret has the following field.
  • password: Password for the filescdc Elasticsearch user.

Dremio Credentials

Table 86. Dremio Credentials
Secret Details
nidataframe-dremio-credentials Has the following fields.
  • username: A user name used to access the Dremio instance.
  • password: A password used to access the Dremio instance.
nidataframe-nessie-credentials Bearer token for Dremio authentication with Nessie. This secret has the following field.
  • bearerToken: A bearer token for authenticating with the Nessie API. Can be any random value.

Grafana Credentials

Table 87. Grafana Credentials
Secret Details
grafana-login Defines an admin user for Grafana with the following fields.
  • admin-user: A user name.
  • admin-password: The password for admin-user.

MongoDB Credentials

All MongoDB instances store the credentials in a secret with the following fields:

Note If you have your own MongoDB instance, you only have to populate mongodb-connection-string.
  • mongodb-root-password: A password that grants root access to the database cluster.
  • mongodb-passwords: An array of passwords that each grant full access to an individual database. These passwords cannot contain commas or any reserved characters as defined by the IETF URL specification.
    Note Separate passwords with commas. Do not include whitespace or a trailing delimiter. For example: password1,password2. All MongoDB credential secrets except userservices-mongodb-credentials and saltmaster-mongodb-credentials require one password.
  • mongodb-replica-set-key: A key used to authenticate nodes in a MongoDB replica set.
  • mongodb-connection-string: The connection string, including credentials, for authentication to the MongoDB database.
Table 88. MongoDB Credentials
Secret Details
assetservice-mongodb-credentials
locationservice-mongodb-credentials
fileingestionservices-mongodb-credentials
nbexecservice-mongodb-credentials
nicomments-mongodb-credentials
nidataframe-mongodb-credentials
nispecificationmanagement-mongodb-credentials Optional installation
niworkorder-mongodb-credentials Optional installation
notification-mongodb-credentials
repositoryservice-mongodb-credentials
routines-mongodb-credentials
routinescheduletrigger-mongodb-credentials
systemsmanagementservice-mongodb-credentials
systemsstateservice-mongodb-credentials
saltmaster-mongodb-credentials Requires two mongodb-passwords: a password for the minions and a password for the pillars databases in that order.
taghistoriandb-mongodb-credentials
tags-mongodb-credentials
userdata-mongodb-credentials
userservices-mongodb-credentials Requires two mongodb-passwords: a password for the user and a password for the keys databases in that order.
webappservices-mongodb-credentials

PostgreSQL Credentials

Table 89. PostgreSQL Credentials
Secret Details
dashboardhost-postgres-secrets Has the following fields.
  • host: The Host name of the PostgreSQL server.
  • user: A PostgreSQL user name.
  • password: The password for user.
testmonitorservicedb-connection Has two forms with the following fields depending on whether the database connection has been defined with a connection string or as parameters. Connection string has the following field.
  • connection-string: A PostgreSQL connection string.
Connection parameters has the following field.
  • password: A password for the user defined by the testmonitorservice.database.connectionInfo.user value.
dynamicformfields-postgres-connection Has two forms with the following fields depending on whether the database connection has been defined with a connection string or as parameters. Connection string has the following field.
  • connection-string: A PostgreSQL connection string.
Connection parameters has the following field.
  • password: A password for the user defined by the dynamicformfields.database.connectionInfo.user value.

Proxy Server Credentials

Table 90. Proxy Server Credentials
Secret Details
webserver-proxy-credentials Credentials for authenticating with a proxy server for access to an OIDC provider. This secret has the following fields.
  • username: The user name for the proxy server.
  • password: The password for the user name.

RabbitMQ Credentials

Table 91. RabbitMQ Credentials
Secret Details
rabbitmq-user Credentials for authenticating with the RabbitMQ instance. This secret has the following fields.
  • rabbitmq-user: A user name.
  • rabbitmq-password: Password for rabbitmq-user.
rabbitmq-erlang-cookie An Erlang Cookie value. This secret has a single field.
  • rabbitmq-erlang-cookie: The Erlang cookie value.

Redis Credentials

Table 92. Redis Credentials
Secret Details
webserver-redis-credentials Has the following field.
  • password: Password used to access the Redis database.

Amazon S3 Credentials

Note

A SystemLink Enterprise configuration requires the following secrets when using an Amazon S3 or an Amazon S3 compatible file storage provider.

Table 93. Amazon S3 Credentials
Secret Details
feeds-s3-credentials Has the following fields.
  • aws-access-key-id: A user name or S3 access key ID for S3 access.
  • aws-secret-access-key: A password or S3 access key ID for S3 access.
fileingestion-s3-credentials Has the following fields.
  • aws-access-key-id: A user name or S3 access key ID for S3 access.
  • aws-secret-access-key: A password or S3 access key ID for S3 access.
nbexecservice-s3-credentials Has the following fields.
  • aws-access-key-id: A user name or S3 access key ID for S3 access.
  • aws-secret-access-key: A password or S3 access key ID for S3 access.
nidataframe-s3-credentials Has the following fields.
  • access-key-id: A user name or S3 access key ID for S3 access.
  • secret-access-key: A password or S3 access key ID for S3 access.

Azure Storage Credentials

Note A SystemLink Enterprise configuration requires the following secrets when using an Azure Storage file storage provider.
Table 94. Azure Storage Credentials
Secret Details
feeds-azure-credentials Has the following fields.
  • azure-secret-access-key: A shared access key for the Azure Storage account linked to the Feed Service.
files-azure-credentials Has the following fields.
  • azure-secret-access-key: A shared access key for the Azure Storage account linked to the File Ingestion Service.
nbexecservice-azure-credentials Has the following fields.
  • azure-secret-access-key: A shared access key for the Azure Storage account linked to the Notebook Execution Service.
nidataframe-azure-credentials Has the following fields.
  • azure-secret-access-key: A shared access key for the Azure Storage account linked to the DataFrame Service.

SMTP Credentials

Table 95. SMTP Credentials
Secret Details
smtp-server-credentials Has the following fields.
  • username: User name for the SMTP server.
  • password: Password for the SMTP server.
Required only if you configure smtp.smtpServer.host and smtp.smtpServer.requireAuthentication is true.