Exporting an LDAP token
When running Ceph Object Gateway with LDAP, the access token is all that is required. The access token is created from the access key and secret key.
Export the access key and secret key as an LDAP token.
-
Export the access key:
Syntax
export RGW_ACCESS_KEY_ID="USERNAME" -
Export the secret key:
Syntax
export RGW_SECRET_ACCESS_KEY="PASSWORD" -
Export the token. For LDAP, use
ldapas the token type (ttype).Example
radosgw-token --encode --ttype=ldapFor Active Directory, use
adas the token type.Example
radosgw-token --encode --ttype=adThe result is a base-64 encoded string, which is the access token. Provide this access token to S3 clients in lieu of the access key. The secret key is no longer required.
-
Optional: For added convenience, export the base-64 encoded string to the
RGW_ACCESS_KEY_IDenvironment variable if the S3 client uses the environment variable.Example
export RGW_ACCESS_KEY_ID="ewogICAgIlJHV19UT0tFTiI6IHsKICAgICAgICAidmVyc2lvbiI6IDEsCiAgICAgICAgInR5cGUiOiAibGRhcCIsCiAgICAgICAgImlkIjogImNlcGgiLAogICAgICAgICJrZXkiOiAiODAwI0dvcmlsbGEiCiAgICB9Cn0K"