Skip to content

Conversation

@jkakavas
Copy link
Member

This enables the SAML backend to define a list of blacklisted SAML IdPs that can't be used. If a user selects one of those, we return an error.
The assumed format of the idp_blacklist_file is :

{"blacklist": [ "https://blacklisted_entityid1.org/saml/idp",
"https://blacklisted_entityid2.org/saml/idp",
"https://blacklisted_entityid3.org/saml/idp",
]}

local: [idp.xml]

entityid: <base_url>/<name>/proxy_saml2_backend.xml
idp_blacklist_enabled: true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we really need this? An undefined or empty idp_blacklist_file entry would suffice, imo.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeap, could be done this way too.


# If IDP blacklisting is enabled and the selected IDP is blacklisted,
# stop here
if self.config["sp_config"].get("idp_blacklist_enabled", None):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The place where the setting is set, is in pysaml2's configuration domain. As such it should be registered with pysaml2's configuration module, and accessed as self.sp.config.getattr("idp_blacklist_enabled", "").

If we intend this to be a SATOSA configuration option (which makes sense because it enforces policy) it should be moved out of the sp_config block, and placed under the config block. Then, one can either set it on initialization (through __init__ and use self. idp_blacklist_enabled) or invoke the configuration directly as config.get("idp_blacklist_enabled").

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you're right, this is intended to be SATOSA config, so I'll move this to config

@c00kiemon5ter
Copy link
Member

LGTM

@johanlundberg johanlundberg merged commit 82c0f6e into IdentityPython:master Sep 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants