0001
0002 #ifndef __FS_CEPH_AUTH_X_PROTOCOL
0003 #define __FS_CEPH_AUTH_X_PROTOCOL
0004
0005 #define CEPHX_GET_AUTH_SESSION_KEY 0x0100
0006 #define CEPHX_GET_PRINCIPAL_SESSION_KEY 0x0200
0007 #define CEPHX_GET_ROTATING_KEY 0x0400
0008
0009
0010 struct ceph_x_ticket_blob {
0011 __u8 struct_v;
0012 __le64 secret_id;
0013 __le32 blob_len;
0014 char blob[];
0015 } __attribute__ ((packed));
0016
0017
0018
0019 struct ceph_x_request_header {
0020 __le16 op;
0021 } __attribute__ ((packed));
0022
0023 struct ceph_x_reply_header {
0024 __le16 op;
0025 __le32 result;
0026 } __attribute__ ((packed));
0027
0028
0029
0030
0031
0032 struct ceph_x_server_challenge {
0033 __u8 struct_v;
0034 __le64 server_challenge;
0035 } __attribute__ ((packed));
0036
0037 struct ceph_x_authenticate {
0038 __u8 struct_v;
0039 __le64 client_challenge;
0040 __le64 key;
0041
0042
0043 } __attribute__ ((packed));
0044
0045 struct ceph_x_service_ticket_request {
0046 __u8 struct_v;
0047 __le32 keys;
0048 } __attribute__ ((packed));
0049
0050 struct ceph_x_challenge_blob {
0051 __le64 server_challenge;
0052 __le64 client_challenge;
0053 } __attribute__ ((packed));
0054
0055
0056
0057
0058
0059
0060
0061
0062
0063
0064 struct ceph_x_authorize_a {
0065 __u8 struct_v;
0066 __le64 global_id;
0067 __le32 service_id;
0068 struct ceph_x_ticket_blob ticket_blob;
0069 } __attribute__ ((packed));
0070
0071 struct ceph_x_authorize_b {
0072 __u8 struct_v;
0073 __le64 nonce;
0074 __u8 have_challenge;
0075 __le64 server_challenge_plus_one;
0076 } __attribute__ ((packed));
0077
0078 struct ceph_x_authorize_challenge {
0079 __u8 struct_v;
0080 __le64 server_challenge;
0081 } __attribute__ ((packed));
0082
0083 struct ceph_x_authorize_reply {
0084 __u8 struct_v;
0085 __le64 nonce_plus_one;
0086 } __attribute__ ((packed));
0087
0088
0089
0090
0091
0092 #define CEPHX_ENC_MAGIC 0xff009cad8826aa55ull
0093
0094 struct ceph_x_encrypt_header {
0095 __u8 struct_v;
0096 __le64 magic;
0097 } __attribute__ ((packed));
0098
0099 #endif