Skip to content

Add tool to keep the application token when revoking all the tokens#154

Open
hippogr wants to merge 2 commits intodevfrom
ruigao/update_revoke_tool
Open

Add tool to keep the application token when revoking all the tokens#154
hippogr wants to merge 2 commits intodevfrom
ruigao/update_revoke_tool

Conversation

@hippogr
Copy link
Contributor

@hippogr hippogr commented Feb 25, 2026

Add a new tool to keep the application token when revoking all the tokens for the user, and all warnings in the original tool.

…ens.py to keep the application token used by alert-manager
Copy link

Copilot AI left a 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 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.py with 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>
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.

2 participants