You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When systemindex permission: enable
service accounts not have acces to non system index
Check List
modify authz workflow to filter out all permissions other than index permissions with system index grant
add/modify test case that confirms cluster-wide permissions are not accessible
add/modify test case where index permissions without system index grant is filtered out
disable the system index permission
enable the system index permission, but trying to access to non-system index
add/modify test case where index permissions with system index grant is allowed (happy path)
Service Account Permissions Manual Testing Flow
Since the service account will have a random generated password, it is nice to hardcode a static password in UserService. The following test will use TestSevAccPassword123##admin-extension
1. Spin up a custer
Spin up a cluster with plugins.security.system_indices.permission.enabled: true in opensearch.yml
2. Create a role called access_all
curl -X PUT "https://localhost:9200/_plugins/_security/api/roles/testrole?pretty" -u "admin:admin" -H 'Content-Type: application/json' -k -d '{ "description" : "Allow full access to all indices and all cluster APIs", "cluster_permissions" : [ "*" ], "index_permissions" : [ { "index_patterns" : [ "*" ], "fls" : [ ], "masked_fields" : [ ], "allowed_actions" : [ "*", "system:admin/system_index" ] } ], "tenant_permissions" : [ { "tenant_patterns" : [ "*" ], "allowed_actions" : [ "kibana_all_write" ] } ]}'
3. Create a service account with the above role mapped
Limit Service Account Permission
Exit Criteria
When systemindex permission: enable
service accounts not have acces to non system index
Check List
Service Account Permissions Manual Testing Flow
Since the service account will have a random generated password, it is nice to hardcode a static password in
UserService
. The following test will useTestSevAccPassword123##
admin-extension
1. Spin up a custer
Spin up a cluster with
plugins.security.system_indices.permission.enabled: true
inopensearch.yml
2. Create a role called
access_all
3. Create a service account with the above role mapped
4. Create two indices (one system index + one non system index) with admin credential
non system index:
system index:
can be verified by:
5. [maybe optional] Write into both indices with admin credential
test_index:
.test-sys-index:
6. Add
.test-sys-index
into the system indices listAdd
.test-sys-index
into the system indices list inopensearch.yml
. After that reboot the cluster.7. Try to read both indices with service account user credential
Success (system index):
Fail (non system index):
The text was updated successfully, but these errors were encountered: