-
Notifications
You must be signed in to change notification settings - Fork 244
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Authorization failed! Given policy has not granted #136
Comments
你的各服务模块配置文件怎么样的,可以发邮件我看看,如果存在服务器连接地址,请用别名替代 比如: {
"AuthServer": {
"Authority": "http://identityServer4/",
"ApiName": "auth-service"
}
}
|
你这个报错属于网关请求网关管理服务的问题,要确保网关启动项目和网关管理项目的AuthServer配置项保持一致 |
这个没有改变过,都是你发的配置文件 |
如果这个我改变过那开发环境也应该不行呢,但是就是发布出来后不行 |
部署环境是否是容器内部,如果是Docker容器,请公开内部端口,AuthServer服务地址填写IP地址,localhost是开发环境下同一台主机 |
我部署在iis上的,全部放在同一主机的 |
IIS部署的话,如果在同一个网站目录之下,不同应用程序连接端口之后还有一个后缀在,最好部署在不同的网站目录上 |
生产环境下,身份服务器地址填写真实IP地址或者域名,不然外部认证用户连接到服务实例,与服务实例配置的授权服务器地址不匹配,也会出现认证失败 |
如果都是本机就不需要设置ip直接localhost撒 |
那你得应用程序就不支持外部授权了 |
应该是这个问题,我吧vue在在开发环境去调用云服务器部署的api,我等等改下ip试试 |
你这个问题,你先检查下如下几点: 1、ApiGateway.Host启动后,如果获取了Token,会在Redis服务器缓存Token信息,你通过这个Token在jwt.io验证一下,看看Scope和issue是否和ApiGateway.Admin项目匹配,你可以在swagger用这个Token调用一下ApiGateway.Admin的API; 2、如果都匹配的话,你看看platform.abppermissiongrants表中,ProviderName为C,ProviderKey为apigateway-host-client的记录是否存在这几个权限分配信息:ApiGateway.RouteGroup.Export 、ApiGateway.Global.Export、ApiGateway.Route.Export、ApiGateway.DynamicRoute.Export、ApiGateway.DynamicRoute.Export、ApiGateway.AggregateRoute.Export,这个也可以通过在redis服务器节点查看 |
好😁 |
但是开发环境又不存在这个问题 |
开发环境不报错,是因为开发环境禁用了审计日志的吗 |
Abp的模块的连接有专门的模块名称,通过名称指定的连接信息连接对应的数据库,没有指定配置,默认使用Default节点 |
我用开发环境运行没有问题,但是发布出来就说Authorization failed! Given policy has not granted
The text was updated successfully, but these errors were encountered: