-
Notifications
You must be signed in to change notification settings - Fork 309
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DAOS-9825 control: Update Telemetry Endpoint to use HTTPS #15216
base: master
Are you sure you want to change the base?
Changes from 6 commits
7cf9875
a3bcfc9
d3f9941
d9860a4
3c3bbc3
3b9be62
82b37d1
f1d463a
1329d1e
49d5062
29db84d
ca672e7
f67aed2
b3cc471
599ec1e
e7833f8
834e532
5b5f7a7
662baa9
8186949
474c6f3
17800cb
5abf1aa
45dd685
587354d
f841535
fbfa2ed
e44a626
5e9d8f5
22d7f3d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -759,6 +759,162 @@ transport_config: | |||||||||||||||
key: /etc/daos/certs/admin.key | ||||||||||||||||
``` | ||||||||||||||||
|
||||||||||||||||
#### Telemetry Certificate Configuration | ||||||||||||||||
|
||||||||||||||||
The DAOS Telemetry framework has option to use certificates to authenticate | ||||||||||||||||
between server/client and admin node.A set of certificates for a given DAOS systems may be | ||||||||||||||||
generated by running the `gen_telemetry_admin_certificate.sh` and `gen_telemetry_server_certificate.sh` script provided with the DAOS | ||||||||||||||||
software if there is not an existing TLS certificate infrastructure. The | ||||||||||||||||
Both script uses the `openssl` tool to generate all of the | ||||||||||||||||
necessary files. | ||||||||||||||||
|
||||||||||||||||
##### Telemetry Admin script | ||||||||||||||||
|
||||||||||||||||
This `gen_telemetry_admin_certificate.sh` script needs to run on the system where the `dmg telemetry metrics` command is going to run or on the system where Prometheus is going to be setup for collecting metrics. | ||||||||||||||||
|
||||||||||||||||
```bash | ||||||||||||||||
$ cd /tmp/ | ||||||||||||||||
$ gen_telemetry_admin_certificate.sh | ||||||||||||||||
Generating Private CA Root Certificate | ||||||||||||||||
Generating RSA private key, 3072 bit long modulus (2 primes) | ||||||||||||||||
............................................................................................................++++ | ||||||||||||||||
.............++++ | ||||||||||||||||
e is 65537 (0x010001) | ||||||||||||||||
Private CA Root Certificate for Telemetry created in ./daosTelemetryCA | ||||||||||||||||
``` | ||||||||||||||||
|
||||||||||||||||
This will create the key and cert file | ||||||||||||||||
|
||||||||||||||||
```bash | ||||||||||||||||
$ ls -l /tmp/daosTelemetryCA/ | ||||||||||||||||
total 12 | ||||||||||||||||
-rw-r--r-- 1 root daos_daemons 1460 Sep 27 17:06 daosTelemetryCA.crt | ||||||||||||||||
-r-------- 1 root root 2455 Sep 27 17:06 daosTelemetryCA.key | ||||||||||||||||
-rw-r--r-- 1 root root 0 Sep 27 17:06 index.txt | ||||||||||||||||
-rw-r--r-- 1 root root 3 Sep 27 17:06 serial.txt | ||||||||||||||||
``` | ||||||||||||||||
|
||||||||||||||||
The generated keys and certificates must then be securely distributed to all nodes for which you need to collect the DAOS metrics. | ||||||||||||||||
|
||||||||||||||||
You can copy this certificates on /etc/daos/certs/ or someother secure location | ||||||||||||||||
|
||||||||||||||||
##### Telemetry Server script | ||||||||||||||||
|
||||||||||||||||
This `gen_telemetry_server_certificate.sh` script need to run on the DAOS server/client node for which DAOS metrics needs to be gathered. | ||||||||||||||||
|
||||||||||||||||
Below files are copied from the Admin node in previous steps. | ||||||||||||||||
|
||||||||||||||||
```bash | ||||||||||||||||
$ ls -l /tmp/daosTelemetryCA/ | ||||||||||||||||
total 12 | ||||||||||||||||
-rw-r--r-- 1 root daos_daemons 1460 Sep 27 17:06 daosTelemetryCA.crt | ||||||||||||||||
-r-------- 1 root root 2455 Sep 27 17:06 daosTelemetryCA.key | ||||||||||||||||
-rw-r--r-- 1 root root 0 Sep 27 17:06 index.txt | ||||||||||||||||
-rw-r--r-- 1 root root 3 Sep 27 17:06 serial.txt | ||||||||||||||||
``` | ||||||||||||||||
|
||||||||||||||||
Run this script with arguments. | ||||||||||||||||
First argument is the File permission you want on certificate,for example below command is run on daos client where it needs to be set as daos_agent user permission. | ||||||||||||||||
Second argument is optional for certificate path (By default it's in current directory). | ||||||||||||||||
For security reason this script will delete the CA key copied at the end which was copied from the Admin node and will create the local node certificate and key. | ||||||||||||||||
|
||||||||||||||||
```bash | ||||||||||||||||
$ cd daosTelemetryCA/ | ||||||||||||||||
$ gen_telemetry_server_certificate.sh daos_agent | ||||||||||||||||
Generating Server Certificate | ||||||||||||||||
Generating RSA private key, 2048 bit long modulus (2 primes) | ||||||||||||||||
.......................+++++ | ||||||||||||||||
......................................................................................................+++++ | ||||||||||||||||
e is 65537 (0x010001) | ||||||||||||||||
Signature ok | ||||||||||||||||
subject=CN = wolf-170 | ||||||||||||||||
Getting CA Private Key | ||||||||||||||||
Required Server Certificate Files: | ||||||||||||||||
.//daosTelemetryCA.crt | ||||||||||||||||
.//telemetry.key | ||||||||||||||||
.//telemetry.crt | ||||||||||||||||
$ ls -l | ||||||||||||||||
total 20 | ||||||||||||||||
-rw-r--r-- 1 root daos_daemons 1460 Sep 27 17:18 daosTelemetryCA.crt | ||||||||||||||||
-rw-r--r-- 1 root root 41 Sep 27 17:19 daosTelemetryCA.srl | ||||||||||||||||
-rw-r--r-- 1 root root 0 Sep 27 17:18 index.txt | ||||||||||||||||
-rw-r--r-- 1 root root 3 Sep 27 17:18 serial.txt | ||||||||||||||||
-rw-r--r-- 1 daos_agent daos_agent 1302 Sep 27 17:19 telemetry.crt | ||||||||||||||||
-r-------- 1 daos_agent daos_agent 1675 Sep 27 17:19 telemetry.key | ||||||||||||||||
``` | ||||||||||||||||
|
||||||||||||||||
Below example is ran with daos_server user on server node | ||||||||||||||||
|
||||||||||||||||
```bash | ||||||||||||||||
$ cd daosTelemetryCA/ | ||||||||||||||||
$ gen_telemetry_server_certificate.sh daos_server | ||||||||||||||||
Generating Server Certificate | ||||||||||||||||
Generating RSA private key, 2048 bit long modulus (2 primes) | ||||||||||||||||
.................................................+++++ | ||||||||||||||||
.+++++ | ||||||||||||||||
e is 65537 (0x010001) | ||||||||||||||||
Signature ok | ||||||||||||||||
subject=CN = wolf-173 | ||||||||||||||||
Getting CA Private Key | ||||||||||||||||
Required Server Certificate Files: | ||||||||||||||||
.//daosTelemetryCA.crt | ||||||||||||||||
.//telemetry.key | ||||||||||||||||
.//telemetry.crt | ||||||||||||||||
$ ls -l | ||||||||||||||||
total 20 | ||||||||||||||||
-rw-r--r-- 1 root daos_daemons 1460 Sep 27 17:24 daosTelemetryCA.crt | ||||||||||||||||
-rw-r--r-- 1 root root 41 Sep 27 17:24 daosTelemetryCA.srl | ||||||||||||||||
-rw-r--r-- 1 root root 0 Sep 27 17:24 index.txt | ||||||||||||||||
-rw-r--r-- 1 root root 3 Sep 27 17:24 serial.txt | ||||||||||||||||
-rw-r--r-- 1 daos_server daos_server 1302 Sep 27 17:24 telemetry.crt | ||||||||||||||||
-r-------- 1 daos_server daos_server 1679 Sep 27 17:24 telemetry.key | ||||||||||||||||
``` | ||||||||||||||||
|
||||||||||||||||
You can copy this certificates on /etc/daos/certs/ or someother secure location | ||||||||||||||||
|
||||||||||||||||
#### Telemetry Yaml Example | ||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
I think it's OK to simplify this and include it under the "Telemetry Endpoint Configuration" section. |
||||||||||||||||
|
||||||||||||||||
Now you have certificate created and you can add those path in the respective yaml file. | ||||||||||||||||
|
||||||||||||||||
```yaml | ||||||||||||||||
# /etc/daos/daos_server.yml (servers) | ||||||||||||||||
telemetry_config: | ||||||||||||||||
# To use telemetry in secure mode | ||||||||||||||||
allow_insecure: false | ||||||||||||||||
# Set the server telemetry endpoint port number | ||||||||||||||||
port: 9191 | ||||||||||||||||
# Server certificate for use in TLS handshakes | ||||||||||||||||
https_cert: /etc/daos/certs/telemetry.crt | ||||||||||||||||
# Key portion of Server Certificate | ||||||||||||||||
https_key: /etc/daos/certs/telemetry.key | ||||||||||||||||
Comment on lines
+776
to
+779
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm leery of calling it a "server certificate" to avoid confusion with the server component certificate -- how about this?
Suggested change
|
||||||||||||||||
``` | ||||||||||||||||
|
||||||||||||||||
```yaml | ||||||||||||||||
# /etc/daos/daos_agent.yml (clients) | ||||||||||||||||
telemetry_config: | ||||||||||||||||
# To use telemetry in secure mode | ||||||||||||||||
allow_insecure: false | ||||||||||||||||
# Enable client telemetry for all DAOS clients. | ||||||||||||||||
enabled: true | ||||||||||||||||
# Set the client telemetry endpoint port number | ||||||||||||||||
port: 9192 | ||||||||||||||||
# Retain client telemetry for a period of time after the client process exits. | ||||||||||||||||
retain: 30s | ||||||||||||||||
# Server certificate for use in TLS handshakes | ||||||||||||||||
https_cert: /etc/daos/certs/telemetry.crt | ||||||||||||||||
# Key portion of Server Certificate | ||||||||||||||||
https_key: /etc/daos/certs/telemetry.key | ||||||||||||||||
Comment on lines
+791
to
+794
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Similar to the server case.
Suggested change
|
||||||||||||||||
``` | ||||||||||||||||
|
||||||||||||||||
```yaml | ||||||||||||||||
# /etc/daos/daos_control.yml (dmg/admin) | ||||||||||||||||
telemetry_config: | ||||||||||||||||
# To use telemetry in secure mode | ||||||||||||||||
allow_insecure: true | ||||||||||||||||
# Custom CA Root certificate for generated certs | ||||||||||||||||
ca_cert: /etc/daos/certs/daosTelemetryCA.crt | ||||||||||||||||
``` | ||||||||||||||||
|
||||||||||||||||
### Server Startup | ||||||||||||||||
|
||||||||||||||||
The DAOS Server is started as a systemd service. The DAOS Server | ||||||||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO we need to disconnect this as much as possible from the DAOS control plane
transport_config
to avoid confusion. We can't reuse those certs for telemetry, and the purpose is entirely different. It may be better to move this into its own section of the doc for that reason.