How to get other IdP-provided attributes from a SAML response into WP?
-
As part of a possible migration from the Shibboleth plugin to this one (which in turn is part of a possible hosting migration), I’m working on replicating functionality of the old Shibboleth plugin.
Right now, Shibboleth’s SAML implementation can handle whatever arbitrary data are included in the IdP’s response, and exposes them as elements under $_SERVER. (Example: My IdP’s SAML responses include not only names and email addresses, but some org-specific information like department, sometimes employee ID, sometimes AD group memberships, and so on.) Then I can just query $_SERVER[‘ADGroups’] or $_SERVER[‘PrimaryRole’] or whatever other arbitrary data are coming in.
(Part of that is the Shib daemon’s attribute map, so if this plugin can only get urn:oid: style field names instead of friendly names, that’s an understandable limitation. Probably depends on whether the IdP sends friendly names in its responses.)
In at least a few specific cases, this plugin can do that, since that’s what the “Attribute Mappings” settings are — you put in the ID of an element in the SAML response, and it’s used for a WordPress-specific thing (like first name or email address). But I’d like to be able to extend that to other fields that might be received in the response. My ideal would be that every attribute from the SAML response gets populated right into $_SERVER for compatibility, but I could be talked into a different implementation. Any suggestions on how to approach this?
- The topic ‘How to get other IdP-provided attributes from a SAML response into WP?’ is closed to new replies.