forked from TrueCloudLab/frostfs-s3-gw
[#387] authmate: fix parsing session rules
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
This commit is contained in:
parent
83bb6fc020
commit
4322da90d8
2 changed files with 11 additions and 5 deletions
|
@ -98,6 +98,7 @@ type (
|
|||
GatesPublicKeys []*keys.PublicKey
|
||||
EACLRules []byte
|
||||
SessionTokenRules []byte
|
||||
SkipSessionRules bool
|
||||
Lifetime time.Duration
|
||||
AwsCliCredentialsFile string
|
||||
ContainerPolicies ContainerPolicies
|
||||
|
@ -439,7 +440,7 @@ func createTokens(options *IssueSecretOptions, lifetime lifetimeOptions) ([]*acc
|
|||
gates[i] = accessbox.NewGateData(gateKey, bearerTokens[i])
|
||||
}
|
||||
|
||||
if options.SessionTokenRules != nil {
|
||||
if !options.SkipSessionRules {
|
||||
sessionRules, err := buildContext(options.SessionTokenRules)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to build context for session token: %w", err)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue