-
Notifications
You must be signed in to change notification settings - Fork 598
Add admin accesskey sts-revoke
and idp ldap accesskey sts-revoke
#5160
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request adds support for STS token revocation by introducing two new commands for LDAP users and admin users.
- Adds the "sts-revoke" subcommand for idp ldap accesskeys via a new file (idp-ldap-accesskey-sts-revoke.go).
- Introduces the "sts-revoke" subcommand for admin accesskeys through a new file (admin-accesskey-sts-revoke.go) and updates auto-completion and command registration accordingly.
Reviewed Changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
cmd/idp-ldap-accesskey.go | Registers the new sts-revoke subcommand |
cmd/idp-ldap-accesskey-sts-revoke.go | Implements the STS token revocation command for LDAP |
cmd/auto-complete.go | Updates auto-complete mappings for the new command |
cmd/admin-accesskey.go | Registers the new sts-revoke subcommand for admin |
cmd/admin-accesskey-sts-revoke.go | Implements the STS token revocation command for admin |
Files not reviewed (1)
- go.mod: Language not supported
Comments suppressed due to low confidence (2)
cmd/admin-accesskey-sts-revoke.go:102
- [nitpick] The comment refers to 'checkAdminUserSTSAcctInfoSyntax' while the function is named 'checkSTSRevokeSyntax'. Consider updating the comment to match the function's name.
// checkAdminUserSTSAcctInfoSyntax - validate all the passed arguments
cmd/admin-accesskey-sts-revoke.go:121
- [nitpick] The comment mentions 'mainAdminUserSTSAcctInfo', but the function is actually named 'mainAdminAccesskeySTSRevoke'. Please update the comment for consistency.
// mainAdminUserSTSAcctInfo is the handle for "mc admin accesskey sts-revoke" command.
Community Contribution License
All community contributions in this pull request are licensed to the project maintainers
under the terms of the Apache 2 license.
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
This PR adds
mc admin accesskey sts-revoke
andmc idp ldap accesskey sts-revoke
, two commands for STS token revocation. Theadmin
command can be used for builtin users or for self revocation by service accounts created for other user providers. Theidp ldap
command can be used to revoke for LDAP users via short username or full DN.Motivation and Context
miniohq/eos#498
How to test this PR?
Create STS accounts and revoke them with this command.
Types of changes
Checklist:
commit-id
orPR #
here)