mozilla / janus-plugin-sfu

Janus plugin to act as a kind of SFU for game networking data.
Mozilla Public License 2.0
135 stars 40 forks source link

Accept JWT tokens authorizing kick, join messages #29

Closed mqp closed 5 years ago

mqp commented 5 years ago

You can now send a JWT token with join and (brand new) kick signalling messages. The tokens currently have no effect, and the kick message does nothing yet. However, if provided, they will be validated against the signing key provided in the configuration file, and the log will show whether validation succeeded or failed. This should help us test things out before we actually start putting things behind auth barriers.

The signing key should be provided in DER format in a path given by the auth_key configuration key. For example, to generate a keypair (via):

ssh-keygen -t rsa -b 2048 -f key.pem -N ''
openssl rsa -in key.pem -outform PEM -pubout -out public.pem
openssl rsa -in key.pem -outform DER -out key.der
openssl rsa -in key.der -inform DER -RSAPublicKey_out -outform DER -out public.der
# sign JWTs with private key, point your config file to public.der