-
Notifications
You must be signed in to change notification settings - Fork 25.5k
record security exceptions in resolved index expressions #135630
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
base: main
Are you sure you want to change the base?
record security exceptions in resolved index expressions #135630
Conversation
Pinging @elastic/es-security (Team:Security) |
if (e instanceof IndexNotFoundException) { | ||
listener.onFailure(e); | ||
} else { | ||
listener.onFailure(actionDenied(authentication, authzInfo, action, request, e)); |
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.
We need to set security exceptions in the case where the action actually succeeded (due to ignore_unavailable=true) instead of when it failed. When it failed, the recorded expressions are irrelevant since we will throw directly. So we need to take the request post resolution and see if:
- it has resolved expressions recorded
- if any of those have
CONCRETE_RESOURCE_UNAUTHORIZED
set
If the above is true, we need to set an actionDenied
exception as you do below
Sorry, only got to this late! @richard-dennehy could you update the branch, address this bit, and the req a review from @ywangd when it's ready? If my comment doesn't make sense I hope Yang can provide guidance. The Jira, for reference is ES-13005. |
Record security exception for resolved index expressions with
CONCRETE_RESOURCE_UNAUTHORIZED
results