Skip to content

Commit 9a55f63

Browse files
authored
Add plugins.query.datasources.encryption.masterkey (#198)
Signed-off-by: Vamsi Manohar <reddyvam@amazon.com>
1 parent fcbc943 commit 9a55f63

File tree

5 files changed

+26
-10
lines changed

5 files changed

+26
-10
lines changed

.github/workflows/deployment-template.yml

+22-10
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ on:
3838
required: false
3939
kibanaserver:
4040
required: true
41+
query_datasources_master_key:
42+
required: false
4143
jobs:
4244

4345
OS-OSD-Deployment:
@@ -61,7 +63,17 @@ jobs:
6163
GA_TRACKING_ID: ${{ secrets.ga-tracking-id }}
6264
KIBANASERVER: ${{ secrets.kibanaserver }}
6365

64-
- name: Step 2 - Replace Tokens for dashboards
66+
- name: Step 2 - Replace Token in opensearch.yml
67+
if: ${{ (inputs.deploy-env == 'observability') || (inputs.deploy-env == 'dev') }}
68+
uses: cschleiden/replace-tokens@v1
69+
with:
70+
files: '["${{ github.workspace }}/config/playground/helm/${{inputs.deploy-env}}/helm-opensearch.yaml"]'
71+
tokenPrefix: '${'
72+
tokenSuffix: '}'
73+
env:
74+
QUERY_DATASOURCES_MASTER_KEY: ${{ secrets.query_datasources_master_key }}
75+
76+
- name: Step 3 - Replace Tokens for dashboards
6577
uses: cschleiden/replace-tokens@v1
6678
with:
6779
files: '["${{ github.workspace }}/config/playground/helm/${{inputs.deploy-env}}/helm-opensearch-dashboards.yaml"]'
@@ -71,7 +83,7 @@ jobs:
7183
KIBANASERVER: ${{ secrets.kibanaserver }}
7284
GA_TRACKING_ID: ${{ secrets.ga-tracking-id }}
7385

74-
- name: Step 3 - Replace Tokens for logstash configuration
86+
- name: Step 4 - Replace Tokens for logstash configuration
7587
if: ${{ (inputs.deploy-env == 'preview') || (inputs.deploy-env == 'searchapps') || (inputs.deploy-env == 'observability') }}
7688
uses: cschleiden/replace-tokens@v1
7789
with:
@@ -82,7 +94,7 @@ jobs:
8294
OSD_USER: ${{ secrets.osd_user }}
8395
OSD_USER_PASSWORD: ${{ secrets.osd_user_password }}
8496

85-
- name: Step 4 - Replace Tokens for tracing configuration
97+
- name: Step 5 - Replace Tokens for tracing configuration
8698
if: ${{ (inputs.deploy-env == 'preview') || (inputs.deploy-env == 'searchapps') || (inputs.deploy-env == 'observability') }}
8799
uses: cschleiden/replace-tokens@v1
88100
with:
@@ -95,14 +107,14 @@ jobs:
95107
OTEL_ROOT_CA: ${{ secrets.otel_root_ca }}
96108
OTEL_DATA_PREPPER_CERT: ${{ secrets.otel_data_prepper_cert }}
97109

98-
- name: Step 5 - Configure AWS Credentials
110+
- name: Step 6 - Configure AWS Credentials
99111
uses: aws-actions/configure-aws-credentials@v2
100112
with:
101113
aws-access-key-id: ${{ secrets.access-key-id }}
102114
aws-secret-access-key: ${{ secrets.secret-access-key }}
103115
aws-region: ${{ secrets.region }}
104116

105-
- name: Step 6 - Delete Logstash
117+
- name: Step 7 - Delete Logstash
106118
if: ${{ (inputs.deploy-env == 'preview') || (inputs.deploy-env == 'searchapps') || (inputs.deploy-env == 'observability') }}
107119
uses: elastic-analytics/dashboards-action@main
108120
env:
@@ -112,7 +124,7 @@ jobs:
112124
command: |
113125
kubectl delete ns logstash
114126
115-
- name: Step 7 - Delete Tracing
127+
- name: Step 8 - Delete Tracing
116128
if: ${{ (inputs.deploy-env == 'preview') || (inputs.deploy-env == 'searchapps') || (inputs.deploy-env == 'observability') }}
117129
uses: elastic-analytics/dashboards-action@main
118130
env:
@@ -125,7 +137,7 @@ jobs:
125137
kubectl delete -f config/playground/metrics/tracing/preview/otel-collector.yaml
126138
kubectl delete -f config/playground/metrics/tracing/preview/data-prepper.yaml
127139
128-
- name: Step 8 - Deploy OpenSearch and OpenSearch Dashboards By Helm Chart
140+
- name: Step 9 - Deploy OpenSearch and OpenSearch Dashboards By Helm Chart
129141
if: ${{ (inputs.deploy-env == 'searchapps') || (inputs.deploy-env == 'preview') || (inputs.deploy-env == 'observability')}}
130142
uses: elastic-analytics/dashboards-action@main
131143
env:
@@ -146,7 +158,7 @@ jobs:
146158
helm install opensearch opensearch/opensearch -f config/playground/helm/${{inputs.deploy-env}}/helm-opensearch.yaml
147159
helm install dashboards opensearch/opensearch-dashboards -f config/playground/helm/${{inputs.deploy-env}}/helm-opensearch-dashboards.yaml
148160
149-
- name: Step 9 - Deploy OpenSearch/OpenSearch Dashboards/ML By Helm Chart
161+
- name: Step 10 - Deploy OpenSearch/OpenSearch Dashboards/ML By Helm Chart
150162
if: ${{ (inputs.deploy-env == 'dev') || (inputs.deploy-env == 'prod') || (inputs.deploy-env == 'ml') }}
151163
uses: elastic-analytics/dashboards-action@main
152164
env:
@@ -170,7 +182,7 @@ jobs:
170182
helm install dashboards opensearch/opensearch-dashboards -f config/playground/helm/${{inputs.deploy-env}}/helm-opensearch-dashboards.yaml
171183
helm install machinelearning opensearch/opensearch -f config/playground/helm/${{inputs.deploy-env}}/helm-machinelearning.yaml
172184
173-
- name: Step 10 - Install Logstash
185+
- name: Step 11 - Install Logstash
174186
if: ${{ (inputs.deploy-env == 'preview') || (inputs.deploy-env == 'searchapps') || (inputs.deploy-env == 'observability') }}
175187
uses: elastic-analytics/dashboards-action@main
176188
env:
@@ -182,7 +194,7 @@ jobs:
182194
kubectl create -f config/playground/metrics/logstash/preview/logstash-configmap.yaml
183195
kubectl apply -f config/playground/metrics/logstash/preview/logstash.yaml
184196
185-
- name: Step 11 - Install Tracing
197+
- name: Step 12 - Install Tracing
186198
if: ${{ (inputs.deploy-env == 'preview') || (inputs.deploy-env == 'searchapps') || (inputs.deploy-env == 'observability') }}
187199
uses: elastic-analytics/dashboards-action@main
188200
env:

.github/workflows/os-osd-deployment-scheduled.yml

+1
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ jobs:
7474
otel_root_ca: ${{ secrets.OTEL_ROOT_CA }}
7575
otel_data_prepper_cert: ${{ secrets.OTEL_DATA_PREPPER_CERT }}
7676
kibanaserver: ${{ secrets.KIBANASERVER }}
77+
query_datasources_master_key: ${{ secrets.QUERY_DATASOURCES_MASTER_KEY }}
7778

7879
OSD-Functional-Test-Preview:
7980
needs: OS-OSD-Preview-Scheduled-Deployment

.github/workflows/os-osd-deployment.yml

+1
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ jobs:
4646
kube-config: ${{ secrets.KUBE_CONFIG_DATA_DEV }}
4747
ga-tracking-id: ${{ secrets.GA_TRACKING_ID }}
4848
kibanaserver: ${{ secrets.KIBANASERVER }}
49+
query_datasources_master_key: ${{ secrets.QUERY_DATASOURCES_MASTER_KEY }}
4950

5051
OS-OSD-Prod-Deployment:
5152
needs: Pre-Deployment

config/playground/helm/dev/helm-opensearch.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ opensearchHome: /usr/share/opensearch
3030
config:
3131
opensearch.yml: |
3232
cluster.name: opensearch-cluster
33+
plugins.query.datasources.encryption.masterkey: ${QUERY_DATASOURCES_MASTER_KEY}
3334
# Bind to all interfaces because we don't know what IP address Docker will assign to us.
3435
network.host: 0.0.0.0
3536
# # minimum_master_nodes need to be explicitly set when bound on a public IP

config/playground/helm/observability/helm-opensearch.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ opensearchHome: /usr/share/opensearch
3030
config:
3131
opensearch.yml: |
3232
cluster.name: opensearch-cluster
33+
plugins.query.datasources.encryption.masterkey: ${QUERY_DATASOURCES_MASTER_KEY}
3334
# Bind to all interfaces because we don't know what IP address Docker will assign to us.
3435
network.host: 0.0.0.0
3536
# # minimum_master_nodes need to be explicitly set when bound on a public IP

0 commit comments

Comments
 (0)