Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable to use not-so-secure SSL communication (UnsafeLegacyRenegotiation) in LTC #966

Merged
merged 4 commits into from
Dec 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .env.demo
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .env.dev
Original file line number Diff line number Diff line change
Expand Up @@ -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


##############################################################################
Expand Down
2 changes: 1 addition & 1 deletion .env.test
Original file line number Diff line number Diff line change
Expand Up @@ -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


##############################################################################
Expand Down
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# 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
```
### 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
Expand Down
6 changes: 5 additions & 1 deletion client/docker/Dockerfile.production
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
12 changes: 12 additions & 0 deletions client/docker/passport-oauth2-patch.diff
Original file line number Diff line number Diff line change
@@ -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) {
6 changes: 6 additions & 0 deletions doc/env-settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions version.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
v1.22.2
2023-11-10T11:00:00Z
v1.22.3
2023-12-06T13:00:00Z
Loading