aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ceph/messenger.h
diff options
context:
space:
mode:
authorSage Weil <sage@newdream.net>2009-11-18 19:19:57 -0500
committerSage Weil <sage@newdream.net>2009-11-18 19:19:57 -0500
commit4e7a5dcd1bbab6560fbc8ada29a840e7a20ed7bc (patch)
treea77e9b4563022340361ca673ef2e1beebb538e2f /fs/ceph/messenger.h
parent5f44f142601bf94c448e2d463f0f18fd159da164 (diff)
ceph: negotiate authentication protocol; implement AUTH_NONE protocol
When we open a monitor session, we send an initial AUTH message listing the auth protocols we support, our entity name, and (possibly) a previously assigned global_id. The monitor chooses a protocol and responds with an initial message. Initially implement AUTH_NONE, a dummy protocol that provides no security, but works within the new framework. It generates 'authorizers' that are used when connecting to (mds, osd) services that simply state our entity name and global_id. This is a wire protocol change. Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs/ceph/messenger.h')
-rw-r--r--fs/ceph/messenger.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/fs/ceph/messenger.h b/fs/ceph/messenger.h
index 4bd85c36308e..f9c9f6487302 100644
--- a/fs/ceph/messenger.h
+++ b/fs/ceph/messenger.h
@@ -26,6 +26,12 @@ struct ceph_connection_operations {
26 /* handle an incoming message. */ 26 /* handle an incoming message. */
27 void (*dispatch) (struct ceph_connection *con, struct ceph_msg *m); 27 void (*dispatch) (struct ceph_connection *con, struct ceph_msg *m);
28 28
29 /* authorize an outgoing connection */
30 int (*get_authorizer) (struct ceph_connection *con,
31 void **buf, int *len, int *proto,
32 void **reply_buf, int *reply_len, int force_new);
33 int (*verify_authorizer_reply) (struct ceph_connection *con, int len);
34
29 /* protocol version mismatch */ 35 /* protocol version mismatch */
30 void (*bad_proto) (struct ceph_connection *con); 36 void (*bad_proto) (struct ceph_connection *con);
31 37
@@ -144,6 +150,10 @@ struct ceph_connection {
144 attempt for this connection, client */ 150 attempt for this connection, client */
145 u32 peer_global_seq; /* peer's global seq for this connection */ 151 u32 peer_global_seq; /* peer's global seq for this connection */
146 152
153 int auth_retry; /* true if we need a newer authorizer */
154 void *auth_reply_buf; /* where to put the authorizer reply */
155 int auth_reply_buf_len;
156
147 /* out queue */ 157 /* out queue */
148 struct mutex out_mutex; 158 struct mutex out_mutex;
149 struct list_head out_queue; 159 struct list_head out_queue;