Remove debug auth logs (#1426)

Co-authored-by: Ben Toogood <ben@micro.mu>
This commit is contained in:
ben-toogood 2020-03-26 19:00:24 +00:00 committed by GitHub
parent e204f3e2e8
commit 1a53307a78
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -124,8 +124,6 @@ func (s *svc) Revoke(role string, res *auth.Resource) error {
// Verify an account has access to a resource
func (s *svc) Verify(acc *auth.Account, res *auth.Resource) error {
log.Infof("%v requesting access to %v:%v:%v", acc.ID, res.Type, res.Name, res.Endpoint)
queries := [][]string{
{res.Type, res.Name, res.Endpoint}, // check for specific role, e.g. service.foo.ListFoo:admin (role is checked in accessForRule)
{res.Type, res.Name, "*"}, // check for wildcard endpoint, e.g. service.foo*
@ -144,8 +142,6 @@ func (s *svc) Verify(acc *auth.Account, res *auth.Resource) error {
for _, q := range queries {
for _, rule := range s.listRules(q...) {
log.Infof("Checking rule: %v for resource: %v:%v:%v", rule.Id, res.Type, res.Name, res.Endpoint)
switch accessForRule(rule, acc, res) {
case rulePb.Access_UNKNOWN:
continue // rule did not specify access, check the next rule
@ -248,7 +244,6 @@ func (s *svc) listRules(filters ...string) []*rulePb.Rule {
// loadRules retrieves the rules from the auth service
func (s *svc) loadRules() {
log.Infof("Loading rules from auth service")
rsp, err := s.rule.List(context.TODO(), &rulePb.ListRequest{})
s.Lock()
defer s.Unlock()
@ -258,7 +253,6 @@ func (s *svc) loadRules() {
return
}
log.Infof("Loaded %v rules from the auth service", len(rsp.Rules))
s.rules = rsp.Rules
}