humanmade / humanmade/wp-simple-saml

Configuration via code not generating expected SP Metadata

Open
#62 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
PHP
Stars
125
Forks
37
PR merge metrics
No merged PRs in 30d

Description

I'm currently trying to use the Configuration via code settings to generated valid SP Metadata. I'm trying to get a similar SP Metadata to the one below:
```

XXXXXXXXXXXXXXXXXX

XXXXXXXXXXXXXX

XXXXXXXXXXXXXXXXXXXX

XXXXXXXXXXXXXXXXXX

XXXXXXXXXXXXXXXXX

urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress
urn:oasis:names:tc:SAML:2.0:nameid-format:transient
urn:oasis:names:tc:SAML:2.0:nameid-format:persistent
urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified
urn:oasis:names:tc:SAML:1.1:nameid-format:X509SubjectName

```

To achieve this I try to add the missing fields that were not being generated in the SP Metadata via the code configuration were I tried the following:

/**
* SIMPLE SAML PLUGIN CONFIGURATION
*/
add_filter( 'wpsimplesaml_idp_metadata_xml_path', function(){
return ABSPATH . '.private/sso/test.idp.xml';
} );

```
add_filter( 'wpsimplesaml_config', function(){
return [
'entityId' => 'https://example.com',
'assertionConsumerService' => [
'url' => 'https://example.com/sso/verify',
'binding' => 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST'
],
'singleLogoutService' => [
'url' => 'https:/example.com/sso/sls',
'binding' => 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST'
],
'AuthNRequest' => true,
'signatureAlgorithm' => 'http://www.w3.org/2001/04/xmldsig-more#rsa-sha256',
'NameIDFormat' => 'urn:oasis:names:tc:SAML:2.0:nameid-format:persistent'

];
} );
```

However, the SP Metadata does not change and the above fields such as ` 'NameIDFormat' => 'urn:oasis:names:tc:SAML:2.0:nameid-format:persistent'` stay the same as default. No change to the SP Metadata is made. What is the hook to configure the fields expected to be in the SP Metadata required by the idP? Can you provide some guidance please.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.