Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Encryption Type Parsing of krb5.conf - Case Sensitive #526

Open
cnigh opened this issue Aug 11, 2023 · 0 comments
Open

Encryption Type Parsing of krb5.conf - Case Sensitive #526

cnigh opened this issue Aug 11, 2023 · 0 comments

Comments

@cnigh
Copy link

cnigh commented Aug 11, 2023

Description
Morning, I've been working to write a SPNEGO HTTP client by using a provided krb5.conf and a keytab for client.NewWithKeytab().

Through the testing, it worked well on my laptop (macos) but was having issues with it on my Oracle Linux 7.9 servers. On the Linux servers, I kept getting no support for encryption type error messages:
2023/08/11 09:55:17 could not login client: [Root cause: KDC_Error] KDC_Error: AS Exchange Error: kerberos error response from KDC: KRB Error: (14) KDC_ERR_ETYPE_NOSUPP KDC has no support for encryption type

Upon inspecting my krb5.conf, I noticed that the linux server had specified several encryption types as preferred where as my laptop did not:

[libdefaults]
 default_tgs_enctypes = AES256-CTS AES128-CTS RC4-HMAC DES-CBC-MD5 DES-CBC-CRC
 default_tkt_enctypes = AES256-CTS AES128-CTS RC4-HMAC DES-CBC-MD5 DES-CBC-CRC
 preferred_enctypes = AES256-CTS AES128-CTS RC4-HMAC DES-CBC-MD5 DES-CBC-CRC

Reproduction Steps

  • When specified with AES256-CTS AES128-CTS, I get the error about no supported encryption type
  • When I removed the enctype specifications, no error.
  • When I specified enctype as aes256-cts aws128-cts, no error

Question/Bug
It seems that the encryption types are made case-sensitive by this function:

id := ETypesByName[etype]

Since linux does not seem to have issues with the upper-case encryption types, should the look up of the type be converted to lowercase before look up?

Data

  • The version of gokrb5 being used (vX.Y.Z or master or branch name): v8.4.4
    
  • The version of Go being used (output of the go version command is handy): go version go1.20.6 darwin/amd64
    
  • Details of the environment in which you are seeing the issue: KDC is an MS Active Directory
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant