From 4157b4bb2108c891a8be5f96cb7fd9bcb04012da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Fri, 13 Jan 2023 13:31:11 +0100 Subject: [PATCH] Feature: adapt skeleton for wopi / jwt and secret/public keys in base64 format in production --- config/packages/prod/lexik_jwt_authentication.yaml | 10 ++++++++++ config/packages/wopi.yaml | 1 - config/services.yaml | 5 ----- 3 files changed, 10 insertions(+), 6 deletions(-) create mode 100644 config/packages/prod/lexik_jwt_authentication.yaml diff --git a/config/packages/prod/lexik_jwt_authentication.yaml b/config/packages/prod/lexik_jwt_authentication.yaml new file mode 100644 index 0000000..c716985 --- /dev/null +++ b/config/packages/prod/lexik_jwt_authentication.yaml @@ -0,0 +1,10 @@ +lexik_jwt_authentication: + # in production, the secret must be located in an environment variable + # for converting the file to a raw variable, use this command: + # + # cat path/to/private_or_public.pem | base64 -w0 + # + # then copy past the printed string into the dedicated environment variable + secret_key: '%env(base64:resolve:JWT_SECRET_KEY)%' + public_key: '%env(base64:resolve:JWT_PUBLIC_KEY)%' + pass_phrase: '%env(JWT_PASSPHRASE)%' diff --git a/config/packages/wopi.yaml b/config/packages/wopi.yaml index 9d88337..70dd110 100644 --- a/config/packages/wopi.yaml +++ b/config/packages/wopi.yaml @@ -1,3 +1,2 @@ wopi: server: "%env(resolve:WOPI_SERVER)%" - access_token_ttl: 0 diff --git a/config/services.yaml b/config/services.yaml index 0dde044..fdadd7e 100644 --- a/config/services.yaml +++ b/config/services.yaml @@ -35,11 +35,6 @@ services: resource: '../src/Service/' - Chill\WopiBundle\Service\Wopi\ChillWopi: - decorates: ChampsLibres\WopiLib\Contract\Service\WopiInterface - arguments: - $cache: '@cache.user_data' - ChampsLibres\WopiLib\Service\DocumentLockManager: arguments: $cache: '@cache.user_data'