【发布时间】:2020-04-25 20:00:51
【问题描述】:
我正在尝试按照 guide 设置一个带有 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]
在尝试修复错误时,我已将用户和组添加到应用程序下的分配中:
但问题仍然存在。
作为管理员授权的解决方法是什么?
【问题讨论】:
标签: spring-boot jhipster okta