Enabling and Securing the Ceph API module
The IBM Storage Ceph Dashboard module offers the RESTful API access to the storage cluster over an SSL-secured connection.
Prerequisites
-
Root-level access to a Ceph Monitor node.
-
Ensure that you have at least one
ceph-mgrdaemon active. -
If you use a firewall, ensure that TCP port
8443, for SSL, and TCP port8080, without SSL, are open on the node with the activeceph-mgrdaemon.
Procedure
-
Log into the
cephadmshell:Example
root@host01 ~]# cephadm shell -
Enable the RESTful plug-in:
[ceph: root@host01 /]# ceph mgr module enable dashboard -
Configure an SSL certificate.
-
If your organization’s certificate authority (CA) provides a certificate, then set using the certificate files:
Syntax
ceph dashboard set-ssl-certificate HOST_NAME -i CERT_FILE ceph dashboard set-ssl-certificate-key HOST_NAME -i KEY_FILEExample
[ceph: root@host01 /]# ceph dashboard set-ssl-certificate -i dashboard.crt [ceph: root@host01 /]# ceph dashboard set-ssl-certificate-key -i dashboard.keyIf you want to set unique node-based certificates, then add a HOST_NAME to the commands:
Example
[ceph: root@host01 /]# ceph dashboard set-ssl-certificate host01 -i dashboard.crt [ceph: root@host01 /]# ceph dashboard set-ssl-certificate-key host01 -i dashboard.key -
Alternatively, you can generate a self-signed certificate. However, using a self-signed certificate does not provide full security benefits of the HTTPS protocol:
[ceph: root@host01 /]# ceph dashboard create-self-signed-certWarning: Most modern web browsers will complain about self-signed certificates, which require you to confirm before establishing a secure connection.
-
-
Create a user, set the password, and set the role:
Syntax
echo -n "PASSWORD" > PATH_TO_FILE/PASSWORDFILE ceph dashboard ac-user-create USERNAME -i PASSWORDFILE ROLEExample
[ceph: root@host01 /]# echo -n "p@ssw0rd" > /root/dash-password.txt [ceph: root@host01 /]# ceph dashboard ac-user-create user1 -i /root/dash-password.txt administratorThis example creates a user named
user1with theadministratorrole. -
Connect to the RESTful plug-in web page. Open a web browser and enter the following URL:
Syntax
https://HOST_NAME:8443Example
https://host01:8443If you used a self-signed certificate, confirm a security exception.
Reference
-
The ceph dashboard --help command.
-
The
https://HOST_NAME:8443/docpage, where HOST_NAME is the IP address or name of the node with the runningceph-mgrinstance. -
The Security hardening guide for your Red Hat Enterprise Linux version on Red Hat Documentation.