Questo contenuto non è disponibile nella lingua selezionata.
Chapter 16. Using TLS certificates for applications accessing RGW
Most of the S3 applications require TLS certificate in the forms such as an option included in the Deployment configuration file, passed as a file in the request, or stored in /etc/pki paths.
TLS certificates for RADOS Object Gateway (RGW) are stored as Kubernetes secret and you need to fetch the details from the secret.
Prerequisites
A running OpenShift Data Foundation cluster.
Procedure
For internal RGW server
Get the TLS certificate and key from the kubernetes secret:
$ oc get secrets/<secret_name> -o jsonpath='{.data..tls\.crt}' | base64 -d $ oc get secrets/<secret_name> -o jsonpath='{.data..tls\.key}' | base64 -d- <secret_name>
-
The default kubernetes secret name is
<objectstore_name>-cos-ceph-rgw-tls-cert. Specify the name of the object store.
For external RGW server
Get the the TLS certificate from the kubernetes secret:
$ oc get secrets/<secret_name> -o jsonpath='{.data.cert}' | base64 -d- <secret_name>
-
The default kubernetes secret name is
ceph-rgw-tls-certand it is an opaque type of secret. The key value for storing the TLS certificates iscert.
16.1. Accessing External RGW server in OpenShift Data Foundation Copia collegamentoCollegamento copiato negli appunti!
Accessing External RGW server using Object Bucket Claims
The S3 credentials such as AccessKey or Secret Key is stored in the secret generated by the Object Bucket Claim (OBC) creation and you can fetch the same by using the following commands:
# oc get secret <object bucket claim name> -o jsonpath='{.data.AWS_SECRET_ACCESS_KEY}' | base64 --decode
# oc get secret <object bucket claim name> -o jsonpath='{.data.AWS_ACCESS_KEY_ID}' | base64 --decode
Similarly, you can fetch the endpoint details from the configmap of OBC:
# oc get cm <object bucket claim name> -o jsonpath='{.data.BUCKET_HOST}'
# oc get cm <object bucket claim name> -o jsonpath='{.data.BUCKET_PORT}'
# oc get cm <object bucket claim name> -o jsonpath='{.data.BUCKET_NAME}'
Accessing External RGW server using the Ceph Object Store User CR
You can fetch the S3 Credentials and endpoint details from the secret generated as part of the Ceph Object Store User CR:
# oc get secret rook-ceph-object-user-<object-store-cr-name>-<object-user-cr-name> -o jsonpath='{.data.AccessKey}' | base64 --decode
# oc get secret rook-ceph-object-user-<object-store-cr-name>-<object-user-cr-name> -o jsonpath='{.data.SecretKey}' | base64 --decode
# oc get secret rook-ceph-object-user-<object-store-cr-name>-<object-user-cr-name> -o jsonpath='{.data.Endpoint}' | base64 --decode
For both the access mechanisms, you can either request for new certificates from the administrator or reuse the certificates from the Kubernetes secret, ceph-rgw-tls-cert.