Skip to main content
Participant
September 17, 2008
Question

Security in FMS

  • September 17, 2008
  • 4 replies
  • 717 views
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 has been closed for replies.

    4 replies

    Participant
    September 26, 2008
    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 :$
    Participant
    September 25, 2008
    thnx dear ... but won't this require a password for viewers also ??
    Participant
    September 25, 2008
    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
    }
    Participant
    September 25, 2008
    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 {....}
    }


    Participant
    September 24, 2008
    up