Skip to main content
Participant
Sep 17, 2008 6:53 PM UTC
Question

Security in FMS

Hi guys,

I have FMS on my server but I have 2 questions on security ..

First: How can I make a User & Password request when connecting to the server through FME
Second: How Can I allow and deny specific domains from watching the stream

Regards ,,,,,
    This topic is closed to new replies. Start a new post to keep the conversation going.

    5 replies

    Participant
    Sep 26, 2008 9:56 PM UTC
    nice job man ..

    but excuse me I'm a biginner in ActionScript ... Could you tell me steps from A 2 Z to do in order to make that application :$
    Translate
    Participant
    Sep 25, 2008 12:58 PM UTC
    thnx dear ... but won't this require a password for viewers also ??
    Translate
    Participant
    Sep 25, 2008 6:52 PM UTC
    Not necessary. Depending on password (was it provided or not) you can control writing rights of connected users. To do this simply add

    application.onConnect = function( client, password )
    {
    if ( password != 'myPassword" ) client.writeAccess = "" // which means, that you deny publishing if the password is wrong
    else client.writeAccess = "/myApp/;otherApp/subdirectory;" // which grants write access to specyfied directories
    }
    Translate
    Participant
    Sep 25, 2008 6:51 AM UTC
    Answering your questions:

    First: You need to read a little about server side scripts, but general idea is quite simple. You should connect to FMS using NetConnect.connect('rtmp://fms_address/application', 'myPassword'). Meanwhile you must create server side function that look like this

    application.onConnect = function( client, password )
    {
    if ( password == 'myPassword" ) { grant access here } else { deny access! }
    }

    I must warn you, that you may have some problems accessing NetConnect objects if you use VideoDisplay or FLVPlayback components - I couldn't do it. But I've written my own video player using Video class and everything works fine now becouse I'm creating NetConnect object myself.

    Second: Once again you should read about server side scripts, but in general you should add to the server side function I've written you above another line

    application.onConnect = function( client, password )
    {
    if ( client.ip == "127.0.0.1" ) { do something } else { do something else }
    if ( password == 'myPassword" ) {....} else {....}
    }


    Translate
    Participant
    Sep 24, 2008 7:36 PM UTC
    up
    Translate