Skip to content

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

Merged
hippogr merged 2 commits into
devfrom
ruigao/update_revoke_tool
Mar 31, 2026
Merged

Add tool to keep the application token when revoking all the tokens#154
hippogr merged 2 commits into
devfrom
ruigao/update_revoke_tool

Conversation

@hippogr

@hippogr hippogr commented Feb 25, 2026

Copy link
Copy Markdown
Contributor

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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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.

Comment thread tools/revokeUserTokens.py Outdated
Comment thread tools/revokeUserTokens.py
Comment thread tools/revokeUserTokens.py
Comment thread tools/revokeUserTokens.py Outdated
Comment thread tools/revokeUserTokens.py
Comment thread tools/revokeUserTokens.py
Comment thread tools/revokeUserTokens.py
Comment thread tools/revokeUserTokens.py
Comment thread tools/revokeAllTokens.py Outdated
Comment thread tools/revokeUserTokens.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@hippogr hippogr merged commit f0d220a into dev Mar 31, 2026
4 of 5 checks passed
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.

3 participants