saml is not working in drupal 10

Created on 19 February 2024, 10 months ago
Updated 20 February 2024, 10 months ago

Hi Folks, I am using drupal 10 for IDP with module drupalauth4ssp and drupal 10 for SP using simplesamlphp_auth .
The library simplesamlphp version 2.1.3 is being used. I am successfully getting metadata for both IDP and Sp. But unluckily I am not being connected through session with all the website. I am not getting any error or warning.

Below is my remote saml20-idp-remote metadata code being used for SP.

$metadata[$IdP_host . '/simplesaml/module.php/saml/idp/metadata'] = [
'metadata-set' => 'saml20-idp-remote',
'entityid' => $IdP_host . '/simplesaml/module.php/saml/idp/metadata',
'SingleSignOnService' => [
[
'Binding' => 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect',
'Location' => $IdP_host . '/simplesaml/module.php/saml/idp/singleSignOnService',
],
],
'SingleLogoutService' => [
[
'Binding' => 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect',
'Location' => $IdP_host . '/simplesaml/module.php/saml/idp/singleLogout',
],
],
'certData' => $IdP_cert_data,
'contacts' => [
[
'emailAddress' => 'email@xyz.com',
'contactType' => 'technical',
'givenName' => 'Administrator',
],
],
];

and for saml20-sp-remote is following code being used in IDP site.

foreach ($SP_config as $SP) {
$metadata[$SP['url'] . '/simplesaml/module.php/saml/sp/metadata.php/drupal-userpass'] = [
'SingleLogoutService' => [
[
'Binding' => 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect',
'Location' => $SP['url'] . '/simplesaml/module.php/saml/sp/saml2-logout.php/drupal-userpass',
],
[
'Binding' => 'urn:oasis:names:tc:SAML:2.0:bindings:SOAP',
'Location' => $SP['url'] . '/simplesaml/module.php/saml/sp/saml2-logout.php/drupal-userpass',
],
],
'AssertionConsumerService' => [
[
'index' => 0,
'Binding' => 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST',
'Location' => $SP['url'] . '/simplesaml/module.php/saml/sp/saml2-acs.php/drupal-userpass',
],
[
'index' => 1,
'Binding' => 'urn:oasis:names:tc:SAML:1.0:profiles:browser-post',
'Location' => $SP['url'] . '/simplesaml/module.php/saml/sp/saml1-acs.php/drupal-userpass',
],
[
'index' => 2,
'Binding' => 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Artifact',
'Location' => $SP['url'] . '/simplesaml/module.php/saml/sp/saml2-acs.php/drupal-userpass',
],
[
'index' => 3,
'Binding' => 'urn:oasis:names:tc:SAML:1.0:profiles:artifact-01',
'Location' => $SP['url'] . '/simplesaml/module.php/saml/sp/saml1-acs.php/drupal-userpass/artifact',
],
],
'name' => [
'en' => 'Hub',
],
'contacts' => [
[
'emailAddress' => 'email@xyz.com',
'contactType' => 'technical',
'givenName' => 'Administrator',
],
],
'certData' => $SP['cert'],
];
}
Any suggestion/guidance is highly appreciated.

💬 Support request
Status

Active

Version

2.0

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024