generated from TrueCloudLab/basic
[#63] iam: Support tag keys #63
No reviewers
Labels
No labels
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
5 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/policy-engine#63
Loading…
Reference in a new issue
No description provided.
Delete branch "dkirillov/policy-engine:feature/iam-tags"
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?
Support:
Signed-off-by: Denis Kirillov d.kirillov@yadro.com
[#XX] iam: Support tag keysto [#63] iam: Support tag keys8baf3b7dc3
toeb296dd757
@ -66,0 +66,4 @@
const (
condKeyAWSPrincipalARN = "aws:PrincipalArn"
condKeyAWSPrincipalTagPrefix = "aws:PrincipalTag/"
userClaimTagPrefix = "tag-"
To be clear, is this
tag-
something present in AWS/S3 spec or our addition?Our addition, to distinguish tags in user claims.
@ -188,1 +193,4 @@
func transformKey(key string) string {
switch {
case strings.HasPrefix(key, condKeyAWSPrincipalTagPrefix):
What about using https://pkg.go.dev/strings#CutPrefix? (it combines
HasPrefix
andTrimPrefix
)Or do we expect this switch to grow?
In the future I expect this switch to grow, but for now I'll change to using
CutPrefix
eb296dd757
to1cf6417ed2
@ -1503,0 +1547,4 @@
err := json.Unmarshal([]byte(policy), &p)
require.NoError(t, err)
s3Chain, err := ConvertToNativeChain(p, newMockUserResolver(nil, nil, ""))
Should be
ConvertToS3Chain
?Oh, sure
1cf6417ed2
to67e4595a91