diff --git a/.env.demo b/.env.demo index af5d8fee0..90fb09887 100644 --- a/.env.demo +++ b/.env.demo @@ -65,7 +65,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 200880373..627780c2a 100644 --- a/.env.dev +++ b/.env.dev @@ -65,7 +65,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 94615adc2..219359460 100644 --- a/.env.test +++ b/.env.test @@ -65,7 +65,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 8bde90c7d..afc9d12b6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,9 +5,9 @@ ### Upgrade requirements - Change environment variable [LAYMAN_CLIENT_VERSION](doc/env-settings.md#LAYMAN_CLIENT_VERSION): ``` - LAYMAN_CLIENT_VERSION=v1.17.1 + LAYMAN_CLIENT_VERSION=v1.17.2 ``` - It was already required in v1.22.2. + It was already required in v1.22.3. - Set new environment variable [LAYMAN_ROLE_SERVICE_URI](doc/env-settings.md#LAYMAN_ROLE_SERVICE_URI) ### Migrations and checks #### Schema migrations @@ -23,10 +23,24 @@ - [GET](doc/rest.md#get-workspace-map)/[PATCH](doc/rest.md#patch-workspace-map) Workspace Map - GET Workspace [Layers](doc/rest.md#get-workspace-layers)/[Maps](doc/rest.md#get-workspace-maps) - GET [Layers](doc/rest.md#get-layers)/[Maps](doc/rest.md#get-maps)/[Publications](doc/rest.md#get-publications) -- All changes from [v1.22.1](#v1221) and [v1.22.2](#v1222). +- All changes from [v1.22.1](#v1221), [v1.22.2](#v1222) and [v1.22.3](#v1223). - [#960](https://github.com/LayerManager/layman/issues/960) Handle WMS requests with HTTP error more efficiently in timgen. - [#962](https://github.com/LayerManager/layman/issues/962) Make values of `layman_metadata.publication_status` and `status` key(s) more consistent in responses of PATCH Workspace [Layer](doc/rest.md#patch-workspace-layer)/[Map](doc/rest.md#patch-workspace-map) and GET Workspace [Layer](doc/rest.md#get-workspace-layer)/[Map](doc/rest.md#get-workspace-map). +## 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 + ``` +### 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 2023-11-10 ### Upgrade requirements 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) { diff --git a/doc/env-settings.md b/doc/env-settings.md index cc49dc551..4736f701e 100644 --- a/doc/env-settings.md +++ b/doc/env-settings.md @@ -122,6 +122,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