Skip to content

Commit

Permalink
Map users by default to read-only role and add another one for admin
Browse files Browse the repository at this point in the history
Signed-off-by: Sayali Gaikawad <[email protected]>
  • Loading branch information
gaiksaya committed Sep 18, 2024
1 parent c527d8d commit ca4f152
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,14 @@ _meta:
opendistro_security_anonymous_role:
backend_roles:
- "opendistro_security_anonymous_backendrole"
- "default-roles-opensearch-nightly-playgrounds"
## Demo roles mapping

all_access:
reserved: false
backend_roles:
- "admin"
- "admin_role_for_nightly"
description: "Maps admin to all_access"

own_index:
Expand Down
2 changes: 1 addition & 1 deletion nightly-playground/test/nightly-playground.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ test('Ensure security is always enabled with custom role mapping', () => {
ignoreErrors: false,
},
'011': {
command: "set -ex; echo \"_meta:\n type: rolesmapping\n config_version: 2\nopendistro_security_anonymous_role:\n backend_roles:\n - opendistro_security_anonymous_backendrole\nall_access:\n reserved: false\n backend_roles:\n - admin\n description: Maps admin to all_access\nown_index:\n reserved: false\n users:\n - '*'\n description: Allow full access to an index named like the username\nkibana_user:\n reserved: false\n backend_roles:\n - kibanauser\n description: Maps kibanauser to kibana_user\nreadall:\n reserved: false\n backend_roles:\n - readall\nkibana_server:\n reserved: true\n users:\n - kibanaserver\n\" > opensearch/config/opensearch-security/roles_mapping.yml",
command: "set -ex; echo \"_meta:\n type: rolesmapping\n config_version: 2\nopendistro_security_anonymous_role:\n backend_roles:\n - opendistro_security_anonymous_backendrole\n - default-roles-opensearch-nightly-playgrounds\nall_access:\n reserved: false\n backend_roles:\n - admin\n - admin_role_for_nightly\n description: Maps admin to all_access\nown_index:\n reserved: false\n users:\n - '*'\n description: Allow full access to an index named like the username\nkibana_user:\n reserved: false\n backend_roles:\n - kibanauser\n description: Maps kibanauser to kibana_user\nreadall:\n reserved: false\n backend_roles:\n - readall\nkibana_server:\n reserved: true\n users:\n - kibanaserver\n\" > opensearch/config/opensearch-security/roles_mapping.yml",
cwd: '/home/ec2-user',
ignoreErrors: false,
},
Expand Down

0 comments on commit ca4f152

Please sign in to comment.