1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef __FS_CEPH_AUTH_X_PROTOCOL
3 #define __FS_CEPH_AUTH_X_PROTOCOL
5 #define CEPHX_GET_AUTH_SESSION_KEY 0x0100
6 #define CEPHX_GET_PRINCIPAL_SESSION_KEY 0x0200
7 #define CEPHX_GET_ROTATING_KEY 0x0400
10 struct ceph_x_ticket_blob
{
15 } __attribute__ ((packed
));
18 /* common request/reply headers */
19 struct ceph_x_request_header
{
21 } __attribute__ ((packed
));
23 struct ceph_x_reply_header
{
26 } __attribute__ ((packed
));
29 /* authenticate handshake */
31 /* initial hello (no reply header) */
32 struct ceph_x_server_challenge
{
34 __le64 server_challenge
;
35 } __attribute__ ((packed
));
37 struct ceph_x_authenticate
{
39 __le64 client_challenge
;
42 } __attribute__ ((packed
));
44 struct ceph_x_service_ticket_request
{
47 } __attribute__ ((packed
));
49 struct ceph_x_challenge_blob
{
50 __le64 server_challenge
;
51 __le64 client_challenge
;
52 } __attribute__ ((packed
));
56 /* authorize handshake */
59 * The authorizer consists of two pieces:
60 * a - service id, ticket blob
61 * b - encrypted with session key
63 struct ceph_x_authorize_a
{
67 struct ceph_x_ticket_blob ticket_blob
;
68 } __attribute__ ((packed
));
70 struct ceph_x_authorize_b
{
74 __le64 server_challenge_plus_one
;
75 } __attribute__ ((packed
));
77 struct ceph_x_authorize_challenge
{
79 __le64 server_challenge
;
80 } __attribute__ ((packed
));
82 struct ceph_x_authorize_reply
{
84 __le64 nonce_plus_one
;
85 } __attribute__ ((packed
));
91 #define CEPHX_ENC_MAGIC 0xff009cad8826aa55ull
93 struct ceph_x_encrypt_header
{
96 } __attribute__ ((packed
));