ytsaurus-ui icon indicating copy to clipboard operation
ytsaurus-ui copied to clipboard

feat(tokens): allow user to issue and manage tokens from ui [#241]

Open vitshev opened this issue 1 year ago • 1 comments

vitshev avatar Apr 26 '24 10:04 vitshev

After https://github.com/ytsaurus/ytsaurus/issues/413 https://github.com/ytsaurus/ytsaurus/pull/444 on server side it is now possible to extract needed information:

  1. GetSupportedFeatures now contains "user_tokens_metadata" = %true; if user tokens are of a new format(ytct-abcd-efgh...)
  2. ListUserTokens supports with_metadata=true parameter which changes output to something like this:
{"ytct-abcd-token_hash_here":{"description":"description_here","token_prefix":"ytct-abcd","creation_time":"2023-12-27T18:25:39.675767Z","effective_expiration":{"time":null,"timeout":null}}}

Please note that "description" can be null, "token_prefix" can be null. "creation_time" and "effective_expiration" follow common format of corresponding cypress node attributes. Please note that tokens can be of an arbitrary format and don't have to start from ytct-abcd-. Some systems can issue temporary tokens for users (e.g. YQL query) and use them

Krock21 avatar May 06 '24 11:05 Krock21