djangosaml2idp icon indicating copy to clipboard operation
djangosaml2idp copied to clipboard

Dynamic configuration loading

Open okke-formsma opened this issue 3 years ago • 3 comments

We're using djangosaml2's dynamic configuration loading feature, and would like to be able to use something similar for djangosaml2idp. Is this a feature on the roadmap, or would you be open to pull requests?

Instead of hardcoding the idp settings in the config file, a callable is defined which returns a dictionary with the contents of SAML_IDP_CONFIG: SAML_IDP_CONFIG_LOADER = 'python.path.to.your.callable'

Thanks for the great package!

okke-formsma avatar Aug 27 '20 14:08 okke-formsma

I'm trying to come up with something similar. The main difficulty here resides in the ServiceProvider model which uses IDP.load() (more or less the config loading) but where the HttpRequest is not accessible (in djangosaml2 it is passed to the callable).

challet avatar Feb 15 '21 13:02 challet

I'm going to bump this. We're in the process of trying to externalize all our configs on our IDP so we don't have to redeploy every time we want something to change. This would be nice feature to avoid that happening.

Amertz08 avatar Mar 03 '21 16:03 Amertz08

I'm trying a PR about this : #126. It may need some further testing for various usages.

challet avatar Mar 19 '21 10:03 challet