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

session: Fix custom cockpit kerberos keytab with krb5 > 1.17 #12732

Merged
merged 1 commit into from
Sep 9, 2019

Conversation

martinpitt
Copy link
Member

After 1.17, krb5 moved to using secure_getenv() for environment variables
[1], in particular for $KRB5_KTNAME. This results in the value being ignored,
as cockpit-session is suid.

Use the gss_acquire_cred_from() GSSAPI extension [2] instead. This is
available since krb5 1.11, so adjust the version check in configure.ac
accordingly. The days of broken krb5 pkg-config are long gone, so just
use that properly.

[1] krb5/krb5@d439e370b70
[2] https://k5wiki.kerberos.org/wiki/Projects/Credential_Store_extensions#gss_acquire_cred_from.28.29

Fixes #12730

After 1.17, krb5 moved to using `secure_getenv()` for environment variables
[1], in particular for `$KRB5_KTNAME`. This results in the value being ignored,
as cockpit-session is suid.

Use the `gss_acquire_cred_from()` GSSAPI extension [2] instead. This is
available since krb5 1.11, so adjust the version check in configure.ac
accordingly. The days of broken krb5 pkg-config are long gone, so just
use that properly.

[1] krb5/krb5@d439e370b70
[2] https://k5wiki.kerberos.org/wiki/Projects/Credential_Store_extensions#gss_acquire_cred_from.28.29

Fixes cockpit-project#12730
Closes cockpit-project#12732
@martinpitt
Copy link
Member Author

I made this nicer by always using gss_acquire_cred_from().

@martinpitt martinpitt merged commit f5982bb into cockpit-project:master Sep 9, 2019
@martinpitt martinpitt deleted the krb-keytab branch September 18, 2019 09:44
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

Successfully merging this pull request may close these issues.

kerberos auth: custom keytab stopped working on fedora-31
2 participants