Configuring a MinIO Tenant to use an external AD/LDAP provider
Accessing the Tenant Console using AD/LDAP Credentials.
Using the MinIO AssumeRoleWithLDAPIdentity Security Token Service (STS) API to generate temporary credentials for use by applications.
For MinIO deployments on baremetal infrastructure, this procedure covers:
Configuring a MinIO cluster for an external AD/LDAP provider.
Accessing the MinIO Console using AD/LDAP credentials.
Using the MinIO AssumeRoleWithLDAPIdentity Security Token Service (STS) API to generate temporary credentials for use by applications.
This procedure is generic for AD/LDAP services.
See the documentation for the AD/LDAP provider of your choice for specific instructions or procedures on configuration of user identities.
You must have access to the MinIO Operator Console web UI.
You can either expose the MinIO Operator Console service using your preferred Kubernetes routing component, or use temporary port forwarding to expose the Console service port on your local machine.
This procedure uses mc for performing operations on the MinIO cluster.
Install mc on a machine with network access to the cluster.
See the mcInstallation Quickstart for instructions on downloading and installing mc.
This procedure assumes a configured alias for the MinIO cluster.
This procedure assumes an existing Active Directory or LDAP service.
Instructions on configuring AD/LDAP are out of scope for this procedure.
For AD/LDAP deployments within the same Kubernetes cluster as the MinIO Tenant, you can use Kubernetes service names to allow the MinIO Tenant to establish connectivity to the AD/LDAP service.
For AD/LDAP deployments external to the Kubernetes cluster, you must ensure the cluster supports routing communications between Kubernetes services and pods and the external network.
This may require configuration or deployment of additional Kubernetes network components and/or enabling access to the public internet.
The MinIO deployment must have bidirectional network connectivity to the target AD / LDAP service.
MinIO requires a read-only access keys with which it binds to perform authenticated user and group queries.
Ensure each AD/LDAP user and group intended for use with MinIO has a corresponding policy on the MinIO deployment.
An AD/LDAP user with no assigned policy and with membership in groups with no assigned policy has no permission to access any action or resource on the MinIO cluster.
Temporarily forward traffic between the local host machine and the MinIO Operator Console and retrieve the JWT token for your Operator deployment.
For instructions, see Configure access to the Operator Console service.
Open your browser to the temporary URL and enter the JWT Token into the login page.
You should see the Tenants page:
To deploy a new MinIO Tenant with AD/LDAP external identity management, select the + Create Tenant button.
To configure an existing MinIO Tenant with AD/LDAP external identity management select that Tenant from the displayed list.
The following steps reference the necessary sections and configuration settings for existing Tenants.
Complete the Identity Provider Section
To enable external identity management with an Active Directory / LDAP provider, select the Identity Provider section.
You can then change the radio button to Active Directory to display the configuration settings.
An asterisk * marks required fields.
The following table provides general guidance for those fields:
Field
Description
LDAP Server Address
The hostname of the Active Directory or LDAP server.
Lookup Bind DN
The Distinguished Name MinIO uses to authenticate and query the AD/LDAP server.
List of user DNs (Distinguished Names) to be Tenant Administrators
Specify a user DNs which MinIO assigns a policy with administrative permissions for the Tenant.
You can specify multiple DNs by selecting the plus icon.
You can delete a DN by selecting the trash can icon for that DN.
Once you complete the section, you can finish any other required sections of Tenant Deployment.
Assign Policies to AD/LDAP Users
MinIO by default assigns no policies to AD/LDAP users or groups.
You must explicitly assign MinIO policies to a given user or group Distinguished Name (DN) to grant that user or group access to the MinIO deployment.
The following example assumes an existing alias configured for the MinIO Tenant.
Use the mcidpldappolicyattach command to assign a user or group DN to an existing MinIO Policy:
Use the MinIO Tenant Console to Log In with AD/LDAP Credential
The MinIO Console supports the full workflow of authenticating to the AD/LDAP provider, generating temporary credentials using the MinIO AssumeRoleWithLDAPIdentity Security Token Service (STS) endpoint, and logging the user into the MinIO deployment.
If the AD/LDAP configuration succeeded, the Console displays a button to login with AD/LDAP credentials.
Enter the user’s AD/LDAP credentials and log in to access the Console.
Once logged in, you can perform any action for which the authenticated user is authorized.
You can also create access keys for supporting applications which must perform operations on MinIO.
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.
Generate S3-Compatible Temporary Credentials using AD/LDAP Credentials
Applications can use an AD/LDAP user credential to generate temporary S3-compatible credentials as-needed using the AssumeRoleWithLDAPIdentity Security Token Service (STS) API endpoint.
MinIO provides an example Go application ldap.go with an example of managing this workflow.
The API response consists of an XML document containing the access key, secret key, session token, and expiration date.
Applications can use the access key and secret key to access and perform operations on MinIO.
Set the Active Directory / LDAP Configuration Settings
Configure the AD/LDAP provider using one of the following:
MinIO Client
Environment variables
MinIO Console
All methods require starting/restarting the MinIO deployment to apply changes.
The following tabs provide a quick reference for the available configuration methods:
MinIO supports specifying the AD/LDAP provider settings using mcidpldap commands.
For distributed deployments, the mcidpldap command applies the configuration to all nodes in the deployment.
The following example code sets all configuration settings related to configuring an AD/LDAP provider for external identity management.
The minimum required settings are:
The identity_ldap configuration key remains available for existing scripts and tools.
MinIO supports specifying the AD/LDAP provider settings using environment variables.
The minioserver process applies the specified settings on its next startup.
For distributed deployments, specify these settings across all nodes in the deployment using the same values.
Any differences in server configurations between nodes will result in startup or configuration failures.
The following example code sets all environment variables related to configuring an AD/LDAP provider for external identity management. The minimum required variable are:
exportMINIO_IDENTITY_LDAP_SERVER_ADDR="ldaps.example.net:636"exportMINIO_IDENTITY_LDAP_LOOKUP_BIND_DN="CN=xxxxx,OU=xxxxx,OU=xxxxx,DC=example,DC=net"exportMINIO_IDENTITY_LDAP_USER_DN_SEARCH_BASE_DN="dc=example,dc=net"exportMINIO_IDENTITY_LDAP_USER_DN_SEARCH_FILTER="(&(objectCategory=user)(sAMAccountName=%s))"exportMINIO_IDENTITY_LDAP_LOOKUP_BIND_PASSWORD="xxxxxxxxx"exportMINIO_IDENTITY_LDAP_GROUP_SEARCH_FILTER="(&(objectClass=group)(member=%d))"exportMINIO_IDENTITY_LDAP_GROUP_SEARCH_BASE_DN="ou=MinIO Users,dc=example,dc=net"exportMINIO_IDENTITY_LDAP_TLS_SKIP_VERIFY="off"exportMINIO_IDENTITY_LDAP_SERVER_INSECURE="off"exportMINIO_IDENTITY_LDAP_SERVER_STARTTLS="off"exportMINIO_IDENTITY_LDAP_SRV_RECORD_NAME=""exportMINIO_IDENTITY_LDAP_COMMENT="LDAP test server"
MinIO supports specifying the AD/LDAP provider settings using the MinIO Console.
For distributed deployments, configuring AD/LDAP from the Console applies the configuration to all nodes in the deployment.
Log in to the MinIO Console as either the root user or a MinIO user with the consoleAdmin policy.
In the Identity section, select LDAP and then Edit Configuration to configure an Active Directory or LDAP server.
The minimum required settings are:
Server Address
Lookup Bind DN
Lookup Bind Password
User DN Search Base
User DN Search Filter
Not all configuration options are available in the MinIO Console.
For additional settings, use mcidpldap or environment variables.
Restart the MinIO Deployment
You must restart the MinIO deployment to apply the configuration changes.
If you configured AD/LDAP from the MinIO Console, no additional action is required.
The MinIO Console automatically restarts the deployment after saving the new AD/LDAP configuration.
For MinIO Client and environment variable configuration, use the mcadminservicerestart command to restart the deployment:
mcadminservicerestartALIAS
Replace ALIAS with the alias of the deployment to restart.
Use the MinIO Console to Log In with AD/LDAP Credentials
The MinIO Console supports the full workflow of authenticating to the AD/LDAP provider, generating temporary credentials using the MinIO AssumeRoleWithLDAPIdentity Security Token Service (STS) endpoint, and logging the user into the MinIO deployment.
You can access the Console by opening the root URL for the MinIO cluster. For example, https://minio.example.net:9000.
Once logged in, you can perform any action for which the authenticated user is authorized.
You can also create access keys for supporting applications which must perform operations on MinIO.
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 service account.
Generate S3-Compatible Temporary Credentials using AD/LDAP Credentials
MinIO requires clients to 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, and DELETE operations.
Applications can generate temporary access credentials as-needed using the AssumeRoleWithLDAPIdentity Security Token Service (STS) API endpoint and AD/LDAP user credentials.
MinIO provides an example Go application ldap.go that manages this workflow.
The API response consists of an XML document containing the access key, secret key, session token, and expiration date.
Applications can use the access key and secret key to access and perform operations on MinIO.