Skip to content
This repository has been archived by the owner on Jul 28, 2021. It is now read-only.

Commit

Permalink
Remove default rule if rules specified (#56)
Browse files Browse the repository at this point in the history
  • Loading branch information
devstein authored Mar 10, 2020
1 parent 5a43a07 commit 179fda2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions adapter/policy/engine/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ func (m *engine) Evaluate(target *authnz.TargetMsg) (*Action, error) {
if p.Rules == nil {
policies[i].Rules = createDefaultRules(p)
} else {
policies[i].Rules = append(p.Rules, createDefaultRules(p)...)
policies[i].Rules = p.Rules
}
}

Expand Down Expand Up @@ -150,8 +150,8 @@ func createDefaultRules(action Action) []v1.Rule {
case policy.OIDC:
return []v1.Rule{
{
Claim: aud,
Match: "ANY",
Claim: aud,
Match: "ANY",
Values: []string{action.Client.ID()},
},
}
Expand Down

0 comments on commit 179fda2

Please sign in to comment.