Skip to content

Commit

Permalink
Merge pull request #3965 from open-formulieren/fix/3950-add-csp-eherk…
Browse files Browse the repository at this point in the history
…enning

[#3950] Add CSP headers eHerkenning
  • Loading branch information
SilviaAmAm authored Mar 5, 2024
2 parents b00d33b + 2508719 commit 35fc9c6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/openforms/contrib/digid_eherkenning/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

ADDITIONAL_CSP_VALUES = {
DigidConfiguration: "https://digid.nl https://*.digid.nl",
EherkenningConfiguration: "",
EherkenningConfiguration: "https://*.eherkenning.nl",
}
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,8 @@ def test_csp_updates_for_eherkenning(self, get_metadata):
self.assertEqual(
csp_added.value,
"https://test-iwelcome.nl/broker/sso/1.13 "
"https://ehm01.iwelcome.nl/broker/slo/1.13",
"https://ehm01.iwelcome.nl/broker/slo/1.13 "
"https://*.eherkenning.nl",
)

# assert new csp entry is added and old one is deleted after url update
Expand All @@ -195,7 +196,8 @@ def test_csp_updates_for_eherkenning(self, get_metadata):
self.assertEqual(
csp_updated.value,
"https://test-iwelcome.nl/broker/sso/1.13 "
"https://ehm01.iwelcome.nl/broker/slo/1.13",
"https://ehm01.iwelcome.nl/broker/slo/1.13 "
"https://*.eherkenning.nl",
)

@patch(
Expand Down Expand Up @@ -232,6 +234,7 @@ def test_response_headers_contain_form_action_values_in_eherkenning(
"form-action "
"'self' "
"https://test-iwelcome.nl/broker/sso/1.13 "
"https://ehm01.iwelcome.nl/broker/slo/1.13;",
"https://ehm01.iwelcome.nl/broker/slo/1.13 "
"https://*.eherkenning.nl;",
response.headers["Content-Security-Policy"],
)

0 comments on commit 35fc9c6

Please sign in to comment.