aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorSage Weil <sage@inktank.com>2013-03-25 13:26:01 -0400
committerSage Weil <sage@inktank.com>2013-05-02 00:17:13 -0400
commit0bed9b5c523d577378b6f83eab5835fe30c27208 (patch)
treeab35e0fdeedf883e029cedab7a0ecbce71376426 /include/linux
parent4b8e8b5d78b8322351d44487c1b76f7e9d3412bc (diff)
libceph: add update_authorizer auth method
Currently the messenger calls out to a get_authorizer con op, which will create a new authorizer if it doesn't yet have one. In the meantime, when we rotate our service keys, the authorizer doesn't get updated. Eventually it will be rejected by the server on a new connection attempt and get invalidated, and we will then rebuild a new authorizer, but this is not ideal. Instead, if we do have an authorizer, call a new update_authorizer op that will verify that the current authorizer is using the latest secret. If it is not, we will build a new one that does. This avoids the transient failure. This fixes one of the sorry sequence of events for bug http://tracker.ceph.com/issues/4282 Signed-off-by: Sage Weil <sage@inktank.com> Reviewed-by: Alex Elder <elder@inktank.com>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/ceph/auth.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/ceph/auth.h b/include/linux/ceph/auth.h
index d4080f309b56..73e973e70026 100644
--- a/include/linux/ceph/auth.h
+++ b/include/linux/ceph/auth.h
@@ -52,6 +52,9 @@ struct ceph_auth_client_ops {
52 */ 52 */
53 int (*create_authorizer)(struct ceph_auth_client *ac, int peer_type, 53 int (*create_authorizer)(struct ceph_auth_client *ac, int peer_type,
54 struct ceph_auth_handshake *auth); 54 struct ceph_auth_handshake *auth);
55 /* ensure that an existing authorizer is up to date */
56 int (*update_authorizer)(struct ceph_auth_client *ac, int peer_type,
57 struct ceph_auth_handshake *auth);
55 int (*verify_authorizer_reply)(struct ceph_auth_client *ac, 58 int (*verify_authorizer_reply)(struct ceph_auth_client *ac,
56 struct ceph_authorizer *a, size_t len); 59 struct ceph_authorizer *a, size_t len);
57 void (*destroy_authorizer)(struct ceph_auth_client *ac, 60 void (*destroy_authorizer)(struct ceph_auth_client *ac,