Repository navigation
mgr/smb: cluster linked join auth and users/groups resource types - #57180
Merged
Merged
Conversation
There's no need for order_resources to be a method. Make order_resources a proper function. Signed-off-by: John Mulligan <[email protected]>
There's no need for these to be methods as they're largely self-contained. Functions should be easier to unit-test independently in the future too. Signed-off-by: John Mulligan <[email protected]>
Split the ConfigStore protocol into a new base protocol that covers the methods needed to list keys in a store, called ConfigStoreListing. Signed-off-by: John Mulligan <[email protected]>
Signed-off-by: John Mulligan <[email protected]>
This in-memory staging area for new resources being applied to the config helps simplify validation. Signed-off-by: John Mulligan <[email protected]>
The linked_to_cluster field will be used for resources that must be life-cycled along side the cluster using them. This is mainly intended for use with `cluster create` command line commands. Signed-off-by: John Mulligan <[email protected]>
Signed-off-by: John Mulligan <[email protected]>
This will be used later to create resources that are not directly named by a user. Signed-off-by: John Mulligan <[email protected]>
Signed-off-by: John Mulligan <[email protected]>
The new squash method works similarly to `one` but permits multiple resources to be reported on by moving them into the report for the "parent" resource. This is meant for upcoming changes to `cluster create` when it starts using linked join auths and linked users-and-groups. Signed-off-by: John Mulligan <[email protected]>
Convert the smb mgr module cli to use linked join auth and users-and-groups resources when created on the `cluster create` command line. These linked resources with have semi-ranodmized names and be linked to the cluster that we're creating on the CLI. Signed-off-by: John Mulligan <[email protected]>
Drop the embedded versions of the join source and usrers and groups configs from the cluster resource type. This means that potentially sensitive information is *always* stored in a separate resource from the less-sensitive general cluster config. Future changes can then make security related choices about those specific resources without worrying about having embedded variants inside the cluster. For convenience I added a new "emtpy" users and groups source type that can be used for testing. It defines *no* users and groups (an empty set basically). This wouldn't be useful in a production scenario today as it would deploy an smbd that you couldn't log into. But for unit testing it's extremely handy, and maybe it can be used for integration testing too. This is a large change because lots of unit tests relied on embedded join auths or users-and-groups. I tried to handle all the breaking changes in one go for bisect-ability. Signed-off-by: John Mulligan <[email protected]>
Signed-off-by: John Mulligan <[email protected]>
Update the documentation to match the code, removing references to source_types 'inline' and 'password' and uris. Adding documentation of the new linked_to_cluster field. Signed-off-by: John Mulligan <[email protected]>
phlogistonjohn
force-pushed
the
jjm-smb-linked-res
branch
from
May 2, 2024 21:06
e7e556e to
9255f19
Compare
4 of 14 tasks
phlogistonjohn
marked this pull request as ready for review
May 7, 2024 18:30
adk3798
approved these changes
May 17, 2024
adk3798
left a comment
Contributor
There was a problem hiding this comment.
LGTM
Note: did not review test changes
|
|
||
|
|
||
| def rand_name(prefix: str, max_len: int = 18, suffix_len: int = 8) -> str: | ||
| trunc = prefix[: (max_len - suffix_len)] |
Contributor
There was a problem hiding this comment.
it's probably unnecessary, but do we want to validate here that max_len is greater than suffix_len
Contributor
Author
There was a problem hiding this comment.
Next time I touch that function I'll add that
| class JoinSourceType(_StrEnum): | ||
| PASSWORD = 'password' | ||
| HTTP_URI = 'http_uri' | ||
| RESOURCE = 'resource' |
Contributor
There was a problem hiding this comment.
is there much point to still having this enum if it only has one option?
Contributor
Author
There was a problem hiding this comment.
Not a lot, but it leaves us options for the future.
Contributor
|
failures consisted of
Nothing to block merging for most PRs in the run |
14 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Depends on #56350
Drop the embedded versions of the join source and users and groups configs from the cluster resource type. This means that potentially sensitive information is always stored in a separate resource from the less-sensitive general cluster config. Future changes can then make security related choices about those specific resource types without worrying about having embedded variants inside the cluster resources.
The embedded values are moved to 'linked resources'. The JoinAuth and UsersAndGroups resource types gain a new optional field
linked_to_clusterthat binds the resource to a single cluster resource instance, making it exclusive to that cluster and automatically removed if the cluster resource is removed. Making it a suitable replacement for the embedded resources when used from the CLI commandsmb cluster create ....Contribution Guidelines
To sign and title your commits, please refer to Submitting Patches to Ceph.
If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.
When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an
xbetween the brackets:[x]. Spaces and capitalization matter when checking off items this way.Checklist
Show available Jenkins commands
jenkins retest this pleasejenkins test classic perfjenkins test crimson perfjenkins test signedjenkins test make checkjenkins test make check arm64jenkins test submodulesjenkins test dashboardjenkins test dashboard cephadmjenkins test apijenkins test docsjenkins render docsjenkins test ceph-volume alljenkins test ceph-volume toxjenkins test windowsjenkins test rook e2e