Repository navigation
asyauth 0.0.26
New
Kerberos GSSAPI per RFC (KerberosCredential.build_gss_context())
A second Kerberos GSSAPI implementation next to the existing Windows-flavoured one: the raw
Kerberos V5 mechanism as the RFCs have it, without SPNEGO and without the Windows specifics.
It is for peers built on MIT krb5 / Heimdal, the first user being RPCSEC_GSS (NFS).
The existing build_context() / KerberosClientNative path used by SMB, LDAP, DCERPC and RDP
is unchanged.
- Initiator context
KerberosGSSClientNativewithauthenticate,get_mic,verify_mic,
wrapandunwrap, with optional mutual authentication, initiator subkey, and sequence /
replay checking. - Per-message tokens for every encryption type family:
- AES128 / AES256 (RFC 4121)
- RC4-HMAC (RFC 4757)
- 3DES and single DES (RFC 1964)
ctx.etypesselects the session key encryption types asked from the KDC (default
[18, 17, 23, 16, 3]), so a weaker context can be forced where the service allows it.- Cross-realm: the service can be in another realm over a direct or a transitive trust.
The realm is taken from the SPN, from the credential (realmc/dcc), or from a KDC referral. - Service tickets are taken from a ccache only on an exact SPN match.
Tests
- New
tests/directory with token test vectors generated by MIT krb5 and interop tests
against live MIT KDCs / acceptors (krb5 1.20, and 1.17 for DES / 3DES), including a
three-realm setup for cross-realm. - The KDCs run in throwaway docker containers started by pytest; these tests are skipped when
docker is not available. Seetests/lab/README.md.
Fixes
- Kerberos:
des3/tdeskeys were rejected because of a wrong length check (a 24 byte key
is 48 hex characters). - NTLM: the LM response is calculated from the credential's
secretfor password credentials;
without a password (NT hash) the LM response mirrors the NT response. - NTLM: the AUTHENTICATE message built by the native client carries the domain and the
username of the credential.
Other
- README rewritten: protocols and subprotocols, credential URL format, secret types and
parameters, the authentication loop, and both Kerberos flavours. - Minimum
minikerberosversion is now 0.4.13.
Known limits
- Contexts with a
des-cbc-crcsession key cannot be established (minikerberos has no profile
for that encryption type). The per-message tokens for such a key are implemented. - The RFC flavour is initiator only, and does not send RFC 4537 encryption type negotiation.