Missing NameQualifier and SPNameQualifier in LogoutRequest result in UnknownPrincipal
Description
Environment
Activity
Scott Cantor July 24, 2018 at 2:24 PM
Implemented, unit tested, documentation added.
Thomas Lenggenhager July 24, 2018 at 4:57 AM
Thank you Scott, for fixing it.
In the mean time this issue was also reported for keycloak, no resolution there yet:
https://issues.jboss.org/browse/KEYCLOAK-7820
Finally, the interoperability of both products will be improved.
Scott Cantor July 23, 2018 at 8:32 PM
I've settled on a fix that adds qualifier defaulting in the comparison rules but does so automatically for persistent and transient, and adds a profile config option that allows additional formats to be defined as permitting that comparison logic, which allows custom formats to be handled.
This is strictly incorrect for any of the other standard Formats, but if people want to alter the system's conformance, they will be able to do that also.
Scott Cantor July 23, 2018 at 3:07 PM
Regardless of my original reasoning, the standard is very poorly worded in this area, but one of the things that's overlooked with this is that the defaulting of the qualifiers is in fact only specified behavior for persistent and transient. It would be incorrect on the face of it to default the qualifiers with any other Format that's defined by the standard. Of course, custom Formats are free to define the same rules, which further complicates this.
I think there would have to be some kind of Format-driven rule for what to do here.
Scott Cantor July 23, 2018 at 2:46 PM
I don't know yet, I have to review why I didn't fix it the last time it came up.
Keycloak generates LogoutRequests for persistent NameIDs without adding the NameQualifier and the SPNameQualifier. See this example:
According to the SAML standard these values are optional if it can be derived from the context. The missing SPNameQualifier could be derived from the Issuer and the missing NameQualifier from the session cache in the IdP.
This was already reported two years ago in this shib-users thread