Skip to content

Commit f3f741f

Browse files
DPTS-1286 Fixes for s3 encryption (#68)
* DPTS-1268 Updated the DB Host parameter * DPTS-1268 Reset to pipeline RDS * DPTS-1268 Add s3 copy encryption * DPTS-1268 Revertng security group * DPTS-1268 Add service side encryption to copy olbject
1 parent 87f79e7 commit f3f741f

File tree

5 files changed

+6
-5
lines changed

5 files changed

+6
-5
lines changed

application/utilities/s3.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ def copy_object(self, bucket, file, event, start):
3030
Bucket=bucket,
3131
CopySource="{}/{}".format(bucket, file),
3232
Key="{}/archive/{}".format(file.split("/")[0], file.split("/")[1]),
33+
ServerSideEncryption='AES256',
3334
)
3435
return response
3536
except ClientError as e:

build/automation/lib/aws.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,15 +171,15 @@ aws-s3-upload: ### Upload file to bucket - mandatory: FILE=[local path (inside c
171171
make -s docker-run-tools ARGS="$$(echo $(AWSCLI) | grep awslocal > /dev/null 2>&1 && echo '--env LOCALSTACK_HOST=$(LOCALSTACK_HOST)' ||:)" CMD=" \
172172
$(AWSCLI) s3 cp \
173173
$(FILE) \
174-
s3://$(URI) \
174+
s3://$(URI) --sse AES256 \
175175
$(ARGS) \
176176
"
177177

178178
aws-s3-download: ### Download file from bucket - mandatory: URI=[remote path],FILE=[local path (inside container)]; optional: ARGS=[S3 cp options]
179179
make -s docker-run-tools ARGS="$$(echo $(AWSCLI) | grep awslocal > /dev/null 2>&1 && echo '--env LOCALSTACK_HOST=$(LOCALSTACK_HOST)' ||:)" CMD=" \
180180
$(AWSCLI) s3 cp \
181181
s3://$(URI) \
182-
$(FILE) \
182+
$(FILE) --sse AES256 \
183183
$(ARGS) \
184184
"
185185

build/automation/var/profile/integration.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ TF_VAR_hk_integration_tester_lambda_function_name = $(PROJECT_ID)-$(ENV)-$(TF_VA
3232
# Lambda layer
3333
TF_VAR_uec_dos_tasks_python_libs = uec-dos-tasks-python-libs
3434

35-
TF_VAR_db_security_group_name = uec-core-dos-integration-datastore-sg
35+
TF_VAR_db_security_group_name = uec-core-dos-pipeline-datastore-sg
3636

3737
# Build slack secrets
3838
TF_VAR_sm_required = true

build/automation/var/profile/nonprod.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,4 @@ TF_VAR_splunk_firehose_role := dos_cw_w_events_firehose_access_role
2727

2828
LAMBDA_VERSIONS_TO_RETAIN = 5
2929

30-
TF_VAR_db_security_group_name = uec-core-dos-integration-datastore-sg
30+
TF_VAR_db_security_group_name = uec-core-dos-pipeline-datastore-sg

build/jenkins/Jenkinsfile.hk-integration

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ pipeline {
3535
DB_SUFFIX = 'tasks'
3636
PIPELINE_DATABASE = "${DB_PREFIX}_${ENVIRONMENT}"
3737
BUCKET = "uec-dos-tasks-${PROFILE}-housekeeping-bucket/${ENVIRONMENT}"
38-
DB_HOST = 'uec-core-dos-integration-data.dos-db-rds'
38+
DB_HOST = 'uec-core-dos-pipeline-primary.dos-db-rds'
3939
SLACK_CHANNEL = 'dos-tasks-integration-notifications'
4040
PATHWAYSDOS_V4_BRANCH = 'develop'
4141
BRANCH_NAME = sh(returnStdout: true, script: "make git-branch-format BRANCH_NAME=${GIT_BRANCH}").trim()

0 commit comments

Comments
 (0)