[英]springboot - basic ActiveDirectory auth then JWT token
Has anyone got a working example of this in a springboot app?有没有人在 springboot 应用程序中有这样的工作示例?
I have not found any example blogs/guides with this setup but I believe this would be a common security setup unless I am mistaken?我没有找到任何具有此设置的示例博客/指南,但我相信这将是一个常见的安全设置,除非我弄错了? No jpa/hibernate/persistence/mysql/postgres/H2db connections should be involved All examples I found online either are just JWT, or just LDAP, or use LDIF or use some H2/postgres to store credentials.
不应该涉及 jpa/hibernate/persistence/mysql/postgres/H2db 连接我在网上找到的所有示例要么只是 JWT,要么只是 LDAP,或者使用 LDIF 或使用一些 H2/postgres 来存储凭据。
This worked:这有效:
JWT from https://github.com/merugu/springsecurity/tree/master/ldapauthenticationjwttoken JWT 来自https://github.com/merugu/springsecurity/tree/master/ldapauthenticationjwttoken
AD from https://medium.com/@dmarko484/spring-boot-active-directory-authentication-5ea04969f220来自https://medium.com/@dmarko484/spring-boot-active-directory-authentication-5ea04969f220 的广告
Had to upgrade the github jwt repo to springboot 2.0.5 and add setSearchFilter {1} ( https://docs.spring.io/spring-security/site/docs/current/api/org/springframework/security/ldap/authentication/ad/ActiveDirectoryLdapAuthenticationProvider.html ) to AD必须将 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
This 2nd option also worked on Springboot 1.5: Spring security switch to Ldap authentication and database authorities ( https://stackoverflow.com/a/34658755 ) on top of https://github.com/cnapagoda/spring-boot-basic-auth第二个选项也适用于 Springboot 1.5: Spring 安全切换到 Ldap 身份验证和数据库权限( https://stackoverflow.com/a/34658755 ) 在https://github.com/cnapagoda/spring-boot-basic-之上授权
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.