[#390] frostfs-cli: Pass bearer token to Tree srv #427
No reviewers
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
4 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/frostfs-node#427
Loading…
Reference in a new issue
No description provided.
Delete branch "aarifullin/frostfs-node:feature/390-bearer_tree_srv"
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?
Signed-off-by: Airat Arifullin a.arifullin@yadro.com
This PR is only first step to solve the issue. The bearer token can be generated with s3-authmate (but this is "custom" way of mine):
This allows to get valid JSON bearer token that can be passed to cli with
--bearer
token, but I haven't checked if it's really fine (it generates only "OTHERS" roles for now)Anyway, the rpc response is
This is because container's role processing differs from object's (here is no
SYSTEM
role). We need to discuss this0bb092c7f8
to9c4a2bffe0
@ -45,0 +54,4 @@
func getBearerToken(cmd *cobra.Command) []byte {
if bearerPath, _ := cmd.Flags().GetString(bearerFlagKey); bearerPath != "" {
var bt bearer.Token
err := common.ReadBinaryOrJSON(cmd, &bt, bearerPath)
Is there a reason to not use
common.ReadBearerToken
?Hm. You're right. Probably I've ignored
ReadBearerToken
for debug reason :) I fixed it9c4a2bffe0
to189a367ef2
Actually, it works if you use S3 Gateway wallet to access the tree.
@alexvanin . Thanks!
Actually, I used the same way but it seems I've had incorrect local state
cmd/internal/common/exit
#429