Allow overriding SAML settings.

Review Request #14288 — Created Jan. 7, 2025 and submitted — Latest diff uploaded

Information

Review Board
release-7.x

Reviewers

The python3-saml library has a bunch of settings that govern its
behavior. We have siteconfig keys for the settings that matter (things
like binding type, verification keys, URLs, etc), which then gets turned
into the dict format that python3-saml wants.

In some cases, users may need to override those settings. In a recent
report, Windows machines which use x509 to log in require setting some
items in the security key (which we otherwise don't use at all).

This change adds an escape hatch for those situations where admins can
define SAML_CONFIG_ADVANCED in their settings_local.py file,
mimicking the advanced_settings.json file that python3-saml would use if
we were not passing in the config as a dict.

Ran unit tests.

Diff Revision 1 (Latest)

Commits

First Last Summary ID Author
Allow overriding SAML settings.
The python3-saml library has a bunch of settings that govern its behavior. We have siteconfig keys for the settings that matter (things like binding type, verification keys, URLs, etc), which then gets turned into the dict format that python3-saml wants. In some cases, users may need to override those settings. In a recent report, Windows machines which use x509 to log in require setting some items in the `security` key (which we otherwise don't use at all). This change adds an escape hatch for those situations where admins can define `SAML_CONFIG_ADVANCED` in their `settings_local.py` file, mimicking the advanced_settings.json file that python3-saml would use if we were not passing in the config as a dict. Testing Done: Ran unit tests.
a71d9afc4eb48e469fa851a2bc852656dcf02331 David Trowbridge
reviewboard/accounts/sso/backends/saml/settings.py
reviewboard/accounts/tests/test_saml_settings.py
Loading...