Skip to content

Commit

Permalink
Merge pull request #18818 from openshift-cherrypick-robot/cherry-pick…
Browse files Browse the repository at this point in the history
…-18751-to-release-3.9

Automatic merge from submit-queue.

[release-3.9] audit doesn't respect embedded config

This is an automated cherry-pick of #18751

/assign deads2k
  • Loading branch information
openshift-merge-robot authored Mar 5, 2018
2 parents 9b766ba + 815221a commit 566fa0d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/cmd/server/kubernetes/master/master_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -797,11 +797,11 @@ func GetAuditConfig(auditConfig configapi.AuditConfig) (audit.Backend, auditpoli
// when a policy file is defined we enable the advanced auditing
if auditConfig.PolicyConfiguration != nil || len(auditConfig.PolicyFile) > 0 {
// policy configuration
if auditConfig.PolicyConfiguration == nil {
p, _ := auditpolicy.LoadPolicyFromFile(auditConfig.PolicyFile)
if auditConfig.PolicyConfiguration != nil {
p := auditConfig.PolicyConfiguration.(*auditinternal.Policy)
policyChecker = auditpolicy.NewChecker(p)
} else if len(auditConfig.PolicyFile) > 0 {
p := auditConfig.PolicyConfiguration.(*auditinternal.Policy)
p, _ := auditpolicy.LoadPolicyFromFile(auditConfig.PolicyFile)
policyChecker = auditpolicy.NewChecker(p)
}

Expand Down

0 comments on commit 566fa0d

Please sign in to comment.