ant-media / Ant-Media-Server

Ant Media Server is a live streaming engine software that provides adaptive, ultra low latency streaming by using WebRTC technology with ~0.5 seconds latency. Ant Media Server is auto-scalable and it can run on-premise or on-cloud.
https://antmedia.io
Other
4.16k stars 618 forks source link

Allow to reduce the the Length of URL in JWT filter #5926

Open USAMAWIZARD opened 6 months ago

USAMAWIZARD commented 6 months ago

Is your feature request related to a problem? Please describe.

To publish the stream we are using AMS RTMP server url with JWT token filter. And our stream url is around 300 characters and and we need to restrict stream url length within 128 chars due to camera vendor validation.

Example stream url length: rtmp://domain.com/WebRTCAppEE/stream_rtmp_a4e5669a-9796-439c-9930-d6334d924f98?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdHJlYW1JZCI6InN0cmVhbV9ydG1wX2E0ZTU2NjlhLTk3OTYtNDM5Yy05OTMwLWQ2MzM0ZDkyNGY5OCIsInR5cGUiOiJwdWJsaXNoIiwiZXhwIjoyMDE1NzU1MTc0fQ.cK0f3XqBeY07qYgB-iiTQdp8c4pO_mtWtPZ-gyjdQ1Y

We use various cameras which have various different restriction related to URL Length.

HI SHARP: supports maximum 140 characters. Uniview: supports maximum 256 characters. Geo vision: supports maximum 256 characters. Describe the solution you'd like

A clear and concise description of what you want to happen.

May be add option to reduce the URL size.

mekya commented 2 months ago

Hi @USAMAWIZARD,

As a workaround solution, I can recommend using other tokens(Hash-based, One-Time token).

If there is a request coming from customer side and JWT is must, we can investigate if it's possible.

PS: Investigation expertise is at the beginner level and implementation expertise is likely at intermediate level

Cheers Oguz