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)
|
ctx = metadata.Set(ctx, "Micro-Namespace", ns)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check the issuer matches the services namespace
|
// Check the issuer matches the services namespace. TODO: Stop allowing go.micro to access
|
||||||
if account != nil && account.Issuer != ns {
|
// 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)
|
return errors.Forbidden(req.Service(), "Account was not issued by %v", ns)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user