minio/docs/sts
Aditya Manthramurthy a0456ce940 LDAP STS API (#8091)
Add LDAP based users-groups system

This change adds support to integrate an LDAP server for user
authentication. This works via a custom STS API for LDAP. Each user
accessing the MinIO who can be authenticated via LDAP receives
temporary credentials to access the MinIO server.

LDAP is enabled only over TLS.

User groups are also supported via LDAP. The administrator may
configure an LDAP search query to find the group attribute of a user -
this may correspond to any attribute in the LDAP tree (that the user
has access to view). One or more groups may be returned by such a
query.

A group is mapped to an IAM policy in the usual way, and the server
enforces a policy corresponding to all the groups and the user's own
mapped policy.

When LDAP is configured, the internal MinIO users system is disabled.
2019-09-10 04:42:29 +05:30
..
README.md Replace Minio refs in docs with MinIO and links (#7494) 2019-04-09 11:39:42 -07:00
assume-role.md Fix time formatting of Expiration field in STS (#8043) 2019-08-08 15:44:57 -07:00
client-grants.go Update go mod with sem versions of our libraries (#7687) 2019-05-29 16:35:12 -07:00
client-grants.md Fix time formatting of Expiration field in STS (#8043) 2019-08-08 15:44:57 -07:00
docker-compose.yml Fix OPA result response handling (#7763) 2019-06-10 17:06:32 -07:00
etcd.md Replace Minio refs in docs with MinIO and links (#7494) 2019-04-09 11:39:42 -07:00
ldap.go LDAP STS API (#8091) 2019-09-10 04:42:29 +05:30
ldap.md LDAP STS API (#8091) 2019-09-10 04:42:29 +05:30
opa.md Fix OPA result response handling (#7763) 2019-06-10 17:06:32 -07:00
putobject.rego Fix OPA result response handling (#7763) 2019-06-10 17:06:32 -07:00
sts.env Fix etcd TLS handling (#6748) 2018-11-01 21:41:11 -07:00
web-identity.go Replace Minio refs in docs with MinIO and links (#7494) 2019-04-09 11:39:42 -07:00
web-identity.md Fix time formatting of Expiration field in STS (#8043) 2019-08-08 15:44:57 -07:00
wso2.md Replace Minio refs in docs with MinIO and links (#7494) 2019-04-09 11:39:42 -07:00

README.md

MinIO STS Quickstart Guide Slack

The MinIO Security Token Service (STS) is an endpoint service that enables clients to request temporary credentials for MinIO resources. Temporary credentials work almost identically to default admin credentials, with some differences:

  • Temporary credentials are short-term, as the name implies. They can be configured to last for anywhere from a few minutes to several hours. After the credentials expire, MinIO no longer recognizes them or allows any kind of access from API requests made with them.
  • Temporary credentials do not need to be stored with the application but are generated dynamically and provided to the application when requested. When (or even before) the temporary credentials expire, the application can request new credentials.

Following are advantages for using temporary credentials:

  • Eliminates the need to embed long-term credentials with an application.
  • Eliminates the need to provide access to buckets and objects without having to define static credentials.
  • Temporary credentials have a limited lifetime, there is no need to rotate them or explicitly revoke them. Expired temporary credentials cannot be reused.

Identity Federation

  • Client grants - Let applications request client_grants using any well-known third party identity provider such as KeyCloak, WSO2. This is known as the client grants approach to temporary access. Using this approach helps clients keep MinIO credentials to be secured. MinIO STS supports client grants, tested against identity providers such as WSO2, KeyCloak.
  • WebIdentity - Let users request temporary credentials using any OpenID(OIDC) compatible web identity providers such as Facebook, Google etc.
  • AssumeRole - Let MinIO users request temporary credentials using user access and secret keys.

Get started

In this document we will explain in detail on how to configure all the prerequisites, primarily WSO2, OPA (open policy agent).

NOTE: If you are interested in AssumeRole API only, skip to here

1. Prerequisites

2. Setup MinIO with WSO2

Make sure we have followed the previous step and configured each software independently, once done we can now proceed to use MinIO STS API and MinIO server to use these credentials to perform object API operations.

export MINIO_ACCESS_KEY=minio
export MINIO_SECRET_KEY=minio123
export MINIO_IAM_JWKS_URL=https://localhost:9443/oauth2/jwks
minio server /mnt/data

3. Setup MinIO Gateway with WSO2, ETCD

Make sure we have followed the previous step and configured each software independently, once done we can now proceed to use MinIO STS API and MinIO gateway to use these credentials to perform object API operations.

NOTE: MinIO gateway requires etcd to be configured to use STS API.

export MINIO_ACCESS_KEY=aws_access_key
export MINIO_SECRET_KEY=aws_secret_key
export MINIO_IAM_JWKS_URL=https://localhost:9443/oauth2/jwks
export MINIO_ETCD_ENDPOINTS=http://localhost:2379
minio gateway s3

4. Test using client-grants.go

On another terminal run client-grants.go a sample client application which obtains JWT access tokens from an identity provider, in our case its WSO2. Uses the returned access token response to get new temporary credentials from the MinIO server using the STS API call AssumeRoleWithClientGrants.

go run client-grants.go -cid PoEgXP6uVO45IsENRngDXj5Au5Ya -csec eKsw6z8CtOJVBtrOWvhRWL4TUCga

##### Credentials
{
	"accessKey": "NUIBORZYTV2HG2BMRSXR",
	"secretKey": "qQlP5O7CFPc5m5IXf1vYhuVTFj7BRVJqh0FqZ86S",
	"expiration": "2018-08-21T17:10:29-07:00",
	"sessionToken": "eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhY2Nlc3NLZXkiOiJOVUlCT1JaWVRWMkhHMkJNUlNYUiIsImF1ZCI6IlBvRWdYUDZ1Vk80NUlzRU5SbmdEWGo1QXU1WWEiLCJhenAiOiJQb0VnWFA2dVZPNDVJc0VOUm5nRFhqNUF1NVlhIiwiZXhwIjoxNTM0ODk2NjI5LCJpYXQiOjE1MzQ4OTMwMjksImlzcyI6Imh0dHBzOi8vbG9jYWxob3N0Ojk0NDMvb2F1dGgyL3Rva2VuIiwianRpIjoiNjY2OTZjZTctN2U1Ny00ZjU5LWI0MWQtM2E1YTMzZGZiNjA4In0.eJONnVaSVHypiXKEARSMnSKgr-2mlC2Sr4fEGJitLcJF_at3LeNdTHv0_oHsv6ZZA3zueVGgFlVXMlREgr9LXA"
}

Explore Further