Add setting to ignore source security roles on CCS requests - #6402
Add setting to ignore source security roles on CCS requests#6402sharathkanaka wants to merge 1 commit into
Conversation
Signed-off-by: Sharath Kanaka <sharatcr@amazon.com>
PR Code Analyzer ❗AI-powered 'Code-Diff-Analyzer' found issues on commit 31cd053. ⛔ Hard block: Issues at High severity or above will block this PR from merging.
The table above displays the top 10 most important findings. Pull Requests Author(s): Please update your Pull Request according to the report above. Repository Maintainer(s): You can Thanks. |
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
Description
Category: Enhancement
Why these changes are required?
On cross-cluster search (CCS) requests, the remote cluster inherits the source cluster's pre-computed security roles for the user. This prevents the remote cluster from independently controlling what permissions CCS users receive based on its own configuration.
Old behavior: Remote cluster always unions source-propagated
securityRolesinto its own role mapping result for CCS requests. The remote cannot independently control what permissions a CCS user receives.New behavior: A new cluster setting
plugins.security.ccs.ignore_source_security_roles(default: false) allows users to skip source cluster propagated securityRoles on CCS requests. When enabled, the remote cluster evaluates access through its own roles_mapping.yml. This gives the remote cluster independent control over CCS user permissions.Issues Resolved
Resolves #6401
Not a backport. No new permissions introduced.
Testing
ConfigurableRoleMapperTest.CcsSkipSourceSecurityRolesTest: covers flag on/off with and without CCS request contextCcsIgnoreSourceSecurityRolesIntTests: end-to-end CCS with two remote clustersCheck List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.
Note: Documentation will be added in a follow-up PR to the documentation-website repo once this change is merged.