Drupal 7 Drupal 7+;登录后SimpleSaml SSO重定向到;演示示例“;页
我们使用Drupal 7将SimpleSaml设置为IP,允许用户使用Drupal凭据登录到第三方服务。用户在Drupal登录页面上输入他们的凭证时,一切似乎都正常,但是,一旦他们登录,他们就会被重定向到SimpleSaml“Demo-Example”页面。(module.php/core/authenticate.php) 他们所有的细节都是正确的,并且他们都经过了明确的身份验证,但是重定向回第三方站点的情况从未发生过。 我们已经检查过,第三方正在发送正确的(编码的)数据,包括AssertionConsumerServiceURL 问题是如何让Drupal重定向回第三方url 使用的图书馆:Drupal 7 Drupal 7+;登录后SimpleSaml SSO重定向到;演示示例“;页,drupal-7,single-sign-on,simplesamlphp,Drupal 7,Single Sign On,Simplesamlphp,我们使用Drupal 7将SimpleSaml设置为IP,允许用户使用Drupal凭据登录到第三方服务。用户在Drupal登录页面上输入他们的凭证时,一切似乎都正常,但是,一旦他们登录,他们就会被重定向到SimpleSaml“Demo-Example”页面。(module.php/core/authenticate.php) 他们所有的细节都是正确的,并且他们都经过了明确的身份验证,但是重定向回第三方站点的情况从未发生过。 我们已经检查过,第三方正在发送正确的(编码的)数据,包括Assertio
simpleSAMLphp version 1.11.0
drupalauth for SimpleSAMLphp 1.7+ and Drupal 7.x
drupalauth4ssp (which comes with the drupalauth module)
配置:
SimpleSaml 2
store.type: sql
auth as: drupal-userpass
Apache is configured correctly
We are on Centos
We have SSL offload implemented on our test environment which seems to be working ok
(Load balancer 443 offloads to Apache 80)
authsources.php的内容:
$config = array(
// This is a authentication source which handles admin authentication.
'admin' => array(
// The default is to use core:AdminPassword, but it can be replaced with
// any authentication source.
'core:AdminPassword',
),
'drupal-userpass' => array(
'drupalauth:External',
// The filesystem path of the Drupal directory.
'drupalroot' => '/var/www/html/',
// Whether to turn on debug
'debug' => TRUE,
// the URL of the Drupal logout page
'drupal_logout_url' => 'https://[drupal_domain]/user/logout',
// the URL of the Drupal login page
'drupal_login_url' => 'https://[drupal_domain]/user',
// Which attributes should be retrieved from the Drupal site.
'attributes' => array(
array('drupaluservar' => 'uid', 'callit' => 'uid'),
array('drupaluservar' => 'name', 'callit' => 'cn'),
array('drupaluservar' => 'mail', 'callit' => 'mail'),
array('drupaluservar' => 'field_user_firstname', 'callit' => 'givenName'),
array('drupaluservar' => 'field_user_lastname', 'callit' => 'sn'),
array('drupaluservar' => 'roles','callit' => 'roles'),
),
),
);
如果需要的话,我很乐意发布更多信息。这里有很多可能出错的提示 有几件事值得检查:
- 必须将config/config.php中的store.type配置为phpsession以外的内容,否则此模块将无法工作
- 似乎正在生成重定向url
- 检查
文件的External.php
和335
行,看看有哪些值(可以使用类似的调试工具346
- 在整体调试中,您的代码将更清楚地说明您所面临的问题
<samlp:Response xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol"
xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion"
ID="_b6a80234ed663a4a818be0e80326ed4e0217b2fae4"
Version="2.0"
IssueInstant="2015-09-23T23:18:03Z"
Destination="http://www.domain.com/saml_login/idp?destination=other_siteURL"
此外,您可能需要从simplesamlphp Drupal模块中删除一些验证
i、 e
然后Drupal将带您到:other_siteURL您是否可以打印出
config/authsources.php
而不需要凭据:)Hi Patryk,请参见编辑。非常感谢。
www.domain.com/saml_login/idp?destination=other_siteURL (encode the destination)
// See if a URL has been explicitly provided in ReturnTo. If so, use it (as long as it points to this site). ?>
if (( isset($_REQUEST['ReturnTo'] ) && $_REQUEST['ReturnTo']) &&
(valid_url( $_REQUEST['ReturnTo'] ) && stristr($_REQUEST['ReturnTo'], $base_url)))