pysaml2
pysaml2 copied to clipboard
do not assert both subject-id and pairwise-id
Description
do not assert both subject-id and pairwise-id default to pairwise-id if both are requested and available
The feature or problem addressed by this PR
When a SP requests subject-id any there pysaml2 will add both subject-id and pairwise-id to the list of required attributes which means that both will be released if they are available.
What your changes do and why you chose this solution
This PR will check if both subject-id and pairwise-id is in available attributes and default to only release pairwise-id if both are. This check only runs if the urn:oasis:names:tc:SAML:profiles:subject-id:req is set to any.
Checklist
- [X] Checked that no other issues or pull requests exist for the same issue/change
- [X] Added tests covering the new functionality
- [ ] Updated documentation OR the change is too minor to be documented
- [ ] Updated CHANGELOG.md OR changes are insignificant