Skip to content

Commit 28e2e45

Browse files
Configure the OpenSearch security in the cluster spec
1 parent 170b929 commit 28e2e45

2 files changed

Lines changed: 95 additions & 175 deletions

File tree

stacks/logging/opensearch.yaml

Lines changed: 47 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,53 @@ spec:
77
productVersion: {{ opensearchVersion }}
88
pullPolicy: IfNotPresent
99
clusterConfig:
10+
security:
11+
settings:
12+
config:
13+
managedBy: API
14+
content:
15+
value:
16+
_meta:
17+
type: config
18+
config_version: 2
19+
config:
20+
dynamic:
21+
authc:
22+
basic_internal_auth_domain:
23+
description: Authenticate via HTTP Basic against internal users database
24+
http_enabled: true
25+
transport_enabled: true
26+
order: 1
27+
http_authenticator:
28+
type: basic
29+
challenge: true
30+
authentication_backend:
31+
type: intern
32+
authz: {}
33+
kibana:
34+
multitenancy_enabled: false
35+
internalUsers:
36+
managedBy: API
37+
content:
38+
valueFrom:
39+
secretKeyRef:
40+
name: opensearch-security-config
41+
key: internal_users.yml
42+
rolesMapping:
43+
managedBy: API
44+
content:
45+
value:
46+
_meta:
47+
type: rolesmapping
48+
config_version: 2
49+
all_access:
50+
reserved: false
51+
backend_roles:
52+
- admin
53+
kibana_server:
54+
reserved: true
55+
users:
56+
- kibanaserver
1057
vectorAggregatorConfigMapName: vector-aggregator-discovery
1158
nodes:
1259
config:
@@ -27,69 +74,12 @@ spec:
2774
# `cluster.routing.allocation.disk.watermark.high` is reached the security index can't
2875
# be created even if enough disk space would be available.
2976
cluster.routing.allocation.disk.threshold_enabled: "false"
30-
plugins.security.allow_default_init_securityindex: "true"
31-
podOverrides:
32-
spec:
33-
containers:
34-
- name: opensearch
35-
volumeMounts:
36-
- name: security-config
37-
mountPath: /stackable/opensearch/config/opensearch-security
38-
readOnly: true
39-
volumes:
40-
- name: security-config
41-
secret:
42-
secretName: opensearch-security-config
43-
defaultMode: 0o660
4477
---
4578
apiVersion: v1
4679
kind: Secret
4780
metadata:
4881
name: opensearch-security-config
4982
stringData:
50-
action_groups.yml: |
51-
---
52-
_meta:
53-
type: actiongroups
54-
config_version: 2
55-
allowlist.yml: |
56-
---
57-
_meta:
58-
type: allowlist
59-
config_version: 2
60-
61-
config:
62-
enabled: false
63-
audit.yml: |
64-
---
65-
_meta:
66-
type: audit
67-
config_version: 2
68-
69-
config:
70-
enabled: false
71-
config.yml: |
72-
---
73-
_meta:
74-
type: config
75-
config_version: 2
76-
77-
config:
78-
dynamic:
79-
authc:
80-
basic_internal_auth_domain:
81-
description: Authenticate via HTTP Basic against internal users database
82-
http_enabled: true
83-
transport_enabled: true
84-
order: 1
85-
http_authenticator:
86-
type: basic
87-
challenge: true
88-
authentication_backend:
89-
type: intern
90-
authz: {}
91-
kibana:
92-
multitenancy_enabled: false
9383
internal_users.yml: |
9484
---
9585
_meta:
@@ -107,36 +97,6 @@ stringData:
10797
hash: {{ bcrypt(password=openSearchDashboardPassword) }}
10898
reserved: true
10999
description: OpenSearch Dashboards user
110-
nodes_dn.yml: |
111-
---
112-
_meta:
113-
type: nodesdn
114-
config_version: 2
115-
roles.yml: |
116-
---
117-
_meta:
118-
type: roles
119-
config_version: 2
120-
roles_mapping.yml: |
121-
---
122-
_meta:
123-
type: rolesmapping
124-
config_version: 2
125-
126-
all_access:
127-
reserved: false
128-
backend_roles:
129-
- admin
130-
131-
kibana_server:
132-
reserved: true
133-
users:
134-
- kibanaserver
135-
tenants.yml: |
136-
---
137-
_meta:
138-
type: tenants
139-
config_version: 2
140100
---
141101
apiVersion: v1
142102
kind: Secret

stacks/opensearch-rag/opensearch.yaml

Lines changed: 48 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,54 @@ spec:
66
image:
77
productVersion: {{ opensearchVersion }}
88
pullPolicy: IfNotPresent
9+
clusterConfig:
10+
security:
11+
settings:
12+
config:
13+
managedBy: API
14+
content:
15+
value:
16+
_meta:
17+
type: config
18+
config_version: 2
19+
config:
20+
dynamic:
21+
authc:
22+
basic_internal_auth_domain:
23+
description: Authenticate via HTTP Basic against internal users database
24+
http_enabled: true
25+
transport_enabled: true
26+
order: 1
27+
http_authenticator:
28+
type: basic
29+
challenge: true
30+
authentication_backend:
31+
type: intern
32+
authz: {}
33+
kibana:
34+
multitenancy_enabled: false
35+
internalUsers:
36+
managedBy: API
37+
content:
38+
valueFrom:
39+
secretKeyRef:
40+
name: opensearch-security-config
41+
key: internal_users.yml
42+
rolesMapping:
43+
managedBy: API
44+
content:
45+
value:
46+
_meta:
47+
type: rolesmapping
48+
config_version: 2
49+
all_access:
50+
reserved: false
51+
backend_roles:
52+
- admin
53+
kibana_server:
54+
reserved: true
55+
users:
56+
- kibanaserver
957
nodes:
1058
roleGroups:
1159
default:
@@ -28,70 +76,12 @@ spec:
2876
node.store.allow_mmap: "false"
2977
# Disable the disk allocation decider to prevent issues with security index creation
3078
cluster.routing.allocation.disk.threshold_enabled: "false"
31-
# Allow automatic initialization of security index
32-
plugins.security.allow_default_init_securityindex: "true"
33-
podOverrides:
34-
spec:
35-
containers:
36-
- name: opensearch
37-
volumeMounts:
38-
- name: security-config
39-
mountPath: /stackable/opensearch/config/opensearch-security
40-
readOnly: true
41-
volumes:
42-
- name: security-config
43-
secret:
44-
secretName: opensearch-security-config
45-
defaultMode: 0o660
4679
---
4780
apiVersion: v1
4881
kind: Secret
4982
metadata:
5083
name: opensearch-security-config
5184
stringData:
52-
action_groups.yml: |
53-
---
54-
_meta:
55-
type: actiongroups
56-
config_version: 2
57-
allowlist.yml: |
58-
---
59-
_meta:
60-
type: allowlist
61-
config_version: 2
62-
63-
config:
64-
enabled: false
65-
audit.yml: |
66-
---
67-
_meta:
68-
type: audit
69-
config_version: 2
70-
71-
config:
72-
enabled: false
73-
config.yml: |
74-
---
75-
_meta:
76-
type: config
77-
config_version: 2
78-
79-
config:
80-
dynamic:
81-
authc:
82-
basic_internal_auth_domain:
83-
description: Authenticate via HTTP Basic against internal users database
84-
http_enabled: true
85-
transport_enabled: true
86-
order: 1
87-
http_authenticator:
88-
type: basic
89-
challenge: true
90-
authentication_backend:
91-
type: intern
92-
authz: {}
93-
kibana:
94-
multitenancy_enabled: false
9585
internal_users.yml: |
9686
---
9787
_meta:
@@ -109,36 +99,6 @@ stringData:
10999
hash: {{ bcrypt(password=openSearchDashboardPassword) }}
110100
reserved: true
111101
description: OpenSearch Dashboards user
112-
nodes_dn.yml: |
113-
---
114-
_meta:
115-
type: nodesdn
116-
config_version: 2
117-
roles.yml: |
118-
---
119-
_meta:
120-
type: roles
121-
config_version: 2
122-
roles_mapping.yml: |
123-
---
124-
_meta:
125-
type: rolesmapping
126-
config_version: 2
127-
128-
all_access:
129-
reserved: false
130-
backend_roles:
131-
- admin
132-
133-
kibana_server:
134-
reserved: true
135-
users:
136-
- kibanaserver
137-
tenants.yml: |
138-
---
139-
_meta:
140-
type: tenants
141-
config_version: 2
142102
---
143103
apiVersion: v1
144104
kind: Secret

0 commit comments

Comments
 (0)