View bearer token in human readable format #1498
Labels
No labels
P0
P1
P2
P3
badger
frostfs-adm
frostfs-cli
frostfs-ir
frostfs-lens
frostfs-node
good first issue
triage
Infrastructure
blocked
bug
config
discussion
documentation
duplicate
enhancement
go
help wanted
internal
invalid
kludge
observability
perfomance
question
refactoring
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/frostfs-node#1498
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Is your feature request related to a problem? Please describe.
Bearer tokens are often saved in raw protobuf binary format, especially since frostfs-http-gw does not support JSON serialized tokens yet. This format is completely inaccessible for humans to review. Even JSON tokens contain base64 encoded protobuf binaries for access rule chains, making them hard to reason about.
Describe the solution you'd like
For my personal use I wrote a simple viewer tool that unpacks nested base64 chains and spits out indented JSON. May be we should add
frostfs-cli bearer view
that does something similar?cmd/viewtoken/main.go (for those who do not have access to repo)
Sample output from viewtoken tool
frostfs-cli bearer view
we should probably switch output to a bespoke key-value format to avoid implying any machine-readability (similar to how netinfo is printed).Describe alternatives you've considered
Keep things as they are and leave bearer tokens unreadable.
The link you provided is broken. Could you please fix it?
It's a private repo. I've added you to access list, but the full code listing for the tool is also available in the collapsible section below the link.