Skip to content

Commit e49cdaa

Browse files
wilbrdtkernicPanel
authored andcommitted
🔥(tray) remove legacy cloudfront configuration
Cloudfront signed URLs have been removed from Marsha project. Removing it from the tray.
1 parent c65d640 commit e49cdaa

File tree

7 files changed

+0
-65
lines changed

7 files changed

+0
-65
lines changed

src/tray/templates/services/app/_deploy_base.yml.j2

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,6 @@ spec:
7575
value: "{{ marsha_hosts | map('blue_green_hosts') | join(',') }},marsha-nginx-current"
7676
- name: DJANGO_CSRF_TRUSTED_ORIGINS
7777
value: "{{ marsha_hosts | map('blue_green_hosts') | join(',') | split(',') | map('regex_replace', '^(.*)$', 'https://\\1') | join(',') }},http://marsha-nginx-current"
78-
- name: DJANGO_CLOUDFRONT_PRIVATE_KEY_PATH
79-
value: "{{ marsha_cloudfront_private_key_path }}"
8078
- name: DJANGO_CELERY_DEFAULT_QUEUE
8179
value: "default-queue-{{ deployment_stamp }}"
8280
envFrom:
@@ -93,10 +91,6 @@ spec:
9391
mountPath: /data/media
9492
- name: marsha-v-static
9593
mountPath: /data/static
96-
{% endif %}
97-
{% if marsha_should_sign_requests %}
98-
- mountPath: "{{ marsha_cloudfront_private_key_path | dirname }}"
99-
name: marsha-cloudfront-private-key-secret
10094
{% endif %}
10195
securityContext:
10296
runAsUser: {{ container_uid }}
@@ -114,8 +108,3 @@ spec:
114108
persistentVolumeClaim:
115109
claimName: "{{ marsha_pvc_static_name }}"
116110
{% endif %}
117-
{% if marsha_should_sign_requests %}
118-
- name: marsha-cloudfront-private-key-secret
119-
secret:
120-
secretName: "{{ marsha_cloudfront_private_key_secret_name }}"
121-
{% endif %}

src/tray/templates/services/app/cronjob_pipeline.yml.j2

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,6 @@ items:
5252
value: "marsha-{{ marsha_postgresql_host }}-{{ deployment_stamp }}"
5353
- name: POSTGRES_PORT
5454
value: "{{ marsha_postgresql_port }}"
55-
- name: DJANGO_CLOUDFRONT_PRIVATE_KEY_PATH
56-
value: "{{ marsha_cloudfront_private_key_path }}"
5755
envFrom:
5856
- secretRef:
5957
name: "{{ marsha_secret_name }}"
@@ -63,10 +61,6 @@ items:
6361
volumeMounts:
6462
- name: marsha-configmap
6563
mountPath: /app/src/backend/marsha/configs
66-
{% if marsha_should_sign_requests %}
67-
- mountPath: "{{ marsha_cloudfront_private_key_path | dirname }}"
68-
name: marsha-cloudfront-private-key-secret
69-
{% endif %}
7064
securityContext:
7165
runAsUser: {{ container_uid }}
7266
runAsGroup: {{ container_gid }}
@@ -75,11 +69,6 @@ items:
7569
configMap:
7670
defaultMode: 420
7771
name: marsha-app-{{ deployment_stamp }}
78-
{% if marsha_should_sign_requests %}
79-
- name: marsha-cloudfront-private-key-secret
80-
secret:
81-
secretName: "{{ marsha_cloudfront_private_key_secret_name }}"
82-
{% endif %}
8372
restartPolicy: Never
8473
{% endif %}
8574
{% endfor %}

src/tray/templates/services/app/job_db_migrate.yml.j2

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,6 @@ spec:
4242
value: "{{ marsha_postgresql_port }}"
4343
- name: DJANGO_ALLOWED_HOSTS
4444
value: "{{ marsha_hosts[0] }}"
45-
- name: DJANGO_CLOUDFRONT_SIGNED_URLS_ACTIVE
46-
value: "{{ marsha_should_sign_requests }}"
47-
- name: DJANGO_CLOUDFRONT_PRIVATE_KEY_PATH
48-
value: "{{ marsha_cloudfront_private_key_path }}"
4945
envFrom:
5046
- secretRef:
5147
name: "{{ marsha_secret_name }}"
@@ -54,10 +50,6 @@ spec:
5450
volumeMounts:
5551
- name: marsha-configmap
5652
mountPath: /app/src/backend/marsha/configs
57-
{% if marsha_should_sign_requests %}
58-
- mountPath: "{{ marsha_cloudfront_private_key_path | dirname }}"
59-
name: marsha-cloudfront-private-key-secret
60-
{% endif %}
6153
restartPolicy: Never
6254
securityContext:
6355
runAsUser: {{ container_uid }}
@@ -67,8 +59,3 @@ spec:
6759
configMap:
6860
defaultMode: 420
6961
name: marsha-app-{{ deployment_stamp }}
70-
{% if marsha_should_sign_requests %}
71-
- name: marsha-cloudfront-private-key-secret
72-
secret:
73-
secretName: "{{ marsha_cloudfront_private_key_secret_name }}"
74-
{% endif %}

src/tray/templates/services/app/secret.yml.j2

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,9 @@ data:
1212
DJANGO_AWS_ACCESS_KEY_ID: "{{ MARSHA_VAULT.DJANGO_AWS_ACCESS_KEY_ID | default('secret') | b64encode }}"
1313
DJANGO_AWS_SECRET_ACCESS_KEY: "{{ MARSHA_VAULT.DJANGO_AWS_SECRET_ACCESS_KEY | default('secret') | b64encode }}"
1414
DJANGO_UPDATE_STATE_SHARED_SECRETS: "{{ MARSHA_VAULT.DJANGO_UPDATE_STATE_SHARED_SECRETS | default('secret') | b64encode }}"
15-
DJANGO_CLOUDFRONT_ACCESS_KEY_ID: "{{ MARSHA_VAULT.DJANGO_CLOUDFRONT_ACCESS_KEY_ID | default('secret') | b64encode }}"
16-
DJANGO_CLOUDFRONT_DOMAIN: "{{ MARSHA_VAULT.DJANGO_CLOUDFRONT_DOMAIN | default('foo.com') | b64encode }}"
1715
DJANGO_SCW_EDGE_SERVICE_DOMAIN: "{{ MARSHA_VAULT.DJANGO_SCW_EDGE_SERVICE_DOMAIN | default('foo.com') | b64encode }}"
1816
DJANGO_JWT_SIGNING_KEY: "{{ MARSHA_VAULT.DJANGO_JWT_SIGNING_KEY | default('secret') | b64encode }}"
1917
DJANGO_SECRET_KEY: "{{ MARSHA_VAULT.DJANGO_SECRET_KEY | default('supersecret') | b64encode }}"
20-
DJANGO_AWS_MEDIALIVE_ROLE_ARN: "{{ MARSHA_VAULT.DJANGO_AWS_MEDIALIVE_ROLE_ARN | default('secret') | b64encode }}"
21-
DJANGO_AWS_MEDIAPACKAGE_HARVEST_JOB_ARN: "{{ MARSHA_VAULT.DJANGO_AWS_MEDIAPACKAGE_HARVEST_JOB_ARN | default('secret') | b64encode }}"
2218
{% if MARSHA_VAULT.DJANGO_SENTRY_DSN is defined and MARSHA_VAULT.DJANGO_SENTRY_DSN is not none %}
2319
DJANGO_SENTRY_DSN: "{{ MARSHA_VAULT.DJANGO_SENTRY_DSN | b64encode }}"
2420
{% endif %}

src/tray/templates/services/app/secret_cloudfront_private_key.yml.j2

Lines changed: 0 additions & 13 deletions
This file was deleted.

src/tray/vars/all/main.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,6 @@ marsha_xapi_replicas: 1
3838
marsha_celery_replicas: 1
3939
marsha_django_configuration: "Development"
4040
marsha_secret_name: "marsha-{{ marsha_vault_checksum | default('undefined_marsha_vault_checksum') }}"
41-
marsha_cloudfront_private_key_secret_name: "marsha-sshkey-{{ marsha_vault_checksum | default('undefined_marsha_vault_checksum') }}"
42-
marsha_cloudfront_private_key_path: "/private/.ssh/aws/ssh-privatekey"
43-
# Set this to true if you have configured AWS CloudFront to require requests
44-
# signature with the aforementioned SSH key
45-
marsha_should_sign_requests: true
4641
marsha_activate_http_basic_auth: false
4742
marsha_celery_command:
4843
- celery

src/tray/vars/vault/main.yml.j2

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,5 @@ DJANGO_SECRET_KEY: {{ lookup('password', '/dev/null chars=ascii_lowercase,digits
1818
# DJANGO_AWS_ACCESS_KEY_ID: yourAwsAccessKeyId
1919
# DJANGO_AWS_SECRET_ACCESS_KEY: yourAwsSecretAccessKey
2020

21-
# FIXME uncomment this block and replace with your cloudfront credentials
22-
# You can refer to Marsha's documentation to know what are these variables:
23-
# https://github.com/openfun/marsha/blob/master/docs/env.md#django_cloudfront_access_key_id
24-
# CloudFront User (has to be a root user, cannot be an IAM user)
25-
# DJANGO_CLOUDFRONT_ACCESS_KEY_ID: YourCloudfrontAccessKeyId
26-
# DJANGO_CLOUDFRONT_URL: https://yourCloudfrontUrl
27-
# DJANGO_CLOUDFRONT_PRIVATE_KEY:
28-
2921
# JWT Token
3022
DJANGO_JWT_SIGNING_KEY: {{ lookup('password', '/dev/null chars=ascii_lowercase,digits length=50') }}

0 commit comments

Comments
 (0)