Add additional logging for OPA connections (#7982)

This commit is contained in:
Harshavardhana
2019-07-27 20:03:25 -07:00
committed by Nitish Tiwari
parent e871e27562
commit 94c88890b8
3 changed files with 45 additions and 13 deletions

View File

@@ -1236,7 +1236,11 @@ func (sys *IAMSys) IsAllowedSTS(args iampolicy.Args) bool {
func (sys *IAMSys) IsAllowed(args iampolicy.Args) bool {
// If opa is configured, use OPA always.
if globalPolicyOPA != nil {
return globalPolicyOPA.IsAllowed(args)
ok, err := globalPolicyOPA.IsAllowed(args)
if err != nil {
logger.LogIf(context.Background(), err)
}
return ok
}
// With claims set, we should do STS related checks and validation.