frostfs-cli bearer create UX #512

Closed
opened 2023-07-12 09:25:45 +00:00 by EliChin · 4 comments

Now we have the following obligatory flags for frostfs-cli bearer create:

  -x, --expire-at string          The last active epoch for the token
  -i, --issued-at string          Epoch to issue token at
  -n, --not-valid-before string   Not valid before epoch

As a common user, I would prefer to avoid looking for the current epoch.

I suggest

  • setting default for -i and -n to equal the current epoch and make these flags optional;
  • keep -x obligatory but require a relative number instead of absolute (-x 10 means that I want the token to be valid for the next 10 epochs)
Now we have the following obligatory flags for `frostfs-cli bearer create`: ``` -x, --expire-at string The last active epoch for the token -i, --issued-at string Epoch to issue token at -n, --not-valid-before string Not valid before epoch ``` As a common user, I would prefer to avoid looking for the current epoch. I suggest * setting default for `-i` and `-n` to equal the current epoch and make these flags optional; * keep `-x` obligatory but require a relative number instead of absolute (`-x 10` means that I want the token to be valid for the next 10 epochs)
fyrchik added the
frostfs-cli
label 2023-07-12 10:43:38 +00:00

All epoch flags support +N syntax for relative epochs, for example +0 means the current epoch, +10 -- 10 epochs from the current one.
Is it enough for you needs?

We can set +0 as a default for some flags, though.

All epoch flags support `+N` syntax for relative epochs, for example `+0` means the current epoch, `+10` -- 10 epochs from the current one. Is it enough for you needs? We can set `+0` as a default for some flags, though.

@fyrchik Shall we say it somehow in --help, it's not clear for me from the existing description? Eg. +N for relative epochs supported

And I still think that a common user shouldn't be required to set --issued-at and --not-valid-before. Why not make them optional?

@fyrchik Shall we say it somehow in `--help`, it's not clear for me from the existing description? Eg. `+N for relative epochs supported` And I still think that a common user shouldn't be required to set `--issued-at` and `--not-valid-before`. Why not make them optional?
fyrchik added the
enhancement
label 2023-07-12 14:59:11 +00:00
fyrchik added this to the v0.37.0 milestone 2023-07-12 14:59:19 +00:00
dstepanov-yadro self-assigned this 2023-07-14 07:26:09 +00:00

@EliChin This is already in the documentation. Or is it written unclear?

frostfs-cli bearer create --help
Create bearer token.

All epoch flags can be specified relative to the current epoch with the +n syntax.
In this case --rpc-endpoint flag should be specified and the epoch in bearer token
is set to current epoch + n.

Usage:
  frostfs-cli bearer create [flags]

Flags:
....
@EliChin This is already in the documentation. Or is it written unclear? ``` frostfs-cli bearer create --help Create bearer token. All epoch flags can be specified relative to the current epoch with the +n syntax. In this case --rpc-endpoint flag should be specified and the epoch in bearer token is set to current epoch + n. Usage: frostfs-cli bearer create [flags] Flags: .... ```

@dstepanov-yadro Sorry, didn't notice this since looking for this information in the flags description themselves. If so, we can keep the help section as it is and hope that our users will be more observant than me.

@dstepanov-yadro Sorry, didn't notice this since looking for this information in the flags description themselves. If so, we can keep the help section as it is and hope that our users will be more observant than me.
Sign in to join this conversation.
No Milestone
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: TrueCloudLab/frostfs-node#512
There is no content yet.