Client Authentication
RTMP, RTSP and WebRTC clients must provide the required connection parameters when attempting to establish a connection with the server. The plugin will extract expected parameters and validate their presence locally first, before transmitting them to the remote server.
Given below are some snippets, explaining how authentication can be achieved for different client types.
Authenticating RTMP Clients
RTMP clients must pass authentication parameters (username and password) using the connection arguments.
Username and password should be the first two parameters in the arguments array being sent to Red5 Pro.
With the simpleauth.default.rtmp.queryparams=true
in the plugin configuration file or using the rtmpAllowQueryParamsEnabled
property of configuration bean set to true
, RTMP clients can also pass parameters in the query string.
Example using FFmpeg:
Authenticating RTSP Clients
RTSP clients (Android and IOS) must pass authentication parameters (username and password) using the R5Configuration
object in the Red5 Pro Mobile SDK.
Android Example
IOS Example
Authenticating WebRTC Clients
WebRTC clients (Using Red5 Pro HTML5 SDK) must pass authentication parameters using the connectionParams
property of the baseConfiguration
object.
Example:
TESTING
WebRTC
You can use the HTML5 Publish – Round Trip Authentication and Subscribe – Round Trip Authentication tests to validate round-trip security.
If you have a Red5 Pro autoscale environment, use the HTML5 Stream Manager Proxy Publish – Round Trip Authentication and Stream Manager Proxy Subscribe – Round Trip Authentication tests to validate round-trip security.
iOS
The Publish – Authentication and Subscribe – Authentication use a hard-coded username and password.
Android
The Publish – Authentication and Subscribe – Authentication use a hard-coded username and password.