]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
restful: Do not store the config file in /etc/ceph
authorBoris Ranto <branto@redhat.com>
Thu, 11 May 2017 07:13:42 +0000 (09:13 +0200)
committerBoris Ranto <branto@redhat.com>
Mon, 22 May 2017 17:20:42 +0000 (19:20 +0200)
This also contains a documentation fix for authentication in / endpoint.

Signed-off-by: Boris Ranto <branto@redhat.com>
src/pybind/mgr/restful/api/__init__.py
src/pybind/mgr/restful/module.py

index 7a3b71e955a27774669d59870b0af4dbd33bc039..e04efca8213e57e353d703dbe3a96fc8d8b25678 100644 (file)
@@ -33,8 +33,8 @@ class Root(RestController):
         return {
             'api_version': 1,
             'auth':
-                'Use ceph auth key pair as HTTP Basic user/password '
-                '(requires caps mon allow * to function properly)',
+                'Use "ceph tell mgr create_key <key>" to create a key pair, '
+                'pass it as HTTP Basic auth to authenticate',
             'doc': 'See /doc endpoint',
             'info': "Ceph Manager RESTful API server",
         }
index 229f99b8e07c4b8579141c58dd490c2b71e9846b..6ef0070c07f025a370bba897b9a431f7aed8e5ee 100644 (file)
@@ -318,7 +318,7 @@ class Module(MgrModule):
 
 
     def load_cert(self):
-        cert_base = '/etc/ceph/ceph-mgr-restful'
+        cert_base = self.get("config").get("mgr_data", "/tmp") + "/ceph-mgr-restful"
         cert_file = cert_base + '.crt'
         pkey_file = cert_base + '.key'