Merge pull request #1488 from micro/disable-warn-log

Change namespace error log level
This commit is contained in:
ben-toogood 2020-04-06 12:55:47 +01:00 committed by GitHub
commit bea7c3f7e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -188,9 +188,9 @@ func AuthHandler(fn func() auth.Auth) server.HandlerWrapper {
// Check the accounts namespace matches the namespace we're operating // Check the accounts namespace matches the namespace we're operating
// within. If not forbid the request and log the occurance. // within. If not forbid the request and log the occurance.
if account.Namespace != namespace { if account.Namespace != namespace {
logger.Warnf("Cross namespace request forbidden: account %v (%v) requested access to %v %v in the %v namespace", logger.Debugf("Cross namespace request forbidden: account %v (%v) requested access to %v %v in the %v namespace",
account.ID, account.Namespace, req.Service(), req.Endpoint(), namespace) account.ID, account.Namespace, req.Service(), req.Endpoint(), namespace)
return errors.Forbidden(req.Service(), "cross namespace request") // return errors.Forbidden(req.Service(), "cross namespace request")
} }
// construct the resource // construct the resource