简体   繁体   English

实施SAML断言

[英]Implementing SAML Assertion

I have a Java Web Application and I want to serve it as a Service Provider and implement SAML. 我有一个Java Web应用程序,我想将其作为服务提供者并实现SAML。 I am not sure about the workflow of how to do it. 我不确定如何执行此工作流程。

I have read this SO question and still not able to understand completely. 我已经阅读了这样的问题 ,但仍然无法完全理解。 In the question they are saying they need to send request to IDP, called as Assertion if I am right. 在问题中,他们说他们需要向IDP发送请求,如果我是对的,则称为断言

How do I create assertion? 如何创建断言? I saw the sample there. 我在那儿看到了样品。 But where to pass the login credentials with that? 但是在哪里传递登录凭证呢?

Also how do I register my application with IDP and do I need to install some certificate given by IDP for that? 另外,我该如何向IDP注册我的应用程序,是否需要为此安装IDP提供的一些证书? what is the workflow? 什么是工作流程?

Thanks 谢谢

Typically you use some kind of third party software to provide SAML integration. 通常,您使用某种第三方软件来提供SAML集成。 Examples of this is OpenAM and Shibboleth. 例如OpenAM和Shibboleth。 It is a good idea to use software like this becaouse SAML is a complex protocol and it is easy to make mistakes, leaving your solution vulnerable. 因为这样的软件是一个好主意,因为SAML是一个复杂的协议,容易出错,使您的解决方案容易受到攻击。

I have a blog post on SAML and the work flow you can have a look at. 我有一篇关于SAML的博客文章,您可以看一下它的工作流程。
This one about SAML and this one about the SAML Web profile flow that you want 这一篇关于SAML另一篇关于SAML Web配置文件流

If you insist on doing the whole integration yourself in code. 如果您坚持要自己在代码中进行整个集成。 OpneSAML is one library you can use. OpneSAML是您可以使用的一个库。 This will require you to have a good understanding of SAML. 这将需要您对SAML有充分的了解。 My book, A Guide to OpenSAML , gives a good introduction to SAML and the OpenSAML library. 我的书《 OpenSAML指南》很好地介绍了SAML和OpenSAML库。

I also have some blog posts on OpenSAML 我也有一些有关OpenSAML的博客文章

About your questions. 关于您的问题。 The Assertion is something that is sent to you from the IDP, this is the proof of an authentication of a user. 断言是从IDP发送给您的,这是对用户身份验证的证明。 What you need to do is to send a AuthnRequest to the IDP to start and authentication. 您需要做的是将AuthnRequest发送到IDP以启动和身份验证。

The registration on the IDP depends completely on what software is used to implment SAML in the IDP side. IDP上的注册完全取决于在IDP端使用什么软件实施SAML。 Usually it involves you sending a SAML Metadata XML to the IDP. 通常,它涉及您将SAML元数据XML发送到IDP。 This is a configuration file containing certificates, endpoint and more. 这是一个包含证书,端点等的配置文件。 Here is a post on SAML Metadata 这是有关SAML元数据帖子
In return the IDP send you metadata the you use to communicate with it. 作为回报,IDP向您发送您用于与其通信的元数据。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM