Introduction to Kerberos_PHP Tutorial
Introduction to Kerberos Information can use the ticket-granting ticket obtained through this verification to access multiple services, that is, SSO (Single Sign On). Since a shared key is established between each Client and Service, the protocol is quite secure.
Conditions
Let’s first look at the prerequisites of the Kerberos protocol: Client and KDC, KDC and Service already have their own shared keys before the protocol works, and Since the messages in the protocol cannot penetrate the firewall, these conditions restrict the Kerberos protocol from being used within an organization, making its application scenarios different from X.509 PKI.
(This process avoids the unsafe method of the client sending the password directly to the KDC in order to pass the verification)
kinit - Obtain and cache Kerberos ticket-granting ticket
kinit is used to obtain and cache Kerberos ticket-granting tickets. This tool is similar in functionality to the kinit tool that are commonly found in other Kerberos implementations, such as SEAM and MIT Reference implementations.
The user must be registered as a principal with the Key Distribution Center (KDC) prior to running kinit.
SYNOPSIS
Summary
In summary, the Kerberos protocol mainly does two things
1. Secure delivery of tickets.
2. Secure release of Session Key. Coupled with the use of timestamps, the security of user authentication is guaranteed to a large extent. And using the Session Key, the messages passed between the Client and the Service after passing the authentication can also be guaranteed by Confidentiality (confidentiality) and Integrity (integrity). However, since an asymmetric key is not used, it cannot be non-repudiation, which also limits its application. However, relatively speaking, it is much simpler to implement than the X.509 PKI identity authentication method.Specific process
(Note: This process uses symmetric encryption; this process occurs in a certain Kerberos realm; lowercase letters c, d, e is the message sent by the client, and the capital letters A, B, E, F, G, H are the messages sent back by each server)
First, the user uses the program on the client (the user's own machine). Login:
- The user enters their user ID and password into the client.
- The client program runs a one-way function (mostly hash) to convert the password into a key. This is the "user key" (K_client) of the client (user). The trusted AS also obtains the same key as this key through some secure means.
Subsequently, client authenticates (client gets ticket for ticket (TGT) from AS):
- Client sends 1 message to AS (Note : The user does not send the key (K_client) to the AS, nor the password):
- A clear text message containing the user ID, such as "User Sunny wants to request a service" (Sunny is the user ID)
- Message A: "Client-TGS session key" encrypted by user key (K_client) (K_TGS-session) (The session key is used for future communication (session) between the client and TGS)
- Message B: "Ticket Authorization Ticket" (TGT) encrypted by TGS key (K_TGS) ( TGT includes: client-TGS session key (K_TGS-session), user ID, user URL, TGT validity period)
Then, the service authorizes (the client gets the ticket (T) from the TGS):
- The client sends the following 2 messages to the TGS:
- Message c: Message B (K_TGS encrypted TGT), and the service ID of the service you want to obtain (note: not the user ID)
- Message d: Client-TGS session secret The "authentication character" encrypted by the key (K_TGS-session) (the authentication character includes: user ID, timestamp)
- Message E: "Client-Server Ticket" encrypted by the server key (K_SS) ( T) (T includes: client-SS session key (K_SS-session), user ID, user URL, T validity period)
- Message F: Client-TGS session key (K_TGS-session) encryption After the "client-SS session key" (K_SS_session)
Finally, service request (client gets service from SS):
- Client sends 2 messages to SS:
- Message e: Message E
- Message g: "New authenticator" encrypted by client-server session key (K_SS_session) (new authenticator includes: user ID, timestamp)
- Message H: client-server session The "new timestamp" encrypted by the key (K_SS_session) (the new timestamp is: the timestamp sent by the client plus 1)
Defects
- Fails at a single point: it requires continuous response from the central server. When the Kerberos service ends, no one can connect to the server. This shortcoming can be compensated by using a composite Kerberos server and a defective authentication mechanism.
- Kerberos requires that the clocks of the hosts participating in the communication are synchronized. Tickets have a validity period, so if the host's clock is out of sync with the Kerberos server's clock, authentication will fail. The default setting requires that the clock times differ by no more than 10 minutes. In practice, a Network Time Protocol daemon is often used to keep host clocks synchronized.
- Management protocols are not standardized and there are some differences in server implementation tools. RFC 3244 describes password changes.
- Because the keys used by all users are stored in the central server, compromising the security of the server will compromise the keys of all users.
- A dangerous client will compromise user passwords.
Reference:
http://idior.cnblogs.com/archive/2006/03/20/354027.html
http://bey2nd.blog.163.com/ blog/static/12063183120141275250466/
http://docs.oracle.com/javase/1.5.0/docs/tooldocs/windows/kinit.html

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

In recent days, Ice Universe has been steadily revealing details about the Galaxy S25 Ultra, which is widely believed to be Samsung's next flagship smartphone. Among other things, the leaker claimed that Samsung only plans to bring one camera upgrade

OnLeaks has now partnered with Android Headlines to provide a first look at the Galaxy S25 Ultra, a few days after a failed attempt to generate upwards of $4,000 from his X (formerly Twitter) followers. For context, the render images embedded below h

Alongside announcing two new smartphones, TCL has also announced a new Android tablet called the NXTPAPER 14, and its massive screen size is one of its selling points. The NXTPAPER 14 features version 3.0 of TCL's signature brand of matte LCD panels

The Vivo Y300 Pro just got fully revealed, and it's one of the slimmest mid-range Android phones with a large battery. To be exact, the smartphone is only 7.69 mm thick but features a 6,500 mAh battery. This is the same capacity as the recently launc

In recent days, Ice Universe has been steadily revealing details about the Galaxy S25 Ultra, which is widely believed to be Samsung's next flagship smartphone. Among other things, the leaker claimed that Samsung only plans to bring one camera upgrade

Samsung has not offered any hints yet about when it will update its Fan Edition (FE) smartphone series. As it stands, the Galaxy S23 FE remains the company's most recent edition, having been presented at the start of October 2023. However, plenty of

Motorola has released countless devices this year, although only two of them are foldables. For context, while most of the world has received the pair as the Razr 50 and Razr 50 Ultra, Motorola offers them in North America as the Razr 2024 and Razr 2

The Redmi Note 14 Pro Plus is now official as a direct successor to last year'sRedmi Note 13 Pro Plus(curr. $375 on Amazon). As expected, the Redmi Note 14 Pro Plus heads up the Redmi Note 14 series alongside theRedmi Note 14and Redmi Note 14 Pro. Li
