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 /* nautilus+: other_keys */
43 } __attribute__ ((packed));
45 struct ceph_x_service_ticket_request {
48 } __attribute__ ((packed));
50 struct ceph_x_challenge_blob {
51 __le64 server_challenge;
52 __le64 client_challenge;
53 } __attribute__ ((packed));
57 /* authorize handshake */
60 * The authorizer consists of two pieces:
61 * a - service id, ticket blob
62 * b - encrypted with session key
64 struct ceph_x_authorize_a {
68 struct ceph_x_ticket_blob ticket_blob;
69 } __attribute__ ((packed));
71 struct ceph_x_authorize_b {
75 __le64 server_challenge_plus_one;
76 } __attribute__ ((packed));
78 struct ceph_x_authorize_challenge {
80 __le64 server_challenge;
81 } __attribute__ ((packed));
83 struct ceph_x_authorize_reply {
85 __le64 nonce_plus_one;
86 } __attribute__ ((packed));
92 #define CEPHX_ENC_MAGIC 0xff009cad8826aa55ull
94 struct ceph_x_encrypt_header {
97 } __attribute__ ((packed));