workspacesField() defaults to a field no resource index maps
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
Research direction
Start with ResourceProvider.java:96 and ResourceSharingDlsUtils.java:85-87, then inspect the plugin mappings listed in the issue. Confirm how the default field reaches the DLS terms clause and how an opt-in plugin configures it. Done means the default is opt-in only and the required keyword mapping is stated wherever plugins enable it.
Written by the indexing model from the issue text.
Description
ResourceProvider.workspacesField() defaults to "workspaces" (ResourceProvider.java:96), and the DLS restriction adds terms(<workspacesField>, <user workspaces>) for each resolved index (ResourceSharingDlsUtils.java:85-87).
No resource index in the onboarded plugins maps a workspaces field, and most of those mappings are dynamic: false:
| Mapping | workspaces mapped |
dynamic: false |
|---|---|---|
ml-commons ml_model_group.json |
no | no |
alerting scheduled-jobs.json |
no | yes |
anomaly-detection config.json |
no | yes |
flow-framework global-context.json, workflow-state.json |
no | yes |
reporting report-definitions-mapping.yml, report-instances-mapping.yml |
no | yes |
notifications notifications-config-mapping.yml |
no | yes |
security-analytics detectors.json |
no | yes |
security-analytics correlation-rules.json |
no | no |
A value written to that field would therefore not be indexed on eight of the ten indices, and the clause could not match. The defect is latent rather than active: only the sample plugin implements resolveWorkspacesForUser, so the user's workspace set is empty in real deployments today and the clause is omitted entirely.
Suggested: default workspacesField() to null so it is opt-in, and state the keyword-mapping requirement wherever a plugin is told to opt in.
- Dominant language
- Java
- Stars
- 252
- Forks
- 395
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 74
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from opensearch-project/security
-
bug triaged
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
opensearch-project/security#6455 · 2 comments ·
-
bug triaged
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
opensearch-project/security#6105 · 3 comments ·
-
bug triaged
Difficulty 1/5 Under an hour Newbie friendliness 72/100
opensearch-project/security#6103 · 4 comments ·
-
triaged
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
opensearch-project/security#5075 · 1 comment ·
-
duplicate enhancement untriaged
Difficulty 5/5 Over a week Newbie friendliness 25/100
opensearch-project/security#6544 · 1 comment ·
All issues in opensearch-project/security
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
infinispan/infinispan#18150 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
opensearch-project/k-NN#3597 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100