pysaml2
pysaml2 copied to clipboard
Make attribute name-format in metadata configurable
The function do_requested_attribute() in src/saml2/metadata.py makes it impossible to specify any other name format than "urn:oasis:names:tc:SAML:2.0:attrname-format:uri" for the RequestedAttribute values in the generated metadata.
My suggestion is to add CONFIG[service][sp][attribute_name_format] which defaults to ATTRNAME_FORMAT_URI.
I think that this could be definitely achieved by extending the following also to the metadata https://github.com/IdentityPython/pysaml2/commit/e5d0b4f0760144430d885165d41d777b59ef5d6a
@spaceone @c00kiemon5ter do you agree?