- request service tickets together with auth ticket. Currently we get auth ticket via CEPHX_GET_AUTH_SESSION_KEY op and then request service tickets via CEPHX_GET_PRINCIPAL_SESSION_KEY op in a separate message. Since nautilus, desired service tickets are shared togther with auth ticket in CEPHX_GET_AUTH_SESSION_KEY reply. - propagate session key and connection secret, if any. In preparation for msgr2, update handle_reply() and verify_authorizer_reply() auth ops to propagate session key and connection secret. Since nautilus, if secure mode is negotiated, connection secret is shared either in CEPHX_GET_AUTH_SESSION_KEY reply (for mons) or in a final authorizer reply (for osds and mdses).
Showing the changes to include/linux/ceph (1 of 8 files). Show all
Unified · Split
| @@ -53,7 +53,9 @@ struct ceph_auth_client_ops { · 52 unmodified lines | |||
| 53 | */ | 53 | */ |
| 54 | int (*build_request)(struct ceph_auth_client *ac, void *buf, void *end); | 54 | int (*build_request)(struct ceph_auth_client *ac, void *buf, void *end); |
| 55 | int (*handle_reply)(struct ceph_auth_client *ac, int result, | 55 | int (*handle_reply)(struct ceph_auth_client *ac, int result, |
| 56 | void *buf, void *end); | 56 | void *buf, void *end, u8 *session_key, |
| 57 | int *session_key_len, u8 *con_secret, | ||
| 58 | int *con_secret_len); | ||
| 57 | 59 | ||
| 58 | /* | 60 | /* |
| 59 | * Create authorizer for connecting to a service, and verify | 61 | * Create authorizer for connecting to a service, and verify |
| @@ -69,7 +71,10 @@ struct ceph_auth_client_ops { · 9 unmodified lines | |||
| 69 | void *challenge_buf, | 71 | void *challenge_buf, |
| 70 | int challenge_buf_len); | 72 | int challenge_buf_len); |
| 71 | int (*verify_authorizer_reply)(struct ceph_auth_client *ac, | 73 | int (*verify_authorizer_reply)(struct ceph_auth_client *ac, |
| 72 | struct ceph_authorizer *a); | 74 | struct ceph_authorizer *a, |
| 75 | void *reply, int reply_len, | ||
| 76 | u8 *session_key, int *session_key_len, | ||
| 77 | u8 *con_secret, int *con_secret_len); | ||
| 73 | void (*invalidate_authorizer)(struct ceph_auth_client *ac, | 78 | void (*invalidate_authorizer)(struct ceph_auth_client *ac, |
| 74 | int peer_type); | 79 | int peer_type); |
| 75 | 80 | ||
| @@ -126,8 +131,11 @@ int ceph_auth_add_authorizer_challenge(struct ceph_auth_client *ac, · 50 unmodified lines | |||
| 126 | struct ceph_authorizer *a, | 131 | struct ceph_authorizer *a, |
| 127 | void *challenge_buf, | 132 | void *challenge_buf, |
| 128 | int challenge_buf_len); | 133 | int challenge_buf_len); |
| 129 | extern int ceph_auth_verify_authorizer_reply(struct ceph_auth_client *ac, | 134 | int ceph_auth_verify_authorizer_reply(struct ceph_auth_client *ac, |
| 130 | struct ceph_authorizer *a); | 135 | struct ceph_authorizer *a, |
| 136 | void *reply, int reply_len, | ||
| 137 | u8 *session_key, int *session_key_len, | ||
| 138 | u8 *con_secret, int *con_secret_len); | ||
| 131 | extern void ceph_auth_invalidate_authorizer(struct ceph_auth_client *ac, | 139 | extern void ceph_auth_invalidate_authorizer(struct ceph_auth_client *ac, |
| 132 | int peer_type); | 140 | int peer_type); |
| 133 | 141 | ||