Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple sp same entityid solution #1

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

marcelkornblum
Copy link

All code copied from PR#124 on the original repo for this project, opened by @lgarvey on Mar 11, 2021

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'

marcelkornblum and others added 2 commits April 25, 2023 15:19
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
@marcelkornblum
Copy link
Author

@lgarvey ☝️

@marcelkornblum
Copy link
Author

@xelixrob If you're happy with this, would you mind very much merging and pushing to pypi? We've been running this code from a fork of the original for a while now but it would be nice to have it merged in somewhere :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant