-
Notifications
You must be signed in to change notification settings - Fork 143
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
add more user based permission check in Memory #1927
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #1927 +/- ##
============================================
- Coverage 82.96% 82.84% -0.12%
- Complexity 5424 5445 +21
============================================
Files 522 522
Lines 21781 21900 +119
Branches 2222 2226 +4
============================================
+ Hits 18070 18144 +74
- Misses 2811 2848 +37
- Partials 900 908 +8
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks good, thanks for doing this.
There used to be an access test for singular get interaction - can we put it back? And maybe add some similar tests for the trace/update APIs?
...main/java/org/opensearch/ml/memory/action/conversation/UpdateInteractionTransportAction.java
Show resolved
Hide resolved
Yes those tests are added. There is slightly difference for the get interaction permission check test due to the conversation id is removed after refactor. But overall this is a valid solution without adding too much latency (negligible from tests). |
Signed-off-by: Xun Zhang <xunzh@amazon.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for adding access tests
* add more user based permission check in Memory Signed-off-by: Xun Zhang <xunzh@amazon.com> * add UT for acess denied cases Signed-off-by: Xun Zhang <xunzh@amazon.com> --------- Signed-off-by: Xun Zhang <xunzh@amazon.com> (cherry picked from commit cdd63b4)
* add more user based permission check in Memory Signed-off-by: Xun Zhang <xunzh@amazon.com> * add UT for acess denied cases Signed-off-by: Xun Zhang <xunzh@amazon.com> --------- Signed-off-by: Xun Zhang <xunzh@amazon.com> (cherry picked from commit cdd63b4) Co-authored-by: Xun Zhang <xunzh@amazon.com>
* add more user based permission check in Memory Signed-off-by: Xun Zhang <xunzh@amazon.com> * add UT for acess denied cases Signed-off-by: Xun Zhang <xunzh@amazon.com> --------- Signed-off-by: Xun Zhang <xunzh@amazon.com>
* add more user based permission check in Memory Signed-off-by: Xun Zhang <xunzh@amazon.com> * add UT for acess denied cases Signed-off-by: Xun Zhang <xunzh@amazon.com> --------- Signed-off-by: Xun Zhang <xunzh@amazon.com>
Description
This PR is to add user based permission check that addresses concerns in #1901.
The permission checks are strictly applied to all interactions/conversations.
The PR is verified using two different login users and ensure they don't have access to each others's data
More tests cases added and Rebased to latest main branch.
Issues Resolved
[List any issues this PR will resolve]
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.