This repository was archived by the owner on Jan 26, 2026. It is now read-only.
IDP dynamic configuration#126
Open
challet wants to merge 13 commits into
Open
Conversation
challet
commented
Mar 19, 2021
| """ Access point for the IDP Server instance | ||
| """ | ||
| _server_instance: Server = None | ||
| _server_instances: Dict[str, Server] = {} |
Contributor
Author
There was a problem hiding this comment.
There are now several instances cached : the keys of this dict are the entityids of the metadata. So it is expected the IDP conf is persistent for one entityid (see the load method)
|
|
||
|
|
||
| @method_decorator(never_cache, name="dispatch") | ||
| class MetadataView(IdPHandlerViewMixin, View): |
Contributor
Author
There was a problem hiding this comment.
Moved as a class based view for inheriting the dynamic configuration loading method
| @property | ||
| def sign_response(self) -> bool: | ||
| if self._sign_response is None: | ||
| return getattr(IDP.load().config, "sign_response", False) |
Contributor
Author
There was a problem hiding this comment.
No more IDP load in models since their config depends on the http request
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds two main dynamic and optional configuration settings :
SAML_IDP_CONF_LOADER: a path to a callable that can adapt the IDP configuration, taking two arguments :SAML_IDP_CONFsettingSAML_IDP_FILTER_SP_QUERYSET: a path to a callable that should return the queryset of SPs available along the request being handled. It takes two arguments :