generated from TrueCloudLab/basic
feature/11-support_notprincipal #12
No reviewers
TrueCloudLab/storage-core-developers
TrueCloudLab/storage-services-committers
TrueCloudLab/storage-services-developers
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
4 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/policy-engine#12
Loading…
Reference in a new issue
No description provided.
Delete branch "dkirillov/policy-engine:feature/11-support_notprincipal"
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?
close #11
@ -72,2 +69,3 @@
var op policyengine.ConditionType
if _, ok := statement.Principal[Wildcard]; ok {
statementPrincipal, inverted := statement.principal()
if _, ok := statementPrincipal[Wildcard]; ok { // this can be true only if 'inverted' false
I didn't catch the thought. Please explain.
Only
Principal
can be*
:The following json is invalid according to spec
@ -86,0 +128,4 @@
case CondNumericGreaterThanEquals:
return "NumericGreaterThanEquals"
default:
return "unknown condition type"
Didn't you consdier to panic here? I am afraid that this can be taken for fine invocation and may cause many problems for the side that invokes this convertation
I supposed in our case it's enough to have panic here
@ -178,0 +229,4 @@
if len(statement.Action) != 0 && len(statement.NotAction) != 0 {
return errors.New("'Actions' and 'NotAction' are mutually exclusive")
}
if len(statement.Resource) != 0 && len(statement.NotResource) != 0 {
It is good that you intend to check mutual exclusion of these fields and this semantically correct but:
statement.Resource != nil
check instead length checking. If these types weren't be slices or maps you would define a pointer to a type and use check fornil
-ness08deadaa4c
to2e66408638
2e66408638
to29b40b02cb
29b40b02cb
toa0017c205f
a0017c205f
toc3bbe0263f
c3bbe0263f
to63ecf63a08