Add tool to keep the application token when revoking all the tokens#154
Open
Add tool to keep the application token when revoking all the tokens#154
Conversation
…ens.py to keep the application token used by alert-manager
There was a problem hiding this comment.
Pull request overview
This PR adds a new tool revokeUserTokens.py that safely revokes all user tokens while preserving the application token (specifically the alertmanager token) to prevent service disruptions. It also adds warning messages to the existing revokeAllTokens.py tool to guide users to use the new tool when appropriate.
Changes:
- Added
tools/revokeUserTokens.py- a new tool that retrieves the alertmanager application token, deletes all user tokens, and restores the application token - Updated
tools/revokeAllTokens.pywith warnings about service disruptions and a reference to the new tool for user-only token revocation
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 10 comments.
| File | Description |
|---|---|
| tools/revokeUserTokens.py | New tool implementing safe token revocation with application token preservation through three steps: retrieve application token, delete all tokens, restore application token |
| tools/revokeAllTokens.py | Added user warnings and confirmation prompt before destructive operations, with guidance to use revokeUserTokens.py for user-only revocations |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add a new tool to keep the application token when revoking all the tokens for the user, and all warnings in the original tool.