-
Notifications
You must be signed in to change notification settings - Fork 641
JWT REST API Filter for Web Management Panel REST Services
Some REST commands which are not Application-specific, such as creating and deleting an app, creating a new user, etc, require an Authentication Filter by logging in to the Web Management Panel. This creates some limitations for people who don't want to use the web panel every time and want access to all of the REST commands. We have created a new JWT filter for those commands which will make you have access to all REST commands without logging on to the management panel.
To enable Jwt Filter for web management panel REST commands, first, change the file at
ant-media-server-directory/webapps/root/WEB-INF/web.xml
Find and replace the Authentication Filter lines
<filter>
<filter-name>AuthenticationFilter</filter-name>
<filter-class>io.antmedia.console.rest.AuthenticationFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>AuthenticationFilter</filter-name>
<url-pattern>/rest/*</url-pattern>
</filter-mapping>
with the lines below
<filter>
<filter-name>JWTServerFilter</filter-name>
<filter-class>io.antmedia.console.rest.JWTServerFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>JWTServerFilter</filter-name>
<url-pattern>/rest/*</url-pattern>
</filter-mapping>
Be aware that this disables Authentication filter and the management web panel will not be accessible from the browser.
Second, find and change the file
ant-media-server-directory/conf/red5.properties
The default lines are
server.jwtServerControlEnabled=false
server.jwtServerSecretKey=
Change the lines as
server.jwtServerControlEnabled=true
server.jwtServerSecretKey= your-secret-key-at-least-32-character
Then, you can use all management panel REST commands using a header same as the normal REST API commands as in the link below. More information about JWT Filter can be found here https://github.com/ant-media/Ant-Media-Server/wiki/JWT-REST-API-Filter
- Introduction
- Quick Start
- Installation
- Publishing Live Streams
- Playing Live Streams
- Conference Call
- Peer to Peer Call
- Adaptive Bitrate(Multi-Bitrate) Streaming
- Data Channel
- Video on Demand Streaming
- Simulcasting to Social Media Channels
- Clustering & Scaling
- Monitor Ant Media Servers with Apache Kafka and Grafana
- WebRTC SDKs
- Security
- Integration with your Project
- Advanced
- WebRTC Load Testing
- TURN Servers
- AWS Wavelength Deployment
- Multi-Tenancy Support
- Monitor Ant Media Server with Datadog
- Clustering in Alibaba
- Playlist
- Kubernetes
- Time based One Time Password
- Kubernetes Autoscaling
- Kubernetes Ingress
- How to Install Ant Media Server on EKS
- Release Tests
- Spaceport Volumetric Video
- WebRTC Viewers Info
- Webhook Authentication for Publishing Streams
- Recording Streams
- How to Update Ant Media Server with Cloudformation
- How to Install Ant Media Server on GKE
- Ant Media Server on Docker Swarm
- Developer Quick Start
- Recording HLS, MP4 and how to recover
- Re-streaming update
- Git Branching
- UML Diagrams