Detect security plugin presence and improve WLM rule error message#533
Open
dzane17 wants to merge 5 commits into
Open
Detect security plugin presence and improve WLM rule error message#533dzane17 wants to merge 5 commits into
dzane17 wants to merge 5 commits into
Conversation
…pensearch-project#530) Signed-off-by: David Zane <davizane@amazon.com>
Signed-off-by: David Zane <davizane@amazon.com>
…sharpen tests Signed-off-by: David Zane <davizane@amazon.com>
…ale-gate refresh Signed-off-by: David Zane <davizane@amazon.com>
Signed-off-by: David Zane <davizane@amazon.com>
74751f2 to
443fa6d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Saving a WLM rule with a username or role on a cluster without the Security plugin currently fails with this cryptic error:
This PR detects whether the OpenSearch Security plugin is installed and active. If it isn't, the Username and Role inputs are disabled with helper text "Requires the OpenSearch Security plugin to be installed and enabled on this cluster." If a save still surfaces the cryptic backend error (e.g. on a slow probe or stale state), it's rewritten to that same actionable wording.
All inactive states are covered: not installed, installed-but-disabled, plugin reachable but degraded, and probe failure (in which case the UI does not over-block).
Screenshot
Issues Resolved
Closes #530
Testing
WLMDetails.security.test.tsxcovering each plugin state and the rewritten save error.datasource-utils.test.tsandWLMCreate.test.tsxwith the same coverage on the create path.workload-managementplugin installed.