-
Notifications
You must be signed in to change notification settings - Fork 285
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
TenantInfo API should also check backend roles apart from just users … #770
TenantInfo API should also check backend roles apart from just users … #770
Conversation
Codecov Report
@@ Coverage Diff @@
## master #770 +/- ##
============================================
- Coverage 64.47% 64.46% -0.01%
Complexity 3224 3224
============================================
Files 244 244
Lines 17160 17168 +8
Branches 3040 3044 +4
============================================
+ Hits 11064 11068 +4
- Misses 4555 4556 +1
- Partials 1541 1544 +3
Continue to review full report at Codecov.
|
response = rh.executeGetRequest("_opendistro/_security/tenantinfo"); | ||
Assert.assertEquals(HttpStatus.SC_OK, response.getStatusCode()); | ||
|
||
rh.sendAdminCertificate = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why use admin certificate for users but not for backend role?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It depend upon the test we are performing.
If we want to send credentials with request, we use it, else no
} else if (roleMapping instanceof RoleMappingsV7) { | ||
backendRoles = ((RoleMappingsV7) roleMapping).getBackend_roles(); | ||
} | ||
return backendRoles != null && backendRoles.contains(user.getName()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Won't this be backendRoles.contains(kibanaOpendistroRole) ?
…arch-project#771) * Create release notes for rc-1 * Bump plugin version to 1.0.0.0-rc1 * Add PR#763, opensearch-project#771 and opensearch-project#770 to release notes rc1 * Build security backend rc1 * change the version in release notes * Change plugin version to rc1
TenantInfo API should also check backend roles apart from just users in rolesmapping
Unit test added
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.