Secret Service
Secret Service in Anywhere Cloud provides a secure, central store for sensitive information such as passwords, API keys, tokens, and certificates that your applications and Cloudera Data Services rely on.
Instead of hardcoding these values or scattering them across configuration files, you store them once in Secret Service and let your services retrieve them safely when needed. Secret Service helps you to:
- Keep sensitive data protected – secrets are stored securely and kept separate from your application code and configuration.
- Control who can access what – each secret is private to its owner, and you can share it only when you choose.
- Simplify management – update or rotate a secret in one place without changing every application that uses it.
External vault requirements for Secret Service
External HashiCorp Vault integration for Secret Service in Anywhere Cloud requires configuring a bootstrap token policy, generating a bootstrap token, and retrieving Certificate Authority (CA) certificates before Data Service deployment.
The Secret Service service in Cloudera Anywhere Cloud uses an external vault to securely store your passwords, tokens, certificates, and encryption keys. Before you deploy Cloudera Data Services on Anywhere Cloud, you must prepare the external vault. After you complete these prerequisites, configure Secret Service by using either the Cloudera console or the backend API.
HashiCorp Vault server requirements
Secret Service in Cloudera Anywhere Cloud connects to any external HashiCorp Vault server and does not require a specific Vault version. The Vault instance must be reachable, unsealed, and support the following capabilities:
- Key/Value (KV) v2 secrets engine
- JSON Web Token (JWT) authentication method
- Access Control List (ACL) policies
Vault token policy
Create a Vault token with a dedicated bootstrap policy, for example, the
ss-bootstrap policy, that allows full lifecycle management of
secret engines. This policy is used only for the initial vault setup and becomes
obsolete after bootstrapping is finalized.
Run the following commands to create the ss-bootstrap policy:
export VAULT_NAMESPACE="admin/my-namespace" # Scopes the following CLI commands; skip when Vault has no namespaces
vault policy write ss-bootstrap - <<'EOF'
path "sys/mounts/*" { capabilities = ["create", "update"] }
path "+/config" { capabilities = ["create", "update"] }
path "+/metadata/*" { capabilities = ["read"] }
path "sys/auth/*" { capabilities = ["create", "update", "sudo"] }
path "auth/+/config" { capabilities = ["create", "update"] }
path "sys/policies/acl/*" { capabilities = ["create", "update"] }
path "auth/+/role/*" { capabilities = ["create", "update", "read"] }
EOF
Vault token use
Generate a bootstrap token. If a Vault namespace is enabled, generate the token under
that namespace. Specify a Time to Live (TTL) value long enough for Secret Service to
deploy before the token expires. Because this token is required only for preliminary
vault configuration, your administrator can revoke it after Secret Service deployment
is finalized. Provide this token when you configure Secret Service, as the Vault
token field in the Cloudera console, or in the
/api/v1/secret-service/config/ backend API.
Run the following commands to generate the bootstrap token. Set a TTL long enough to finish configuring Secret Service; the token can expire after configuration succeeds.
export VAULT_NAMESPACE="admin/my-namespace" # Or set "admin" as appropriate
vault token create \
-orphan \
-display-name="secret-service-bootstrap" \
-policy="ss-bootstrap" \
-ttl="vault-token-ttl" \
-format=json | jq -r '.auth.client_token'
Vault CA certificate
You need a CA certificate only if your Vault server's Transport Layer Security (TLS) certificate is issued by a private Certificate Authority (CA). If your Vault server uses a certificate from a publicly trusted CA, skip this step.
Obtain the CA certificate in PEM format from the team that manages your Vault server or your organization's public key infrastructure (PKI). If the chain includes intermediate CAs, include them in the same file. Save the certificate as vault-ca.pem.
Optionally, verify that the certificate validates your Vault server by running the following command from a machine that can reach Vault:
openssl s_client -connect vault.example.com:8200 \
-servername vault.example.com \
-CAfile vault-ca.pem \
-verify_return_error </dev/null
A successful check ends with Verify return code: 0 (ok). If the command reports a verification error, the certificate does not match your Vault server; check with your Vault or PKI team.
Provide the vault-ca.pem file when you connect the vault in the Anywhere Cloud Console or through the API.
Vault resources created during installation
Secret Service creates instance-scoped resources at the following paths:
- KV v2 secrets engine –
kv-{instance-digest}/ - JWT auth method –
jwt-{instance-digest}/ - Policy –
scs-service-{instance-digest} - Service role –
{instance-digest}-service-role
Connecting a vault in the Anywhere Cloud Console
Connect an external HashiCorp Vault instance to Secret Service in the Anywhere Cloud console by entering your Vault endpoint, bootstrap token, namespace, and CA certificate.
- You have completed the steps in External vault requirements for Secret Service.
- You have the vault-ca.pem file available if your Vault server uses a private CA certificate.
- You must hold the Platform Admin role to manage and configure Secret Service and the Vault connection.
Adding a Secret
Add secrets in Anywhere Cloud to securely store key-value credentials or binary files for your workloads.
After you configure the external vault, you can add secrets in the Cloudera Anywhere Cloud console.
The added secret is displayed on the Manage Secrets page.
New secrets are private: only you can see and use them. A secret becomes shareable when you share it for the first time. For more information, see Sharing secrets.
Editing a secret
Update the description or replace the values of a secret, for example, to rotate a password or an API key.
You can edit a secret that you own, or a secret for which you have the Edit and use permission.
You cannot change the name or the type of a secret. To rename a secret or change its type, add a new secret and delete the old one.
Replacing the values of a secret overwrites the stored values. You cannot recover the previous values.
You own the secret, or you have the Edit and use permission for the secret.
The secret is updated, and the console displays the Secret updated message.
If another user changed the secret after you opened it, the console displays the This secret changed since you opened it. message. Reload the list, and edit the secret again.
Sharing secrets
Share a secret with specific users and assign usage or editing permissions in the Anywhere Cloud console.
The shared secret is displayed on the Manage Secrets page.
Deleting a secret
Permanently delete a secret that you own and no longer need, which removes access for all users and services that rely on it.
Only the owner of a secret can delete it. Deletion is permanent, and you cannot recover a deleted secret. Users with whom the secret is shared lose access to it, and services that use the secret can no longer read it.
Before you delete a secret, check which services use it.
You own the secret.
- Go to .
- Find the secret, click the More actions icon, and then select Delete.
- In the Delete secret dialog box, type the name of the secret to confirm.
- Click Delete secret.
The secret is deleted and removed from the list, and the console displays the Secret deleted message.
Workload access to secrets
Cloudera Data Services and engines read secrets through the Secret Service API, never directly from your external Vault instance.
Secrets are stored in your external Vault instance, not in Cloudera Anywhere Cloud. When a workload needs a secret, it calls the Secret Service API. Secret Service reads the secret from Vault by using short-lived Vault tokens that it requests for itself. Workloads do not receive Vault credentials. For more information about token lifetimes, see the Vault JWT role token TTL parameter.
A caller can read a secret only if it owns the secret, or if the secret is shared with it directly or through a role. A caller can be a user or a service. When a service acts on behalf of a user, for example by presenting that user's token, Secret Service treats the request as coming from that user.
Only Anywhere Cloud Secret Service connects to Vault, so your workload clusters do not need network access to your Vault instance.
Connecting a vault by using the API
Enable Secret Service on Anywhere Cloud by using Helm and connect your external HashiCorp Vault instance through the backend configuration API.
Supply the Vault connection details, including the address, token, and Certificate Authority (CA) certificate, through the backend configuration API instead of Helm values, so that the same configuration applies to both command-line and Cloudera console deployments.
- You have completed the steps in External vault requirements for Secret Service.
- You have your Vault server address, bootstrap token, and the vault-ca.pem certificate file.
- You have
kubectlandhelmcommand-line interface (CLI) access to theawc-corenamespace. - The
features.crossClusterparameter is enabled on your cluster. Secret Service requiresfeatures.crossClusterto function, and Cloudera recommends enabling it during cluster creation. - Your Vault server is reachable, unsealed, and supports the Key/Value (KV) v2 secrets engine, JSON Web Token (JWT) authentication, and Access Control List (ACL) policies.
Secret Service is enabled on your Cloudera Anywhere Cloud cluster and connected to your external HashiCorp Vault backend.
