spring-boot - jhipster+okta 的授权错误:未添加 ROLE_ADMIN
问题描述
我正在尝试按照本指南使用 okta 设置测试 jhipster Web 应用程序。
我可以使用 okta 使用我的 jhipster Web 应用程序登录,我应该是 ROLE_ADMIN,但是在被重定向回 webapp 菜单后,任何导航到实体的尝试都会导致未授权/拒绝访问页面。
IDE 是 Intellij,构建工具是 gradle。我正在使用 Java SDK 11。
okta 有 ROLE_ADMIN 和 ROLE_USER 组:
我添加了声明:
控制台日志:
Enter: add() with argument[s] = [AuditEvent [timestamp=2020-04-25T19:50:39.747921400Z, principal=anonymousUser, type=AUTHORIZATION_FAILURE, data={details=org.springframework.security.web.authentication.WebAuthenticationDetails@b364: RemoteIpAddress: 0:0:0:0:0:0:0:1; SessionId: null, type=org.springframework.security.access.AccessDeniedException, message=Access is denied}]]
Exit: add() with result = null
WARN 16660 --- [ XNIO-1 task-52] o.z.problem.spring.common.AdviceTraits : Unauthorized: Full authentication is required to access this resource
WARN 16660 --- [ XNIO-1 task-52] .m.m.a.ExceptionHandlerExceptionResolver : Resolved [org.springframework.security.authentication.InsufficientAuthenticationException: Full authentication is required to access this resource]
在尝试修复错误时,我已将用户和组添加到应用程序下的分配中:
但问题仍然存在。
被授权为管理员的修复程序是什么?
解决方案
推荐阅读
- javascript - 如何在只用JS加密的代码中制作密码
- python - 有线索的 Python 猜谜游戏
- vue.js - 如何将 vuetify 对话框添加到现有应用程序中?
- wpf - 如何在不创建 ValidationErrors 的情况下调用 TryValidateObject?
- amazon-s3 - 如何根据 dask 数据框列编写文件名?
- javascript - React 组件监听孙子事件
- python-3.7 - 如何在没有此 ValueError 异常的情况下运行我的最大回撤代码?
- r - 用于创建多边形中心线的 R 函数
- c - 使用 trie 的 pset4 拼写器。大小函数的问题
- arrays - 使用 countifs() 比较 Excel 中的两个列表