Skip to content

Commit 0144231

Browse files
tenancy access control (#1821) (#1822)
* Check user name for private tenant access control * fix broken link * remove broken link --------- (cherry picked from commit de18327) Signed-off-by: Sean Kao <[email protected]> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent 162e81a commit 0144231

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

DEVELOPER_GUIDE.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ By default, tests use the same runtime as `JAVA_HOME`.
1414

1515
### Setup
1616

17-
1. Download OpenSearch for the version that matches the [OpenSearch Dashboards version specified in opensearch_dashboards.json](./dashboards-observability/opensearch_dashboards.json#L4) from [opensearch.org](https://opensearch.org/downloads.html).
18-
1. Download the OpenSearch Dashboards source code for the [version specified in opensearch_dashboards.json](./dashboards-observability/opensearch_dashboards.json#L4) you want to set up.
17+
1. Download OpenSearch for the version that matches the OpenSearch Dashboards version specified in `opensearch_dashboards.json` from [opensearch.org](https://opensearch.org/downloads.html).
18+
1. Download the OpenSearch Dashboards source code for the version specified in `opensearch_dashboards.json` you want to set up.
1919
1. Change your node version to the version specified in `.node-version` inside the OpenSearch Dashboards root directory.
2020
1. cd into `OpenSearch-Dashboards` and remove the `plugins` directory.
2121
1. Check out this package from version control as the `plugins` directory.

README.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,10 @@ Observability is collection of plugins and applications that let you visualize d
6666
[cypress-test-badge]: https://img.shields.io/badge/Cypress%20tests-in%20progress-yellow
6767
[cypress-test-link]: https://github.com/opensearch-project/opensearch-build/issues/1124
6868
[cypress-code-badge]: https://img.shields.io/badge/Cypress%20code-blue
69-
[cypress-code-link]: https://github.com/opensearch-project/observability/blob/main/dashboards-observability/.cypress/CYPRESS_TESTS.md
7069
[opensearch-it-badge]: https://img.shields.io/badge/OpenSearch%20Plugin%20IT%20tests-in%20progress-yellow
7170
[opensearch-it-link]: https://github.com/opensearch-project/opensearch-build/issues/1124
7271
[opensearch-it-code-badge]: https://img.shields.io/badge/OpenSearch%20IT%20code-blue
73-
[opensearch-it-code-link]: https://github.com/opensearch-project/observability/blob/main/opensearch-observability/src/test/kotlin/org/opensearch/observability/ObservabilityPluginIT.kt
72+
[opensearch-it-code-link]: https://github.com/opensearch-project/observability/blob/main/src/test/kotlin/org/opensearch/observability/ObservabilityPluginIT.kt
7473
[bwc-tests-badge]: https://img.shields.io/badge/BWC%20tests-in%20progress-yellow
7574
[bwc-tests-link]: https://github.com/opensearch-project/observability/issues/276
7675
[good-first-badge]: https://img.shields.io/github/issues/opensearch-project/observability/good%20first%20issue.svg

src/main/kotlin/org/opensearch/observability/security/UserAccessManager.kt

+3
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,9 @@ internal object UserAccessManager {
147147
if (getUserTenant(user) != tenant) {
148148
return false
149149
}
150+
if (isUserPrivateTenant(user)) {
151+
return access.contains("$USER_TAG${user.name}")
152+
}
150153
if (canAdminViewAllItems(user)) {
151154
return true
152155
}

0 commit comments

Comments
 (0)