使用 JAVA 和 SAML 2.0 的 IdP 发起的 Web SSO 配置文件
在我们的 Web 应用程序中,我们充当身份提供商 (IdP),通过使用用户名/密码的登录屏幕对用户进行身份验证。成功验证后,我们希望显示一个超链接列表,最终用户可以单击这些超链接来访问合作伙伴(服务生产商)网站。我们计划使用 SAML 2.0 和 HTTP POST 绑定来完成
这些消息将作为名为 SAMLResponse 的隐藏表单控件放置在 HTML FORM 中,如下所示,
...因为我是在 JAVA JSP 链接中将 SAMLResponse 实现为隐藏元素的新手,我有以下内容查询 - 如何在 JAVA 中生成 SAMLResponse 对象,然后将其设为隐藏字段 - 请给我指出示例 - 如何在 JAVA 中对 SAML 响应进行数字签名 - 如何在JAVA中加密SAMLResponse
在Java世界中是否有等效的方法?是否有针对常见 servlet 容器或应用程序服务器的现成解决方案和/或教程?
In our web application we act as Identity provider (IdP) which authenticate users through a Login screen with username/password. On successful authentiocation we would like to display a list of hyperlinks which end-users can click to visit partner (service prodicer) web sites. We plan to accomplish these using SAML 2.0 and HTTP POST binding
The message will be placed within an HTML FORM as a hidden form control named SAMLResponse as shown below
...
as i am newbie to implementation of SAMLResponse as hidden element in JAVA JSP Links, i have following queries
- How to generate SAMLResponse object in JAVA and then make it as hidden field - Please point me to examples
- How to Digitally Sign the SAMLResponse in JAVA
- How to encrypt SAMLResponse in JAVA
Is there a equivalent method in the Java world? Are there out of the box solutions and/or tutorials for common servlet containers or application servers?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可能想看看 http://shibboleth.internet2.edu/ 的 Shibboleth,这是一个开源项目IdP 和 SP 实施。我发现它相当成熟,尽管整个 SAML 的设置并不是完全微不足道的。然而,一旦它开始工作,它似乎就工作得很好。恕我直言,在安全关键环境中,使用经过验证的实现是一个更好的主意,而不是在对所有细节缺乏了解的情况下自行实施。这使得您自己的实现更容易出错,因此容易受到漏洞的影响。
无论如何,如果您仍然决定推出自己的实现,您至少可以查看 IdP 组件的源代码以获取有关如何执行某些操作的提示。
http://svn.middleware.georgetown.edu/view/java-idp/branches/REL_2/src/main/java/edu/internet2/middleware/shibboleth/idp/
You might want to have a look at Shibboleth from http://shibboleth.internet2.edu/, an open source IdP and SP implementation. I found it quite mature, even though the whole SAML stuff is not completely trivial to set up. Once it is working, however, it seems to work just fine. IMHO using a proven implementation is a better idea in security critical contexts than rolling your own with a weak understanding of all the details. This makes your own implementation much more error prone and therefore susceptible to vulnerabilities.
In any case, you can at least look at the IdP component's source code to get hints on how to do certain things, should you still decide to roll your own implementation.
http://svn.middleware.georgetown.edu/view/java-idp/branches/REL_2/src/main/java/edu/internet2/middleware/shibboleth/idp/