Skip to content

Commit 4c550f5

Browse files
committed
Sign logout requests according to logout_requests_signed config option
Signed-off-by: Ivan Kanakarakis <[email protected]>
1 parent c1fab71 commit 4c550f5

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/saml2/client.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,7 @@ def do_logout(
280280
except KeyError:
281281
session_indexes = None
282282

283+
sign = sign if sign is not None else self.logout_requests_signed
283284
sign_post = False if binding == BINDING_HTTP_REDIRECT else sign
284285
sign_redirect = False if binding == BINDING_HTTP_POST and sign else sign
285286

src/saml2/entity.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,11 @@ def apply_binding(
241241
:return: A dictionary
242242
"""
243243

244-
# XXX sig-allowed should be configurable
244+
# XXX SIG_ALLOWED_ALG should be configurable
245+
# XXX should_sign stems from authn_requests_signed and sign_response
246+
# XXX based on the type of the entity
247+
# XXX but should also take into account the type of message (Authn/Logout/etc)
248+
# XXX should_sign should be split and the exact config options should be checked
245249
sign = sign if sign is not None else self.should_sign
246250
sign_alg = sigalg or self.signing_algorithm
247251
if sign_alg not in [long_name for short_name, long_name in SIG_ALLOWED_ALG]:

0 commit comments

Comments
 (0)