minio / mc

Unix like utilities for object store
https://min.io/download
GNU Affero General Public License v3.0
2.86k stars 548 forks source link

add STS support for `mc admin` command #4754

Closed pjuarezd closed 11 months ago

pjuarezd commented 11 months ago

Community Contribution License

All community contributions in this pull request are licensed to the project maintainers under the terms of the [Apache 2 license] (https://www.apache.org/licenses/LICENSE-2.0). By creating this pull request I represent that I have the right to license the contributions to the project maintainers under the Apache 2 license.

Description

add STS support for mc admin commands

Motivation and Context

To allow invoke subcommands in the admin section such as user, group, policy, etc.

Example:

MC_HOST_demomc=http://localhost:9000  \
MC_STS_ENDPOINT=https://sts.minio-operator.svc.cluster.local:4223/sts/ns-1 \
MC_WEB_IDENTITY_TOKEN_FILE=/var/run/secrets/kubernetes.io/serviceaccount/token \
./mc admin policy create demomc bucket-rw policy.json 

How to test this PR?

Types of changes

Checklist:

ravindk89 commented 11 months ago

@pjuarezd is this only for the Operator STS loop? Or could this also be used for non-Operator STS, e.g. OIDC or AD/LDAP loops?