Skip to content

Kerberos incompatibilities #14

@grawity

Description

@grawity
  1. In standard Kerberos implementations (e.g. MIT Kerberos, Heimdal Kerberos) KRB5CCNAME generally defaults to FILE:/tmp/krb5cc_<uid> (although a different default may be set via krb5.conf). Currently godap assumes an empty string by default.

    $ ~/go/bin/godap -k ldap.nullroute.lt
    2024/11/11 18:43:52 open : no such file or directory
    
  2. In standard Kerberos implementations KRB5CCNAME is typically in the form of type:value, with an implied default of FILE: for the type. That is, while KRB5CCNAME="/tmp/cache" is valid, so is KRB5CCNAME="FILE:/tmp/cache", and most software (such as sshd or pam_krb5) uses the latter format, which godap currently does not accept.

    $ klist
    Ticket cache: FILE:/tmp/krb5cc_1000
    
    $ export KRB5CCNAME="FILE:/tmp/krb5cc_1000"
    
    $ ldapwhoami -Q -Y GSSAPI -H ldap://ldap.nullroute.lt
    dn:uid=grawity,cn=gssapi,cn=auth
    
    $ ~/go/bin/godap -k ldap.nullroute.lt
    2024/11/11 18:44:28 open FILE:/tmp/krb5cc_1000: no such file or directory
    
  3. The KDC is not looked up via SRV records, but specifying it manually doesn't seem to work either:

    $ export KRB5CCNAME="/tmp/krb5cc_1000"
    
    $ ~/go/bin/godap -k ldap.nullroute.lt
    2024/11/11 18:46:26 [Root cause: Networking_Error] Networking_Error: TGS Exchange
    Error: issue sending TGS_REQ to KDC: communication error with KDC via TCP: no
    KDCs defined in configuration for realm NULLROUTE.LT
    
    $ ~/go/bin/godap -k --kdc star.nullroute.lt ldap.nullroute.lt
    2024/11/11 18:46:26 [Root cause: Networking_Error] Networking_Error: TGS Exchange
    Error: issue sending TGS_REQ to KDC: communication error with KDC via TCP: no
    KDCs defined in configuration for realm NULLROUTE.LT
    

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingenhancementNew feature or requestgood first issueGood for newcomers

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions