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

Using ldap with kerberos gives "keytab not provided" error #238

Open
alxbse opened this issue Jan 21, 2020 · 0 comments
Open

Using ldap with kerberos gives "keytab not provided" error #238

alxbse opened this issue Jan 21, 2020 · 0 comments

Comments

@alxbse
Copy link

alxbse commented Jan 21, 2020

Trying to use the ldap auth provider with kerberes gives me an "keytab not provided" error. Even when the keytab-file flag is used the error is thrown. This applies to both 0.4.0 and master.

The cause for the error seems to be an erroneous if check when verifying ldap options.

https://github.com/appscode/guard/blob/a3c65d74d64b13842a9bff0357951a18623142f3/auth/providers/ldap/options.go#L136-L138

Flags used:

$ guard run --tls-ca-file /pki/ca.crt  --tls-cert-file /pki/server.crt --tls-private-key-file /pki/server.key --auth-providers ldap --ldap.server-address ldap-server --ldap.user-search-dn users-dn --ldap.group-search-dn groups-dn --ldap.auth-choice Kerberos --ldap.keytab-file /keytab-file
I0121 09:51:50.362637       1 logs.go:19] FLAG: --alsologtostderr="false"
I0121 09:51:50.362698       1 logs.go:19] FLAG: --analytics="true"
I0121 09:51:50.362714       1 logs.go:19] FLAG: --auth-providers="[ldap]"
I0121 09:51:50.362723       1 logs.go:19] FLAG: --azure.client-id=""
I0121 09:51:50.362731       1 logs.go:19] FLAG: --azure.client-secret="***REDACTED***"
I0121 09:51:50.362739       1 logs.go:19] FLAG: --azure.environment=""
I0121 09:51:50.362746       1 logs.go:19] FLAG: --azure.tenant-id=""
I0121 09:51:50.362754       1 logs.go:19] FLAG: --azure.use-group-uid="true"
I0121 09:51:50.362763       1 logs.go:19] FLAG: --clock-check-interval="10m0s"
I0121 09:51:50.362771       1 logs.go:19] FLAG: --github.base-url=""
I0121 09:51:50.362779       1 logs.go:19] FLAG: --gitlab.base-url=""
I0121 09:51:50.362786       1 logs.go:19] FLAG: --gitlab.use-group-id="false"
I0121 09:51:50.362793       1 logs.go:19] FLAG: --google.admin-email=""
I0121 09:51:50.362800       1 logs.go:19] FLAG: --google.sa-json-file=""
I0121 09:51:50.362807       1 logs.go:19] FLAG: --help="false"
I0121 09:51:50.362815       1 logs.go:19] FLAG: --ldap.auth-choice="Kerberos"
I0121 09:51:50.362822       1 logs.go:19] FLAG: --ldap.bind-dn=""
I0121 09:51:50.362830       1 logs.go:19] FLAG: --ldap.bind-password="***REDACTED***"
I0121 09:51:50.362837       1 logs.go:19] FLAG: --ldap.ca-cert-file=""
I0121 09:51:50.362845       1 logs.go:19] FLAG: --ldap.group-member-attribute="member"
I0121 09:51:50.362853       1 logs.go:19] FLAG: --ldap.group-name-attribute="cn"
I0121 09:51:50.362860       1 logs.go:19] FLAG: --ldap.group-search-dn="groups-dn"
I0121 09:51:50.362868       1 logs.go:19] FLAG: --ldap.group-search-filter="(objectClass=groupOfNames)"
I0121 09:51:50.362875       1 logs.go:19] FLAG: --ldap.is-secure-ldap="false"
I0121 09:51:50.362882       1 logs.go:19] FLAG: --ldap.keytab-file="/keytab-file"
I0121 09:51:50.362889       1 logs.go:19] FLAG: --ldap.server-address="ldap-server"
I0121 09:51:50.362897       1 logs.go:19] FLAG: --ldap.server-port="389"
I0121 09:51:50.362904       1 logs.go:19] FLAG: --ldap.service-account=""
I0121 09:51:50.362913       1 logs.go:19] FLAG: --ldap.skip-tls-verification="false"
I0121 09:51:50.362921       1 logs.go:19] FLAG: --ldap.start-tls="false"
I0121 09:51:50.362929       1 logs.go:19] FLAG: --ldap.user-attribute="uid"
I0121 09:51:50.362936       1 logs.go:19] FLAG: --ldap.user-search-dn="users-dn"
I0121 09:51:50.362942       1 logs.go:19] FLAG: --ldap.user-search-filter="(objectClass=person)"
I0121 09:51:50.362950       1 logs.go:19] FLAG: --log_backtrace_at=":0"
I0121 09:51:50.362958       1 logs.go:19] FLAG: --log_dir=""
I0121 09:51:50.362964       1 logs.go:19] FLAG: --logtostderr="true"
I0121 09:51:50.362971       1 logs.go:19] FLAG: --max-clock-skew="2m0s"
I0121 09:51:50.362977       1 logs.go:19] FLAG: --ntp-server="0.pool.ntp.org"
I0121 09:51:50.362983       1 logs.go:19] FLAG: --secure-addr=":8443"
I0121 09:51:50.362990       1 logs.go:19] FLAG: --stderrthreshold="0"
I0121 09:51:50.362996       1 logs.go:19] FLAG: --tls-ca-file="/pki/ca.crt"
I0121 09:51:50.363003       1 logs.go:19] FLAG: --tls-cert-file="/pki/server.crt"
I0121 09:51:50.363009       1 logs.go:19] FLAG: --tls-private-key-file="/pki/server.key"
I0121 09:51:50.363014       1 logs.go:19] FLAG: --token-auth-file="***REDACTED***"
I0121 09:51:50.363025       1 logs.go:19] FLAG: --v="0"
I0121 09:51:50.363034       1 logs.go:19] FLAG: --vmodule=""
F0121 09:51:50.436546       1 server.go:71] keytab not provided
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