跳到主要内容

4. 示例

用户 "joe" 可能希望以用户 "pete" 的身份登录机器 "foo". 如果 "pete" 已在 "foo" 上做好设置, 允许 "joe" 访问他的账户, 那么客户端会发送 IAC SB AUTHENTICATION NAME "pete" IAC SE IAC SB AUTHENTICATION IS KERBEROS_V4 AUTH <joe's kerberos ticket> IAC SE, 服务器随后会根据票据信息把该用户认证为 "joe", 并且由于 "pete" 允许 "joe" 使用他的账户, 服务器会返回 ACCEPT. 如果使用相互认证, 那么客户端客户端会发送 CHALLENGE, 并验证服务器返回的 RESPONSE.

       Client                           Server
IAC DO AUTHENTICATION
IAC WILL AUTHENTICATION
[ The server is now free to request authentication information.
]
IAC SB AUTHENTICATION SEND
KERBEROS_V4 CLIENT|MUTUAL
KERBEROS_V4 CLIENT|ONE_WAY IAC
SE
[ The server has requested mutual Version 4 Kerberos
authentication. If mutual authentication is not supported,
then the server is willing to do one-way authentication.

The client will now respond with the name of the user that it
wants to log in as, and the Kerberos ticket. ]
IAC SB AUTHENTICATION NAME
"pete" IAC SE
IAC SB AUTHENTICATION IS
KERBEROS_V4 CLIENT|MUTUAL AUTH
<kerberos ticket information>
IAC SE
[ The server responds with an ACCEPT command to state that the
authentication was successful. ]
IAC SB AUTHENTICATION REPLY
KERBEROS_V4 CLIENT|MUTUAL ACCEPT
IAC SE
[ Next, the client sends across a CHALLENGE to verify that it is
really talking to the right server. ]
IAC SB AUTHENTICATION IS
KERBEROS_V4 CLIENT|MUTUAL
CHALLENGE xx xx xx xx xx xx xx
xx IAC SE
[ Lastly, the server sends across a RESPONSE to prove that it
really is the right server.
IAC SB AUTHENTICATION REPLY
KERBEROS_V4 CLIENT|MUTUAL
RESPONSE yy yy yy yy yy yy yy yy
IAC SE