Skip to content

Commit

Permalink
tenancy access control (opensearch-project#1821)
Browse files Browse the repository at this point in the history
* Check user name for private tenant access control

Signed-off-by: Sean Kao <[email protected]>

* fix broken link

Signed-off-by: Sean Kao <[email protected]>

* remove broken link

Signed-off-by: Sean Kao <[email protected]>

---------

Signed-off-by: Sean Kao <[email protected]>
  • Loading branch information
seankao-az authored Apr 26, 2024
1 parent 5439507 commit de18327
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions DEVELOPER_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ By default, tests use the same runtime as `JAVA_HOME`.

### Setup

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).
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.
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).
1. Download the OpenSearch Dashboards source code for the version specified in `opensearch_dashboards.json` you want to set up.
1. Change your node version to the version specified in `.node-version` inside the OpenSearch Dashboards root directory.
1. cd into `OpenSearch-Dashboards` and remove the `plugins` directory.
1. Check out this package from version control as the `plugins` directory.
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,10 @@ Observability is collection of plugins and applications that let you visualize d
[cypress-test-badge]: https://img.shields.io/badge/Cypress%20tests-in%20progress-yellow
[cypress-test-link]: https://github.com/opensearch-project/opensearch-build/issues/1124
[cypress-code-badge]: https://img.shields.io/badge/Cypress%20code-blue
[cypress-code-link]: https://github.com/opensearch-project/observability/blob/main/dashboards-observability/.cypress/CYPRESS_TESTS.md
[opensearch-it-badge]: https://img.shields.io/badge/OpenSearch%20Plugin%20IT%20tests-in%20progress-yellow
[opensearch-it-link]: https://github.com/opensearch-project/opensearch-build/issues/1124
[opensearch-it-code-badge]: https://img.shields.io/badge/OpenSearch%20IT%20code-blue
[opensearch-it-code-link]: https://github.com/opensearch-project/observability/blob/main/opensearch-observability/src/test/kotlin/org/opensearch/observability/ObservabilityPluginIT.kt
[opensearch-it-code-link]: https://github.com/opensearch-project/observability/blob/main/src/test/kotlin/org/opensearch/observability/ObservabilityPluginIT.kt
[bwc-tests-badge]: https://img.shields.io/badge/BWC%20tests-in%20progress-yellow
[bwc-tests-link]: https://github.com/opensearch-project/observability/issues/276
[good-first-badge]: https://img.shields.io/github/issues/opensearch-project/observability/good%20first%20issue.svg
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,9 @@ internal object UserAccessManager {
if (getUserTenant(user) != tenant) {
return false
}
if (isUserPrivateTenant(user)) {
return access.contains("$USER_TAG${user.name}")
}
if (canAdminViewAllItems(user)) {
return true
}
Expand Down

0 comments on commit de18327

Please sign in to comment.