Repository navigation
feat: access-token rotate gives a token a new secret in place - #107
Merged
Merged
Conversation
joshiste
marked this pull request as ready for review
November 27, 2026 10:33
It brings the rotate operation of the access tokens. (ticket 27433)
The token keeps its id, name, type, teams and expiry. --grace-period lets the previous secret keep working while whatever uses it switches over, --expires-at sets a new expiry or never. recreate is deprecated. (ticket 27433)
A platform without the rotate endpoint answers 404, which read as a missing token. The token list now tells the two apart. (ticket 27433)
joshiste
force-pushed
the
feat/access-token-rotate
branch
from
November 27, 2026 12:47
b554f77 to
50a6eb5
Compare
The weekly platform-e2e installs the latest release, which does not have rotate until it is released after the platform; it checks recreate then. (ticket 27433)
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
access-token rotategives an access token a new secret in place, usingPOST /api/access-tokens/v2/{id}/rotate(steadybit/platform#2334, #2357).--grace-period(0s–168h) lets the previous secret keep working while whatever uses it switches over; without it the previous secret stops working at once.--expires-atsets a new expiry: a date, an RFC 3339 time, ornever.-t json|yamlprints the id, the token andpreviousSecretExpiresAt, for a script to read.recreate, instead of reporting the token as not found.recreateis deprecated (cobraDeprecated): it still works, but help no longer lists it.Merge only after the platform release that ships rotate: the CLI builds against the prod spec, so
api-compatibilityfails until then.Tests:
TestRotatecovers the query parameters, both outputs, a 404 and an invalid date;TestRotateOnAPlatformWithoutRotatecovers the older platform.e2e/platform.shnow rotates instead of recreating, against dev. It checks that the id stays the same and that the previous secret works during the grace period. After a second rotate withneverand no grace period, it checks that both earlier secrets stop working and the expiry is gone.Ticket: https://steadybitgmbh.kanbanize.com/ctrl_board/2/cards/27433