RealServer authentication provides a way for you to control what or who can access your RealServer, whether it is an encoder sending a stream, a colleague perusing RealSystem Administrator, or a user viewing content for which they've paid.
Authentication verifies the identity of the users or software that make requests of RealServer. The verification can come in the form of asking for a name and password, or it can be hidden from the user.
You can require a name and password for the following RealServer areas:
The names of authorized users for each item above are stored in separate databases. One database stores the names for the authorized encoder users, another stores names of other administrators, and still another stores names of people who can view presentations. You can set up additional authentication areas and databases.
RealServer identifies requests (in the form of URLs) for secure content by the mount point. The URL must contain the mount point, and it may contain additional directory information. Encoders are an exception to this-RealServer looks at the port number at which live data arrives in deciding whether it should accept the connection.
![]() |
Additional Information |
---|
To limit visitors to RealServer via bandwidth, connection volume, client version, or IP address, use the methods described in Chapter 14, "Limiting Access to RealServer". |
RealPlayer versions 3 and earlier do not work with authentication and may display an error message. RealPlayer 4 works with player validation only. RealPlayer 5 and later support both player validation and user authentication.
The following are factors in deciding to use this feature:
Authentication works with all other RealServer features. There are few special considerations for each feature, however.
All on-demand files stored in the Secure
directory (or in any subdirectories) are authenticated automatically, once the authentication feature has been set up.
Once the authentication feature has been set up, live broadcasts are authenticated automatically if they include /secure/
as part of the path when you encode the events.
Archived files are on-demand files; they can be authenticated if they are moved to the correct location first. They must be placed in the Secure
directory or in a subdirectory of Secure
, or the archiving feature must be configured to use the Secure
directory.
Just like any other live event, broadcasts created by G2SLTA can be authenticated, as long as you include /secure/
in the path you type for livefile
. For an example, see "Unicasted Live Content (from Encoders)".
If you are sending a stream to a RealServer that is acting as a receiver, you must put copies of all the databases that store authentication information on the receiver. This distributes the authentication load.
In both back-channel and scalable multicasts, the user or client is authenticated through the initial control channel connection. Be sure the multicast (either /
or /scalable/
) path is on the list of Commerce Rules.
RealProxy makes requests on behalf of clients, and caches the streams it receives. Although RealProxy stores the streamed data, it requires a control channel between the requesting client and RealServer. RealServer uses the control channel to request and receive authentication information.
Authentication is performed over the two-way control channel. As long as the client can establish a connection through the firewall to RealServer, all material can be authenticated for clients who are behind firewalls.
The access control feature, which checks the client's IP address against a list of allowed addresses, takes place before authentication. So if a client's IP address is blocked, authentication will not take place. If you have users who should be able to play secure material are receiving error messages, check the list of access rules to see if their client's address is disallowed.
Authentication of content cannot be applied to the files of ISP-hosted customers. Their material is always available. Depending on the access needs, you may be able to apply access control rules so that customers can allow or deny certain users' access to content.
You can monitor which secure presentations are in use by viewing the paths of the files in Java Monitor. Those that contain the /secure/
mount point are authenticated.
Efforts to authenticate users are not included in the access log; records are created for successful serves. You can identify authenticated material in the access log by the GET
statement; secure material always contains the /secure/
mount point in the path.
In addition, connection attempts for authenticated material are stored in the accesslog.txt
file in the Logs directory of appropriate data storage directory (if you are using the text file method), or in the Access_log table (if you are using the database method).
Use the following instructions to add to the list of authorized users for any type of authentication.
![]() |
Note |
---|
If you are using Window NT to manage the list of users, passwords, and groups, use those tools instead of the instructions below. |
SecureEncoder
.
SecureAdmin
.
SecureContent
.
Encoder user authentication is configured automatically at setup; when you installed RealServer, you gave a user name and password for RealServer to use. These were added to the administrator database and the encoder database. Users of RealSystem encoders version 6 and later must supply this user name and password to connect.
![]() |
Additional Information |
---|
Other authentication features that can be used in authenticating encoder users are listed in "Optional Authentication Features (for All Types of Users)". |
RealServer uses the following settings for encoder user authentication (you can view these settings with RealSystem Administrator by clicking Broadcasting>Encoders):
EncoderRealm
. If you want to use a realm which does not yet exist, see "Creating a New Realm".
Add each encoder user and password with the instructions in "Adding User Names and Passwords"; use SecureEncoder
for the realm.
Content creators who use older encoders need only supply a password, but the password must be the same for everyone. During installation, you were prompted for this password. If you change the password with RealSystem Administrator, be sure to tell the new password to everyone who will be connecting.
RealServer uses the following settings for encoder user authentication (you can view these settings with RealSystem Administrator by clicking Broadcasting>Pre-G2 Encoders):
At installation, RealServer is configured to prompt all RealSystem Administrator users for a user name and password. Use the user name and password you entered during Setup.
![]() |
Additional Information |
---|
Other authentication features that can be used in authenticating RealSystem Administrator users are listed in "Optional Authentication Features (for All Types of Users)". |
Use the instructions in "Adding User Names and Passwords"; use SecureAdmin
for the realm.
There are four steps to setting up authentication for users and content:
When RealServer is first installed, it is automatically configured to look for on-demand secure content in the Secure
directory.
This section describes the steps necessary for authenticating users who request secured media.
![]() |
Additional Information |
---|
There are two sets of optional authentication features that can be used in authenticating content users: those listed in "Optional Content User Authentication Features", and the more general options shown in "Optional Authentication Features (for All Types of Users)". |
Add user names and passwords by following the instructions in "Adding User Names and Passwords"; use SecureContent
for the realm.
![]() |
Note |
---|
A type of authentication which does not require user names and password is also available; refer to "Player Validation". |
The steps in this section assign access permission to all content stored in the default supplied directory. For live content, these steps use the default live encoding path.
You can have multiple directories that contain secure material, and they can be in different physical locations.
SecureUserContent
.
/secure
is typed in the box. (This is the name of the default secured directory.) If your content is in a subdirectory, type the full path here. For example, add a subdirectory named Earnings
as /secure/Earnings
.
SecureG2LiveContent
.
/encoder/secure
is typed in the box. (This is the name of the default secured directory.) If your content is in a subdirectory, type the full path here. For example, add a subdirectory named Earnings
as /secure/Earnings
.
![]() |
Note |
---|
If you use subdirectories, be sure to also add the main secured directory as a Protected Path, or anything you put in the main directory will not be authenticated!) |
For on-demand content, place the files in the Secure
subdirectory of the main RealSystem Administrator.
For live content, encode it using the virtual path encoder/Secure
.
Links to individual on-demand or live streams are similar to their non-authenticated counterparts, with the addition of the /secure/
mount point.
The link in a Web page to on-demand content, located in the Secure
directory, has the following format:
http://address:HTTPPort
/ramgen
/secure/path
/file
Live content which will be authenticated has this format:
http://address:HTTPPort
/ramgen
/encoder/secure/path
/file
Notice that it includes the /encoder/
mount point, which invokes the live broadcasting feature.
There are several more options in setting up content authentication than for encoder or RealSystem Administrator user authentication:
If you want a user to be able to log in at more than one location and view the same content from more than one location, set Allow Duplicate IDs to Yes
.
Normally, when Allow Duplicate IDs is set to No
, a user can view a given clip from only one computer at a time. If a user tries to log in from a second computer and view the same content, he or she will receive an error message. The user must log out at the first location before being permitted to log in at the second location. Users will still be able to view different content even though they are logged in at different locations.
Yes
.
Player validation allows or denies access to individual clients (usually one per computer), rather than to specific people, and authentication is transparent to the visitor-a dialog box warning only appears when the visitor attempts to access content for which he or she is not authorized. The user isn't asked for a user name and password. This type of authentication involves less viewer interaction than regular user authentication, but each client must be registered individually by the viewer or RealServer administrator.
Player validation requires a user name the first time the user registers. The player ID is associated with the original user name, no matter who is using the client software.
Use Player Validation
.
Additional options appear in the lower right portion of the browser window.
rtsp://realserver.example.com:554/video/real8video.rm
would appear in the Destination URL box as video/real8video.rm
.
Because of privacy concerns, users can elect to suppress the unique identifiers which RealServer and other applications use to identify RealPlayers; instead, RealPlayer will send a generic identifier (GUID) consisting of zeroes.
If users were allowed to register RealPlayers that use this particular GUID, all users with that GUID would log in using the first zero-GUID user's settings. You would not get a true picture of the number of users. To prevent this, RealServer's predefined data stores contain a single record for a "dummy" user with the all-zero GUID, and no permission is granted for this user to access any secure content. All users who have the zero-GUID option selected in their RealPlayer will be denied access to secure content.
For more information about RealPlayer and privacy, please read RealNetworks' Consumer Software Privacy Statement:
http://www.realnetworks.com/company/privacy/software.html.
In its default state, RealServer requires that you individually add the names of users to the appropriate databases before they can receive secure content. This is feasible if you are administering RealServer for a small site. But in case you want to allow users to register themselves via a Web page, some versions of RealServer include a sample CGI program and HTML files that interact with a Web site and your RealServer so that users may register themselves. To set up self-registration, you'll need to customize two sets of supplied files: HTML pages containing forms for registration, and .cgi files that connect the .htm files with RealServer and the data storage files. Instructions are located within the Commerce
subdirectory of the main RealServer directory.
To quickly register individual RealPlayers when player validation is in use, you can customize the link that users click so that RealServer registers and recognizes the client software in one step.
You can also use these instructions as a basis for writing your own CGI scripts and Web pages to accomplish the same purpose automatically.
![]() |
Note |
---|
If you are automating this procedure, you may omit Step 1. A realm is only required if you add users from RealSystem Administrator. |
A generic realm name appears in the Edit Realm Description box.
SecurePlayer
.
SP
.
RealSystem 5.0
.
PlayerContent
option.
SecurePlayer
.
Chris
.
SecurePlayerContent
.
register
.
http://realserver.example.com:8080
/ramgen/registerChris
!real8audio.rm
The user clicks the link and is added to the database; she can then begin viewing secure content.
rtsp://realserver.example.com:554/registerChris
!real8audio.rm
The following shows the syntax to use in creating a link that can be used to register Players automatically, as shown in the preceding section.
http://address
:HTTPPort
/ramgen/PrefixUsername
!file
Component | Meaning |
---|---|
http |
The protocol used to initiate streaming. Always use http in Web pages. |
address |
Address of RealServer; IP address or machine and domain name. |
HTTPPort |
Port number where RealServer listens for requests sent via HTTP. Its default value is 8080 . |
ramgen |
Ram file generator mount point. |
Prefix |
Prefix as shown in the Player Registration Prefix box (on the Security>Commerce page of RealSystem Administrator). |
Username |
User's name as it will appear in the database; you typed this in Step e of "Add a user name:". |
! | This delimiter separates the user name from the file name. |
file |
The name of the presentation, including the extension. Do not use a file located in a secure directory. |
For a link that users can type or paste directly in the File>Open Location dialog box in RealPlayer, use the following syntax:
rtsp://address
:RTSPPort
/PrefixUsername
!file
Once RealServer has verified the identity of the user or client, an additional level of verification is available: it can allow access to all files or only to very specific files. Evaluate Permissions controls this; when set to No
, it allows general access to all authenticated users or players. When set to Yes
, RealServer performs the additional step of examining the requested URL and looking for it in the database. If the user or player who requested it has permission for that clip or content path, RealServer streams the requested file.
If you'll be looking up permissions for specific files or directories, you must also indicate the database which stores the clip permission information. This database can be the same as the database that stores user names and passwords.
Yes
.
You can use a different setting for each rule.
If you selected this box, you must also set up the different permissions type for each user and each clip or directory to which you'll be giving them access. See the following section for a list of the different permission types.
Users are prompted only once per realm for name and password for SMIL files, regardless of how many files in the presentation require a name and password. When the user clicks on a link to a SMIL presentation that contains secure materials, RealServer prompts the player for security information on the first clip. The player then prompts the user for an authorized name and password. The player then stores the information and supplies it when the RealServer asks for security information on remaining clips in that realm.
Should any clip in the presentation expire sooner than the others, the entire presentation will halt. The person viewing the presentation will not be able to continue until more time is allotted by the administrator.
For this reason, it is important that all the permissions on all the files within a presentation be the same.
The best methods of organizing authentication and SMIL files are the following:
This is one case in which giving identical permission to all files (including the SMIL file) will not work as expected.
As each clip is viewed, RealServer subtracts the viewing time from the directory. If each clip is 10 minutes long, and there are three clips in the presentation, RealServer subtracts 30 minutes from the total viewing time. This means that in setting up this type of access, the time allotted must be the sum of all the clips.
Keeping track of all the clips, their lengths, and the total directory access time can be tricky. A better solution is to limit the access time only for the SMIL file.
RealServer has these optional features, which apply to all types of users:
A realm contains information about the type of authentication protocol and the database where the authenticated users' names will be stored.
RealServer has three authentication protocols for authenticating the identity of visitors:
If the clients that will be accessing content on your RealServer are RealPlayer 5 and earlier, be sure to use the RealSystem 5.0 style for content authentication.
This method is only available to systems using Windows NT, and requires that RealServer itself be installed on an NT Server. For authenticating content, it also requires Microsoft Internet Explorer and RealNetworks RealPlayer.
A generic realm name appears in the Edit Realm Description box.
The list of databases groups database interfaces and the locations of databases. RealServer includes four database interfaces:
It's best to use the text file method only for simple tracking or for troubleshooting the system before linking a full-fledged database to RealServer. For small-scale data, the text file method is also faster than a full-fledged database.
Use the instructions below to choose the name and type of database that will store users' names and passwords.
A generic database name appears in the Edit Database Name box.
Flat File needs only the path to the main text file directory. For example, the enc_r_db directory under the main RealServer directory. See "Overview".
mSQL has two required names, and three optional items:
ODBC uses the same information as mSQL, but ODBC does not ask for a Host Name. (Refer to "Setting Up Other Types of Data Storage" for further instructions.)
In RealSystem 5.0 authentication protocol, RealServer stores all passwords in an encrypted format. Passwords can be entered and changed through the RealServer Administration page.
If you want to change the passwords manually, without using RealSystem Administrator, you can use the supplied password command line utility. It is located in the RealServer Bin
directory.
You can also use these instructions as a basis for writing your own CGI scripts and Web pages to accomplish the same purpose automatically.
mkpnpass username realm
username
is the user name exactly as it is entered or will be entered in the authentication database or text file.
realm
is the value of the Realm
variable specified in the relevant list. For encoders, this is given by Authentication Realm on the Broadcasting>Encoders page in RealSystem Administrator. (In the configuration file, it is given by the value of the Realm
variable in the G2_Encoders
list.)
For RealSystem Administrator users, use the value of the Realm
variable in the RealAdministrator_Files
list within the FSMount
list in the configuration file. (You must open the configuration file itself to see this value.)
The resulting encrypted password is displayed on the screen.
RealServer encrypts passwords with the MD5 hashing algorithm. It uses the form MD5("
username:realm:new_password
")
. On BSD systems and some other UNIX systems, you can generate these passwords with the following command:
echo -n "username:realm:new_password
" | md5
User
directory (see "Users Directory").