Skip to content
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

Map users by default to read-only role and add another one for admin #204

Merged
merged 2 commits into from
Sep 18, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading