Create Ceph Object Storage users#
Ceph Object Storage users can create Amazon S3 buckets and bucket policies that grant access to other users.
This section describes how to create two Ceph Object Storage users and configure their S3 credentials.
Create and configure Ceph Object Storage users#
-
Open the
CephDeploymentcustom resource for editing:kubectl -n pelagia edit cephdpl -
In the
spec.objectStorage.rgwsection, add new Ceph Object Storage users. For example:spec: objectStorage: rgw: objectUsers: - name: user-b displayName: user-a capabilities: bucket: "*" user: read - name: user-t displayName: user-t capabilities: bucket: "*" user: read -
Verify that
rgwUserSecretsare created for both users:kubectl -n pelagia get cephdeploymentsecret -o yamlExample of a positive system response:
status: secretInfo: rgwUserSecrets: - name: user-a secretName: <user-aCredSecretName> secretNamespace: <user-aCredSecretNamespace> - name: user-t secretName: <user-tCredSecretName> secretNamespace: <user-tCredSecretNamespace> -
Obtain S3 user credentials from the cluster secrets. Specify an access key and a secret key for both users:
kubectl -n <user-aCredSecretNamespace> get secret <user-aCredSecretName> -o jsonpath='{.data.AccessKey}' | base64 -d kubectl -n <user-aCredSecretNamespace> get secret <user-aCredSecretName> -o jsonpath='{.data.SecretKey}' | base64 -d kubectl -n <user-tCredSecretNamespace> get secret <user-tCredSecretName> -o jsonpath='{.data.AccessKey}' | base64 -d kubectl -n <user-tCredSecretNamespace> get secret <user-tCredSecretName> -o jsonpath='{.data.SecretKey}' | base64 -dSubstitute the corresponding
secretNamespaceandsecretNamefor both users. -
Obtain Ceph Object Storage public endpoint from the
CephDeploymentHealthstatus:kubectl -n pelagia get cephdeploymenthealth -o yaml | grep publicEndpointExample of a positive system response:
publicEndpoint: https://object-storage.just.example.com -
Obtain the CA certificate to use an HTTPS endpoint:
kubectl -n rook-ceph get secret $(kubectl -n rook-ceph get ingress -o jsonpath='{.items[0].spec.tls[0].secretName}{"\n"}') -o jsonpath='{.data.ca\.crt}' | base64 -d; echoSave the output to
ca.crt.