From 286a89a9cc82703557370c90536b5362578ca2af Mon Sep 17 00:00:00 2001 From: chandi Date: Wed, 21 Oct 2020 19:26:01 +0200 Subject: [PATCH 1/3] etherpad: add skin and additional changes from the fork --- .gitmodules | 6 ++++++ mod/etherpad/Dockerfile | 27 ++++++++++++++------------- mod/etherpad/bbb-etherpad-plugin | 1 + mod/etherpad/bbb-etherpad-skin | 1 + mod/etherpad/settings.json | 28 +++++++++++++++++++++------- 5 files changed, 43 insertions(+), 20 deletions(-) create mode 160000 mod/etherpad/bbb-etherpad-plugin create mode 160000 mod/etherpad/bbb-etherpad-skin diff --git a/.gitmodules b/.gitmodules index a504ee2..8afffbd 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,9 @@ [submodule "bbb-webrtc-sfu"] path = bbb-webrtc-sfu url = https://github.com/bigbluebutton/bbb-webrtc-sfu.git +[submodule "mod/etherpad/bbb-etherpad-skin"] + path = mod/etherpad/bbb-etherpad-skin + url = https://github.com/alangecker/bbb-etherpad-skin +[submodule "mod/etherpad/bbb-etherpad-plugin"] + path = mod/etherpad/bbb-etherpad-plugin + url = https://github.com/alangecker/bbb-etherpad-plugin diff --git a/mod/etherpad/Dockerfile b/mod/etherpad/Dockerfile index d6aaa0f..a56835e 100644 --- a/mod/etherpad/Dockerfile +++ b/mod/etherpad/Dockerfile @@ -2,20 +2,21 @@ FROM etherpad/etherpad:1.8.6 USER root -# install etherpad plugins -# - ep_delete_after_delay_lite -# - ep_redis_publisher RUN apt-get update \ - && apt-get install -y git \ - && npm install ep_delete_after_delay_lite git+https://git@github.com/pedrobmarin/ep_redis_publisher.git - -# apply "Including more data at pad update event" -# https://github.com/mconf/etherpad-lite/commit/5bc37fc92714e82165386dc0a5dd467609169a87 -# this is a necessary patch for the closed captions -RUN sed -i "s|hooks\.callAll(\"padUpdate\".*)|hooks\.callAll(\"padUpdate\", {'pad':this, 'author': author, 'revs': newRev, 'changeset': aChangeset});|" /opt/etherpad-lite/src/node/db/Pad.js - -COPY settings.json /opt/etherpad-lite/settings.json -COPY entrypoint.sh /entrypoint.sh + && apt-get install -y git USER etherpad + +RUN npm install \ + ep_delete_after_delay_lite \ + git+https://git@github.com/pedrobmarin/ep_redis_publisher.git + +# add skin from git submodule +COPY --chown=etherpad:0 ./bbb-etherpad-skin /opt/etherpad-lite/src/static/skins/bigbluebutton + +# add plugin from git submodule +COPY --chown=etherpad:0 ./bbb-etherpad-plugin /opt/etherpad-lite/node_modules/ep_bigbluebutton_patches + +COPY settings.json /opt/etherpad-lite/settings.json +COPY entrypoint.sh /entrypoint.sh ENTRYPOINT ["/entrypoint.sh"] \ No newline at end of file diff --git a/mod/etherpad/bbb-etherpad-plugin b/mod/etherpad/bbb-etherpad-plugin new file mode 160000 index 0000000..6c28508 --- /dev/null +++ b/mod/etherpad/bbb-etherpad-plugin @@ -0,0 +1 @@ +Subproject commit 6c28508afde7c10aeec64403c43bf909cae60c74 diff --git a/mod/etherpad/bbb-etherpad-skin b/mod/etherpad/bbb-etherpad-skin new file mode 160000 index 0000000..05ad435 --- /dev/null +++ b/mod/etherpad/bbb-etherpad-skin @@ -0,0 +1 @@ +Subproject commit 05ad435b3e935c2563b69bc5b937d1f3fd50fe5a diff --git a/mod/etherpad/settings.json b/mod/etherpad/settings.json index c5bd1a9..768e67f 100644 --- a/mod/etherpad/settings.json +++ b/mod/etherpad/settings.json @@ -80,7 +80,7 @@ * - "colibris": the new experimental skin (since Etherpad 1.8), candidate to * become the default in Etherpad 2.0 */ - "skinName": "no-skin", + "skinName": "bigbluebutton", /* * IP and port which etherpad should bind at @@ -312,14 +312,26 @@ "trustProxy": true, /* - * When embedding the pads in an iframe set this to true. - */ - "forceSameSiteNone": false, - + * Settings controlling the session cookie issued by Etherpad. + */ + "cookie": { + /* + * Value of the SameSite cookie property. "Lax" is recommended unless + * Etherpad will be embedded in an iframe from another site, in which case + * this must be set to "None". Note: "None" will not work (the browser will + * not send the cookie to Etherpad) unless https is used to access Etherpad + * (either directly or via a reverse proxy with "trustProxy" set to true). + * + * "Strict" is not recommended because it has few security benefits but + * significant usability drawbacks vs. "Lax". See + * https://stackoverflow.com/q/41841880 for discussion. + */ + "sameSite": "None" + }, /* * Privacy: disable IP logging */ - "disableIPlogging": false, + "disableIPlogging": true, /* * Time (in seconds) to automatically reconnect pad when a "Force reconnect" @@ -527,6 +539,8 @@ */ ] - } // logconfig + }, // logconfig + /* Override any strings found in locale directories */ + "customLocaleStrings": {} } \ No newline at end of file From 95daedfc0ea77988da2a482f0f72201efb7ea7d7 Mon Sep 17 00:00:00 2001 From: chandi Date: Wed, 21 Oct 2020 19:26:25 +0200 Subject: [PATCH 2/3] nginx: reenable authorization for notes --- mod/nginx/bbb/notes.nginx | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/mod/nginx/bbb/notes.nginx b/mod/nginx/bbb/notes.nginx index ea8705d..a802dc0 100644 --- a/mod/nginx/bbb/notes.nginx +++ b/mod/nginx/bbb/notes.nginx @@ -11,14 +11,8 @@ location /pad/p/ { proxy_set_header X-Forwarded-Proto https; # for EP to set secure cookie flag when https is used proxy_http_version 1.1; - # there is currently no viable source for building the - # bbb-etherpad including sesstiontokens which got introduced in v2.2.21 - # https://github.com/bigbluebutton/bigbluebutton/issues/10159 - # - # We disable the authentication for now. - - # auth_request /bigbluebutton/connection/checkAuthorization; - # auth_request_set $auth_status $upstream_status; + auth_request /bigbluebutton/connection/checkAuthorization; + auth_request_set $auth_status $upstream_status; } location /pad { @@ -53,8 +47,8 @@ location /pad/socket.io { proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "Upgrade"; - # auth_request /bigbluebutton/connection/checkAuthorization; - # auth_request_set $auth_status $upstream_status; + auth_request /bigbluebutton/connection/checkAuthorization; + auth_request_set $auth_status $upstream_status; } location /static { From 70fdf23594ed685c9bb7bb859df42c0d5fd2619e Mon Sep 17 00:00:00 2001 From: chandi Date: Wed, 21 Oct 2020 21:26:22 +0200 Subject: [PATCH 3/3] added changelog entry --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0afe888..fc40f0d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## Unreleased - Applied v2.2.28 changes @alangecker +- Etherpad skin & plugin #69 @alangecker - Updated `development.md` docs (example config & note about issue #66) @alangecker - Allow setting the breakout room limit @alangecker