File tree Expand file tree Collapse file tree 1 file changed +42
-0
lines changed
Expand file tree Collapse file tree 1 file changed +42
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ . .env
3+ doco exec -it opensearch curl -XPUT -u admin:${OPENSEARCH_PASSWORD} " opensearch:9200/_plugins/_security/api/roles/indexer_${BRAND} " -H " Content-Type: application/json" -d " $( cat << EOF
4+ {
5+ "cluster_permissions": [
6+ "cluster_composite_ops_monitor",
7+ "cluster:monitor/main",
8+ "cluster:monitor/state",
9+ "cluster:monitor/health"
10+ ],
11+ "index_permissions": [
12+ {
13+ "index_patterns": ["indexer_${BRAND} *"],
14+ "fls": [],
15+ "masked_fields": [],
16+ "allowed_actions": ["*"]
17+ },
18+ {
19+ "index_patterns": ["*"],
20+ "fls": [],
21+ "masked_fields": [],
22+ "allowed_actions": [
23+ "indices:admin/aliases/get",
24+ "indices:data/read/search",
25+ "indices:admin/get"]
26+ }
27+ ],
28+ "tenant_permissions": []
29+ }
30+ EOF
31+
32+ ) "
33+
34+ doco exec -it opensearch curl -XPUT admin:${OPENSEARCH_PASSWORD} -XPUT " http://opensearch:9200/_plugins/_security/api/internalusers/indexer_${BRAND} " \
35+ -H " Content-Type: application/json" \
36+ -d " $( cat << EOF
37+ {
38+ "password": "${INDEXER_PASSWORD} ",
39+ "opendistro_security_roles": ["indexer_${BRAND} ", "own_index"]
40+ }
41+ EOF
42+ ) "
You can’t perform that action at this time.
0 commit comments