mc idp ldap accesskey ls
The mc idp ldap accesskey ls displays a list of LDAP access key pairs.
mc idp ldap accesskey ls is also known as mc idp ldap accesskey list.
This command works against access keys created by an AD/LDAP user after authenticating to MinIO AIStor.
Create AD/LDAP service accounts with the mc idp ldap accesskey create command.
Authenticated users can manage their own long-term Access Keys using the Console UI. MinIO AIStor supports using AssumeRoleWithLDAPIdentity to generate temporary access keys using the Security Token Service.
Syntax
The following example returns a list of access keys associated with the authenticated user on the myaistor alias:
mc idp ldap accesskey ls myaistorIf the authenticated user has the admin:ListUsers permission, the example command returns a list of all users and their associated access keys.
The command has the following syntax:
mc [GLOBALFLAGS] idp ldap accesskey ls \
ALIAS[:CONFIG_NAME] \
[--all] \
[--self] \
[--svcacc-only] \
[--temp-only] \
[--users-only] \
[DN] ...-
Replace
ALIASwith the alias of a MinIO AIStor deployment configured for AD/LDAP integration. -
Optionally append
:CONFIG_NAMEto specify a non-default LDAP configuration. -
Replace
DNwith the string of a user’s distinguished name. You may list multiple distinguished names by separating each with a space. -
Brackets
[]indicate optional parameters. -
Parameters sharing a line are mutually dependent.
-
Parameters separated using the pipe
|operator are mutually exclusive.
Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.
Parameters
ALIAS[:CONFIG_NAME]
Required
The alias of the MinIO AIStor deployment configured for AD/LDAP.
Optionally append :CONFIG_NAME to use a non-default LDAP configuration.
If not specified, the command uses the default LDAP configuration.
--all
Optional
List all access keys for all LDAP users.
--self
Optional
List access keys for the currently authenticated user.
--svcacc-only
Optional
Output only service account access keys.
Mutually exclusive with --temp-only.
--temp-only
Optional
Output only temporary access keys.
Mutually exclusive with --svcacc-only.
--users-only
Optional
Output only the user distinguished names.
Examples
List all access keys
To return a list of all access keys, you must first authenticate as the admin user.
Once authenticated, the following command returns all AD/LDAP access keys on the deployment accessible at the alias myaistor.
mc idp ldap accesskey ls myaistorIf the user does not have the admin:ListUsers permission, the command returns a list of access keys for the authenticated user only.
List user distinguished names
To return a list of DNs for a deployment, you must first authenticate as a user with the admin:ListUsers permission.
Once authenticated, the following command outputs the AD/LDAP distinguished names on the myaistor deployment.
mc idp ldap accesskey ls myaistor --users-onlyList temporary access keys
To return a list of all temporary access keys for a deployment, you must first authenticate as a user with the admin:ListUsers permission.
Once authenticated, the following command outputs a list of distinguished names with their associated temporary access keys.
mc idp ldap accesskey ls myaistor --temp-onlyList a user’s access keys
The following command returns the AD/LDAP access keys for the user bobfisher on the myaistor deployment.
mc idp ldap accesskey list myaistor uid=bobfisher,dc=min,dc=ioList access keys for multiple users
The following command returns the AD/LDAP access keys for the users bobfisher and cody3 on the myaistor deployment.
mc idp ldap accesskey list myaistor uid=bobfisher,dc=min,dc=io uid=cody3,dc=min,dc=ioList access keys for authenticated user
The following command returns the AD/LDAP access keys for the currently authenticated user on the myaistor deployment.
mc idp ldap accesskey list myaistor --selfWithout --self, if the authenticated user has the admin:ListUsers permission, the command returns a list of all users and access keys on the deployment.
List access keys using a non-default LDAP configuration
The following command lists access keys using the LDAP configuration named myldap instead of the default configuration.
mc idp ldap accesskey ls myaistor:myldapGlobal flags
This command supports any of the global flags.
Behavior
S3 compatibility
This command uses a MinIO AIStor administrative API and does not work against other S3-compatible services.