Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Embed some useful details into "description" of token #43

Open
TJM opened this issue Feb 28, 2023 · 0 comments
Open

Embed some useful details into "description" of token #43

TJM opened this issue Feb 28, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@TJM
Copy link
Contributor

TJM commented Feb 28, 2023

The create token API has a description field, which is defined as:

Free text token description. Useful for filtering and managing tokens.
Limited to 1024 characters.

I suggest that we embed some useful details into that field, possibly even JSON encoded. I don't know what will be available, but at a minimum, I can already see that it would be nice to know what vault server created the token (we have two). I was also thinking stuff like clientIP, username? ... stuff like that. I'd have to look into what is available in the context at that point.

Here is an example of what it looks like after you create a token with a description in 7.38.8's API...

{
    "token_id" : "475435e0-30e6-40a7-8488-8815b871f699",
    "subject" : "jfac@01fr1x1h805xmg0t17xhqr1v7a/users/tommy-2",
    "expiry" : 1677632178,
    "issued_at" : 1677545778,
    "issuer" : "jfac@01fr1x1h805xmg0t17xhqr1v7a",
    "description" : "tommy was here",
    "refreshable" : false
  }

... but the GUI doesn't show it, nor offer filtering on it. I do see description in the Access Tokens section of the GUI of 7.49.8, but it is really difficult to see (have to basically hover it to see the value).
Screen Shot 2023-02-27 at 6 07 42 PM

I don't know when "description" was added, and searching for description in the release notes is a lost cause. @alexhung maybe you can check in the "git" history (or ask someone) to see what version it was added so we can add a check to prevent it from breaking older versions, but I am not too concerned that someone will want to run a crusty old version of Artifactory with the latest and greatest secrets plugin. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants