Skip to content
Snippets Groups Projects
Commit 06e9b153 authored by Felipe Cecagno's avatar Felipe Cecagno
Browse files

- update webhooks to use the same message format for bearer auth or checksum

- make ws port configurable on kurento
parent 22bf1e90
No related branches found
No related tags found
No related merge requests found
......@@ -65,10 +65,14 @@ module.exports = class CallbackEmitter extends EventEmitter {
const sharedSecret = process.env.SHARED_SECRET || config.bbb.sharedSecret;
const bearer_auth = process.env.BEARER_AUTH || config.bbb.auth2_0;
if (bearer_auth) {
// Send data as a JSON
data = "[" + this.message + "]";
// data to be sent
// note: keep keys in alphabetical order
data = {
event: "[" + this.message + "]",
timestamp: this.timestamp
};
if (bearer_auth) {
const callbackURL = this.callbackURL;
requestOptions = {
......@@ -83,13 +87,6 @@ module.exports = class CallbackEmitter extends EventEmitter {
};
}
else {
// data to be sent
// note: keep keys in alphabetical order
data = {
event: "[" + this.message + "]",
timestamp: this.timestamp
};
// calculate the checksum
const checksum = Utils.checksum(`${this.callbackURL}${JSON.stringify(data)}${sharedSecret}`);
......
......@@ -18,8 +18,7 @@ USER meteor
RUN cd /source \
&& meteor npm install \
&& meteor build --directory /app \
&& rm -r /source
&& meteor build --directory /app
ENV NODE_ENV production
......
......@@ -7,21 +7,20 @@ RUN apt-get update \
RUN wget https://ubuntu.bigbluebutton.org/repo/bigbluebutton.asc -O- | apt-key add - \
&& add-apt-repository "deb https://ubuntu.bigbluebutton.org/xenial-200-dev bigbluebutton-xenial main" \
&& apt-get update \
&& apt-get -y install kurento-media-server \
&& apt-get -y install kurento-media-server bzip2 jq \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
RUN apt-get update \
&& apt-get install -y bzip2 \
&& apt-get install -y --download-only openh264-gst-plugins-bad-1.5
EXPOSE 8888
COPY ./docker-entrypoint.sh /usr/local/bin/
COPY ./healthchecker.sh /healthchecker.sh
HEALTHCHECK --start-period=15s --interval=30s --timeout=3s --retries=1 CMD /healthchecker.sh
ENV GST_DEBUG=Kurento*:5
ENV PORT=8888
ENTRYPOINT ["docker-entrypoint.sh"]
CMD ["/usr/bin/kurento-media-server"]
#!/bin/bash -x
set -e
#!/bin/bash -e
apt-get install -y openh264-gst-plugins-bad-1.5
echo | tee /etc/kurento/modules/kurento/WebRtcEndpoint.conf.ini
rm -f /etc/kurento/modules/kurento/WebRtcEndpoint.conf.ini
touch /etc/kurento/modules/kurento/WebRtcEndpoint.conf.ini
if [ -n "$KMS_TURN_URL" ]; then
echo "turnURL=$KMS_TURN_URL" | tee -a /etc/kurento/modules/kurento/WebRtcEndpoint.conf.ini
echo "turnURL=$KMS_TURN_URL" >> /etc/kurento/modules/kurento/WebRtcEndpoint.conf.ini
fi
if [ -n "$KMS_STUN_IP" -a -n "$KMS_STUN_PORT" ]; then
# Generate WebRtcEndpoint configuration
echo "stunServerAddress=$KMS_STUN_IP" | tee -a /etc/kurento/modules/kurento/WebRtcEndpoint.conf.ini
echo "stunServerPort=$KMS_STUN_PORT" | tee -a /etc/kurento/modules/kurento/WebRtcEndpoint.conf.ini
echo "stunServerAddress=$KMS_STUN_IP" >> /etc/kurento/modules/kurento/WebRtcEndpoint.conf.ini
echo "stunServerPort=$KMS_STUN_PORT" >> /etc/kurento/modules/kurento/WebRtcEndpoint.conf.ini
fi
cat /etc/kurento/kurento.conf.json | sed '/^[ ]*\/\//d' | jq ".mediaServer.net.websocket.port = $PORT" > /etc/kurento/kurento.conf.json
# Remove ipv6 local loop until ipv6 is supported
cat /etc/hosts | sed '/::1/d' | tee /etc/hosts > /dev/null
exec /usr/bin/kurento-media-server "$@"
exec "$@"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment