kerberos

Authenticates a user from a Kerberos ticket, so that a client holding a TGT can reach reva directly without an intermediate identity provider.

DriversAuthenticationAuth managers
Package
github.com/cs3org/reva/v3/pkg/auth/manager/kerberos
Source
pkg/auth/manager/kerberos · Go reference

Overview

Package kerberos authenticates a user from a Kerberos ticket, so that a client holding a TGT can reach reva directly without an intermediate identity provider.

The client presents a SPNEGO token, which this manager validates against the service keytab. What it gets back is a client principal, which it resolves to a user through the user provider. The principal is authoritative: the client id supplied alongside the token is ignored, because anything the client says about who it is has not been verified and the ticket has.

Mutual authentication

Mutual authentication is not supported, by construction. This manager runs in the auth provider, which is a different process from the HTTP frontend that received the request, and the CS3 Authenticate RPC returns a user and a token with nowhere to put a SPNEGO response token. A client must therefore not set GSS_C_MUTUAL_FLAG. This is the usual arrangement for SPNEGO over HTTPS, where the TLS certificate already authenticates the server.

Replay

The replay cache is per-process and in memory, so several auth provider replicas do not share one. Under TLS an attacker cannot observe an AP-REQ to replay it, which is what makes this acceptable; a deployment that wants replay protection across replicas needs a shared cache.

Configuration

KeyTypeDefaultDescription
keytabstring-Keytab is the path to the service keytab holding the key for ServicePrincipal. source
service_principalstring-ServicePrincipal is the SPN clients request a ticket for, such as HTTP/cernbox.cern.ch. Empty accepts any principal the keytab holds. source
realmstring-Realm is the Kerberos realm to accept. Empty accepts any realm the keytab can validate. source
user_claimstring"username"UserClaim is the claim the username from the ticket is resolved against. source
max_clock_skew_secondsint300MaxClockSkewSeconds bounds the difference between the client’s clock and this host’s. Kerberos is sensitive to it, and the default matches the protocol’s own. source