Skip to content
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

[FEATURE] default tenant to global when security plugin installed #1076

Open
kavilla opened this issue Feb 7, 2024 · 2 comments
Open

[FEATURE] default tenant to global when security plugin installed #1076

kavilla opened this issue Feb 7, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@kavilla
Copy link
Member

kavilla commented Feb 7, 2024

Is your feature request related to a problem?

Normally, tests for plugins are written without the security plugin installed (sometimes by no choice of the plugin itself).

When written they are written using the default OpenSearch Dashboards index: .kibana. However, when the security plugin is installed, we noticed plugin failures in their tests. When the plugin is installed then this default index translates to the global tenant. Digging deeper, we see that FTRepo's default tenant when the plugin is installed is the private tenant. [source]. This equates to creating an index like .kibana_random_user and it ends up causing failures in the tests because some functions and tests were not expecting this.

For example: we can see the data explorer tests uses a bulk upload helper function to upload a fixture that uses .kibana. But this then becomes problematic because the actual saved objects, like index patterns, get pushed the global tenant but the test will navigate to a page referencing the private tenant. A common behavior we see is that OpenSearch Dashboards will see that the cluster has data indices but no index patterns so it will re-route tests to the index-patterns page by default and say please create an index pattern.

Current mitigations proved successful to solve this issue:
#959
#1073

What solution would you like?

Since most of the tests are written using .kibana, we should switch the default tenant to be the global tenant. And modify the security plugin tests to switch to the private tenant.

@kavilla kavilla added enhancement New feature or request untriaged labels Feb 7, 2024
@Hailong-am
Copy link
Collaborator

same issue for vis-augmenter #1118

@wbeckler
Copy link

What happens if you change the default tenant to global? As in, how many security dashboard plugin tests would break?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants