Fix server calling across namespace
This commit is contained in:
parent
cd283654eb
commit
c3b404bab0
@ -209,8 +209,9 @@ func AuthHandler(fn func() auth.Auth) server.HandlerWrapper {
|
||||
ctx = metadata.Set(ctx, "Micro-Namespace", ns)
|
||||
}
|
||||
|
||||
// Check the issuer matches the services namespace
|
||||
if account != nil && account.Issuer != ns {
|
||||
// Check the issuer matches the services namespace. TODO: Stop allowing go.micro to access
|
||||
// any namespace and instead check for the server issuer.
|
||||
if account != nil && account.Issuer != ns && account.Issuer != "go.micro" {
|
||||
return errors.Forbidden(req.Service(), "Account was not issued by %v", ns)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user