gpt4 book ai didi

single-sign-on - 用作 SP 时出现 Simplesamlphp 未处理的异常错误

转载 作者:行者123 更新时间:2023-12-04 04:29:16 29 4
gpt4 key购买 nike

在使用 simplesamlphp 作为服务提供商时成功接收到 SAML 2.0 token 后,出现以下错误。

 Oct 21 17:30:15 simplesamlphp DEBUG [6b6e3c270f] GenerateGroups - attribute 'eduPersonAffiliation' not found.
Oct 21 17:30:15 simplesamlphp DEBUG [6b6e3c270f] Session: doLogin("default-sp")
Oct 21 17:30:15 simplesamlphp WARNING [6b6e3c270f] Unable to find the SAML 2 binding used for this request.
Oct 21 17:30:15 simplesamlphp WARNING [6b6e3c270f] Request method: 'GET'
Oct 21 17:30:15 simplesamlphp ERROR [6b6e3c270f] SimpleSAML_Error_Error: UNHANDLEDEXCEPTION
Oct 21 17:30:15 simplesamlphp ERROR [6b6e3c270f] Backtrace:
Oct 21 17:30:15 simplesamlphp ERROR [6b6e3c270f] 0 /var/www/simplesamlphp/www/module.php:180 (N/A)
Oct 21 17:30:15 simplesamlphp ERROR [6b6e3c270f] Caused by: Exception: Unable to find the current binding.
Oct 21 17:30:15 simplesamlphp ERROR [6b6e3c270f] Backtrace:
Oct 21 17:30:15 simplesamlphp ERROR [6b6e3c270f] 2 /var/www/simplesamlphp/lib/SAML2/Binding.php:95 (SAML2_Binding::getCurrentBinding)
Oct 21 17:30:15 simplesamlphp ERROR [6b6e3c270f] 1 /var/www/simplesamlphp/modules/saml/www/sp/saml2-acs.php:11 (require)
Oct 21 17:30:15 simplesamlphp ERROR [6b6e3c270f] 0 /var/www/simplesamlphp/www/module.php:135 (N/A)
Oct 21 17:30:15 simplesamlphp ERROR [6b6e3c270f] Error report with id bd213fb5 generated.

我的SP是这样设置的:

**authsources.php**

'default-sp' => array(
'saml:SP',
'entityID' => NULL,
'idp' => NULL,
'discoURL' => NULL,
'RelayState' => '{link to my application}',
'acs.Bindings' => array(
'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST',
'urn:oasis:names:tc:SAML:1.0:profiles:browser-post',
),
),

saml20-idp-remote.php

$metadata['https://{idp entity id}'] = array(
'metadata-set' => 'saml20-idp-remote',
'entityid' => 'https://{idp entity id}',
'name' => array(
'en' => 'IDP Name',
'no' => 'IDP name',
),
'description' => 'IDP desc',
'SingleSignOnService' =>
array (
0 =>
array (
'Binding' => 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST',
'Location' => '{SSO url}',
),
1 =>
array(
'Binding' => 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Artifact',
'Location' => '{SSO url}',
),
),
'SingleLogoutService' => '{SLO url}',
'certFingerprint' => '{the fingerprint}',
);

我对单点登录还很陌生。为了保密起见,我还隐藏了 URL,但我不确定我是否遗漏了某些内容或导致此错误的原因。如果有人能帮助我指出正确的方向,将不胜感激。我还应该提到我正在尝试使用 https://drupal.org/project/simplesamlphp_auth连接到我的应用程序。

这是 IDP 的第一个流程。我使用 mysql 来存储 session 。

最佳答案

无法找到当前绑定(bind)。”的意思就是,无法确定当前绑定(bind)。您的 saml20-idp-remote.php 提到了 HTTP-POST 绑定(bind),并且您的日志提到了 Request method: 'GET',因此在发布到 https://…/module 时可能出现了问题.php/saml/sp/saml2-acs.php/default-sp.

我只是在胡乱猜测,但根据我的经验,最常见的原因是重定向网络服务器。也许您重定向到不同的主机名?你强制使用 HTTPS 吗?检查 IdP AssertionConsumerService 的 URL 是否正确 - 它们应该直接指向 SimpleSamlPhp 而无需任何重定向。

关于single-sign-on - 用作 SP 时出现 Simplesamlphp 未处理的异常错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19547602/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com