History

libceph, ceph: incorporate nautilus cephx changes

- 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).

Ilya Dryomov committed 6 years ago

Commit 285ea341 parent 6610fff8 files · +210 −53Browse files

Showing the changes to include/linux/ceph (1 of 8 files). Show all

Unified · Split

include/linux/ceph/auth.h+12−4
@@ -53,7 +53,9 @@ struct ceph_auth_client_ops { · 52 unmodified lines
5353 */
5454 int (*build_request)(struct ceph_auth_client *ac, void *buf, void *end);
5555 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);
5759
5860 /*
5961 * Create authorizer for connecting to a service, and verify
@@ -69,7 +71,10 @@ struct ceph_auth_client_ops { · 9 unmodified lines
6971 void *challenge_buf,
7072 int challenge_buf_len);
7173 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);
7378 void (*invalidate_authorizer)(struct ceph_auth_client *ac,
7479 int peer_type);
7580
@@ -126,8 +131,11 @@ int ceph_auth_add_authorizer_challenge(struct ceph_auth_client *ac, · 50 unmodified lines
126131 struct ceph_authorizer *a,
127132 void *challenge_buf,
128133 int challenge_buf_len);
129−extern int ceph_auth_verify_authorizer_reply(struct ceph_auth_client *ac,
130− struct ceph_authorizer *a);
134+int ceph_auth_verify_authorizer_reply(struct ceph_auth_client *ac,
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);
131139 extern void ceph_auth_invalidate_authorizer(struct ceph_auth_client *ac,
132140 int peer_type);
133141

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t