6.1.1. Secrets in Nubus for Kubernetes#
Nubus for Kubernetes uses and needs sensitive data such as passwords, tokens, and keys. Kubernetes uses Secrets for such sensitive data.
This section describes the supported use cases for configuring secrets in Nubus for Kubernetes:
Nubus generates the Secrets automatically from a seed. See Auto-generated secrets.
The operator defines custom secret values in the Helm Chart
custom_values.yaml
values file and lets the Nubus Helm Chart create the Kubernetes Secrets. See Custom secret values.The operator brings their own Kubernetes Secrets and tells the Helm Chart the name of each secret and the key therein. See Existing secrets.
Important
Regardless of the option you choose, keep in mind that Nubus doesn’t support changing secrets after the initial rollout. Credential roll-over is the process of changing credentials after initial rollout.
To make sure that you configured all necessary secrets, consult the List of secrets.
See also
- Secrets | Kubernetes
in Kubernetes Documentation [1] for concept information about the Kubernetes Secrets object.
6.1.1.1. Auto-generated secrets#
Nubus for Kubernetes creates Secrets automatically, if you as the operator don’t provide any further information about sensitive data.
Important
Using auto-generated secrets is for evaluation deployments only.
- Recommendation
For a production deployment, generate your own secrets and configure them as described in the following sections:
To let Nubus for Kubernetes create the Secrets
with automatically generated values,
you need to ensure to provide a seed value in
global.nubusMasterPassword
of your custom_values.yaml
values file
before you start the initial deployment of Nubus.
Caution
Running a helm upgrade with a changed seed breaks the deployment.
6.1.1.2. Custom secret values#
In Nubus for Kubernetes you can define custom values for various Secrets
while letting the Nubus helm chart configure and deploy the secret Manifests.
This option is for scenarios where you need more control on the secret values.
The credential configuration in the Nubus Helm Chart follows the pattern componentName.auth
.
- Example
For example, to provide the secret value for the Provisioning API to the Self Service Consumer, you need to define
nubusSelfServiceConsumer.provisioningApi.auth.password
in your values file as shown in Listing 6.1.nubusSelfServiceConsumer: provisioningApi: auth: password: "<Some-secret-value>"
6.1.1.3. Existing secrets#
In Nubus for Kubernetes, you can also use existing Kubernetes Secrets. This option is for scenarios, where you as the operator manage the secrets in the cluster or delegate this task to third party software.
To provide references to existing Kubernetes Secrets, look for the following keys in the Helm Chart:
credentialSecret
orauth.credentialSecret
existingSecret
orauth.existingSecret
For each individual setting you need to have a closer look into the Helm Chart and the respective sub chart.
- Example
For example, to provide an existing secret for the Provisioning API to the Self Service Consumer, you need to define the following values, as shown in Listing 6.2:
nubusSelfServiceConsumer.provisioningApi.auth.existingSecret.name
nubusSelfServiceConsumer.provisioningApi.auth.existingSecret.keyMapping.password
nubusSelfServiceConsumer: provisioningApi: auth: existingSecret: name: "<name-of-secret-for-provisioning-api-in-self-service-consumer>" keyMapping: password: "<name-of-the-key-whose-value-holds-the-password>"
Tip
To configure a custom secret key, you can add an optional
keyMapping
section to yourexistingSecret
. It let’s you map the default key to a custom key. You can find the default key in thevalues.yaml
file of the Helm Chart.In the example in Listing 6.2, the default key is
password
.
6.1.1.4. List of secrets#
This section lists the secrets used in Nubus for Kubernetes. It helps you as the operator to verify that you configured all necessary secrets and that you don’t get stuck with auto-generated secrets.
- Custom secret values
nubusGuardian.postgresql.auth.username
andnubusGuardian.postgresql.auth.password
nubusGuardian.provisioning.config.keycloak.username
andnubusGuardian.provisioning.config.keycloak.password
nubusNotificationsApi.postgresql.auth.username
andnubusNotificationsApi.postgresql.auth.password
nubusPortalConsumer.provisioningApi.auth.username
andnubusPortalConsumer.provisioningApi.auth.password
nubusSelfServiceConsumer.provisioningApi.auth.username
andnubusSelfServiceConsumer.provisioningApi.auth.password
nubusUmcServer.memcached.auth.username
andnubusUmcServer.memcached.auth.password
nubusUmcServer.postgresql.auth.username
,nubusUmcServer.postgresql.auth.password
andnubusUmcServer.postgresql.auth.postgresPassword
For S3-compatible object storage, see Manual credential configuration for using external S3-compatible object storage.
- Existing secrets
global.ldap.auth.cnAdmin.existingSecret.name
andglobal.ldap.auth.cnAdmin.existingSecret.keyMapping.password
keycloak.keycloak.auth.existingSecret.name
andkeycloak.keycloak.auth.existingSecret.keyMapping.adminPassword
keycloak.postgresql.auth.existingSecret.name
andkeycloak.postgresql.auth.existingSecret.keyMapping.password
nubusGuardian.postgresql.auth.credentialSecret.name
andnubusGuardian.postgresql.auth.credentialSecret.key
nubusGuardian.provisioning.config.keycloak.credentialSecret.name
andnubusGuardian.provisioning.config.keycloak.credentialSecret.key
nubusKeycloakExtensions.keycloak.auth.existingSecret.name
andnubusKeycloakExtensions.keycloak.auth.existingSecret.keyMapping.adminPassword
nubusKeycloakExtensions.postgresql.auth.existingSecret.name
andnubusKeycloakExtensions.postgresql.auth.existingSecret.keyMapping.password
nubusKeycloakExtensions.smtp.auth.existingSecret.name
andnubusKeycloakExtensions.smtp.auth.existingSecret.keyMapping.password
nubusPortalConsumer.provisioningApi.auth.credentialSecret.name
andnubusPortalConsumer.provisioningApi.auth.credentialSecret.key
nubusProvisioning.api.auth.admin.existingSecret.name
andnubusProvisioning.api.auth.admin.existingSecret.keyMapping.password
nubusProvisioning.ldap.auth.existingSecret.name
andnubusProvisioning.ldap.auth.existingSecret.keyMapping.password
nubusProvisioning.api.auth.eventsUdm.existingSecret.name
andnubusProvisioning.api.auth.eventsUdm.existingSecret.keyMapping.password
nubusProvisioning.api.auth.prefill.existingSecret.name
andnubusProvisioning.api.auth.prefill.existingSecret.keyMapping.password
nubusProvisioning.api.nats.auth.existingSecret.name
andnubusProvisioning.api.nats.auth.existingSecret.keyMapping.provisioningApiPassword
nubusProvisioning.dispatcher.nats.auth.existingSecret.name
andnubusProvisioning.dispatcher.nats.auth.existingSecret.keyMapping.dispatcherPassword
nubusProvisioning.prefill.nats.auth.existingSecret.name
andnubusProvisioning.prefill.nats.auth.existingSecret.keyMapping.prefillPassword
nubusProvisioning.udmTransformer.nats.auth.existingSecret.name
andnubusProvisioning.udmTransformer.nats.auth.existingSecret.keyMapping.udmTransformerPassword
nubusSelfServiceConsumer.provisioningApi.auth.existingSecret.name
andnubusSelfServiceConsumer.provisioningApi.auth.existingSecret.keyMapping.password
nubusUmcServer.memcached.auth.existingSecret.name
andnubusUmcServer.memcached.auth.existingPasswordSecret
postgresql.auth.existingSecret
, see Configure external PostgreSQL databaseFor S3-compatible object storage, see, Existing credential configuration for using external S3-compatible object storage.