bigbluebutton-Github/build/packages-template/bbb-webrtc-sfu/webrtc-sfu.nginx
prlanzarin 6225042148 feat: add user name to checkAuthorization response
Audio's callerId depends on the user name and there isn't
an "on-demand" way of fetching that field internally, making callerId
assembly with trusted attributes (server-side generated) impossible in
bbb-webrtc-sfu.

The new extra header (User-Name, mapped to user_name in the proxied
connection) allows fetching the user name field in a cheap way and
consequently provides a cheap+safe way of assembling the callerId.

Alternatives I've considered but discarded:
  - a new akka-apps req-resp pair for fetching the user name (+overhead)
  - a new akka-apps req-resp pair for generating the callerId (+overhead)
  - piggybacking on GetMicrophonePermissionReq/Resp to generate the
    callerId (same overhead, but mixing responsabilities)
2022-06-28 20:33:36 +00:00

25 lines
925 B
Nginx Configuration File

location /bbb-webrtc-sfu {
auth_request /bigbluebutton/connection/checkAuthorization;
auth_request_set $auth_status $upstream_status;
# Extra variables are annotated by bbb-web as custom headers
auth_request_set $user_id $sent_http_user_id;
auth_request_set $meeting_id $sent_http_meeting_id;
auth_request_set $voice_bridge $sent_http_voice_bridge;
auth_request_set $user_name $sent_http_user_name;
proxy_pass http://127.0.0.1:3008;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
# Following custom headers are used by bbb-webrtc-sfu
proxy_set_header User-Id $user_id;
proxy_set_header Meeting-Id $meeting_id;
proxy_set_header Voice-Bridge $voice_bridge;
proxy_set_header User-Name $user_name;
proxy_read_timeout 60s;
proxy_send_timeout 60s;
client_body_timeout 60s;
send_timeout 60s;
}