Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Workspace] Add ACL related functions for workspace #146

Merged

Conversation

gaobinlong
Copy link
Collaborator

Description

The main change of this PR are:

  1. Add acl related functions for workspace feature
  2. Add permissions field to the default mapping of the OSD index(.kibana)
  3. Update the test snapshot after we change the default mapping of the OSD index

Check List

  • All tests pass
    • yarn test:jest
    • yarn test:jest_integration
    • yarn test:ftr
  • New functionality includes testing.
  • New functionality has been documented.
  • Update CHANGELOG.md
  • Commits are signed per the DCO using --signoff

@codecov-commenter
Copy link

codecov-commenter commented Sep 12, 2023

Codecov Report

Merging #146 (da81581) into workspace-pr-integr-2.9 (c3bc14b) will decrease coverage by 0.01%.
The diff coverage is 65.85%.

@@                     Coverage Diff                     @@
##           workspace-pr-integr-2.9     #146      +/-   ##
===========================================================
- Coverage                    66.19%   66.19%   -0.01%     
===========================================================
  Files                         3317     3318       +1     
  Lines                        63894    63976      +82     
  Branches                      9970     9995      +25     
===========================================================
+ Hits                         42297    42351      +54     
- Misses                       19156    19164       +8     
- Partials                      2441     2461      +20     
Flag Coverage Δ
Linux_1 34.76% <ø> (ø)
Linux_2 55.11% <65.85%> (+0.03%) ⬆️
Linux_3 43.22% <0.00%> (?)
Linux_4 35.09% <0.00%> (-0.01%) ⬇️
Windows_1 34.82% <ø> (ø)
Windows_2 55.07% <65.85%> (+0.03%) ⬆️
Windows_3 43.23% <0.00%> (-0.01%) ⬇️
Windows_4 35.09% <0.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
...ore/server/saved_objects/permission_control/acl.ts 65.43% <65.43%> (ø)
...d_objects/migrations/core/build_active_mappings.ts 87.09% <100.00%> (+0.43%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Signed-off-by: gaobinlong <[email protected]>
@gaobinlong gaobinlong merged commit f02a059 into ruanyl:workspace-pr-integr-2.9 Sep 14, 2023
ruanyl pushed a commit that referenced this pull request Sep 15, 2023
* [Workspace] Add acl related functions for workspace

Signed-off-by: gaobinlong <[email protected]>

* Minor change

Signed-off-by: gaobinlong <[email protected]>

---------

Signed-off-by: gaobinlong <[email protected]>
wanglam pushed a commit that referenced this pull request Feb 26, 2024
* [Workspace] Add acl related functions for workspace

Signed-off-by: gaobinlong <[email protected]>

* Minor change

Signed-off-by: gaobinlong <[email protected]>

---------

Signed-off-by: gaobinlong <[email protected]>
gaobinlong added a commit that referenced this pull request Mar 8, 2024
…) (#287)

* [Workspace] Add ACL related functions for workspace (#146)

* [Workspace] Add acl related functions for workspace



* Minor change



---------



* Modify changelog



* Add more unit test cases



* Modify test case



* Some minor change



* Add more test cases



* Optimize some code and the comments of the functions



* Add more comments for some basic functions



* Export more interfaces



* consume permissions in repository



* feat: consume permissions in serializer



* Add unit tests for consuming permissions in repository



* Remove double exclamation



* Rename some variables



* Remove duplicated semicolon



* Add permissions field to the mapping only if the permission control is enabled



* Fix test failure



* Add feature flag config to the yml file



* Make the comment of feature flag more clear



* Make comment more clear



* Remove management permission type



* Fix test failure



---------

Signed-off-by: gaobinlong <[email protected]>
Signed-off-by: SuZhou-Joe <[email protected]>
Co-authored-by: Josh Romero <[email protected]>
Co-authored-by: SuZhou-Joe <[email protected]>
SuZhou-Joe added a commit that referenced this pull request Mar 11, 2024
* [Workspace][Feature] Add ACL related functions (opensearch-project#5084)

* [Workspace] Add ACL related functions for workspace (#146)

* [Workspace] Add acl related functions for workspace

Signed-off-by: gaobinlong <[email protected]>

* Minor change

Signed-off-by: gaobinlong <[email protected]>

---------

Signed-off-by: gaobinlong <[email protected]>

* Modify changelog

Signed-off-by: gaobinlong <[email protected]>

* Add more unit test cases

Signed-off-by: gaobinlong <[email protected]>

* Modify test case

Signed-off-by: gaobinlong <[email protected]>

* Some minor change

Signed-off-by: gaobinlong <[email protected]>

* Add more test cases

Signed-off-by: gaobinlong <[email protected]>

* Optimize some code and the comments of the functions

Signed-off-by: gaobinlong <[email protected]>

* Add more comments for some basic functions

Signed-off-by: gaobinlong <[email protected]>

* Export more interfaces

Signed-off-by: gaobinlong <[email protected]>

* consume permissions in repository

Signed-off-by: SuZhou-Joe <[email protected]>

* feat: consume permissions in serializer

Signed-off-by: SuZhou-Joe <[email protected]>

* Add unit tests for consuming permissions in repository

Signed-off-by: gaobinlong <[email protected]>

* Remove double exclamation

Signed-off-by: gaobinlong <[email protected]>

* Rename some variables

Signed-off-by: gaobinlong <[email protected]>

* Remove duplicated semicolon

Signed-off-by: gaobinlong <[email protected]>

* Add permissions field to the mapping only if the permission control is enabled

Signed-off-by: gaobinlong <[email protected]>

* Fix test failure

Signed-off-by: gaobinlong <[email protected]>

* Add feature flag config to the yml file

Signed-off-by: gaobinlong <[email protected]>

* Make the comment of feature flag more clear

Signed-off-by: gaobinlong <[email protected]>

* Make comment more clear

Signed-off-by: gaobinlong <[email protected]>

* Remove management permission type

Signed-off-by: gaobinlong <[email protected]>

* Fix test failure

Signed-off-by: gaobinlong <[email protected]>

---------

Signed-off-by: gaobinlong <[email protected]>
Signed-off-by: SuZhou-Joe <[email protected]>
Co-authored-by: Josh Romero <[email protected]>
Co-authored-by: SuZhou-Joe <[email protected]>

* Remove duplicated attribute

Signed-off-by: gaobinlong <[email protected]>

* Enable acl in integration tests for workspace client wrapper

Signed-off-by: gaobinlong <[email protected]>

* Format the code

Signed-off-by: gaobinlong <[email protected]>

* Modify feature flag

Signed-off-by: gaobinlong <[email protected]>

* Modify feature flag to false

Signed-off-by: gaobinlong <[email protected]>

* Modify feature flag to true

Signed-off-by: gaobinlong <[email protected]>

* Enhance the test case

Signed-off-by: gaobinlong <[email protected]>

---------

Signed-off-by: gaobinlong <[email protected]>
Signed-off-by: SuZhou-Joe <[email protected]>
Co-authored-by: Josh Romero <[email protected]>
Co-authored-by: SuZhou-Joe <[email protected]>
SuZhou-Joe pushed a commit that referenced this pull request Mar 11, 2024
* [Workspace] Add acl related functions for workspace

Signed-off-by: gaobinlong <[email protected]>

* Minor change

Signed-off-by: gaobinlong <[email protected]>

---------

Signed-off-by: gaobinlong <[email protected]>
SuZhou-Joe pushed a commit that referenced this pull request Mar 18, 2024
* [Workspace] Add acl related functions for workspace

Signed-off-by: gaobinlong <[email protected]>

* Minor change

Signed-off-by: gaobinlong <[email protected]>

---------

Signed-off-by: gaobinlong <[email protected]>
SuZhou-Joe added a commit that referenced this pull request Mar 18, 2024
…) (#287)

* [Workspace] Add ACL related functions for workspace (#146)

* [Workspace] Add acl related functions for workspace



* Minor change



---------



* Modify changelog



* Add more unit test cases



* Modify test case



* Some minor change



* Add more test cases



* Optimize some code and the comments of the functions



* Add more comments for some basic functions



* Export more interfaces



* consume permissions in repository



* feat: consume permissions in serializer



* Add unit tests for consuming permissions in repository



* Remove double exclamation



* Rename some variables



* Remove duplicated semicolon



* Add permissions field to the mapping only if the permission control is enabled



* Fix test failure



* Add feature flag config to the yml file



* Make the comment of feature flag more clear



* Make comment more clear



* Remove management permission type



* Fix test failure



---------

Signed-off-by: gaobinlong <[email protected]>
Signed-off-by: SuZhou-Joe <[email protected]>
Co-authored-by: Josh Romero <[email protected]>
Co-authored-by: SuZhou-Joe <[email protected]>
ruanyl pushed a commit that referenced this pull request Apr 16, 2024
…) (opensearch-project#6405)

* [Workspace] Add ACL related functions for workspace (#146)

* consume permissions in repository
* feat: consume permissions in serializer
* Add unit tests for consuming permissions in repository
* Remove double exclamation
* Rename some variables
* Remove duplicated semicolon
* Add permissions field to the mapping only if the permission control is enabled
* Fix test failure
* Add feature flag config to the yml file
* Make the comment of feature flag more clear
* Make comment more clear
* Remove management permission type
* Fix test failure

---------

(cherry picked from commit 54c36fe)

Signed-off-by: gaobinlong <[email protected]>
Signed-off-by: SuZhou-Joe <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Josh Romero <[email protected]>
Co-authored-by: SuZhou-Joe <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants