diff --git a/roost_backend/tests/test_kerberos.py b/roost_backend/tests/test_kerberos.py index 1f5209d..9d6549f 100644 --- a/roost_backend/tests/test_kerberos.py +++ b/roost_backend/tests/test_kerberos.py @@ -7,6 +7,7 @@ # pylint: disable=protected-access + class KerberosTests(unittest.TestCase): realm = 'EXAMPLE.COM' client_princ = 'user@EXAMPLE.COM' diff --git a/roost_backend/utils/kerberos.py b/roost_backend/utils/kerberos.py index dc1927e..d3bc720 100644 --- a/roost_backend/utils/kerberos.py +++ b/roost_backend/utils/kerberos.py @@ -114,6 +114,7 @@ def _b64(data): return k5.Credentials(ctx).copy_from_cstruct(kcreds) + def add_credential_to_ccache(creds, princ=None): # pylint: disable=protected-access, too-many-locals, too-many-statements # all this should be abstracted away somewhere else. @@ -156,6 +157,7 @@ def verify_same_princ(client_name): 0x08, # KRB5_TC_MATCH_TIMES_EXACT expired._handle) + def _get_zephyr_creds(realm): context = k5.Context() ccache = context.cc_default()