From be1e50e826dc1e20df9f551a201c56b6581218e7 Mon Sep 17 00:00:00 2001 From: Benjamin Dauvergne Date: Tue, 23 Nov 2021 19:21:20 +0100 Subject: [PATCH] views: log SAML response and assertion in debug view (#58915) --- mellon/views.py | 3 +++ tests/test_sso_slo.py | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/mellon/views.py b/mellon/views.py index 316a6c8..ce83a75 100644 --- a/mellon/views.py +++ b/mellon/views.py @@ -324,6 +324,9 @@ class LoginView(ProfileMixin, LogMixin, View): 'response_dump': login.response and login.response.debug(4), 'assertion_dump': login.assertion and login.assertion.debug(4), } + self.log.info('mellon: debug login attributes %s', attributes) + self.log.info('mellon: debug login assertion_dump %s', context['assertion_dump']) + self.log.info('mellon: debug login response_dump %s', context['response_dump']) return self.render(request, 'mellon/debug_login.html', context) def login(self, user, attributes): diff --git a/tests/test_sso_slo.py b/tests/test_sso_slo.py index 970d50c..201cca8 100644 --- a/tests/test_sso_slo.py +++ b/tests/test_sso_slo.py @@ -724,6 +724,10 @@ def test_debug_sso(db, app, idp, caplog, sp_settings, settings): assert '