Session cookie related tests fail with:
FAILED test_ipalib/test_rpc.py::test_rpcclient_context::test_context_request_url - AssertionError: 'https://master1.ipa.test/ipa/json' != 'https://master1.ipa... FAILED test_ipalib/test_rpc.py::test_rpcclient_context::test_context_session_cookie - TypeError: argument of type 'NoneType' is not iterable FAILED test_ipapython/test_session_storage.py::test_session_storage::test_02 - AssertionError: assert None == b'Test Data'
_________________________ test_session_storage.test_02 _________________________ self = <ipatests.test_ipapython.test_session_storage.test_session_storage object at 0x7fcbd4dab4d0> def test_02(self): data = session_storage.get_data(self.principal, self.key) > assert(data == self.data) E AssertionError: assert None == b'Test Data' E + where b'Test Data' = <ipatests.test_ipapython.test_session_storage.test_session_storage object at 0x7fcbd4dab4d0>.data test_ipapython/test_session_storage.py:34: AssertionError
The following code can reproduce the problem:
from ipapython import session_storage CCACHE_COOKIE_KEY = "X-IPA-Session-Cookie" principal = "admin@IPA.TEST" data = "test" session_storage.remove_data(principal, CCACHE_COOKIE_KEY) session_storage.store_data(principal, CCACHE_COOKIE_KEY, data) print(session_storage.get_data(principal, CCACHE_COOKIE_KEY))
output:
[user@host /dir# KRB5_TRACE=/dev/stdout python3 test.py [22297] 1706109672.564323: Storing config in FILE:/tmp/krb5cc_0 for admin@IPA.TEST: X-IPA-Session-Cookie: (null) [22297] 1706109672.564324: Removing admin@IPA.TEST -> krb5_ccache_conf_data/X-IPA-Session-Cookie/admin\@IPA.TEST@X-CACHECONF: from FILE:/tmp/krb5cc_0 2 krb5_free_cred_contents (<ipapython.session_storage.LP__krb5_context object at 0x7f535553cb90>, <cparam 'P' (0x7f53553d43b0)>) [22297] 1706109672.564325: Storing config in FILE:/tmp/krb5cc_0 for admin@IPA.TEST: X-IPA-Session-Cookie: test\x00 [22297] 1706109672.564326: Storing admin@IPA.TEST -> krb5_ccache_conf_data/X-IPA-Session-Cookie/admin\@IPA.TEST@X-CACHECONF: in FILE:/tmp/krb5cc_0 2 krb5_free_cred_contents (<ipapython.session_storage.LP__krb5_context object at 0x7f535553ccb0>, <cparam 'P' (0x7f53553d4430)>) None
[root@master1 /]# ipa --version VERSION: 4.11.1, API_VERSION: 2.253
Metadata Update from @slev: - Issue assigned to slev
Metadata Update from @slev: - Assignee reset - Custom field on_review adjusted to https://github.com/freeipa/freeipa/pull/7186
master:
ipa-4-11:
ipa-4-10:
Metadata Update from @frenaud: - Issue close_status updated to: fixed - Issue status updated to: Closed (was: Open)
ipa-4-9:
Metadata Update from @frenaud: - Custom field rhbz adjusted to https://issues.redhat.com/browse/RHEL-23621, https://issues.redhat.com/browse/RHEL-23622
Log in to comment on this ticket.