Kerberos is a network authentication protocol that uses secret-key cryptography and a trusted third party to let clients and servers verify each other’s identity over an insecure network. It works by issuing time-limited “tickets” that prove a user has authenticated, so passwords are never sent across the wire.
Background and Purpose
Kerberos was developed in the 1980s at the Massachusetts Institute of Technology (MIT) as part of Project Athena, designed to address a simple but serious problem: on a shared network, how can a server know that a client really is who it claims to be? Early systems sent passwords in plain text, which anyone with network access could capture. Kerberos solved this by introducing a central authentication service that both parties trust, and by using symmetric encryption (a single shared secret) rather than sending passwords.
The name comes from Greek mythology—Kerberos (often spelled Cerberus) was the three-headed dog guarding the gates of Hades. The protocol’s three heads are often said to represent the three parties involved: the client, the server, and the key distribution center (KDC). Kerberos is now the default authentication method in many enterprise environments, including Microsoft Active Directory and various Unix/Linux systems.
Core Components
Kerberos relies on a few key pieces working together:
- Key Distribution Center (KDC) – the trusted third party that issues tickets. It has two logical parts: the Authentication Server (AS) and the Ticket Granting Server (TGS).
- Ticket Granting Ticket (TGT) – a ticket obtained after initial authentication, used to request service tickets without re-entering a password.
- Service Ticket – a ticket that grants access to a specific service (like a file server or database).
- Authenticator – a timestamped piece of data encrypted with the session key, proving the client holds the key.
- Session Key – a temporary encryption key shared between the client and the service (or the client and the TGS) for that session.
Each user and service has a long-term secret: for users, it’s derived from their password; for services, it’s a random key stored in the KDC’s database. These secrets are used to protect the short-lived session keys.
How Kerberos Works: Step by Step
The authentication flow can be broken into three main phases. Let’s walk through a typical scenario where a user named Alice wants to access a file server.
- Initial Authentication (AS Exchange): Alice sends a request to the Authentication Server (AS) with her username. The AS looks up Alice’s long-term key (derived from her password) and sends back two things: a TGT encrypted with the TGS’s secret key, and a session key (called the TGS session key) encrypted with Alice’s key. Alice’s computer decrypts the session key using her password; she never sends the password itself.
- Requesting a Service Ticket (TGS Exchange): Alice wants to use the file server. She sends a request to the Ticket Granting Server (TGS) containing the TGT, the name of the service, and an authenticator (her username and a timestamp, encrypted with the TGS session key). The TGS decrypts the TGT with its own key, verifies the authenticator, and if valid, issues a service ticket for the file server. This service ticket is encrypted with the file server’s secret key and contains a new session key for Alice and the file server.
- Accessing the Service (AP Exchange): Alice sends the service ticket and a new authenticator (encrypted with the service session key) to the file server. The file server decrypts the service ticket, checks the authenticator, and if everything matches, grants access. Optionally, the server can send back a timestamp encrypted with the session key to prove its own identity to Alice (mutual authentication).
All tickets have a limited lifetime (typically 8–10 hours), after which they expire and the user must re-authenticate. This limits the window in which a stolen ticket can be reused.
Why Tickets Instead of Passwords?
The core innovation of Kerberos is that the user’s password is used only once, at the initial AS exchange, to decrypt the TGS session key. After that, all communication uses short-lived session keys and tickets. This means:
- Passwords are never transmitted over the network, even encrypted (they’re only used locally to derive the long-term key).
- Tickets are time-limited and tied to specific services, so a stolen ticket can’t be used forever or for everything.
- The KDC acts as a central authority, making it easier to revoke access or enforce policies.
However, the KDC becomes a single point of failure and a prime target: if an attacker compromises the KDC’s database, they can forge tickets for any user. That’s why Kerberos deployments often use multiple KDCs and strict physical security.
Common Problems and Misconceptions
One of the most frequent issues with Kerberos is clock skew. Because Kerberos relies on timestamps in authenticators to prevent replay attacks, if the client and server clocks differ by more than a few minutes (default is 5 minutes), authentication fails. Network Time Protocol (NTP) is essential in Kerberos environments.
Another common misconception is that Kerberos is a single-sign-on (SSO) system in itself. It provides the foundation for SSO—once you have a TGT, you can request service tickets without re-entering your password—but SSO in practice also requires applications to be Kerberos-aware. Many web applications use SPNEGO or other wrappers to integrate.
Kerberos also has a known vulnerability called “pass-the-ticket” or “pass-the-hash” attacks, where an attacker who obtains a valid TGT or service ticket can reuse it without knowing the password. This is why ticket lifetimes are kept short and why modern systems add additional protections like credential guarding.
Kerberos vs. Other Authentication Methods
Kerberos is often compared to other authentication protocols:
- LDAP (Lightweight Directory Access Protocol): LDAP is a directory service protocol, not an authentication protocol per se, but it can be used for authentication (bind). Kerberos is faster and more secure because it doesn’t send passwords or hashes over the network; LDAP often uses SSL/TLS to protect credentials.
- RADIUS: RADIUS is used for network access (like Wi-Fi or VPN) and typically sends a shared secret or hashed password. Kerberos is more suited to internal enterprise services.
- OAuth 2.0 / SAML: These are used for web-based single sign-on and delegated authorization. Kerberos works at the OS/network level, while OAuth and SAML work at the application layer. They can be combined (e.g., using Kerberos for desktop login and SAML for web apps).
Kerberos is generally considered more secure than simple password-based systems because it never exposes passwords and provides mutual authentication. However, it requires a complex infrastructure and is not suitable for public internet scenarios where users aren’t part of a trusted domain.
Security Considerations and Best Practices
To keep a Kerberos deployment secure, administrators should follow several best practices:
- Keep the KDC servers tightly controlled and patched; they hold the keys to the kingdom.
- Use strong encryption types (e.g., AES) rather than older DES or RC4, which are now considered weak.
- Set reasonable ticket lifetimes—too long increases risk, too short causes user frustration.
- Enable pre-authentication to prevent offline password guessing from captured AS responses.
- Monitor for anomalous ticket requests or unusual service usage.
- Use NTP to keep clocks synchronized across all clients and servers.
Kerberos is not a magic bullet: it protects against eavesdropping and replay, but it does not protect against malware on the client machine that can steal tickets or keys. Endpoint security is still necessary.
Frequently Asked Questions
Q: Is Kerberos still used today?
Yes, Kerberos is the default authentication protocol in Microsoft Active Directory and is widely used in Unix/Linux environments (e.g., via MIT Kerberos or Heimdal). Many enterprise applications, including file sharing, email, and database access, rely on it.
Q: What happens if my password changes?
When you change your password, the KDC updates your long-term key. Any existing TGTs and service tickets remain valid until they expire, but you’ll need to re-authenticate to get new tickets. Some systems may invalidate all tickets immediately for security.
Q: Can Kerberos be used on the internet?
Kerberos was designed for a closed, trusted network. Using it on the public internet requires additional security like IPsec or VPNs to protect the KDC and prevent ticket theft. For web applications, OAuth or SAML are more common.
Q: What is a “realm” in Kerberos?
A realm is a logical administrative domain that has its own KDC. Realms are typically named after the DNS domain (e.g., EXAMPLE.COM). Cross-realm trust can be set up so users in one realm can authenticate to services in another.
Q: Why does Kerberos require synchronized clocks?
Authenticators contain timestamps to prevent replay attacks. If clocks are skewed, the server can’t verify that the authenticator is fresh, so it rejects the request. The default maximum skew is 5 minutes, but some implementations allow configuration.
Q: Is Kerberos the same as single sign-on?
Kerberos enables SSO within a realm, but SSO is a broader concept. With Kerberos, a user logs in once to get a TGT, and then can access all Kerberos-enabled services without re-entering credentials. However, not all applications support Kerberos, so full SSO may require additional tools like SAML or OAuth.
Related
- Ministers of the Interior and Kingdom Relations: Full List
- Ministers of Agriculture and Food: Full List
- Secretaries of State for Scotland: Full List
How pages are sourced and corrected: Sources and editorial policy.