From b8fcfb1de8ec305aebc83cdf9a89d1177765ac29 Mon Sep 17 00:00:00 2001 From: Jiri Kozel Date: Mon, 4 Dec 2023 14:30:50 +0100 Subject: [PATCH 1/4] Start with v1.22.3 --- CHANGELOG.md | 8 ++++++++ version.txt | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4e246d0ee..0bc998960 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## v1.22.3 +### Upgrade requirements +### Migrations and checks +#### Schema migrations +#### Data migrations +### Changes + + ## v1.22.2 2023-11-10 ### Upgrade requirements diff --git a/version.txt b/version.txt index 8530c0fe3..2ff614810 100644 --- a/version.txt +++ b/version.txt @@ -1,2 +1,2 @@ -v1.22.2 -2023-11-10T11:00:00Z +v1.22.3-dev +2023-11-10T11:00:01Z From eefb9fa1cc5fc6e1cc166ec1f66747ed45d50cd7 Mon Sep 17 00:00:00 2001 From: Jiri Kozel Date: Mon, 4 Dec 2023 14:38:26 +0100 Subject: [PATCH 2/4] Improve logging in Layman Test Client related to Passport.js --- CHANGELOG.md | 1 + client/docker/Dockerfile.production | 6 +++++- client/docker/passport-oauth2-patch.diff | 12 ++++++++++++ 3 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 client/docker/passport-oauth2-patch.diff diff --git a/CHANGELOG.md b/CHANGELOG.md index 0bc998960..7daf7ef2c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ #### Schema migrations #### Data migrations ### Changes +- Improve logging in Layman Test Client related to Passport.js. ## v1.22.2 diff --git a/client/docker/Dockerfile.production b/client/docker/Dockerfile.production index 8d0f82a54..3054ba7e9 100644 --- a/client/docker/Dockerfile.production +++ b/client/docker/Dockerfile.production @@ -3,7 +3,7 @@ FROM node:18-alpine RUN mkdir /code WORKDIR /code -RUN apk update && apk add wget +RUN apk update && apk add wget patch ARG LAYMAN_CLIENT_VERSION # https://stackoverflow.com/a/42144033 @@ -15,6 +15,10 @@ RUN wget "https://github.com/LayerManager/layman-test-client/archive/$LAYMAN_CLI RUN npm ci +COPY docker/passport-oauth2-patch.diff /code/ +RUN patch node_modules/passport-oauth2/lib/strategy.js < passport-oauth2-patch.diff +RUN rm passport-oauth2-patch.diff + ARG LTC_BASEPATH RUN test -n "LTC_BASEPATH" ENV LTC_BASEPATH=$LTC_BASEPATH diff --git a/client/docker/passport-oauth2-patch.diff b/client/docker/passport-oauth2-patch.diff new file mode 100644 index 000000000..24cffa4d4 --- /dev/null +++ b/client/docker/passport-oauth2-patch.diff @@ -0,0 +1,12 @@ +@@ -174,7 +174,10 @@ + + self._oauth2.getOAuthAccessToken(code, params, + function(err, accessToken, refreshToken, params) { +- if (err) { return self.error(self._createOAuthError('Failed to obtain access token', err)); } ++ if (err) { ++ console.warn("Failed to obtain access token: ", err); ++ return self.error(self._createOAuthError('Failed to obtain access token', err)); ++ } + if (!accessToken) { return self.error(new Error('Failed to obtain access token')); } + + self._loadUserProfile(accessToken, function(err, profile) { From 33955c3de5a2a9f55cd584d53dcf0585fefe1c4d Mon Sep 17 00:00:00 2001 From: Jiri Kozel Date: Wed, 6 Dec 2023 11:16:44 +0100 Subject: [PATCH 3/4] Enable to use not-so-secure SSL communication (UnsafeLegacyRenegotiation) in LTC --- .env.demo | 2 +- .env.dev | 2 +- .env.test | 2 +- CHANGELOG.md | 8 ++++++++ doc/env-settings.md | 6 ++++++ 5 files changed, 17 insertions(+), 3 deletions(-) diff --git a/.env.demo b/.env.demo index 34f0e7951..90db7b4c1 100644 --- a/.env.demo +++ b/.env.demo @@ -64,7 +64,7 @@ LAYMAN_CLIENT_URL=http://layman_client:3000/client/ # client LAYMAN_CLIENT_PUBLIC_URL=http://localhost/client/ -LAYMAN_CLIENT_VERSION=v1.17.1 +LAYMAN_CLIENT_VERSION=v1.17.2 # extra hosts to be added to /etc/hosts EXTRA_HOST1=1.2.3.4:1.2.3.4 diff --git a/.env.dev b/.env.dev index 6b54684a2..860c94f59 100644 --- a/.env.dev +++ b/.env.dev @@ -64,7 +64,7 @@ LAYMAN_CLIENT_URL=http://layman_client:3000/client/ # client LAYMAN_CLIENT_PUBLIC_URL=http://localhost:3000/client/ -LAYMAN_CLIENT_VERSION=v1.17.1 +LAYMAN_CLIENT_VERSION=v1.17.2 ############################################################################## diff --git a/.env.test b/.env.test index 87414b6c8..58c47c4f9 100644 --- a/.env.test +++ b/.env.test @@ -64,7 +64,7 @@ LAYMAN_CLIENT_URL=http://layman_client_test:3000/client/ # client LAYMAN_CLIENT_PUBLIC_URL=http://layman_test_run_1:8000/client/ -LAYMAN_CLIENT_VERSION=v1.17.1 +LAYMAN_CLIENT_VERSION=v1.17.2 ############################################################################## diff --git a/CHANGELOG.md b/CHANGELOG.md index 7daf7ef2c..59d90a913 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,11 +2,19 @@ ## v1.22.3 ### Upgrade requirements +- Change environment variable [LAYMAN_CLIENT_VERSION](doc/env-settings.md#LAYMAN_CLIENT_VERSION): + ``` + LAYMAN_CLIENT_VERSION=v1.17.2 + ``` ### Migrations and checks #### Schema migrations #### Data migrations ### Changes - Improve logging in Layman Test Client related to Passport.js. +- [968](https://github.com/LayerManager/layman/issues/968) Enable to use not-so-secure SSL communication (UnsafeLegacyRenegotiation) in Layman Test Client. It can be activated by environment variable [NODE_OPTIONS](doc/env-settings.md#NODE_OPTIONS): + ``` + NODE_OPTIONS="--openssl-config=/code/unsafe_openssl.cnf" + ``` ## v1.22.2 diff --git a/doc/env-settings.md b/doc/env-settings.md index b47fc6f8d..2ad9eceef 100644 --- a/doc/env-settings.md +++ b/doc/env-settings.md @@ -119,6 +119,12 @@ See [`secret` at express-session documentation](https://www.npmjs.com/package/ex ### LTC_SESSION_MAX_AGE See [`cookie.maxAge` at express-session documentation](https://www.npmjs.com/package/express-session#cookiemaxage). + +### NODE_OPTIONS +See [NODE_OPTIONS](https://nodejs.org/docs/latest-v18.x/api/cli.html#node_optionsoptions). + +To enable not-so-secure SSL communication (UnsafeLegacyRenegotiation), set `NODE_OPTIONS="--openssl-config=/code/unsafe_openssl.cnf"`. + ## Connection to Redis ### LAYMAN_REDIS_URL From 936aa9122a9975ecc9f9d97ea9f498107844f793 Mon Sep 17 00:00:00 2001 From: Jiri Kozel Date: Wed, 6 Dec 2023 11:40:18 +0100 Subject: [PATCH 4/4] Release v1.22.3 --- CHANGELOG.md | 4 +--- version.txt | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 59d90a913..c1339dcd0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,14 +1,12 @@ # Changelog ## v1.22.3 + 2023-12-06 ### Upgrade requirements - Change environment variable [LAYMAN_CLIENT_VERSION](doc/env-settings.md#LAYMAN_CLIENT_VERSION): ``` LAYMAN_CLIENT_VERSION=v1.17.2 ``` -### Migrations and checks -#### Schema migrations -#### Data migrations ### Changes - Improve logging in Layman Test Client related to Passport.js. - [968](https://github.com/LayerManager/layman/issues/968) Enable to use not-so-secure SSL communication (UnsafeLegacyRenegotiation) in Layman Test Client. It can be activated by environment variable [NODE_OPTIONS](doc/env-settings.md#NODE_OPTIONS): diff --git a/version.txt b/version.txt index 2ff614810..1b66ecdf7 100644 --- a/version.txt +++ b/version.txt @@ -1,2 +1,2 @@ -v1.22.3-dev -2023-11-10T11:00:01Z +v1.22.3 +2023-12-06T13:00:00Z