]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
keyring: make child of KeyStore
authorSage Weil <sage@newdream.net>
Tue, 8 May 2012 23:24:12 +0000 (16:24 -0700)
committerSage Weil <sage@inktank.com>
Thu, 10 May 2012 17:10:56 +0000 (10:10 -0700)
This lets us pass a keyring to the auth methods as a source for keys for
doing the authentication handshaking.  Normally we pass a RotatatingKeyring
or the KeyServer, but for mon->mon we don't use a service key.  This will
let us use a simple KeyRing for that.

Signed-off-by: Sage Weil <sage@newdream.net>
src/auth/KeyRing.h

index cfac054b28f8680355a2418b82cc5d42eef4178e..4771ff22f63447599b94e1dd07275c6d2e2dd37c 100644 (file)
@@ -22,7 +22,7 @@
 
 class md_config_t;
 
-class KeyRing {
+class KeyRing : public KeyStore {
   map<EntityName, EntityAuth> keys;
 
   int set_modifier(const char *type, const char *val, EntityName& name, map<string, bufferlist>& caps);
@@ -54,6 +54,10 @@ public:
     secret = k->second.key;
     return true;
   }
+  bool get_service_secret(uint32_t service_id, uint64_t secret_id,
+                         CryptoKey& secret) const {
+    return false;
+  }
 
   // modifiers
   void add(const EntityName& name, EntityAuth &a) {