我用Drupal設置了我的SimpleSamlPhp(我有我的IdP在另一臺服務器上)。以管理員身份登錄「http://localhost:31478/simplesaml/」後,我運行了我的IdP的「測試認證來源」,顯示了具有正確屬性的「SAML 2.0 SP演示示例」屏幕畫面。我想這意味着SimpleSamlPhp和我的Idp可以看到對方並且正確溝通。用drupal和simplesamlphp_auth「找不到IdP的元數據」
然而,當我試圖用聯合登錄使用Drupal開啓 「通過SimpleSAMLphp激活驗證」 後,我得到了以下錯誤:
SimpleSAML_Error_Exception: Could not find the metadata of an IdP with entity ID 'tenant2.test.com' in sspmod_saml_Auth_Source_SP->getIdPMetadata() (line 134 of /var/www/vendor/simplesamlphp/simplesamlphp/modules/saml/lib/Auth/Source/SP.php).
設置
- 的Drupal版本是8.
- php版本是5.6.24-0。
- simplesamlphp_auth模塊版本是8.x-3.0-alpha4 + 2-dev。
- simplesamlphp_auth模塊已在Drupal中安裝並啓用。對於simplesamlphp_auth模塊配置,「此SP的身份驗證源」已設置爲「default-sp」
我在/ var中有我的simplesamlphp目錄。下面的變化爲實現由SAML
/var/simplesamlphp/config/config.php
'baseurlpath' => 'simplesaml/',
....
'enable.saml20-sp' => true,
'enable.saml20-idp' => true,
'enable.shib13-idp' => false,
'enable.adfs-idp' => false,
'enable.wsfed-sp' => false,
'enable.authmemcookie' => false,
....
'saml' => TRUE,
....
....
'default-saml20-idp' => 'tenant2.test.com',
....
'store.type' => 'memcache',
....
....
'memcache_store.servers' => array(
array(
array('hostname' => 'localhost'),
),
),
'memcache_store.prefix' => 'SimpleSAMLphp',
....
....
'trusted.url.domains' => array('localhost:31478'),
/var/simplesamlphp/config/authsources.php
<?php
$config = array(
'admin' => array(
'core:AdminPassword',
),
'default-sp' => array(
'saml:SP',
'privatekey' => 'saml.pem',
'certificate' => 'saml.crt',
'entityID' => null,
'idp' => 'tenant2.test.com',
'discoURL' => null,
),
);
/var/simplesamlphp/metadata/saml20-idp-remote.php
<?php
$metadata['tenant2.test.com'] = array(
'SingleSignOnService' => 'https://tenant2.test.com/testSamlLogin',
'AssertionConsumerService' => 'http://localhost:31478/simplesaml/module.php/saml/sp/saml2-acs.php/default-sp',
'SingleLogoutService' => 'https://tenant2.test.com/admin/logout',
'certFingerprint' => '0a89aec59bf48e414ec050f6956891cb3f5b09a0',
);
我一直在試圖解決這個問題幾天。我錯過了什麼嗎?
謝謝。
你找到答案了嗎?我面臨同樣的問題 – Rahul