The issue isn't directly related to the use of saml_assertion as the
namespace in that location. That namespace prefix is registered with
XPath to refer to "urn:oasis:names:tc:SAML:2.0:assertion". (The
reason it is called "saml_assertion" instead of the more common "saml"
is to work around PHP bug 49490[1].)
The issue is that instead of being in the assertion namespace, the
NameID in that logout request is in the protocol namespace. (Note the
"samlp:"-prefix on the node, which is registered as "urn:oasis:names:
tc:SAML:2.0:protocol" on the LogoutRequest element. Since we look for a
NameID element in the "urn:oasis:names:tc:SAML:2.0:assertion" namespace,
we are unable to locate the element. I also see that the Issuer element
has the same problem.
Another problem with the message is that the Issuer element is in the
wrong place. The Issuer element needs to appear as the first child of
the LogoutRequest element. simpleSAMLphp won't complain about it, since
we don't do schema validation of the messages, but if that SP ever
tries to connect to an IdP that does schema validation, it will reject
the message as being invalid.
[1] http://bugs.php.net/bug.php?id=49490
Regards,
Olav Morken
UNINETT / Feide
The namespaces are part of the definition of the messages in the SAML
specification. The LogoutRequest message belongs in the protocol
namespace, while the Issuer-element and the NameID-element belongs in
the assertion namespace.
If the SP does not obey these rules, the SP has a severe bug, and it
should be fixed. There is nothing you can change on the IdP to make the
SP use the correct namespace. You can only work around it by changing
the code to look for the elements in a differen namespace. (Note that
doing this means that your IdP will no longer work with other service
providers, since they will send the messages with the correct
namespaces.)
> Or is the logout request built based on the idp metadata? In the idp
> metadata, I found that there is a protocol namespace in the following
> tag:
>
> <md:IDPSSODescriptor
> protocolSupportEnumeration="urn:oasis:names:tc:SAML:2.0:protocol">
> Could this be the reason?
This only indicates that this IdP has support for SAML 2.0.