Configuration
In order to setup security
for your application, you must define your users and roles.
User
Definitions
Each user definition must include
a password, one or more role definitions and optional substitutions. You may
define your users either in an XML file or by implementing a subclass of
the
GmsCustomUserManager.
Defining Users
in an XML File
By default, Enterprise RTView
will look for user definitions in a file named users.xml in the
directory where your application or applet started. You may specify another
file name or path for your user definition file in the Security
tab of the Display Builder Application Options dialog.
The user definition file
must be an XML file and must start with the following:
<?xml version="1.0"?>
<users xmlns="www.sl.com"
>
The user definition file
must end with the following:
</users>
The following tags are supported:
user |
name |
The
user name. |
password |
The
password for this user. |
role |
The
role(s) for this user. You may assign multiple roles per user. NOTE: The
role must have a corresponding role definition.
Each user must have at least one role. |
sub |
Set initial substitutions
for this user, specifying name and value. In addition, Enterprise
RTView automatically defines the following substitution for each user when
the application is started with the login dialog:
$rtvuser - user's
login name
Substitutions are optional
and must use the following syntax:
<sub
name="$sub1" value="value1" />
<sub
name="$sub2" value="value2" /> |
Examples
User definition:
<?xml version="1.0"?>
<users xmlns="www.sl.com"
>
<user>
<name>user name</name>
<password>user password</password>
<sub name="$sub1" value="value1" />
<sub name="$sub2" value="value2" />
<role>user role1</role>
<role>user role2</role>
</user>
</users>
When creating your users
definition file, the passwords can be entered in plain text. You can then
re-save your user file with the passwords encrypted by using the -saveusers
command line option with the Display Builder, Display Viewer. NOTE: This option will only work if you are logged in as the admin role.
Role Definitions
Each role definition must
include a list of displays to include or exclude, and optional substitutions.
NOTE: By default, all displays are excluded. You may define your roles
either in an XML file or by implementing a subclass of the
GmsCustomRoleManager.
Defining
Roles in an XML File
By default, Enterprise RTView
will look for role definitions in a file named roles.xml in the
directory where your application or applet started. You may specify another
file name or path for your role definition file in the Security
tab of the Display Builder Application Options dialog.
The role definition file
must be an XML file and must start with the following:
<?xml version="1.0"?>
<roles xmlns="www.sl.com"
>
The role definition file
must end with the following:
</roles>
The following tags are supported
role |
name |
The
role name. |
displays |
include |
The name of
a display to include for this role. * is supported as a wildcard character,
but only one * per display name is allowed. Specify ALL for the display
name to include all displays. |
exclude |
The name of a display to
exclude for this role. * is supported as a wildcard character, but only
one * per display name is allowed. |
sub |
Set initial substitutions
for this role, specifying name and value. In addition, Enterprise
RTView automatically defines the following substitution for each role when
the application is started with the login dialog:
$rtvrole - user's
role
Substitutions are optional
and must use the following syntax:
<sub
name="rolesub1" value="value1"/>
<sub
name="rolesub2" value="value2"/> |
Examples
Role definition:
<?xml version="1.0"?>
<roles xmlns="www.sl.com"
>
<role>
<name>operator</name>
<displays>
<include>ALL</include>
<exclude>admin*.rtv</exclude>
<sub name="rolesub1" value="value1"/>
<sub name="rolesub2" value="value2"/>
</displays>
</role>
</roles>
The displays listed for each
role are processed in reverse order, so the last display listed takes precedence
over all others. So, in the example above, displays starting with admin
are excluded, but all other displays are included. If the lines were reversed,
all displays would be included, even those starting with admin.
|