Skip to content

Commit 49c74f0

Browse files
committed
Merge branch 'release/v1.3'
2 parents 3865a9c + 65a72f8 commit 49c74f0

6 files changed

Lines changed: 31 additions & 119 deletions

File tree

config/packages/dev/framework.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
framework:
2+
session:
3+
handler_id: ~
4+
cookie_secure: false
5+

config/packages/framework.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ framework:
66
secret: '%env(APP_SECRET)%'
77
session:
88
handler_id: ~
9+
cookie_secure: true
10+
cookie_httponly: true
911
templating:
1012
engines: ['twig']
1113
csrf_protection: false

config/packages/lexik_jwt_authentication.yaml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,15 @@ lexik_jwt_authentication:
44
secret_key: '%kernel.root_dir%/../var/jwt/private.pem'
55
public_key: '%kernel.root_dir%/../var/jwt/public.pem'
66
pass_phrase: '%env(JWT_PASSPHRASE)%'
7-
token_ttl: '%env(JWT_TOKEN_TTL)%'
7+
token_ttl: '%env(JWT_TOKEN_TTL)%'
8+
token_extractors:
9+
# look for a token as Authorization Header
10+
authorization_header:
11+
enabled: false
12+
prefix: Bearer
13+
name: Authorization
14+
15+
# check token in a cookie
16+
cookie:
17+
enabled: true
18+
name: token

config/packages/security.yaml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,6 @@ security:
3232
anonymous: false
3333
context: admin
3434
provider: fos.user.provider
35-
share:
36-
pattern: "^/api/share/[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
37-
provider: fos.user.provider
38-
stateless: true
39-
anonymous: ~
40-
logout: ~
41-
guard:
42-
authenticators:
43-
- App\Security\ShareAuthenticator
4435
srp:
4536
pattern: ^/api/auth/srpp
4637
stateless: true

k8s/deployment.yaml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,14 @@ spec:
5454
containerPort: 9000
5555
volumeMounts:
5656
- mountPath: /var/www/html/public
57-
name: caesar-shared-static
57+
name: caesar-static-files
5858
- mountPath: /var/www/html/var/jwt
5959
name: caesar-certificate
6060
- name: nginx
6161
image: "nginx:alpine"
6262
imagePullPolicy: IfNotPresent
63+
securityContext:
64+
runAsUser: 0
6365
ports:
6466
- name: http
6567
containerPort: 80
@@ -68,23 +70,26 @@ spec:
6870
name: nginx-config-volume
6971
subPath: nginx.conf
7072
- mountPath: /var/www/html/public
71-
name: caesar-shared-static
73+
name: caesar-static-files
7274
initContainers:
7375
- name: copy-public
7476
image: "caesarteam/caesar-server:${CICD_GIT_BRANCH}"
7577
imagePullPolicy: IfNotPresent
7678
command: [ "/bin/cp", "-r", "public/.", "public_site/" ]
7779
volumeMounts:
7880
- mountPath: /var/www/html/public_site
79-
name: caesar-shared-static
81+
name: caesar-static-files
82+
securityContext:
83+
runAsUser: 82
84+
runAsGroup: 82
85+
fsGroup: 82
8086
volumes:
8187
- name: caesar-certificate
8288
persistentVolumeClaim:
8389
claimName: caesar-certificate
84-
- name: caesar-shared-static
85-
emptyDir:
86-
medium: Memory
87-
sizeLimit: "1Gi"
90+
- name: caesar-static-files
91+
persistentVolumeClaim:
92+
claimName: caesar-static-files
8893
- configMap:
8994
defaultMode: 256
9095
name: nginx-config

src/Security/ShareAuthenticator.php

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

0 commit comments

Comments
 (0)