【问题标题】:set simpleSAMLphp SP to send POST request设置 simpleSAMLphp SP 发送 POST 请求
【发布时间】:2014-05-14 22:39:57
【问题描述】:

我有问题

我连接了 SP 和 IDP,除了一件事之外一切正常:SP 向 iDp 发送 GET 请求。以及使用 POST 协议发送的 iDp 需求数据。

这是SP

'spname' => array(
  'saml:SP',
  'ProtocolBinding' => 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST',
  'idp' => 'https://someurl.com/SomeSSO.aspx',
  'acs.Bindings' => array(
   'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST',
   'urn:oasis:names:tc:SAML:1.0:profiles:browser-post',
  ),
  'discoURL' => NULL,
  'privatekey' => 'some.pem',
  'certificate' => 'some.crt'
 ),

这是 iDp 遥控器:

$metadata['https://something.com/SomeSSO.aspx'] = array(
 'name' => array(
  'en' => 'Something',
  'no' => 'Something',
 ),
 'description'          => 'Something',
 'SingleSignOnService'  => 'https://xxxxxx.com/SomeSSO.aspx?ou_id=-850',
 'SingleLogoutService'  => 'https://xxxxxx.com/SomeSSO.aspx?ou_id=-850',
 'certFingerprint'      => xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
);

有人可以帮我吗?

【问题讨论】:

    标签: simplesamlphp


    【解决方案1】:

    您已经陈述了您的问题,但没有提出实际问题。

    如果您希望 IdP 也使用 GET,我相信您需要在协议绑定属性中将 HTTP-POST 到 HTTP-GET。

    【讨论】:

      【解决方案2】:

      要将 SimpleSAMLphp 配置为使用 HTTP POST 而不是 GET,您需要修改远程 IdP 配置以明确指定 HTTP POST 绑定,这样应该可以工作:

      $metadata['https://something.com/SomeSSO.aspx'] = array(
          'name' => array(
              'en' => 'Something',
              'no' => 'Something',
          ),
          'description'           => 'Something',
          'SingleSignOnService'   => array (
              array (
                  'Binding'   => 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST',
                  'Location'  => 'https://xxxxxx.com/SomeSSO.aspx?ou_id=-850',
              ),
          ),
          'SingleLogoutService'   => array (
              array (
                  'Binding'   => 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST',
                  'Location'  => 'https://xxxxxx.com/SomeSSO.aspx?ou_id=-850',
              ),
          ),
          'certFingerprint'       => xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
      );
      

      SimpleSAMLphp 包含一个元数据解析器,它负责将 IdP 配置详细信息转换为 SimpleSAMLphp 所需的格式。此处的 SimpleSAMLphp 文档中简要提到了此功能:https://simplesamlphp.org/docs/1.8/simplesamlphp-sp#section_2

      如果您的远程 IdP 以 XML 格式提供其元数据,请考虑使用元数据解析器来生成您的远程 IdP 配置,因为元数据解析器会自动为您的远程 IdP 端点生成正确的绑定。

      【讨论】:

        猜你喜欢
        • 2019-06-05
        • 2022-08-19
        • 1970-01-01
        • 1970-01-01
        • 2016-01-25
        • 2017-07-13
        • 2010-10-12
        • 2016-03-24
        • 2015-06-10
        相关资源
        最近更新 更多