为了账号安全,请及时绑定邮箱和手机立即绑定

springboot - 基本的 ActiveDirectory 身份验证,然后是 JWT 令牌

springboot - 基本的 ActiveDirectory 身份验证,然后是 JWT 令牌

慕田峪7331174 2021-12-10 15:13:30
有没有人在 springboot 应用程序中有这样的工作示例?/auth 控制器,用户在其中提供 ActiveDirectory 凭据(通过基本身份验证或 POST json)并在他们提供有效的 AD 凭据时接收 JWT 令牌。不应涉及 LDIF 文件,Springboot 应用程序将根据 ldaps://ActiveDirectoryhost:636 端点验证凭据/myapi 控制器仅在来自第 1 步(以上)的有效 JWT 令牌以“授权承载”标题发送时才有效我没有找到任何具有此设置的示例博客/指南,但我相信这将是一个常见的安全设置,除非我弄错了?不应该涉及 jpa/hibernate/persistence/mysql/postgres/H2db 连接我在网上找到的所有示例要么只是 JWT,要么只是 LDAP,或者使用 LDIF 或使用一些 H2/postgres 来存储凭据。
查看完整描述

1 回答

?
慕莱坞森

TA贡献1810条经验 获得超4个赞

这有效:

JWT 来自https://github.com/merugu/springsecurity/tree/master/ldapauthenticationjwttoken

来自https://medium.com/@dmarko484/spring-boot-active-directory-authentication-5ea04969f220 的广告

必须将 github jwt repo 升级到 springboot 2.0.5 并添加 setSearchFilter {1} ( https://docs.spring.io/spring-security/site/docs/current/api/org/springframework/security/ldap/authentication /ad/ActiveDirectoryLdapAuthenticationProvider.html ) 到 AD

:这第二个选项也工作Springboot 1.5 春季安全开关,LDAP认证和数据库权限(https://stackoverflow.com/a/34658755之上)https://github.com/cnapagoda/spring-boot-basic-授权


查看完整回答
反对 回复 2021-12-10
  • 1 回答
  • 0 关注
  • 286 浏览

添加回答

举报

0/150
提交
取消
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号