Skip to content

Commit e74227f

Browse files
doc: document remote control in the mgr smb file
It covers the remote control configuration object and the tls credential resource and source object created to support it and future tls needs. Signed-off-by: John Mulligan <[email protected]>
1 parent 83b8751 commit e74227f

File tree

1 file changed

+84
-2
lines changed

1 file changed

+84
-2
lines changed

doc/mgr/smb.rst

Lines changed: 84 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -450,8 +450,8 @@ custom_dns
450450
custom_ports
451451
Optional. A mapping of service names to port numbers that will override the
452452
default ports used for those services. The service names are:
453-
``smb``, ``smbmetrics``, and ``ctdb``. If a service name is not
454-
present in the mapping the default port will be used.
453+
``smb``, ``smbmetrics``, ``ctdb``, and ``remote-control``. If a service
454+
name is not present in the mapping the default port will be used.
455455
For example, ``{"smb": 4455, "smbmetrics": 9009}`` will change the
456456
ports used by smb for client access and the metrics exporter, but
457457
not change the port used by the CTDB clustering daemon.
@@ -506,6 +506,32 @@ public_addrs
506506
host. Run ``cephadm list-networks`` for an example of these mappings.
507507
If destination is not supplied the network is automatically determined
508508
using the address value supplied and taken as the destination.
509+
remote_control
510+
Optional object. This object configures an SMB cluster to deploy an extra
511+
``remote control`` service. This service provides a gRPC server that
512+
can be used to enumerate connected clients and disconnect clients from
513+
shares. This service uses mTLS for authentication. By default, this service
514+
uses port 54445. The port can be configured using the ``custom_ports``
515+
parameter in the cluster resource. If the service is enabled and any of the
516+
``cert``, ``key``, or ``ca_cert`` fields are not populated mTLS will be
517+
disabled and the service will operate in a read-only mode. Running the
518+
service with mTLS disabled is not recommended.
519+
Fields:
520+
521+
enabled
522+
Optional boolean. If explicitly set to ``true`` or ``false`` this
523+
field will enable or disable the remote control service. If left
524+
unset the TLS fields will be checked - if the TLS fields are filled
525+
automatically enable the service.
526+
cert
527+
Optional object. The fields are described in :ref:`tls source
528+
fields<tls-source-fields>`
529+
key
530+
Optional object. The fields are described in :ref:`tls source
531+
fields<tls-source-fields>`
532+
ca_cert
533+
Optional object. The fields are described in :ref:`tls source
534+
fields<tls-source-fields>`
509535
custom_smb_global_options
510536
Optional mapping. Specify key-value pairs that will be directly added to
511537
the global ``smb.conf`` options (or equivalent) of a Samba server. Do
@@ -561,6 +587,16 @@ ref
561587
String. Required for ``source_type: resource``. Must refer to the ID of a
562588
``ceph.smb.join.auth`` resource
563589

590+
.. _tls-source-fields:
591+
592+
A TLS source object supports the following fields:
593+
594+
source_type
595+
Optional. Must be ``resource`` if specified.
596+
ref
597+
String. Required for ``source_type: resource``. Must refer to the ID of a
598+
``ceph.smb.tls.credential`` resource
599+
564600
.. note::
565601
The ``source_type`` ``empty`` is generally only for debugging and testing
566602
the module and should not be needed in production deployments.
@@ -804,6 +840,52 @@ Example:
804840
groups: []
805841
806842
843+
TLS Credential Resource
844+
------------------------
845+
846+
TLS credential resources store copies of TLS files such as Certificates, Keys,
847+
or CA Certificates.
848+
A TLS credential resource supports the following fields:
849+
850+
resource_type
851+
A literal string ``ceph.smb.tls.credential``
852+
tls_credential_id
853+
A short string identifying the TLS credential resource
854+
intent
855+
One of ``present`` or ``removed``. If not provided, ``present`` is assumed.
856+
If ``removed`` all following fields are optional
857+
credential_type
858+
Required string. The value may be one of ``cert``, ``key``, or ``ca-cert``.
859+
This value indicates what type of TLS credential the value field holds.
860+
value:
861+
A string containing the TLS certificate or key value in PEM encoding.
862+
linked_to_cluster:
863+
Optional. A string containing a cluster id. If set, the resource may only
864+
be used with the linked cluster and will automatically be removed when the
865+
linked cluster is removed.
866+
867+
Example:
868+
869+
.. code-block:: yaml
870+
871+
resource_type: ceph.smb.tls.credential
872+
tls_credential_id: mycert1
873+
credential_type: cert
874+
# NOTE: The value below is truncated to make the documentation more
875+
# consise. A real embedded certificate is expected to be valid and
876+
# will be longer than this example.
877+
value: |
878+
-----BEGIN CERTIFICATE-----
879+
MIIFDjCCA/agAwIBAgISBtFQfoXc4RmyVabbv28RClKdMA0GCSqGSIb3DQEBCwUA
880+
MDMxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1MZXQncyBFbmNyeXB0MQwwCgYDVQQD
881+
EwNSMTAwHhcNMjUwNTE5MTAyNzUyWhcNMjUwODE3MTAyNzUxWjASMRAwDgYDVQQD
882+
EwdjZXBoLmlvMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAx6fif6PQ
883+
LOTdnO8d1JHcF7D+oB/mQlplFz4vwq/GB6Y4oWK3uCQ4PPz/qyvE4wyvc5EPhjfg
884+
d8XNc4ajEBcSUoRj3UwWwiA4oht0SyoJIfwVGp/kF5jxHhVCLdoaaqAxv7nAghWM
885+
6Dg=
886+
-----END CERTIFICATE-----
887+
888+
807889
A Declarative Configuration Example
808890
-----------------------------------
809891

0 commit comments

Comments
 (0)