Skip to content

Commit

Permalink
Fill the Authz Context with a Sentinel Scope (#6729)
Browse files Browse the repository at this point in the history
  • Loading branch information
mkeeler authored Nov 1, 2019
1 parent ab5a05f commit ff8157f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions agent/consul/kvs_endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,9 @@ func kvsPreApply(srv *Server, rule acl.Authorizer, op api.KVOp, dirEnt *structs.
}

default:
// TODO (namespaces) use actual ent authz context - ensure we set the Sentinel Scope
if rule.KeyWrite(dirEnt.Key, nil) != acl.Allow {
var authzContext acl.EnterpriseAuthorizerContext
dirEnt.FillAuthzContext(&authzContext)
if rule.KeyWrite(dirEnt.Key, &authzContext) != acl.Allow {
return false, acl.ErrPermissionDenied
}
}
Expand Down

0 comments on commit ff8157f

Please sign in to comment.