Installation guide
Restrict access from domains
Bydefault,aclientcanconnecttoFlashMediaServerfromanydomainorIPaddress,whichcan
beasecurityrisk.Youcancreateawhitelistofalloweddomains(orablacklistofbanned
domains)toensurethatonlyauthorizedclientscanconnecttoyourapplicationsorservices.
Youcanaddacomma-delimitedlistofdomainsandIPaddressblocksintheA d a pto r.x m l or
vHost.xml conguration les to add this level of security. is is usually the rst step in locking
downyourserver.Itpreventsmaliciousorunauthorizeddomainsfromfreelyaccessingyour
applications and streams.
Server-side ActionScript
Flash Media Server 3.5 has several user authentication methods available. is section discusses
the server-side ActionScript method to implement a user authentication scheme to validate the
connecting client. For example, using variables passed in through the client NetConnection
method,youcouldimplementasimpleusernameandpassword,anencryptedtoken(MD5Hash),
or a unique key.
• Usercredentials(loginandpassword)
NetConnection.connect(“rtmp...”, “username”, “password”);
• Encryptedtoken(MD5Hash)
NetConnection.connect(“rtmp...”, 6aef79f07bc8f23c38e8979f3630f436);
• Uniquekey
NetConnection.connect(“rtmp...”, 349jh3k4324h9.234234098);
en,ontheserver-side,FlashMediaServerwouldbeabletointegratewithwebservices(SOAP),
FlashRemoting,XML,HTTPPost(loadVars),orsimpleleaccesstovalidatetheclientbased
on the data sent. is authentication scheme could be as simple as checking login information
againstadatabaseorascomplexascreatinganSSL-basedtokensystemusingColdFusion.
Access adaptor plug-in
Improved feature in Flash Media Interactive Server; requires Flash Player 6 or later.
Anaccessadaptorisaserverplug-inwritteninC++thatinterceptsconnectionstotheserverand
determines whether requests should be accepted, rejected, or redirected before the requests reach
the server’s script layer. You can create custom logic in the access adaptor to handle client
connection requests. For example, you could query your account database upon client login and
then update the database record aer the client connection was accepted.
e access adaptor can be congured to accept or reject requests based on the number of clients
currently connected or the amount of bandwidth currently being consumed. You can also set
read and write access for les and folders on the server, set permissions to access audio and video
bitmap data, and inspect client properties through the access adaptor.
When you use the access adaptor, you are catching the connection before it is processed by
FlashMediaServer.Forthisreason,youarelimitedtotrappingonlytheconnectionevents.If
you want to apply additional rules aer the connection is established, you need to congure an
authorization adaptor.
Note: There can only be one Access plug-in per Flash Media Interactive Server installation.
Authorization adaptor plug-in
Feature in Flash Media Interactive Server; requires Flash Player 6 or later.
enextlineofdefenseistheauthorizationadaptor.Aserverplug-inwritteninC++,the
authorization adaptor authorizes client access to server events. Aer the connection has been
established but before it is accepted, the authorization adaptor comes into play.
54