# cephx tickets, message by message

*HTML: https://book.ceph-s3.ir/en/lab-cephx.html*
*Licence: CC BY-NC-SA 4.0. Author: Ramin Najarbashi.*

[Interactive lab](lab.html)cephx tickets, message by message
In the book: [Chapter 8](08-under-the-hood.html#sec-08-6-4)
Labcephx tickets, message by messageFollow a client's authentication from the MON to an OSD step by step: which key protects each part of each message, who can open it, and where an attack is stopped.**4 / 9**step**…**state4. AUTH ticket and service ticketsThe session key is encrypted with the client secret, so only the client opens it; the ticket blob uses the service's rotating secret and is opaque to the client. Since Nautilus the service tickets come in the same reply.{ CephxServiceTicket (auth session_key, expires) }client secret The Client can open it{ CephxTicketBlob (AuthTicket: name, global_id, caps) }AUTH rotating secret Opaque to the Client; only carried{ connection_secret }auth session key The Client can open it{ OSD CephxServiceTicket (OSD session_key) }auth session key The Client can open it{ OSD CephxTicketBlob (session_key, AuthTicket, caps) }OSD rotating secret Opaque to the Client; only carriedKeys each party holds by this stepClientclient secret auth session key OSD session keyMONclient secret AUTH rotating secret OSD rotating secret the OSD's own keyOSDOSD rotating secret the OSD's own keyClock warnings on MONs and expired-ticket errors on clients often come from clock skew, because tickets carry expiry times; take NTP seriously (chapter 7).Follows:`doc/dev/cephx.rst :: Phase I, Phase III, Rotating service secrets` The protocol design`src/auth/cephx/CephxServiceHandler.cc, CephxClientHandler.cc, CephxProtocol.cc` Client and service implementation`src/auth/cephx/CephxKeyServer.cc :: rotating secrets` Rotating secrets`src/common/options/global.yaml.in :: auth_service_ticket_ttl (1 h), auth_mon_ticket_ttl (72 h)` Ticket lifetimesA fixed snapshot of the simulator; the interactive version is in the web edition's lab. [Interactive lab: cephx tickets, message by message](lab-cephx.html)The interactive version needs JavaScript; this is a fixed snapshot.
