Skip to content

Commit 4098fa1

Browse files
authored
Merge pull request ceph#57180 from phlogistonjohn/jjm-smb-linked-res
mgr/smb: cluster linked join auth and users/groups resource types Reviewed-by: Adam King <[email protected]>
2 parents be04bf2 + 9255f19 commit 4098fa1

File tree

12 files changed

+691
-476
lines changed

12 files changed

+691
-476
lines changed

doc/mgr/smb.rst

Lines changed: 17 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -364,14 +364,7 @@ placement
364364
A join source object supports the following fields:
365365

366366
source_type
367-
One of ``password`` or ``resource``
368-
auth
369-
Object. Required for ``source_type: password``. Fields:
370-
371-
username:
372-
Required string. User with ability to join a system to AD.
373-
password:
374-
Required string. The AD user's password
367+
Optional. Must be ``resource`` if specified.
375368
ref
376369
String. Required for ``source_type: resource``. Must refer to the ID of a
377370
``ceph.smb.join.auth`` resource
@@ -381,26 +374,15 @@ ref
381374
A user group source object supports the following fields:
382375

383376
source_type
384-
One of ``inline`` or ``resource``
385-
values
386-
Object. Required for ``source_type: inline``. Fields:
387-
388-
users
389-
List of objects. Fields:
390-
391-
username
392-
A user name
393-
password
394-
A password
395-
groups
396-
List of objects. Fields:
397-
398-
name
399-
The name of the group
377+
Optional. One of ``resource`` (the default) or ``empty``
400378
ref
401379
String. Required for ``source_type: resource``. Must refer to the ID of a
402380
``ceph.smb.join.auth`` resource
403381

382+
.. note::
383+
The ``source_type`` ``empty`` is generally only for debugging and testing
384+
the module and should not be needed in production deployments.
385+
404386
The following is an example of a cluster configured for AD membership:
405387

406388
.. code-block:: yaml
@@ -427,14 +409,8 @@ The following is an example of a cluster configured for standalone operation:
427409
cluster_id: rhumba
428410
auth_mode: user
429411
user_group_settings:
430-
- source_type: inline
431-
values:
432-
users:
433-
- name: chuckx
434-
password: 3xample101
435-
- name: steves
436-
password: F00Bar123
437-
groups: []
412+
- source_type: resource
413+
ref: ug1
438414
placement:
439415
hosts:
440416
- node6.mycluster.sink.test
@@ -534,6 +510,10 @@ auth
534510
Required string. User with ability to join a system to AD
535511
password
536512
Required string. The AD user's password
513+
linked_to_cluster:
514+
Optional. A string containing a cluster id. If set, the resource may only
515+
be used with the linked cluster and will automatically be removed when the
516+
linked cluster is removed.
537517

538518
Example:
539519

@@ -564,7 +544,7 @@ values
564544
users
565545
List of objects. Fields:
566546

567-
username
547+
name
568548
A user name
569549
password
570550
A password
@@ -573,6 +553,10 @@ values
573553

574554
name
575555
The name of the group
556+
linked_to_cluster:
557+
Optional. A string containing a cluster id. If set, the resource may only
558+
be used with the linked cluster and will automatically be removed when the
559+
linked cluster is removed.
576560

577561

578562
Example:

src/pybind/mgr/smb/enums.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,12 @@ class AuthMode(_StrEnum):
4141

4242

4343
class JoinSourceType(_StrEnum):
44-
PASSWORD = 'password'
45-
HTTP_URI = 'http_uri'
4644
RESOURCE = 'resource'
4745

4846

4947
class UserGroupSourceType(_StrEnum):
50-
INLINE = 'inline'
51-
HTTP_URI = 'http_uri'
5248
RESOURCE = 'resource'
49+
EMPTY = 'empty'
5350

5451

5552
class ConfigNS(_StrEnum):

0 commit comments

Comments
 (0)