From: Boris Ranto Date: Thu, 11 May 2017 07:13:42 +0000 (+0200) Subject: restful: Do not store the config file in /etc/ceph X-Git-Tag: ses5-milestone6~9^2~47^2~7 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=4f452ade6faaf9a7827b4984a3d5a0abec220f04;p=ceph.git restful: Do not store the config file in /etc/ceph This also contains a documentation fix for authentication in / endpoint. Signed-off-by: Boris Ranto --- diff --git a/src/pybind/mgr/restful/api/__init__.py b/src/pybind/mgr/restful/api/__init__.py index 7a3b71e955a..e04efca8213 100644 --- a/src/pybind/mgr/restful/api/__init__.py +++ b/src/pybind/mgr/restful/api/__init__.py @@ -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 " to create a key pair, ' + 'pass it as HTTP Basic auth to authenticate', 'doc': 'See /doc endpoint', 'info': "Ceph Manager RESTful API server", } diff --git a/src/pybind/mgr/restful/module.py b/src/pybind/mgr/restful/module.py index 229f99b8e07..6ef0070c07f 100644 --- a/src/pybind/mgr/restful/module.py +++ b/src/pybind/mgr/restful/module.py @@ -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'