Tokens cleanup - #2015
Open
cstamas wants to merge 12 commits into
Open
Conversation
Just some cleanup and added token TYPE (PAT and OTT) for now.
cstamas
commented
Jul 29, 2026
cstamas
commented
Jul 29, 2026
cstamas
marked this pull request as ready for review
July 30, 2026 08:53
netomi
reviewed
Jul 30, 2026
| ALTER TABLE ONLY public.personal_access_token | ||
| ADD COLUMN IF NOT EXISTS type CHARACTER VARYING(32); | ||
|
|
||
| UPDATE public.personal_access_token |
Contributor
There was a problem hiding this comment.
that would set all existing tokens to type LLT
we have a lot of OTT already, what they share is that their description is always 'One time use publish token'
Contributor
There was a problem hiding this comment.
when thinking about it, the OTT should also have a different prefix imho to the normal personal access tokens.
gnugomez
reviewed
Jul 30, 2026
|
|
||
| @Schema(description = "The token type used to publish this version") | ||
| @NotNull | ||
| private String publishedWith; |
Member
There was a problem hiding this comment.
question: could this be considered sensitive? wouldn't it be better to expose a boolean for tokens that are coming from TP?
Member
Author
There was a problem hiding this comment.
this is they type of the token: LLT or OTT. But yes, if the goal is to show "coming from TP" then we can make it different, but right now it is publishedWith == "OTT".
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.
Just some cleanup and added token TYPE (LLT for "long lived token" and OTT for "one time token") for now. Token type of published version exposed.
Changes:
AccessTokenService"thinned" to minimumPersonalAccessTokenentity (and DB table) got new fieldtype(enum; so far all token was LLT).use(this matters most OTT)PersonalAccessTokenscomponentpersonalAccessTokens...to make clear what it is about, methods grouped togetherpublishedWith(token type; OTT or PAT) along with existingpublishedBy.publishedWith).