Skip to content
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

Add phylum auth revoke-token subcommand #1181

Merged
merged 10 commits into from
Aug 10, 2023
Merged

Add phylum auth revoke-token subcommand #1181

merged 10 commits into from
Aug 10, 2023

Conversation

cd-work
Copy link
Contributor

@cd-work cd-work commented Aug 9, 2023

This adds a new subcommand to the auth subcommand which allows
revoking Locksmith API tokens.

It is possible to either specify one or more tokens as CLI arguments, or
alternatively interactively select which tokens should be revoked.

Closes #1176.


Small Disclaimer: I might have gone a little overboard with the implementation of this issue, however I do believe that the ease of use provided by the selection UI justifies the small additional code complexity.

tmp

This adds a new subcommand to the `auth` subcommand which allows
revoking Locksmith API tokens.

It is possible to either specify one or more tokens as CLI arguments, or
alternatively interactively select which tokens should be revoked.

Closes #1176.
@cd-work cd-work requested a review from a team as a code owner August 9, 2023 20:33
@cd-work cd-work requested a review from maxrake August 9, 2023 20:33
Copy link
Contributor

@maxrake maxrake left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed with local testing. The UX LGTM.

There are a few documentation related changes that are requested. Also, while not directly related to this PR, it might be worth changing doc_templates/phylum_auth_set-token.md at this time to reference API keys in the examples instead of OIDC tokens.

There are also some clippy errors showing in the CI checks.

docs/command_line_tool/phylum_auth_revoke-token.md Outdated Show resolved Hide resolved
cli/src/app.rs Outdated Show resolved Hide resolved
cli/src/format.rs Outdated Show resolved Hide resolved
@cd-work cd-work requested a review from maxrake August 10, 2023 17:59
Copy link
Contributor

@maxrake maxrake left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The updated changes were tested locally and work as expected. There is still one small documentation change requested.

doc_templates/phylum_auth_set-token.md Outdated Show resolved Hide resolved
doc_templates/phylum_auth_set-token.md Outdated Show resolved Hide resolved
@cd-work cd-work requested a review from maxrake August 10, 2023 18:31
Copy link
Contributor

@maxrake maxrake left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@cd-work cd-work merged commit 58a543c into main Aug 10, 2023
14 checks passed
@cd-work cd-work deleted the revoke_tokens branch August 10, 2023 19:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

List and revoke API keys
2 participants