aminueza / terraform-provider-minio

Terraform provider for managing MinIO S3 buckets and IAM Users.
https://registry.terraform.io/providers/aminueza/minio
GNU Affero General Public License v3.0
233 stars 69 forks source link

Support Minio STS AssumeRoleWithWebIdentity to obtain dynamic credentials #559

Open matteo-s opened 7 months ago

matteo-s commented 7 months ago

Description

Minio supports the STS api, enabling users possessing a valid oidc access_token (or id_token) to obtain a temporary set of credentials, which can then be used for regular S3 access.

The API expects a token as input, and returns a set of <AccessKeyId>,<SecretAccessKey>,<SessionToken>, valid until <Expiration>.

My proposal is to implement a new type of resource, called minio_sts_key which will support the Create action taking in input the required parameters and then enrich the resource with the newly obtained credentials.

Ref. https://github.com/minio/minio/blob/master/docs/sts/web-identity.md

Additional Information

I can contribute a proof-of-concept implementation. See https://github.com/scc-digitalhub/terraform-provider-minio/commit/1528ded7e2e5f5fa8e4b3273541fe131c27f0599