Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/apache/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Apache 如何为SAML2生成有效的SP XML文件?_Apache_Saml 2.0_Adfs_Shibboleth - Fatal编程技术网

Apache 如何为SAML2生成有效的SP XML文件?

Apache 如何为SAML2生成有效的SP XML文件?,apache,saml-2.0,adfs,shibboleth,Apache,Saml 2.0,Adfs,Shibboleth,我不知道如何为我的定制SP服务实现SAML2协议,我有一些困难 我已经试过了 <?xml version="1.0" encoding="UTF-8"?> <EntityDescriptor xmlns:md="urn:oasis:names:tc:SAML:2.0:metadata" entityID="http://www.mydomain.ext/#/secure"> <SPSSODescriptor WantAssertionsSigned="true

我不知道如何为我的定制SP服务实现SAML2协议,我有一些困难

我已经试过了

<?xml version="1.0" encoding="UTF-8"?>
 <EntityDescriptor xmlns:md="urn:oasis:names:tc:SAML:2.0:metadata" entityID="http://www.mydomain.ext/#/secure">
  <SPSSODescriptor WantAssertionsSigned="true" protocolSupportEnumeration="urn:oasis:names:tc:SAML:2.0:protocol">
   <AssertionConsumerService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" Location="http://www.mydomain.ext/#/" isDefault="true"/>
    <KeyDescriptor>
     <ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
      <ds:X509Data>
       <ds:X509Certificate>
        {my_x509_certificate_generated}
       </ds:X509Certificate>
      </ds:X509Data>
     </ds:KeyInfo>
    </KeyDescriptor>
   <NameIDFormat>urn:oasis:names:tc:SAML:2.0:nameid-format:entity</NameIDFormat>
  </SPSSODescriptor>
 </EntityDescriptor>

{my_x509_certificate_generated}
urn:oasis:names:tc:SAML:2.0:nameid格式:entity

我需要将xml文件发送到IDP。创建有效的SP xml文件会错过什么?Thank’s

您附加的xml是一个SP元数据,它描述SP属性—ID、证书、绑定支持等。。。 我建议您在开始实际的编码或配置之前,更熟悉SAML

以下是一些很好的资源:

如果您正在使用JAVA实现SP,以下是一些您可以使用的好库: OneLogin的SAML Java工具包-

Okta登录小部件-

LastPass SAML Java SDK-

死简单SAML 2.0客户端-


pac4j-

感谢塞拉的邀请。配置SP后,我可以在URL“”中看到SP元数据文件。新的问题是,当我将凭据放在IDP登录上时,会再次重定向到IDP并显示错误消息。无法重定向到我的SP以创建会话。是否可能需要在IDP上配置更多内容?您看到的错误是什么?这里有几件事需要检查-您的元数据是否有正确的ACS URL?这是IDP知道在SP中将用户重定向到何处进行身份验证的地方;您是否将SP配置为使用与IDP相同的绑定来传输SAML响应消息?(根据您的元数据,这是HTTP-POST);是否已使用IDP证书更新SP?否,我看到一个自定义错误页面视图。这是元数据文件路径=>的结果。与IDP的联合是正确的。我可以用Apache重定向post接收的数据吗?谢谢!您可以使用Apache或任何其他web服务器执行Post绑定。一种方法是返回一个HTML表单,其中包含一个脚本,该脚本将自动将表单发布到ACS url中——谢谢你,给Sela。我知道IDP包含登录表单,完成后,IDP将POST数据发送到我的SP。Shibboleth服务处理响应并应重定向到apache服务,对吗?。我想知道哪些数据在重定向之前接收到SP服务。我的网站没有任何形式,只有视图。是否有必要在SP上制作一个表单,并在没有Shibboleth的情况下更改帖子url?