This is the multi-page printable view of this section. .
Identity and Access Management
-
1: Silo Identity Management
- 2: User Management
- 3: Group Management
- 4: OpenID Connect Access Management
- 5: Active Directory / LDAP Access Management
- 6: Silo External Identity Management Plugin
- 7: Access Management
- 8: Silo External Access Management Plugin
MinIO requires the client perform both authentication and authorization for each new operation.
Authentication
The process of verifying the identity of a connecting client. MinIO requires clients authenticate using AWS Signature Version 4 protocol with support for the deprecated Signature Version 2 protocol. Specifically, clients must present a valid access key and secret key to access any S3 or MinIO administrative API, such as
PUT,GET, andDELETEoperations.
Authorization
The process of restricting the actions and resources the authenticated client can perform on the deployment. MinIO uses Policy-Based Access Control (PBAC), where each policy describes one or more rules that outline the permissions of a user or group of users. MinIO supports S3-specific actions and conditions when creating policies. By default, MinIO denies access to actions or resources not explicitly referenced in a user’s assigned or inherited policies.
Identity Management
MinIO supports both internal and external identity management:
| IDentity Provider (IDP) | Description |
|---|---|
| MinIO Internal IDP | Provides built-in identity management functionality. |
| OpenID | Supports managing identities through an OpenID Connect (OIDC) compatible service. |
| MinIO Authentation Plugin | Supports a custom external identity manager using the MinIO Authentication Plugin extension. |
| Active Directory / LDAP | Supports managing identities through an Active Directory or LDAP service. |
| Access Management Plugin | Supports a custom external access manager using the MinIO Access Management Plugin extension. |
Once authenticated, MinIO either allows or rejects the client request depending on whether or not the authenticated identity is authorized to perform the operation on the specified resource.
Access Management
MinIO uses Policy-Based Access Control (PBAC) to define the authorized actions and resources to which an authenticated user has access. Each policy describes one or more actions and conditions that outline the permissions of a user or group of users.
MinIO manages the creation and storage of policies. The process for assigning a policy to a user or group depends on the configured IDentity Provider (IDP).
MinIO deployments using the MinIO Internal IDP require explicitly associating a user to a policy or policies using the mc admin policy attach command. A user can also inherit the policies attached to the groups in which they have membership.
By default, MinIO denies access to actions or resources not explicitly allowed by an attached or inherited policy. A user with no explicitly assigned or inherited policies cannot perform any S3 or MinIO administrative API operations.
For MinIO deployments using an External IDP, policy assignment depends on the choice of IDP:
MinIO checks for a JSON Web Token (JWT) claim ( MinIO does not support assigning OIDC user identities to groups. The IDP administrator must instead assign all necessary policies to the user’s policy claim. See Access Control for Externally Managed Identities for more information. |
|
MinIO checks for a policy whose name matches the Distinguished Name (DN) of the authenticated AD/LDAP user. MinIO also supports querying for the authenticated AD/LDAP user’s group memberships. MinIO assigns any policy whose name matches the DN for each returned group. If no policies match either the user DN or any of the user’s group DNs, the user cannot perform any action on the MinIO deployment. See Access Control for Externally Managed Identities for more information. |
MinIO PBAC is built for compatibility with AWS IAM policy syntax, structure, and behavior. The MinIO documentation makes a best-effort to cover IAM-specific behavior and functionality. Consider deferring to the IAM documentation for more complete documentation on IAM, IAM policies, or IAM JSON syntax.
Deny overrides Allow
MinIO follows AWS IAM policy evaluation rules where a Deny rule overrides Allow rule on the same action/resource. For example, if a user has an explicitly assigned policy with an Allow rule for an action/resource while one of its groups has an assigned policy with a Deny rule for that action/resource, MinIO would apply only the Deny rule.
For more information on IAM policy evaluation logic, see the IAM documentation on Determining Whether a Request is Allowed or Denied Within an Account.
1 - Silo Identity Management
MinIO includes a built-in IDentity Provider (IDP) that provides core identity management functionality. The MinIO IDP supports creating an arbitrary number of long-lived users on the deployment for supporting client authentication.
Each user consists of a unique access key (username) and corresponding secret key (password). Clients must authenticate their identity by specifying both a valid access key (username) and the corresponding secret key (password) of an existing MinIO user.
Administrators use the mc admin user command to create and manage MinIO users.
MinIO also supports creating access keys. Access Keys are child identities of an authenticated parent user and inherit their permissions from the parent.
MinIO by default denies access to all actions or resources not explicitly allowed by a user’s assigned or inherited policies. You must either explicitly assign a policy describing the user’s authorized actions and resources or assign the user to groups which have associated policies. See Access Management for more information.
External Identity Management
MinIO supports external management of identities using either an OpenID Connect (OIDC) or Active Directory/LDAP IDentity Provider (IDP). For more information, see:
AD/LDAP and OIDC configurations are mutually exclusive. Furthermore, enabling AD/LDAP external identity management disables the MinIO internal IDP, with the exception of creating access keys. You can configure multiple OIDC providers while maintaining MinIO-managed users.
2 - User Management
Overview
A MinIO user consists of a unique access key (username) and corresponding secret key (password). Clients must authenticate their identity by specifying both a valid access key (username) and the corresponding secret key (password) of an existing MinIO user.
Each user can have one or more assigned policies that explicitly list the actions and resources to which that user has access. Users can also inherit policies from the groups in which they have membership.
MinIO by default denies access to all actions or resources not explicitly allowed by a user’s assigned or inherited policies. You must either explicitly assign a policy describing the user’s authorized actions and resources or assign the user to groups which have associated policies. See Access Management for more information.
This page documents user management for the MinIO internal IDentity Provider (IDP). MinIO also external management of identities using either an OpenID Connect (OIDC) or Active Directory/LDAP IDentity Provider (IDP). For more information, see:
Enabling external identity management disables the MinIO internal IDP, with the exception of creating access keys.
Access Keys
MinIO Access Keys (formerly “Service Accounts”) are child identities of an authenticated MinIO user, including externally managed identities. Each access key inherits its privileges based on the policies attached to it’s parent user or those groups in which the parent user has membership. Access keys also support an optional inline policy which further restricts access to a subset of actions and resources available to the parent user.
A MinIO user can generate any number of access keys. This allows application owners to generate arbitrary access keys for their applications without requiring action from the MinIO administrators. Since the generated access keys have the same or fewer permissions as the parents, administrators can focus on managing the top-level parent users without micro-managing generated access keys.
You can create access keys by using the mc admin user svcacct add command. Identities created by these methods do not expire until you remove the access key or the parent account.
You can also create security token service accounts programmatically with the AssumeRole STS API endpoint. STS tokens default to expire in 1 hour, but you set expiration for up to 7 days from creation.
Access Keys support programmatic access by applications. You cannot use an access key to log into the MinIO Console.
MinIO root User
MinIO deployments have a root user with access to all actions and resources on the deployment, regardless of the configured identity manager. When a minio server first starts, it sets the root user credentials by checking the value of the following environment variables:
Rotating the root user credentials requires updating either or both variables for all MinIO servers in the deployment. Specify long, unique, and random strings for root credentials. Exercise all possible precautions in storing the access key and secret key, such that only known and trusted individuals who require superuser access to the deployment can retrieve the root credentials.
- MinIO strongly discourages using the
rootuser for regular client access regardless of the environment (development, staging, or production). - MinIO strongly recommends creating users such that each client has access to the minimal set of actions and resources required to perform their assigned workloads.
If these variables are unset, minio defaults to minioadmin and minioadmin as the access key and secret key respectively. MinIO strongly discourages use of the default credentials regardless of deployment environment.
MinIO RELEASE.2021-04-22T15-44-28Z and later deprecates the following variables used for setting or updating root user credentials:
MINIO_ACCESS_KEYto the new access key.MINIO_SECRET_KEYto the new secret key.MINIO_ACCESS_KEY_OLDto the old access key.MINIO_SECRET_KEY_OLDto the old secret key.
User Management
Create a User
Use the mc admin user add command to create a new user on the MinIO deployment:
- Replace
ALIASwith thealiasof the MinIO deployment. - Replace
ACCESSKEYwith the access key for the user. MinIO allows retrieving the access key after user creation through themc admin user infocommand. - Replace
SECRETKEYwith the secret key for the user. MinIO does not provide any method for retrieving the secret key once set.
Specify a unique, random, and long string for both the ACCESSKEY and SECRETKEY. Your organization may have specific internal or regulatory requirements around generating values for use with access or secret keys.
After creating the user, use mc admin policy attach to associate a MinIO Policy Based Access Control to the new user. The following command assigns the built-in readwrite policy:
Replace USERNAME with the ACCESSKEY created in the previous step.
Delete a User
Use the mc admin user rm command to remove a user on a MinIO deployment:
3 - Group Management
Overview
A group is a collection of users. Each group can have one or more assigned policies that explicitly list the actions and resources to which group members are allowed or denied access.
For example, consider the following groups. Each group is assigned a built-in policy or supported policy action. Each group also has one or more assigned users. Each user’s total set of permissions consists of their explicitly assigned permission and the inherited permissions from each of their assigned groups. MinIO by default denies access to any resource or operation not explicitly allowed by a user’s assigned or inherited policies.
Group |
Policy |
Members |
|---|---|---|
|
readwrite on finance bucketreadonly on audit bucket |
|
|
readonly on audit bucket |
|
|
|
Groups provide a simplified method for managing shared permissions among users with common access patterns and workloads. Client’s cannot authenticate to a MinIO deployment using a group as an identity.
The mc admin group command supports the creation and management of groups on the MinIO deployment. See the command reference for examples of usage.
4 - OpenID Connect Access Management
MinIO supports using an OpenID Connect (OIDC) compatible IDentity Provider (IDP) such as Okta, KeyCloak, Dex, Google, or Facebook for external management of user identities.
For identities managed by the external OpenID Connect (OIDC) compatible provider, MinIO can use either of two methods to assign policies to the authenticated user.
- Use the JSON Web Token claim returned as part of the OIDC authentication flow to identify the policies to assign to the authenticated user.
- Use the
RoleArnspecified in the authorization request to assign the policies attached to the provider’s RolePolicy.
MinIO by default denies access to all actions or resources not explicitly allowed by a user’s assigned or inherited policies. Users managed by an OIDC provider must specify the necessary policies as part of the JWT claim. If the user JWT claim has no matching MinIO policies, that user has no permissions to access any action or resource on the MinIO deployment.
The specific claim which MinIO looks for is configured as part of deploying the cluster with OIDC identity management. This page focuses on creating MinIO policies to match the configured OIDC claims.
Authentication and Authorization Flow
MinIO supports two OIDC authentication and authorization flows:
-
The RolePolicy flow sets the assigned policies for an authenticated user in the MinIO configuration.
MinIO recommends using the RolePolicy method for authenticating with an OpenID provider.
-
The JWT flow sets the assigned policies for an authenticated user as part of the OIDC configuration.
MinIO supports multiple OIDC provider configurations. However, you can configure only one JWT claim-based OIDC provider per deployment. All other providers must use RolePolicy.
RolePolicy and RoleArn
With a RolePolicy, all clients which generate an STS credential using a given RoleArn receive the policy or policies associated to the RolePolicy configuration for that RoleArn.
You can use OpenID Policy Variables to create policies that programmatically manage what each individual user has access to.
The login flow for an application using OIDC credentials with a RolePolicy claim flow is as follows:
-
Create an OIDC Configuration.
-
Record the RoleArn assigned to the configuration either at time of creation or at MinIO start. Use this RoleArn with the AssumeRoleWithWebIdentity STS API.
-
Create a RolePolicy to use with the RoleArn. Use either the
MINIO_IDENTITY_OPENID_ROLE_POLICYenvironment variable or theidentity_openid role_policyconfiguration setting to define the list of policies to use for the provider -
Users select the configured OIDC provider when logging in to MinIO.
-
Users complete authentication to the configured OIDC provider and redirect back to MinIO.
MinIO only supports the OpenID Authorization Code Flow. Authentication using Implicit Flow is not supported.
-
MinIO verifies the
RoleArnin the API call and checks for the RolePolicy to use. Any authentication request with the RoleArn receives the same policy access permissions. -
MinIO returns temporary credentials in the STS API response in the form of an access key, secret key, and session token. The credentials have permissions matching those policies specified in the RolePolicy.
-
Applications use the temporary credentials returned by the STS endpoint to perform authenticated S3 operations on MinIO.
JSON Web Token Claim
Using JSON Web Tokens allows you to have individual assignment of policies. However, the use of web tokens also comes at the increased cost of managing multiple policies for separate claims.
The login flow for an application using OIDC credentials with a JSON Web Token Claim flow is as follows:
-
Authenticate to the configured OIDC provider and retrieve a JSON Web Token (JWT).
MinIO only supports the OpenID Authorization Code Flow. Authentication using Implicit Flow is not supported.
-
Specify the JWT to the MinIO Security Token Service (STS) AssumeRoleWithWebIdentity API endpoint.
MinIO verifies the JWT against the configured OIDC provider.
If the JWT is valid, MinIO checks for a claim specifying a list of one or more policies to assign to the authenticated user. MinIO defaults to checking the
policyclaim. -
MinIO returns temporary credentials in the STS API response in the form of an access key, secret key, and session token. The credentials have permissions matching those policies specified in the JWT claim.
-
Applications use the temporary credentials returned by the STS endpoint to perform authenticated S3 operations on MinIO.
MinIO provides an example Go application web-identity.go that handles the full login flow.
Identifying the JWT Claim Value
MinIO uses the JWT token returned as part of the OIDC authentication flow to identify the specific policies to assign to the authenticated user.
You can use a JWT Debugging tool to decode the returned JWT token and validate that the user attributes include the required claims.
See RFC 7519: JWT Claim for more information on JWT claims.
Defer to the documentation for your preferred OIDC provider for instructions on configuring user claims.
Creating Policies to Match Claims
Use the mc admin policy command to create policies that match one or more claim values.
OIDC Policy Variables
The following table contains a list of supported policy variables for use in authorizing OIDC-managed users.
Each variable corresponds to a claim returned as part of the authenticated user’s JWT token:
| Variable | Description |
|---|---|
jwt:sub |
Returns the sub claim for the user. |
jwt:iss |
Returns the Issuer Identifier claim from the ID token. |
jwt:aud |
Returns the Audience claim from the ID token. |
jwt:jti |
Returns the JWT ID claim from the client authentication information. |
jwt:upn |
Returns the User Principal Name claim from the client authentication information. |
jwt:name |
Returns the name claim for the user. |
jwt:groups |
Returns the groups claim for the user. |
jwt:given_name |
Returns the given_name claim for the user. |
jwt:family_name |
Returns the family_name claim for the user. |
jwt:middle_name |
Returns the middle_name claim for the user. |
jwt:nickname |
Returns the nickname claim for the user. |
jwt:preferred_username |
Returns the preferred_username claim for the user. |
jwt:profile |
Returns the profile claim for the user. |
jwt:picture |
Returns the picture claim for the user. |
jwt:website |
Returns the website claim for the user. |
jwt:email |
Returns the email claim for the user. |
jwt:gender |
Returns the gender claim for the user. |
jwt:birthdate |
Returns the birthdate claim for the user. |
jwt:phone_number |
Returns the phone_number claim for the user. |
jwt:address |
Returns the address claim for the user. |
jwt:scope |
Returns the scope claim for the user. |
jwt:client_id |
Returns the client_id claim for the user. |
See the OpenID Connect Core 1.0 document for more information on these scopes. Your OIDC provider of choice may have more specific documentation.
For example, the following policy uses variables to substitute the authenticated user’s preferred_username as part of the Resource field such that the user can only access those prefixes which match their username:
MinIO replaces the ${jwt:preferred_username} variable in the Resource field with the value of the preferred_username in the JWT token. MinIO then evaluates the policy and grants or revokes access to the requested API and resource.
5 - Active Directory / LDAP Access Management
MinIO supports configuring a single Active Directory or LDAP (AD/LDAP) service for external management of user identities. Enabling AD/LDAP external identity management disables the MinIO internal IDP.
For identities managed by the external AD/LDAP provider, MinIO uses the user’s Distinguished Name and attempts to map it against an existing policy.
If the AD/LDAP configuration includes the necessary settings to query the user’s AD/LDAP group membership, MinIO also uses those group Distinguished Names and attempts to map each against an existing policy.
MinIO by default denies access to all actions or resources not explicitly allowed by a user’s assigned or inherited policies. Users managed by an AD/LDAP provider must specify the necessary policies as part of the user profile data. If no policies match either the user DN or group DNs, MinIO blocks all access to actions and resources on the deployment.
The specific AD/LDAP queries MinIO issues to authenticate the user and retrieve it’s group membership are configured as part of deploying the cluster with Active Directory / LDAP identity management. This page covers creation of MinIO policies to match the possible returned Distinguished Names.
Authentication and Authorization Flow
The login flow for an application using Active Directory / LDAP credentials is as follows:
-
Specify the AD/LDAP credentials to the MinIO Security Token Service (STS) AssumeRoleWithLDAPIdentity API endpoint.
-
MinIO verifies the provided credentials against the AD/LDAP server.
-
MinIO checks for any policy whose name matches the user Distinguished Name (DN) and assigns that policy to the authenticated user.
If configured to perform group queries, MinIO also queries for a list of AD/LDAP groups in which the user has membership. MinIO checks for any policy whose name matches a returned group DN and assigns that policy to the authenticated user.
-
MinIO returns temporary credentials in the STS API response in the form of an access key, secret key, and session token. The credentials have permissions matching those policies whose name matches either the authenticated user DN or a group DN.
MinIO provides an example Go application ldap.go that handles the full login flow.
AD/LDAP users can alternatively create access keys associated to their AD/LDAP user Distinguished Name. Access Keys are long-lived credentials which inherit their privileges from the parent user. The parent user can further restrict those privileges while creating the access keys. Use either of the following methods to create a new access key:
Use the mc admin user svcacct add command to create the access keys. Specify the user Distinguished Name as the username to which to associate the access keys.
Mapping Policies to User DN
The following commands use mc idp ldap policy attach to associate an existing MinIO policy to an AD/LDAP User DN.
- MinIO would assign an authenticated user with DN matching
cn=sisko,cn=users,dc=example,dc=comtheconsoleAdminpolicy, granting complete access to the MinIO server. - MinIO would assign an authenticated user with DN matching
cn=dax,cn=users,dc=example,dc=comboth thereadwriteanddiagnosticspolicies, granting general read/write access to the MinIO server and access to diagnostic administrative operations. - MinIO would assign no policies to an authenticated user with DN matching
cn=quark,cn=users,dc=example,dc=comand deny all access to API operations.
Mapping Policies to Group DN
The following commands use mc idp ldap policy attach to associate an existing MinIO policy to an AD/LDAP Group DN.
- MinIO would assign any authenticating user with membership in the
cn=ops,cn=groups,dc=example,dc=comAD/LDAP group theconsoleAdminpolicy, granting complete access to the MinIO server. - MinIO would assign any authenticating user with membership in the
cn=engineering,cn=groups,dc=example,dc=comAD/LDAP group thediagnosticspolicy, granting access to diagnostic administrative operations.
6 - Silo External Identity Management Plugin
Overview
The MinIO Identity Management Plugin provides a REST interface for offloading authentication to an external identity manager through a webhook service.
Once enabled, client applications use the AssumeRoleWithCustomToken STS API extension to generate access tokens for MinIO. MinIO verifies this token by making a POST request to the configured plugin endpoint and uses the returned response to determine the authentication status of the client.
Configuration Settings
You can configure the MinIO Identity Management Plugin using the following environment variables or configuration settings:
Specify the following environment variables to each MinIO server in the deployment:
Set the following configuration settings using the mc admin config set command:
Authentication and Authorization Flow
The login flow for an application is as follows:
-
Make a POST request using the AssumeRoleWithCustomToken API.
The request includes a token used by the configured external identity manager for authenticating the client.
-
MinIO makes a POST call to the configured identity plugin URL using the token specified to the STS API.
-
On successful authentication, the identity manager returns a
200 OKresponse with anapplication/jsoncontent-type and body with the following structure:userThe owner of the requested credentials
maxValiditySecondsThe maximum allowed expiry duration for the returned credentials
claimsA JSON string of
"key": "value"pair claims associated with the requested credentials. MinIO reserves and ignores theexp,parent, andsubclaims objects if present. -
MinIO returns a response to the STS API request that includes temporary credentials for use with making authenticated requests.
If the identity manager rejects the authentication request or otherwise encounters an error, the response must return a 403 FORBIDDEN HTTP status code with an application/json content-type and body with the following structure:
The "reason" field should include the reason for the 403.
Creating Policies to Match Claims
Use the mc admin policy command to create policies that match one or more claim values.
7 - Access Management
Overview
MinIO uses Policy-Based Access Control (PBAC) to define the authorized actions and resources to which an authenticated user has access. Each policy describes one or more actions and conditions that outline the permissions of a user or group of users.
MinIO PBAC is built for compatibility with AWS IAM policy syntax, structure, and behavior. The MinIO documentation makes a best-effort to cover IAM-specific behavior and functionality. Consider deferring to the IAM documentation for more complete documentation on AWS IAM-specific topics.
The mc admin policy command supports creation and management of policies on the MinIO deployment. See the command reference for examples of usage.
Tag-Based Policy Conditions
Changed: RELEASE.2022-10-02T19-29-29Z
Policies can use conditions to limit a user’s access only to objects with a specific tag.
MinIO supports tag-based conditions for selected actions. s3:ExistingObjectTag/<key> evaluates tags stored on the target object when that API path loads the object metadata before authorization. s3:RequestObjectTag/<key> and s3:RequestObjectTagKeys are client-supplied request values, not evidence of stored object state. PutObject, CreateMultipartUpload, and PutObjectTagging explicitly bind them to the tag input those handlers consume; other action paths retain the historical X-Amz-Tagging Header mapping for compatibility, so use request-tag conditions only where the API actually consumes tags.
Bucket tags are separate from object tags. PutBucketTagging does not populate the s3:RequestObjectTag* condition keys from its XML body.
Built-In Policies
MinIO provides the following built-in policies for assigning to users or groups:
consoleAdmin
userpolicy
Grants complete access to all S3 and administrative API operations against all resources on the MinIO deployment. Equivalent to the following set of actions:
readonly
userpolicy
Grants read-only permissions on any object on the MinIO deployment. The GET action must apply to a specific object without requiring any listing. Equivalent to the following set of actions:
For example, this policy specifically supports GET operations on objects at a specific path (e.g. GET play/mybucket/object.file), such as:
The exclusion of listing permissions is intentional, as typical use cases do not intend for a “read-only” role to have complete discoverability (listing all buckets and objects) on the object storage resource.
readwrite
userpolicy
Grants read and write permissions for all buckets and objects on the MinIO server. Equivalent to s3:*.
diagnostics
userpolicy
Grants permission to perform diagnostic actions on the MinIO deployment. Specifically includes the following actions:
admin:ServerTraceadmin:Profilingadmin:ConsoleLogadmin:ServerInfoadmin:TopLocksInfoadmin:OBDInfoadmin:BandwidthMonitoradmin:Prometheus
writeonly
userpolicy
Grants write-only permissions to any namespace (bucket and path to object) the MinIO deployment. The PUT action must apply to a specific object location without requiring any listing. Equivalent to the s3:PutObject action.
Use mc admin policy attach to associate a policy to a user or group on a MinIO deployment.
For example, consider the following table of users. Each user is assigned a built-in policy or a supported action. The table describes a subset of operations a client could perform if authenticated as that user:
User |
Policy |
Operations |
|---|---|---|
|
readwrite on finance bucketreadonly on audit bucket |
PUT and GET on finance bucket.GET on audit bucket |
|
readonly on audit bucket |
|
|
All |
Each user can access only those resources and operations which are explicitly granted by the built-in role. MinIO denies access to any other resource or action by default.
Deny overrides Allow
MinIO follows the IAM policy evaluation rules where a Deny rule overrides Allow rule on the same action/resource. For example, if a user has an explicitly assigned policy with an Allow rule for an action/resource while one of its groups has an assigned policy with a Deny rule for that action/resource, MinIO would apply only the Deny rule.
For more information on IAM policy evaluation logic, see the IAM documentation on Determining Whether a Request is Allowed or Denied Within an Account.
Policy Document Structure
MinIO policy documents use the same schema as AWS IAM Policy documents.
The following sample document provides a template for creating custom policies for use with a MinIO deployment. For more complete documentation on IAM policy elements, see the IAM JSON Policy Elements Reference.
The maximum size for any single policy document is 20KiB. There is no limit to the number of policy documents that can be attached to a user or group.
-
For the
Statement.Actionarray, specify one or more supported S3 API operations. -
For the
Statement.Resourcekey, specify the bucket or bucket prefix to which to restrict the policy. You can use*and?wildcard characters as per the S3 Resource Spec.The
*wildcard may result in unintended application of a policy to multiple buckets or prefixes based on the pattern match. For example,arn:aws:s3:::data*would match the bucketsdata,data_private, anddata_internal. Specifying only*as the resource key applies the policy to all buckets and prefixes on the deployment.An object pattern and a bucket ARN are not interchangeable. See Bucket and Object Resources.
-
For the
Statement.Conditionkey, you can specify one or more supported Conditions.
Bucket and Object Resources
A resource ARN either names a bucket or names objects within it, and the two forms authorize different operations:
arn:aws:s3:::mybucketnames the bucket itself, and authorizes bucket-level operations such asListBucketorPutBucketPolicy.arn:aws:s3:::mybucket/*names the objects in the bucket, and authorizes object operations such asGetObjectorPutObject.
Grant both when a principal needs both, which is the conventional form for a policy that manages a bucket and its contents:
Twelve bucket-level writes require the bucket ARN
An object-only pattern such as arn:aws:s3:::mybucket/* does not authorize the following actions, even when the statement grants s3:*:
PutBucketPolicy, DeleteBucketPolicy, PutBucketObjectLockConfiguration, PutBucketVersioning, PutReplicationConfiguration, PutLifecycleConfiguration, DeleteBucket, ForceDeleteBucket, PutBucketCors, DeleteBucketCors, PutBucketQOS, PutInventoryConfiguration
Each of these hands the caller something an object-scoped grant does not otherwise provide — access for other principals, defeat of a protection aimed at write-holders, activity that outlives the grant, or destruction of the bucket entity. Add the bare bucket ARN alongside the object pattern to grant them.
Earlier releases authorized these through the object pattern as well, because a bucket-level request was matched against the string mybucket/, which mybucket/* also matches. That was an over-grant; see upstream minio/minio#20449. Set MINIO_API_LEGACY_BUCKET_RESOURCE_MATCH to on to restore the previous behaviour while you adjust policies.
Everything else is unchanged. ListBucket, GetBucketLocation, the bucket configuration reads, and CreateBucket are still authorized through an object pattern, so listing and provisioning flows written that way keep working. Deny statements and NotResource exclusions match as they always did, so no restriction written against mybucket/* is weakened. The built-in readwrite, readonly, writeonly and diagnostics policies use arn:aws:s3:::* and are unaffected.
Supported S3 Policy Actions
MinIO policy documents support a subset of IAM S3 Action keys. This section also includes any condition keys supported by a specific action beyond the common set of supported keys.
The following actions control access to common S3 operations. The remaining subsections document actions for more advanced S3 operations:
s3:*
policy-action
Selector for all MinIO S3 operations. Applying this action to a given resource allows the user to perform any S3 operation against that resource.
s3:CreateBucket
policy-action
Controls access to the CreateBucket S3 API operation.
s3:DeleteBucket
policy-action
Controls access to the DeleteBucket S3 API operation.
s3:ForceDeleteBucket
policy-action
Controls access to the DeleteBucket S3 API operation for operations with the x-minio-force-delete flag. Required for removing non-empty buckets.
s3:GetBucketLocation
policy-action
Controls access to the GetBucketLocation S3 API operation.
s3:ListAllMyBuckets
policy-action
Controls access to the ListBuckets S3 API operation.
s3:DeleteObject
policy-action
Controls access to the DeleteObject S3 API operation.
Supports the following additional condition key:
s3:GetObject
policy-action
Controls access to the GetObject S3 API operation.
Supports the following additional condition keys:
s3:GetObjectAttributes
policy-action
Controls access to the GetObjectAttributes S3 API operation.
The policy parser admits the following condition key for this action:
The current handler authorizes before it loads object metadata, however, so that condition value is absent for this operation.
s3:GetObjectVersionAttributes
policy-action
Controls access to the GetObjectAttributes S3 API operations on versioned objects.
Supports the following additional condition keys:
The version ID comes from the request query. The current handler authorizes before it loads object metadata, so s3:ExistingObjectTag/<key> is admitted by the policy parser but absent at evaluation time for this operation.
s3:RestoreObject
policy-action
Controls access to the RestoreObject S3 API operation.
s3:ListBucket
policy-action
Controls access to the ListObjectsV2 S3 API operation.
Supports the following additional condition keys:
s3:PutObject
policy-action
Controls access to the PutObject S3 API operation.
Supports the following additional condition keys:
s3:PutObjectTagging
policy-action
Controls access to the PutObjectTagging S3 API operation.
Supports the following additional condition keys:
s3:GetObjectTagging
policy-action
Controls access to the GetObjectTagging S3 API operation.
Supports the following additional condition keys:
s3:DeleteObjectTagging
policy-action
Controls access to the DeleteObjectTagging S3 API operation.
Supports the following additional condition keys:
Bucket Configuration
s3:GetBucketPolicy
policy-action
Controls access to the GetBucketPolicy S3 API operation.
s3:PutBucketPolicy
policy-action
Controls access to the PutBucketPolicy S3 API operation.
s3:DeleteBucketPolicy
policy-action
Controls access to the DeleteBucketPolicy S3 API operation.
s3:GetBucketTagging
policy-action
Controls access to the GetBucketTagging S3 API operation.
s3:PutBucketTagging
policy-action
Controls access to the PutBucketTagging S3 API operation.
The policy parser retains the following condition keys for compatibility:
The handler does not populate them from the bucket-tagging XML body. Only the historical, client-supplied X-Amz-Tagging Header fallback can populate them, and that Header does not constrain the bucket tags stored from the body. Do not use these keys to enforce the contents of a PutBucketTagging request.
s3:GetBucketPolicyStatus
policy-action
Controls access to the GetBucketPolicyStatus S3 API operation.
Multipart Upload
s3:AbortMultipartUpload
policy-action
Controls access to the AbortMultipartUpload S3 API operation.
s3:ListMultipartUploadParts
policy-action
Controls access to the ListParts S3 API operation.
s3:ListBucketMultipartUploads
policy-action
Controls access to the ListMultipartUploads S3 API operation.
Versioning and Retention
s3:PutBucketVersioning
policy-action
Controls access to the PutBucketVersioning S3 API operation.
s3:GetBucketVersioning
policy-action
Controls access to the GetBucketVersioning S3 API operation.
s3:DeleteObjectVersion
policy-action
Controls access to the DeleteObjectVersion S3 API operation.
Supports the following additional condition keys:
s3:ListBucketVersions
policy-action
Controls access to the ListBucketVersions S3 API operation.
Supports the following additional condition keys:
s3:PutObjectVersionTagging
policy-action
Controls access to the PutObjectVersionTagging S3 API operation.
Supports the following additional condition keys:
s3:GetObjectVersionTagging
policy-action
Controls access to the GetObjectVersionTagging S3 API operation.
Supports the following additional condition keys:
s3:DeleteObjectVersionTagging
policy-action
Controls access to the DeleteObjectVersionTagging S3 API operation.
Supports the following additional condition keys:
s3:GetObjectVersion
policy-action
Controls access to the GetObjectVersion S3 API operation.
Supports the following additional condition keys:
s3:BypassGovernanceRetention
policy-action
Controls access to the following S3 API operations on objects locked under GOVERNANCE retention mode:
s3:PutObjectRetentions3:PutObjects3:DeleteObject
See the S3 documentation on s3:BypassGovernanceRetention for more information.
Supports the following additional condition keys:
s3:PutObjectRetention
policy-action
Controls access to the PutObjectRetention S3 API operation.
Required for any PutObject operation that specifies retention metadata.
Supports the following additional condition keys:
s3:GetObjectRetention
policy-action
Controls access to the GetObjectRetention S3 API operation.
Required for including object locking metadata as part of the response to a GetObject or HeadObject operation.
Supports the following additional condition keys:
s3:GetObjectLegalHold
policy-action
Controls access to the GetObjectLegalHold S3 API operation.
Required for including object locking metadata as part of the response to a GetObject or HeadObject operation.
s3:PutObjectLegalHold
policy-action
Controls access to the PutObjectLegalHold S3 API operation.
Required for any PutObject operation that specifies legal hold metadata.
Supports the following additional condition keys:
s3:GetBucketObjectLockConfiguration
policy-action
Controls access to the GetObjectLockConfiguration S3 API operation.
s3:PutBucketObjectLockConfiguration
policy-action
Controls access to the PutObjectLockConfiguration S3 API operation.
Bucket Notifications
s3:GetBucketNotification
policy-action
Controls access to the GetBucketNotification S3 API operation.
s3:PutBucketNotification
policy-action
Controls access to the PutBucketNotification S3 API operation.
s3:ListenNotification
policy-action
MinIO Extension for controlling API operations related to MinIO Bucket Notifications.
This action is not intended for use with other S3-compatible services.
s3:ListenBucketNotification
policy-action
MinIO Extension for controlling API operations related to MinIO Bucket Notifications.
This action is not intended for use with other S3-compatible services.
Object Lifecycle Management
s3:PutLifecycleConfiguration
policy-action
Controls access to the PutLifecycleConfiguration S3 API operation.
s3:GetLifecycleConfiguration
policy-action
Controls access to the GetLifecycleConfiguration S3 API operation.
Object Encryption
s3:PutEncryptionConfiguration
policy-action
Controls access to the PutEncryptionConfiguration S3 API operation.
s3:GetEncryptionConfiguration
policy-action
Controls access to the GetEncryptionConfiguration S3 API operation.
Bucket Replication
s3:GetReplicationConfiguration
policy-action
Controls access to the GetBucketReplication S3 API operation.
s3:PutReplicationConfiguration
policy-action
Controls access to the PutBucketReplication S3 API operation.
s3:ReplicateObject
policy-action
MinIO Extension for controlling API operations related to Server-Side Bucket Replication.
Required for MinIO server-side replication.
Supports the following additional condition keys:
s3:ReplicateDelete
policy-action
MinIO Extension for controlling API operations related to Server-Side Bucket Replication.
Required for synchronizing delete operations as part of MinIO server-side replication.
Supports the following additional condition keys:
s3:ReplicateTags
policy-action
MinIO Extension for controlling API operations related to Server-Side Bucket Replication.
Required for MinIO server-side replication.
Supports the following additional condition keys:
s3:GetObjectVersionForReplication
policy-action
MinIO Extension for controlling API operations related to Server-Side Bucket Replication.
Required for MinIO server-side replication.
Supports the following additional condition keys:
Supported S3 Policy Condition Keys
MinIO policy documents support IAM conditional statements.
Each condition element consists of operators and condition keys. MinIO supports a subset of IAM condition keys. For complete information on any listed condition key, see the IAM Condition Element Documentation
MinIO supports the following condition keys for all supported actions:
aws:Refereraws:SourceIpaws:UserAgentaws:SecureTransportaws:CurrentTimeaws:EpochTimeaws:PrincipalTypeaws:useridaws:usernames3:x-amz-content-sha256s3:signatureAge
Warning
The aws:Referer, aws:SourceIp, and aws:UserAgent keys may be spoofed and therefore pose a potential security risk. aws:SourceIp is only as trustworthy as the proxy boundary that supplies or overwrites forwarding headers. MinIO recommends only using these condition keys to deny access as a secondary security measure.
Never use these three keys to grant access by themselves.
Condition Value Sources and Precedence
Unreleased server behavior (as of 2026-08-03)
The table below describes behavior after companion server change 1a6d5b415. That change is present only on the local pgsty/minio branch: it is not on public origin/master, and the latest published server release (RELEASE.2026-08-04T00-00-00Z) does not contain it. Published builds retain the previous behavior. Verify the server release notes before relying on these precedence guarantees.
Silo constructs the condition-value map from semantic request sources instead of treating every header and query parameter as interchangeable. A raw header or query parameter whose name resembles an internal condition key cannot replace a value calculated by the server or create one that the server did not provide.
| Condition family | Source used for policy evaluation | Precedence and compatibility |
|---|---|---|
Identity, time, transport, authentication, s3:versionid, s3:LocationConstraint, LDAP, and JWT values |
Authenticated credentials and claims, the server clock and transport, or the API field parsed for that operation | Same-named raw headers and query parameters cannot add or replace these values. aws:Referer and aws:UserAgent remain client-controlled by definition; see the warning above for aws:SourceIp. |
s3:signatureAge |
Elapsed time calculated by the SigV4 presigned-request verifier | Available only for a verified SigV4 presigned request. A client-supplied x-amz-signature-age Header on any other request type is ignored. |
s3:prefix, s3:delimiter, s3:max-keys |
Query string only | A similarly named request header is ignored for these list conditions. |
s3:x-amz-content-sha256, s3:x-amz-copy-source, s3:x-amz-metadata-directive, and server-side-encryption keys |
Their corresponding HTTP headers only | Query-string substitutes do not satisfy these conditions. In particular, the X-Amz-Content-Sha256 query value used while verifying a presigned request is not exposed as the policy condition value. |
s3:x-amz-storage-class |
X-Amz-Storage-Class header, with a compatible query-string fallback |
Header presence wins even when the header value is empty. The query form remains available for compatibility with existing upload paths. |
s3:RequestObjectTag/<key> and s3:RequestObjectTagKeys |
The X-Amz-Tagging Header by default; an explicitly supplied effective tag set on tag-aware handlers |
PutObject and CreateMultipartUpload accept the Header or their compatible query fallback, with Header presence winning. PutObjectTagging uses the parsed XML request body. Query tagging is ignored on unrelated operations. The historical Header fallback remains for compatibility on actions whose policy map admits these keys, so outside the three handlers above a request-tag condition does not by itself prove that the operation consumes or stores those tags. |
s3:ExistingObjectTag/<key> |
Tags loaded from the stored target object | Request headers and query parameters never provide existing-object tags. The value is available only on API paths that load those tags before authorization, including object GET/HEAD and object-tagging handlers. |
| Object-lock condition keys | Object-lock request headers or retention values calculated by the handler | Query-string fields with the same names are ignored. |
If an API path does not load or calculate a listed source, that condition key is absent. Its result then follows the semantics of the policy operator in use; do not assume that merely listing a key for an action causes the server to synthesize a value.
For additional keys supported by a specific S3 action, see the reference documentation for that action.
MinIO Extended Condition Keys
MinIO extends the S3 standard condition keys with the following extended key:
sts:DurationSeconds
NoteAdded: MinIO
SERVER RELEASE.2024-02-06T21-36-22Z
Specify a time in seconds to limit the duration of all Security Token Service credentials generated by AssumeRoleWithWebIdentity.
This value overrides the
DurationSecondsfield specified to the client.For example:
mc admin Policy Action Keys
MinIO supports the following actions for use with defining policies for mc admin operations. These actions are only valid for MinIO deployments and are not intended for use with other S3-compatible services:
admin:*
policy-action
Selector for all admin action keys.
admin:Heal
policy-action
Allows heal command
admin:StorageInfo
policy-action
Allows listing server info
admin:DataUsageInfo
policy-action
Allows listing data usage info
admin:TopLocksInfo
policy-action
Allows listing top locks
admin:Profiling
policy-action
Allows profiling
admin:ServerTrace
policy-action
Allows listing server trace
admin:ConsoleLog
policy-action
Allows listing console logs on terminal
admin:KMSCreateKey
policy-action
Allows creating a new KMS master key
While this option is still supported, kms:CreateKey is preferred.
admin:KMSKeyStatus
policy-action
Allows getting KMS key status
While this option is still supported, kms:KeyStatus is preferred.
admin:ServerInfo
policy-action
Allows listing server info
admin:OBDInfo
policy-action
Allows obtaining cluster on-board diagnostics
admin:ServerUpdate
policy-action
Allows MinIO binary update
admin:ServiceRestart
policy-action
Allows restart of MinIO service.
admin:ServiceStop
policy-action
Allows stopping MinIO service.
admin:ConfigUpdate
policy-action
Allows MinIO config management
admin:CreateUser
policy-action
Allows creating MinIO user
admin:DeleteUser
policy-action
Allows deleting MinIO user
admin:ListUsers
policy-action
Allows list users permission
admin:EnableUser
policy-action
Allows enable user permission
admin:DisableUser
policy-action
Allows disable user permission
admin:GetUser
policy-action
Allows GET permission on user info
admin:AddUserToGroup
policy-action
Allows adding user to group permission
admin:RemoveUserFromGroup
policy-action
Allows removing user to group permission
admin:GetGroup
policy-action
Allows getting group info
admin:ListGroups
policy-action
Allows list groups permission
admin:EnableGroup
policy-action
Allows enable group permission
admin:DisableGroup
policy-action
Allows disable group permission
admin:CreatePolicy
policy-action
Allows create policy permission
admin:DeletePolicy
policy-action
Allows delete policy permission
admin:GetPolicy
policy-action
Allows get policy permission
admin:AttachUserOrGroupPolicy
policy-action
Allows attaching a policy to a user/group
admin:ListUserPolicies
policy-action
Allows listing user policies
admin:CreateServiceAccount
policy-action
Allows creating MinIO Access Key
admin:UpdateServiceAccount
policy-action
Allows updating MinIO Access Key
admin:RemoveServiceAccount
policy-action
Allows deleting MinIO Access Key
admin:ListServiceAccounts
policy-action
Allows listing MinIO Access Key
admin:SetBucketQuota
policy-action
Allows setting bucket quota
admin:GetBucketQuota
policy-action
Allows getting bucket quota
admin:SetBucketTarget
policy-action
Allows setting bucket target
admin:GetBucketTarget
policy-action
Allows getting bucket targets
admin:SetTier
policy-action
Allows creating and modifying remote storage tiers using the mc ilm tier commands.
admin:ListTier
policy-action
Allows listing configured remote storage tiers using the mc ilm tier commands.
admin:BandwidthMonitor
policy-action
Allows retrieving metrics related to current bandwidth consumption.
admin:Prometheus
policy-action
Allows access to MinIO metrics. Only required if MinIO requires authentication for scraping metrics.
admin:ListBatchJobs
policy-action
Allows access to list the active batch jobs.
admin:DescribeBatchJob
policy-action
Allows access to the see the definition details of a running batch job.
admin:StartBatchJob
policy-action
Allows user to begin a batch job run.
admin:CancelBatchJob
policy-action
Allows user to stop a batch job currently in process.
admin:Rebalance
policy-action
Allows access to start, query, or stop a rebalancing of objects across pools with varying free storage space.
KMS policy action keys
MinIO supports restricting key management service (KMS) actions by policy.
You can restrict KMS activities in a policy with any of the following KMS actions:
kms:Status
policy-action
Check the status of KMS.
kms:Metrics
policy-action
Obtain Prometheus-formatted metrics.
kms:API
policy-action
List supported API endpoints.
kms:Version
policy-action
Retrieve the KMS version.
kms:CreateKey
policy-action
Create a new KMS key.
kms:ListKeys
policy-action
Retrieve a list of existing KMS keys.
kms:KeyStatus
policy-action
Retrieve the status of a specified KMS key.
To select all of the available kms policy actions, use kms:*.
Changed: RELEASE.2024-07-16T23-46-41Z
KMS actions can be restricted by resource or a resource prefix. The wildcard character * can be used to apply the KMS action policy to all resources that match the prefix.
For example, the following policy document allows a user to list keys, create new keys, and check the status of keys for any resource that begins with keys-abc- or myuser-.
mc admin Policy Condition Keys
MinIO supports the following conditions for use with defining policies for mc admin actions.
aws:Refereraws:SourceIpaws:UserAgentaws:SecureTransportaws:CurrentTimeaws:EpochTime
For complete information on any listed condition key, see the IAM Condition Element Documentation.
Policy Variables
MinIO supports using policy variables for automatically substituting context from the authenticated user and/or the operation into the user’s assigned policy or policies. Use the ${POLICYVARIABLE} format to specify the variable to the policy as part of the Condition or Resource definition. MinIO policy variables function similarly to AWS IAM policy elements: Variables and tags.
Each MinIO identity provider supports its own set of policy variables:
MinIO Policy Variables
The following table contains a list of recommended policy variables for use in authorizing MinIO-managed users:
| Variable | Description |
|---|---|
| aws:referrer | The referrer in the HTTP header for the authenticated API call. |
| aws:SourceIp | The source IP in the HTTP header for the authenticated API call. |
| aws:username | The name of the user associated with the authenticated API call. |
For example, the following policy uses variables to substitute the authenticated user’s username as part of the Resource field such that the user can only access those prefixes which match their username:
MinIO replaces the ${aws:username} variable in the Resource field with the username. MinIO then evaluates the policy and grants or revokes access to the requested API and resource.
OpenID Policy Variables
The following table contains a list of supported policy variables for use in authorizing OIDC-managed users.
Each variable corresponds to a claim returned as part of the authenticated user’s JWT token:
| Variable | Description |
|---|---|
jwt:sub |
Returns the sub claim for the user. |
jwt:iss |
Returns the Issuer Identifier claim from the ID token. |
jwt:aud |
Returns the Audience claim from the ID token. |
jwt:jti |
Returns the JWT ID claim from the client authentication information. |
jwt:upn |
Returns the User Principal Name claim from the client authentication information. |
jwt:name |
Returns the name claim for the user. |
jwt:groups |
Returns the groups claim for the user. |
jwt:given_name |
Returns the given_name claim for the user. |
jwt:family_name |
Returns the family_name claim for the user. |
jwt:middle_name |
Returns the middle_name claim for the user. |
jwt:nickname |
Returns the nickname claim for the user. |
jwt:preferred_username |
Returns the preferred_username claim for the user. |
jwt:profile |
Returns the profile claim for the user. |
jwt:picture |
Returns the picture claim for the user. |
jwt:website |
Returns the website claim for the user. |
jwt:email |
Returns the email claim for the user. |
jwt:gender |
Returns the gender claim for the user. |
jwt:birthdate |
Returns the birthdate claim for the user. |
jwt:phone_number |
Returns the phone_number claim for the user. |
jwt:address |
Returns the address claim for the user. |
jwt:scope |
Returns the scope claim for the user. |
jwt:client_id |
Returns the client_id claim for the user. |
See the OpenID Connect Core 1.0 document for more information on these scopes. Your OIDC provider of choice may have more specific documentation.
For example, the following policy uses variables to substitute the authenticated user’s preferred_username as part of the Resource field such that the user can only access those prefixes which match their username:
MinIO replaces the ${jwt:preferred_username} variable in the Resource field with the value of the preferred_username in the JWT token. MinIO then evaluates the policy and grants or revokes access to the requested API and resource.
Active Directory / LDAP Policy Variables
The following table contains a list of supported policy variables for use in authorizing AD/LDAP users:
Variable |
Description |
|---|---|
|
The simple username (name) for the authenticated user.This is distinct from the user’s DistinguishedName or CommonName. |
|
The Distinguished Name used by the authenticated user. |
|
The Group Distinguished Name for the authenticated user. |
For example, the following policy uses variables to substitute the authenticated user’s name as part of the Resource field such that the user can only access those prefixes which match their name:
MinIO replaces the ${ldap:username} variable in the Resource field with the value of the authenticated user’s name. MinIO then evaluates the policy and grants or revokes access to the requested API and resource.
8 - Silo External Access Management Plugin
Overview
The MinIO Access Management Plugin provides a REST interface for offloading authorization through a webhook service.
Once enabled, MinIO sends the request and credential details for every API call to the configured external HTTP(S) endpoint and looks for a response of ALLOW or DENY. MinIO can therefore delegate the access management to the external system instead of relying on S3 policy based access control.
Configuration Settings
You can configure the MinIO External Access Management Plugin using the following environment variables or configuration settings.
Specify the following environmental variables to each MinIO server in the deployment:
Set the following configuration settings using the mc admin config set command:
Authentication and Authorization Flow
The login flow for an application is as follows:
- The client includes authentication information as part of performing the API call
- The configured Identity Manager authenticates the client
- MinIO makes a
POSTcall to the configured access management plugin URL which includes the context of the API call and authentication data - On successful authorization, the access manager returns a
200 OKresponse with a JSON body of eitherresult trueor"result" : { "allow" : true }:
If the access manager rejects the authorization request, MinIO automatically blocks and denies the API call.
Request Body Example
The following JSON resembles the request body sent as part of the POST to the configured access manager webhook.
Response Body Example
MinIO requires the response body from the Access Management service meet one of the two following formats: