Spring Security 集成到活动目录中

发布于 2024-07-24 04:34:30 字数 393 浏览 3 评论 0原文

我想在 Spring 中通过 Active Directory 查找对生产者和消费者进行身份验证 - 在各自执行的主体(即服务帐户)下。

我假设我必须使用

JaasPlainTextPasswordValidationCallbackHandler

and

JaasCertificateValidationCallbackHandler

设置我的

jaas.config

文件。

谁能给我一个代码示例,告诉我从这里去哪里? 我猜测服务帐户名称需要进入 jaas.config 文件 - 但如果是这样 - 我希望自动填充它。

I want to authenticate my web service in Spring with an Active Directory lookup at both the producer and the consumer - under the Principal that that each are executing under (ie Service Accounts).

I'm assuming I have to use

JaasPlainTextPasswordValidationCallbackHandler

and

JaasCertificateValidationCallbackHandler

and set up my

jaas.config

file.

Can anyone give me a code example of where to go from here? I'm guessing the Service Account names will need to go into the jaas.config file - but if so - I'd like that to be automatically populated.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

与往事干杯 2024-07-31 04:34:30

你根本不需要 JAAS。 一个简单的 LDAP 身份验证方案应该可以很好地适用于 Spring Security 和 Active Directory; Active Directory 公开 LDAP 接口(通常为端口 389)。

http://static.springframework.org/ spring-security/site/docs/2.0.x/reference/ldap.html

You shouldn't need JAAS at all. A simple LDAP authentication scheme should work fine for Spring Security and Active Directory; Active Directory exposes an LDAP interface (typically port 389).

http://static.springframework.org/spring-security/site/docs/2.0.x/reference/ldap.html

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文