-
Notifications
You must be signed in to change notification settings - Fork 282
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
Prevent recursive action groups #1868
Prevent recursive action groups #1868
Conversation
Signed-off-by: cliu123 <[email protected]>
eead291
to
4fba30e
Compare
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.
I am concerned this validation check appears to be happening at several different locations. Can we add a single validation function that is run before all creates/updates?
src/main/java/org/opensearch/security/dlic/rest/api/ActionGroupsApiAction.java
Outdated
Show resolved
Hide resolved
src/main/java/org/opensearch/security/dlic/rest/api/PatchableResourceApiAction.java
Outdated
Show resolved
Hide resolved
Good comments! |
Signed-off-by: cliu123 <[email protected]>
e044b96
to
5e1ff85
Compare
src/main/java/org/opensearch/security/dlic/rest/api/ActionGroupsApiAction.java
Outdated
Show resolved
Hide resolved
Signed-off-by: cliu123 <[email protected]>
src/main/java/org/opensearch/security/dlic/rest/api/ActionGroupsApiAction.java
Outdated
Show resolved
Hide resolved
Signed-off-by: cliu123 <[email protected]>
Signed-off-by: cliu123 <[email protected]>
Codecov Report
@@ Coverage Diff @@
## main #1868 +/- ##
=========================================
Coverage 60.87% 60.88%
- Complexity 3215 3224 +9
=========================================
Files 256 256
Lines 18012 18040 +28
Branches 3211 3219 +8
=========================================
+ Hits 10965 10983 +18
- Misses 5467 5476 +9
- Partials 1580 1581 +1
Continue to review full report at Codecov.
|
The backport to
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-1.3 1.3
# Navigate to the new working tree
cd .worktrees/backport-1.3
# Create a new branch
git switch --create backport/backport-1868-to-1.3
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 07637c4473977c80c5a2373c7bb2fddaca6dc770
# Push it to GitHub
git push --set-upstream origin backport/backport-1868-to-1.3
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-1.3 Then, create a pull request where the |
Signed-off-by: cliu123 <[email protected]> Signed-off-by: Stephen Crawford <[email protected]>
Signed-off-by: cliu123 <[email protected]>
Signed-off-by: cliu123 [email protected]
Description
Category (Enhancement, New feature, Bug fix, Test fix, Refactoring, Maintenance, Documentation) Bug fix
Prevent the following 3 cases that cause recursive action groups and result in
StackOverflowException
when resolving the security configurations in runtime:Issues Resolved
#1389
Testing
UTs
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.