Identity Management Plugin

The MinIO AIStor Identity Management Plugin provides a REST interface for offloading authentication to an external identity manager with a webhook service.

Client applications can use the AssumeRoleWithCustomToken STS API extension to generate access tokens for MinIO AIStor. MinIO AIStor 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 AIStor Identity Management Plugin with the following environment variables or configuration settings:

Authenticating through a webhook The client calls the AssumeRoleWithCustomToken STS endpoint with a token your own service understands. AIStor POSTs that token to the URL set in MINIO_IDENTITY_PLUGIN_URL and reads back a user identifier and claims. Authorization is unchanged: the policy named by MINIO_IDENTITY_PLUGIN_ROLE_POLICY applies. AUTHENTICATION WEBHOOK AssumeRoleWithCustomToken CLIENT Request signed or STS AISTOR SERVER your deployment 1 · Authenticate a token your service understands 2 · Authorize the policy named by the plugin's role_policy YOUR SERVICE outside it POST the token return user and claims MINIO_IDENTITY_PLUGIN_URL Allowed · the operation runs Denied · the request returns 403 AIStor denies anything a policy does not explicitly allow, so a user with no policy can perform no operation at all.
The webhook answers the first step only. Authorization is unchanged: the policy named by the plugin’s role_policy applies to whatever user the webhook returns.

Authentication and authorization flow

The login flow for an application is as follows:

  1. Make a POST request using the AssumeRoleWithCustomToken API.

    The request includes a token used by the configured external identity manager for authenticating the client.

  2. MinIO AIStor makes a POST call to the configured identity plugin URL using the token specified to the STS API.

  3. On successful authentication, the identity manager returns a 200 OK response with an application/json content-type and body with the following structure:

    {
       "user": "<string>",
       "maxValiditySeconds": 3600,
       "claims": {"KEY": "VALUE", ...]}
    }
    
    user The owner of the requested credentials
    maxValiditySeconds The maximum allowed expiry duration for the returned credentials, in seconds.
    Must be at least 900 (15 minutes) and less than 31536000 (365 days).
    claims A JSON string of "key": "value" pair claim(s) associated with the requested credentials.
    MinIO AIStor reserves and ignores the exp, parent, and sub claims objects if present.
  4. MinIO AIStor 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 encounters an error, the response must return a 403 FORBIDDEN HTTP status code. The response must use the application/json content type and a body with the following structure:

{
     "reason": "<string>"
}

The "reason" field should include the reason for the 403.

Create policies to match claims

Use either the Console UI or the mc admin policy command to create policies that match one or more claim values.