@@ -140,43 +140,98 @@ See also :ref:`multisite`.
140140Setting up HTTPS
141141----------------
142142
143- In order to enable HTTPS for RGW services, apply a spec file following this scheme:
143+ RGW services, like other cephadm-managed services, support three ways of configuring
144+ HTTPS certificates, all managed through the cephadm Certificate Manager (certmgr):
145+
146+ - **cephadm-signed (default): **
147+ If ``ssl `` is set to true but no certificate is specified, cephadm generates and
148+ signs a certificate for the RGW service automatically.
149+
150+ - **inline: **
151+ Users can set the ``certificate_source `` to ``inline `` in the spec and
152+ embed the certificate and private key directly in the spec using
153+ the ``ssl_cert `` and ``ssl_key `` fields.
154+
155+ - **reference: **
156+ Users can register their own certificate and key with certmgr and
157+ set the ``certificate_source `` to ``reference `` in the spec.
158+
159+ **Option 1: Inline certificate and key **
144160
145161.. code-block :: yaml
146162
147163 service_type : rgw
148164 service_id : myrgw
149165 spec :
150- rgw_frontend_ssl_certificate : |
151- -----BEGIN PRIVATE KEY-----
152- V2VyIGRhcyBsaWVzdCBpc3QgZG9vZi4gTG9yZW0gaXBzdW0gZG9sb3Igc2l0IGFt
153- ZXQsIGNvbnNldGV0dXIgc2FkaXBzY2luZyBlbGl0ciwgc2VkIGRpYW0gbm9udW15
154- IGVpcm1vZCB0ZW1wb3IgaW52aWR1bnQgdXQgbGFib3JlIGV0IGRvbG9yZSBtYWdu
155- YSBhbGlxdXlhbSBlcmF0LCBzZWQgZGlhbSB2b2x1cHR1YS4gQXQgdmVybyBlb3Mg
156- ZXQgYWNjdXNhbSBldCBqdXN0byBkdW8=
157- -----END PRIVATE KEY-----
166+ ssl : true
167+ certificate_source : inline
168+ ssl_cert : |
158169 -----BEGIN CERTIFICATE-----
159- V2VyIGRhcyBsaWVzdCBpc3QgZG9vZi4gTG9yZW0gaXBzdW0gZG9sb3Igc2l0IGFt
160- ZXQsIGNvbnNldGV0dXIgc2FkaXBzY2luZyBlbGl0ciwgc2VkIGRpYW0gbm9udW15
161- IGVpcm1vZCB0ZW1wb3IgaW52aWR1bnQgdXQgbGFib3JlIGV0IGRvbG9yZSBtYWdu
162- YSBhbGlxdXlhbSBlcmF0LCBzZWQgZGlhbSB2b2x1cHR1YS4gQXQgdmVybyBlb3Mg
163- ZXQgYWNjdXNhbSBldCBqdXN0byBkdW8=
170+ (PEM cert contents here)
164171 -----END CERTIFICATE-----
172+ ssl_key : |
173+ -----BEGIN PRIVATE KEY-----
174+ (PEM key contents here)
175+ -----END PRIVATE KEY-----
176+
177+ Apply the spec:
178+
179+ .. prompt :: bash #
180+
181+ ceph orch apply -i myrgw.yaml
182+
183+ .. note ::
184+
185+ The older ``rgw_frontend_ssl_certificate `` field is still supported
186+ for backward compatibility, but it is deprecated.
187+ New deployments should use ``ssl_cert `` / ``ssl_key `` instead.
188+
189+ **Option 2: Reference to a registered certificate/key **
190+
191+ First, register the certificate and key with certmgr:
192+
193+ .. prompt :: bash #
194+
195+ ceph orch certmgr cert set --cert-name rgw_ssl_cert --service-name rgw.<service_id> -i $PWD/server_cert.pem
196+ ceph orch certmgr key set --key-name rgw_ssl_key --service-name rgw.<service_id> -i $PWD/server_key
197+
198+ Then use ``reference `` source in the RGW spec:
199+
200+ .. code-block :: yaml
201+
202+ service_type : rgw
203+ service_id : myrgw
204+ spec :
165205 ssl : true
206+ certificate_source : reference
166207
167- Then apply this yaml document :
208+ Apply the spec :
168209
169210.. prompt :: bash #
170211
171212 ceph orch apply -i myrgw.yaml
172213
173- Note the value of ``rgw_frontend_ssl_certificate `` is a literal string as
174- indicated by a ``| `` character preserving newline characters.
214+ **Option 3: cephadm-signed (default) **
215+
216+ If ``ssl: true `` is set but no certificate is provided, cephadm
217+ will automatically generate and sign a certificate for the RGW service.
218+
219+ .. code-block :: yaml
220+
221+ service_type : rgw
222+ service_id : myrgw
223+ spec :
224+ ssl : true
225+ certificate_source : cephadm-signed
226+
227+ This will deploy RGW with a cephadm-signed certificate.
175228
176229Setting up HTTPS with Wildcard SANs
177230-----------------------------------
178231
179- To enable HTTPS for RGW services, apply a spec file following this scheme:
232+ When using cephadm-signed certificates, wildcard Subject Alternative
233+ Names (SANs) can be optionally included in the generated certificates.
234+ For RGW services, this can be enabled by applying a spec file such as:
180235
181236.. code-block :: yaml
182237
@@ -187,7 +242,7 @@ To enable HTTPS for RGW services, apply a spec file following this scheme:
187242 count_per_host : 1
188243 spec :
189244 ssl : true
190- generate_cert : true
245+ certificate_source : cephadm-signed
191246 rgw_frontend_port : 8080
192247 wildcard_enabled : true # Enables wildcard SANs in the certificate
193248 zonegroup_hostnames :
0 commit comments