generated from canonical/template-operator
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[DPE-4682] Add fix for user management (#374)
# Issue Addressing #331 , namely that currently it's impossible to add users manually to Opensearch, as they are cleaned up on the first `update-status`. # Solution Saving every relation ID with the corresponding user's name in a dictionary on the databag. This allows us to keep track of relation users and the relations they belong to. This data structure is maintained such as - `index-created` : adding new relation - usrer pair as craeting the user in Opensearch - `update-status`, `relation-broken`, `relation-departed`: removing (stale or dedicated) relations - user pairs from the databag as removing Opensearch users ## Developers' notes In order to get involved scopes clear: - Operations on the new databag structure are strongly coupled togeter. Thus they MUST be in the same module. (This principle is also in attempt to decrease the "spagetti".) - Since removing users is now clearly specific to client relations, this functionality should reside in the Provider code. Accompaigned with the suited user creation functionality encapsulating all relation-specific details (role name same as username, databag structures to be maintained, etc.) - Note: since extra user roles may be shared across multiple users, and re-used, we do NOT clean up those. But normal roles only. - Note2: We are taking advantage of usernames being equal to their related roles (and don't store roles specifically). --------- Co-authored-by: Judit Novak <[email protected]>
- Loading branch information
1 parent
81625dc
commit c232216
Showing
9 changed files
with
339 additions
and
84 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.