mc admin accesskey list
The mc admin accesskey ls command lists users, access keys, or temporary security token service keys managed by the MinIO AIStor deployment.
You can use mc admin accesskey ls as an alias to this command.
Syntax
The following command lists all access keys associated to the user with username admin1 on the deployment at alias myaistor:
mc admin accesskey ls myaistor admin1The output resembles the following:
User: admin1
Access Keys:
5XF3ZHNZK6FBDWH9JMLX, expires: 3 months from now, sts: true
F4V2BBUZSWY7UG96ED70, expires: never, sts: false
FZVSEZ8NM9JRBEQZ7B8Q, expires: never, sts: false, status: disabledEach line names the key, when it expires, and whether it came from the Security Token Service.
A disabled key carries status: disabled; a key with no such marker is enabled.
The command has the following syntax:
mc [GLOBALFLAGS] admin accesskey ls \
ALIAS \
[USER] \
[--all] \
[--self] \
[--svcacc-only] \
[--temp-only] \
[--users-only]- 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
Required
The alias of the MinIO AIStor deployment.
USER
Optional
The username of the user(s) to display access keys for. Separate multiple usernames with a space.
--all
Optional
List all users and any access keys or temporary STS keys associated with them. Requires admin privileges for the deployment.
This flag is mutually exclusive with --self and with USER.
--svcacc-only
Optional
List only access keys, without temporary Security Token Service (STS) keys.
This flag is mutually exclusive with --temp-only and --users-only.
--self
Optional
List access keys and STS keys for the currently authenticated user. Earlier releases return an empty list when the caller authenticated through LDAP or OpenID Connect.
This flag is mutually exclusive with --all and with USER.
--temp-only
Optional
List only temporary Security Token Service (STS) keys.
This flag requires admin privileges for the user running the command.
This flag is mutually exclusive with --svcacc-only and --users-only.
--users-only
Optional
List the MinIO AIStor users managed by the deployment.
Use in conjunction with the --all flag to list all users on the deployment.
This flag is mutually exclusive with --svcacc-only and --temp-only.
Global Flags
This command supports any of the global flags.
Examples
List all built-in users and associated access keys
The following command lists all users managed by the MinIO AIStor deployment at alias myaistor and any associated access keys or temporary STS tokens.
mc admin accesskey list myaistor/ --allReturn a list of access keys for the current authenticated user
The following command lists the access keys or temporary STS tokens associated with the currently authenticated user for the myaistor deployment.
mc admin accesskey list myaistor/ --selfList all users created and managed by the deployment
The following command returns a list of all of the users on the deployment at myaistor.
The list only includes MinIO AIStor managed users, not users managed by a third party tool on a protocol like OpenID or Active Directory/LDAP.
mc admin accesskey ls myaistor/ --all --users-onlyReturn a list of access keys associated with the users aistoruser1 and aistoruser2
The following command returns a list of access keys for two users on the myaistor deployment.
mc admin accesskey ls myaistor/ aistoruser1 aistoruser2Behavior
S3 compatibility
This command uses a MinIO AIStor administrative API and does not work against other S3-compatible services.