Releases: uktrade/djangosaml2idp2
Releases · uktrade/djangosaml2idp2
Multiple sps with same entityid
Merge pull request #1 from uktrade/multiple-sp-same-entityid-solution
This is a minimal change required to provide at least the possibility of supporting multiple SP entries with the same entity id.
It's required specifically to support multiple integrations with AWS services which all use th same entity_id, but it's not possible (or logical) to create multiple ServiceProvider instances with the same entity-id. So the solution is to add an extra field in an overridden ServiceProvider instance e.g. real_entity_id which takes precedence if provided:
def get_entity_id(self):
return self.real_entity_id or self.entity_id
The entity_id field can then be used as a lookup/alias field, e.g:
/idp/sso/init?sp=aws-quicksight
/idp/sso/init?sp=aws-appstream
For each ServiceProvider instance the entity_id would hold the alias, e.g aws-quicksight or aws-appstream whilst the real_entity_id fields would be set to 'urn:amazon:webservices'
Co-authored-by: Lyndon Garvey @lgarvey