-
Notifications
You must be signed in to change notification settings - Fork 25.6k
[Failure Store] Prevent explicit selectors in role index name patterns #125843
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
[Failure Store] Prevent explicit selectors in role index name patterns #125843
Conversation
Adding basic validation to prevent using `::` selectors when defining
index permissions.
For example, the `test-*::failures` will not be allowed for `test-role`:
```
PUT /_security/role/test-role
{
"indices": [
{
"names": ["test-*::failures"],
"privileges": ["read"]
}
]
}
```
| } | ||
| if (DataStream.isFailureStoreFeatureFlagEnabled()) { | ||
| for (String indexName : ridp.indicesPrivileges().getIndices()) { | ||
| validationException = validateIndexNameExpression(indexName, validationException); |
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 don't support failure store privileges yet for RCS2, but I think we should prevent using :: in remote index patterns as well - regardless of the privileges support.
|
Pinging @elastic/es-security (Team:Security) |
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 👍
💔 Backport failed
You can use sqren/backport to manually backport by running |
💚 All backports created successfully
Questions ?Please refer to the Backport tool documentation |
elastic#125843) Adding basic validation to prevent using `::` selectors when defining index permissions. Index names do not allow colon character (`:`), hence the index name patterns that would include double colon (`::`), would never match any of the index names. To avoid confusion, we are preventing using `::` in role index name patterns. For example, the `test-*::failures` will be rejected during `test-role` validation: ``` PUT /_security/role/test-role { "indices": [ { "names": ["test-*::failures"], "privileges": ["read"] } ] } ``` (cherry picked from commit 1f7e26c)
#125843) (#125939) Adding basic validation to prevent using `::` selectors when defining index permissions. Index names do not allow colon character (`:`), hence the index name patterns that would include double colon (`::`), would never match any of the index names. To avoid confusion, we are preventing using `::` in role index name patterns. For example, the `test-*::failures` will be rejected during `test-role` validation: ``` PUT /_security/role/test-role { "indices": [ { "names": ["test-*::failures"], "privileges": ["read"] } ] } ``` (cherry picked from commit 1f7e26c)
Adding basic validation to prevent using
::selectors when defining index permissions.Index names do not allow colon character (
:), hence the index name patterns thatwould include double colon (
::), would never match any of the index names.To avoid confusion, we are preventing using
::in role index name patterns.For example, the
test-*::failureswill be rejected duringtest-rolevalidation: