diff --git a/Documentation/CRDs/Object-Storage/ceph-object-store-crd.md b/Documentation/CRDs/Object-Storage/ceph-object-store-crd.md index 23716456e..b9c8b04bc 100644 --- a/Documentation/CRDs/Object-Storage/ceph-object-store-crd.md +++ b/Documentation/CRDs/Object-Storage/ceph-object-store-crd.md @@ -381,6 +381,90 @@ vault write -f transit/keys/ exportable=true # transit engine * `tokenSecretName` can be (and often will be) the same for both kms and s3 configurations. +### SSE-S3 with Vault Agent + +Instead of using a static token for SSE-S3, you can use a [Vault Agent](https://developer.hashicorp.com/vault/docs/agent-and-proxy/agent) running as a sidecar in the RGW pod. The agent authenticates to Vault using the pod's Kubernetes service account (via Vault's [Kubernetes auth method](https://developer.hashicorp.com/vault/docs/auth/kubernetes)) and acts as a local proxy, eliminating the need to manage static tokens. + +This approach uses the [Vault Agent Injector](https://developer.hashicorp.com/vault/docs/platform/k8s/injector) (a mutating admission webhook) to automatically inject the Vault Agent sidecar into RGW pods. + +#### Prerequisites + +1. **Deploy the Vault Agent Injector** in the cluster: + + ```bash + helm repo add hashicorp https://helm.releases.hashicorp.com + helm install vault hashicorp/vault \ + --set "injector.enabled=true" \ + --set "server.enabled=false" # if using an external Vault server + ``` + +2. **Configure Vault** with the Kubernetes auth method, a policy, and a role: + + ```bash + # Enable Kubernetes auth method + vault auth enable kubernetes + + # Configure Kubernetes auth + vault write auth/kubernetes/config \ + kubernetes_host="https://$KUBERNETES_HOST:443" + + # Create a policy granting access to the transit engine + vault policy write rgw-sse-s3 - <