content/operate/kubernetes/security/sso.md
Redis Enterprise Software supports SAML 2.0 single sign-on (SSO) for the Cluster Manager UI with both IdP-initiated and SP-initiated authentication. User accounts are automatically created on first sign-in using just-in-time (JIT) provisioning.
Your identity provider must support:
To enable SSO for your Redis Enterprise cluster (REC), follow these steps to configure SAML authentication.
Before enabling SSO, ensure you have:
An existing Redis Enterprise cluster (REC) deployed in Kubernetes
External access to the Cluster Manager UI - The Cluster Manager UI must be accessible externally via a LoadBalancer service or Ingress so users can access it from their browser and the identity provider can redirect back after authentication. See [Connect to the admin console]({{< relref "/operate/kubernetes/re-clusters/connect-to-admin-console.md" >}}) for configuration options.
A SAML 2.0-compatible identity provider (such as Okta, Azure AD, or similar)
Admin access to your identity provider
A TLS certificate and private key for the service provider (SP)
{{<warning>}}
SSO requires external access to the Cluster Manager UI. Port forwarding is not sufficient for SSO authentication because the identity provider needs to redirect users back to the UI after authentication. You must configure either a LoadBalancer service (via spec.uiServiceType: LoadBalancer) or an Ingress controller.
{{</warning>}}
The Service Provider certificate is used by the cluster to sign SAML requests and encrypt SAML responses.
Create a secret with your service provider certificate and private key:
kubectl -n <rec-namespace> create secret generic sso-service-cert \
--from-literal=name=sso_service \
--from-file=certificate=<sp-cert-file> \
--from-file=key=<sp-key-file>
The secret must:
RedisEnterpriseCluster custom resource.name key explicitly set to sso_service.certificate key with the public certificate in PEM format.key key with the private key in PEM format.Replace the <placeholders> in the command above with your own values.
Configure the service provider certificate in the RedisEnterpriseCluster custom resource:
apiVersion: app.redislabs.com/v1
kind: RedisEnterpriseCluster
metadata:
name: rec
spec:
nodes: 3
certificates:
ssoServiceCertificateSecretName: sso-service-cert
sso:
enabled: false # SSO not yet active - set to true in Step 7 after completing configuration
enforceSSO: false # Optional: set to true to disable local authentication for non-admin users
saml:
spMetadataSecretName: sp-metadata # Optional: store SP metadata in a secret
serviceProvider:
baseAddress: "https://redis-ui.example.com:443" # Optional: customize base address
Apply the configuration:
kubectl apply -f <rec-config-file>.yaml
The base address is used to construct service provider URLs, such as the Assertion Consumer Service (ACS) URL and Single Logout (SLO) URL.
If not specified, the base address is automatically determined from the REC Cluster Manager UI service:
LoadBalancer (configured via spec.uiServiceType), the load balancer address is used.rec-ui.svc.cluster.local).To explicitly set the base address, add it to the serviceProvider section:
spec:
sso:
saml:
serviceProvider:
baseAddress: "https://redis-ui.example.com:443"
Format: [<scheme>://]<hostname>[:<port>]
Examples:
"https://redis-ui.example.com:443" (recommended - explicit scheme)"redis-ui.example.com:443" (defaults to https://)"http://redis-ui.example.com:9443" (NOT recommended for production){{<warning>}}
Using http:// is NOT recommended for production environments as it transmits sensitive SAML assertions in plaintext. Only use http:// for testing or development purposes.
{{</warning>}}
Usage guidelines:
"https://redis-ui.example.com:443".After applying the configuration, retrieve the service provider metadata to use when configuring your identity provider.
If you configured spMetadataSecretName in Step 1, the operator creates a secret with the SP metadata:
kubectl -n <rec-namespace> get secret sp-metadata -o jsonpath='{.data.sp_metadata}' | base64 -d > sp-metadata.xml
{{<note>}}
This secret is only created when the cluster is configured to use Kubernetes secrets (spec.clusterCredentialSecretType is unset or set to "kubernetes"). When using Vault secrets, use Option B instead.
{{</note>}}
You can obtain the SP metadata directly from the Redis Enterprise Server API:
kubectl -n <rec-namespace> exec -it <rec-pod-name> -c redis-enterprise-node -- \
curl -k -u "<username>:<password>" \
https://localhost:9443/v1/cluster/sso/saml/metadata/sp > sp-metadata.xml
Replace <rec-pod-name>, <username>, and <password> with your cluster details.
Use the Service Provider metadata from Step 2 to configure a SAML application in your identity provider.
Sign in to your identity provider's admin console (for example, Okta, Azure AD, Google Workspace).
Create a new SAML 2.0 application or integration.
Upload the sp-metadata.xml file or manually configure the SAML settings using values from the metadata:
entityID attribute of the metadataAssertionConsumerService element's Location attributeSingleLogoutService element's Location attribute (if present)Configure the SAML assertion to include the following attributes:
email - User's email address (required)firstName - User's first name (optional)lastName - User's last name (optional)redisRoleMapping - Role mapping for JIT user provisioning (required for new users)Refer to your identity provider's documentation for specific configuration steps.
After configuring the SAML app in your identity provider, download the identity provider metadata and certificate.
In your identity provider's admin console, locate the SAML app you created in Step 3.
Download the following:
Save these files for use in Step 5.
Now configure the identity provider details in your Redis Enterprise cluster.
Create a secret with the Identity Provider certificate:
kubectl -n <rec-namespace> create secret generic sso-issuer-cert \
--from-literal=name=sso_issuer \
--from-file=certificate=<idp-cert-file>
The secret must:
RedisEnterpriseCluster custom resource.name key explicitly set to sso_issuer.certificate key with the IdP public certificate in PEM format.key field (only the public certificate is needed).Replace <idp-cert-file> with the path to your IdP certificate file.
{{<note>}} While IdP metadata XML may contain the certificate, Redis Enterprise Server does not use it from there, so the certificate must be provided separately via this secret. {{</note>}}
Configure the IdP using one of the following options:
Using IdP metadata XML is the recommended approach as it's less error-prone.
Create a secret with the IdP metadata:
kubectl -n <rec-namespace> create secret generic idp-metadata \
--from-file=idp_metadata=<idp-metadata-file>.xml
The secret must:
RedisEnterpriseCluster custom resource.idp_metadata key with the IdP metadata XML content.Replace <idp-metadata-file> with the path to your IdP metadata XML file.
Update the RedisEnterpriseCluster custom resource to add the IdP configuration:
spec:
certificates:
ssoServiceCertificateSecretName: sso-service-cert
ssoIssuerCertificateSecretName: sso-issuer-cert
sso:
enabled: false # SSO not yet active - set to true in Step 7 after completing configuration
enforceSSO: false # Optional: set to true to disable local authentication for non-admin users
saml:
idpMetadataSecretName: idp-metadata
spMetadataSecretName: sp-metadata
serviceProvider:
baseAddress: "https://redis-ui.example.com:443"
Apply the updated configuration:
kubectl apply -f <rec-config-file>.yaml
If IdP metadata XML is unavailable, you can manually configure the issuer settings.
Update the RedisEnterpriseCluster custom resource with the IdP details:
spec:
certificates:
ssoServiceCertificateSecretName: sso-service-cert
ssoIssuerCertificateSecretName: sso-issuer-cert
sso:
enabled: false # SSO not yet active - set to true in Step 7 after completing configuration
enforceSSO: false # Optional: set to true to disable local authentication for non-admin users
saml:
issuer:
entityID: "urn:sso:example:idp"
loginURL: "https://idp.example.com/sso/saml"
logoutURL: "https://idp.example.com/slo/saml" # optional
spMetadataSecretName: sp-metadata
serviceProvider:
baseAddress: "https://redis-ui.example.com:443"
Replace the values with your identity provider's configuration:
entityID: Identity Provider entity ID (issuer identifier)loginURL: Identity Provider SSO login URL where SAML authentication requests are sentlogoutURL: Identity Provider single logout URL (optional)Apply the updated configuration:
kubectl apply -f <rec-config-file>.yaml
{{<note>}}
If both idpMetadataSecretName and issuer are provided, idpMetadataSecretName takes precedence and issuer is ignored.
{{</note>}}
In your identity provider's admin console, assign users to the SAML application you created in Step 3.
Navigate to the SAML app in your identity provider.
Assign existing users or groups to the application.
For new users who will use just-in-time (JIT) provisioning, ensure the redisRoleMapping attribute is configured with appropriate Redis Enterprise roles.
Refer to your identity provider's documentation for specific steps on assigning users to applications.
Finally, activate SSO by enabling it in the RedisEnterpriseCluster custom resource.
Update the RedisEnterpriseCluster custom resource to enable SSO:
spec:
certificates:
ssoServiceCertificateSecretName: sso-service-cert
ssoIssuerCertificateSecretName: sso-issuer-cert
sso:
enabled: true
enforceSSO: false # Set to true to disable local authentication for non-admin users
saml:
idpMetadataSecretName: idp-metadata
spMetadataSecretName: sp-metadata
serviceProvider:
baseAddress: "https://redis-ui.example.com:443"
Apply the configuration:
kubectl apply -f <rec-config-file>.yaml
Test SSO by accessing the Cluster Manager UI and clicking Sign in with SSO.
Here's a complete example of a RedisEnterpriseCluster resource with SSO enabled:
apiVersion: app.redislabs.com/v1
kind: RedisEnterpriseCluster
metadata:
name: rec
spec:
nodes: 3
certificates:
ssoServiceCertificateSecretName: sso-service-cert
ssoIssuerCertificateSecretName: sso-issuer-cert
sso:
enabled: true
enforceSSO: false
saml:
idpMetadataSecretName: idp-metadata
spMetadataSecretName: sp-metadata
serviceProvider:
baseAddress: "https://redis-ui.example.com:443"
Refer to the RedisEnterpriseCluster API reference for full details on the available fields.
After enabling SSO:
redisRoleMapping attribute in your identity provider to assign appropriate roles for new usersFor more information about Redis Enterprise Software security, see [Access control]({{< relref "/operate/rs/security/access-control/" >}}).