| Back | Next | Contents | Cams Administrator's Guide |
A Cams access control policy declares web resources and the access control rules that secure them using a security domain specific XML file, access-control-policy.xml. Web resources are declared in permissions that are grouped within permission collections. Access control rules are declared within an access control rule library.
This document contains reference information for each of the XML tags that can be used within a Cams access-control-policy.xml file to implement an access control policy. Table 1 shows the hierarchical file structure of this file with convenience links to each of the standard Cams access control XML elements. This document is also organized into the following sections:
| Tag Name | Instances | Description |
|---|---|---|
|
1
|
declares an access control policy |
|
|
0 ... N
|
a collection of permissions |
|
|
0 ... N
|
associates web resources with an access control rule or another security domain owner |
|
|
1
|
a URL pattern for matching web resources |
|
|
1
|
a reference to an access control rule in the current security domain or a security domain owner to which access control is delegated |
|
|
1
|
an access control rule library |
|
|
|
0 ... N
|
a custom type of access control rule registered with the access control rule library |
|
1
|
defines the Java class responsible for creating, loading, storing and removing access control rule instances for a given type |
|
|
0 ... 1
|
a list of initialization/configuration parameters |
|
|
0 ... N
|
a name/value pair |
|
|
|
0 ... N
|
an access control rule expression |
|
|
0 ... N
|
always grant access |
|
|
0 ... N
|
always deny access |
|
0 ... N
|
requires web resource access using a secure connection (usually SSL/TLS) |
|
|
0 ... N
|
boolean operators to expression relationships between access control rule elements |
|
|
|
0 ... N
|
a reference to another access control rule embedded in this rule |
|
|
0 ... N
|
an authentication access control rule embedded in this rule |
|
0 ... N
|
an authentication method access control rule embedded in this rule |
|
|
|
0 ... N
|
a remote host access control rule embedded in this rule |
|
|
0 ... N
|
an attribute access control rule embedded in this rule |
|
0 ... N
|
an obligations access control rule embedded in this rule |
|
|
0 ... N
|
an SQL data access control rule embedded in this rule |
|
|
0 ... N
|
an example date/time access control rule embedded in this rule |
|
|
0 ... N
|
an example user session attribute access control rule embedded in this rule |
|
|
0 ... N
|
a custom access control rule of a type declared by acr-type and embedded in this rule |
|
|
|
0 ... N
|
an authentication access control rule that implements role-based access control |
|
0 ... N
|
a constraint based on a role name and optionally a class |
|
|
1
|
a role name |
|
|
0 ... 1
|
a role Java class |
|
|
0 ... N
|
an authentication method access control rule that implements authentication type-based access control |
|
|
|
0 ... N
|
a remote host access control rule that implements DNS host or IP address access control |
|
0 ... 1
|
a list of remote host names to allow access |
|
|
|
0 ... N
|
a remote host name pattern |
|
0 ... 1
|
a list of remote host names to deny access |
|
|
|
0 ... N
|
a remote host name pattern |
|
0 ... 1
|
a list of remote IP addresses to allow access |
|
|
|
0 ... N
|
a remote host IP address pattern |
|
0 ... 1
|
a list of remote IP addresses to deny access |
|
|
|
0 ... N
|
a remote host IP address pattern |
|
|
0 ... N
|
an attribute access control rule that implements HTTP request attribute-based access control (e.g., query parameters) |
|
0 ... N
|
a target within an attribute access control rule to which an access control request may apply if ALL of its conditions match |
|
|
1
|
a reference to the access control rule to be evaluated if all conditions defined in the attribute target match |
|
|
0 ... N
|
all conditions of a specific category that attributes must meet to match an enclosing attribute target |
|
|
1 ... N
|
a specific condition that must be met by one or more attributes |
|
|
1 ... N
|
an attempt to match a designated attribute within an access control request against a pattern of possible values |
|
|
1
|
indicates which attribute is to be used in the matching operation |
|
|
1
|
the value or pattern of values used by the attribute match operation |
|
|
0 ... N
|
an obligations access control that implements custom request routing based on access control decisions |
|
|
1
|
a reference to another access control rule embedded in this obligation |
|
|
1
|
A container for a sequence of obligation instances |
|
|
0 ... N
|
An obligation |
|
|
1
|
A container for a sequence of evaluation result matches |
|
|
0 ... N
|
A match condition for evaluation of an obligation's nested acr-ref |
|
|
1
|
A container for a sequence of effect matches |
|
|
0 ... N
|
A match condition for evaluation of an overall access control evaluation request |
|
|
0 ... 1
|
A container for a sequence of obligation attribute assignments |
|
|
0 ... N
|
An obligation attribute assignment |
|
|
1
|
An obligation attribute assignment value |
|
|
0 ... N
|
an SQL data access control rule that implements SQL database value-based access control |
|
|
1
|
the JDBC database configuration parameters |
|
|
0 or 1
|
a container for sql-data-param-sets |
|
|
0 ... N
|
an SQL query to be evaluated with the result assigned to a namespace for reference within sql-data-constraint queries |
|
|
1
|
a container for sql-data-constraints |
|
|
0 ... N
|
a SQL select or update statement that returns an integer value indicating success or failure |
|
|
1
|
configures caching of granted access control decisions within a Cams user session |
|
|
0 ... N
|
an example date/time access control rule |
|
|
0 ... N
|
an example user session attribute access |
|
|
0 ... N
|
a custom access control rule of a type declared by acr-type (see also acr-persistence-manager). |
Table 1 - Hierarchical links to the standard Cams access-control-policy.xml file XML elements
An access control policy contains all the rules and permissions that govern access to web resources secured by Cams. Access control policies are specific to a security domain and defined in an XML file, access-control-policy.xml. Each HTTP request creates an access check request, which is evaluated against the Cams access control policy to return a grant or deny decision. All access check requests are first evaluated by the system security domain's access control policy, which may delegate request to another security domain.
The top-level element for an access control policy.
| Item | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Syntax |
<access-control-policy lastModified="date/time value" defaultBias="granted|denied" debug="true|false"> ... </access-control-policy> |
|||||||||
| Attributes |
|
|||||||||
| Child Elements |
|
|||||||||
| Example |
Example access-control-policy.xml file. Contains all examples shown in this document for easy copy and paste reference. Please note that this file does NOTE: Because this link is for an XML-formatted file, it has been saved with a txt extension to ensure that your browser displays it without trying to interpret the XML. We recommend opening it in a text or XML editor to cut and paste the examples. WARNING: A Cams policy server will not load this access-control-policy.xml file without additional configuration. The file contains database connection values, references to other security domains and other references that must be configured before it will load. Please read the comments, which explain the values that must be set. |
A security domain's access control policy contains one permission collection for each unique type of permission it supports. For example, all HTTP protocol permissions are stored in a single HTTP-specific permission collection. Permission collections organize Cams access control policies by protocol and optimize access control performance.
A type-specific collection of permissions. Any number of permission-collections may exist within an access control policy, but each must have a unique type. Currently, http (used for all HTTP protocol access check requests) or cams (used for Cams protocol access check requests) are defined by default. However, Cams agents can be embedded into other types of network software, which when associated with a permission collection/permission type would enable Cams to secure other protocols (e.g. SOAP to support securing web services).
| Item | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Syntax |
<permission-collection type="type code" desc="textual description" debug="true|false"> ... </permission-collection> |
|||||||||
| Attributes |
|
|||||||||
| Data | None | |||||||||
| Child Elements |
|
|||||||||
| Example |
<permission-collection type="http" desc="HTTP Resource Permissions"> <!--=================================--> WARNING: This will not load correctly unless a "myCompany"
security domain is defined. -->
<permission desc="mycompany web resources">
<resource-pattern id="*://www.mycompany.com:*/*"/>
<owner id="mycompany"/>
</permission>
<!-- Resources available only to authenticated employees -->
<permission desc="Employee web resources">
<resource-pattern id="*://*:*/employee*"/>
<acr-ref id="complex employee rule"/>
</permission>
<!-- Grant access to images under employee resources -->
<permission desc="Grant access to employee images" actions="GET">
<resource-pattern id="*://*:*/employee/images*"/>
<acr-ref id="granted"/>
</permission>
<!--=================================--> <!-- Host Permission Examples --> <!--=================================--> <!-- Resources available only when using any LAN host -->
<permission desc="All LAN hosts can access internal resources">
<resource-pattern id="*://*:*/internal*"/>
<acr-ref id="lan rule"/>
</permission>
<!-- Resources available only when using a specific WAN hosts -->
<permission desc="Specific WAN hosts can access partner resources">
<resource-pattern id="*://*:*/partner*"/>
<acr-ref id="wan rule"/>
</permission>
<!--=================================--> <!-- Auth/Host Permission Examples --> <!--=================================--> <!-- Resources available only when authenticated as an "administor"
from any LAN host -->
<permission desc="Administrator resources that can only be access from LAN">
<resource-pattern id="*://*:*/admin*"/>
<acr-ref id="administrator lan rule"/>
</permission>
<!--=================================--> <!-- Attribute Permission Example --> <!--=================================--> <!-- ReportBuilder historical reports are only available to shareholders
for specific report types and years. -->
<permission desc="Administrator resources that can only be access from LAN">
<resource-pattern id="*://*:*/ReportBuilder/gethistorical.do"/>
<acr-ref id="shareholder reportbuilder rule"/>
</permission>
<!--=================================--> <!-- Obligations Permission Example --> <!--=================================--> <!-- Users must be authenticated with the "PASSWORD" authentication method
to update their profiles. -->
<permission desc="Users must authenticate with user name and password for self-administration">
<resource-pattern id="*://*:*/CamsIdentity/selfAdmin*"/>
<acr-ref id="obligate authenticated user with password authentication method rule"/>
</permission>
<!--=================================--> <!-- SQL Data Permission Example --> <!--=================================--> <!-- Users must be authenticated and have completed information in the user
database table COMPANY field. -->
<permission desc="Users must authenticate with user name and password for self-administration">
<resource-pattern id="*://*:*/whitepapers*"/>
<acr-ref id="authenticated user with completed company rule"/>
</permission>
<!--=================================--> <!-- Custom Rule Permission Examples --> <!--=================================--> <!-- Resources available during business hours -->
<permission desc="Live support is only available during business hours">
<resource-pattern id="*://*:*/livesupport*"/>
<acr-ref id="business hours rule"/>
</permission>
<!-- Resources only available to authenticated users with gold accounts -->
<permission desc="Gold account resources only available to users with gold accounts">
<resource-pattern id="*://*:*/goldaccount*"/>
<acr-ref id="account type rule"/>
</permission>
|
A type-specific resource and rules for controlling access. A permission identifies a set of resources via a resource pattern and either an access control rule to evaluate or the owner of another security domain to which access control will be delegated. Any number of permissions may be added to a permission-collection provided the resource pattern and action(s) are valid for the enclosing permission collection and the permissions don't overlap. Permissions overlap if their fully-qualified resource patterns are identical and they have at least one action in common. An access control policy referencing an overlapping permission will fail to load.
| Item | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Syntax |
<permission desc="textual description" actions"GET,POST,PUT,DELETE,HEAD,OPTIONS,TRACE | ACCESS, START, STOP" debug="true|false"> ... |
|||||||||
| Attributes |
|
|||||||||
| Child Elements |
|
|||||||||
| Example | |
Identifies the resources associated with a permission. When a permission receives an access control request, it compares the requested resource and action against it's identifer and actions patterns. If the patterns match and are the most specific for the request, then the permission will be used to enforce access control.
| Item | Description | ||||||
|---|---|---|---|---|---|---|---|
| Syntax |
<resource-pattern id="resource pattern"/> |
||||||
| Attributes |
|
||||||
| Child Elements | None | ||||||
| Example | See permission-collection example |
A reference to an existing access control rule within the enclosing security domain's access control rule library. Access control rules can be referenced from:
The referenced access control rule must already have been defined within the access control library or an Undefined Access Control Rule will be reported.
| Item | Description | |||
|---|---|---|---|---|
| Syntax |
<acr-ref id="access control rule identifier reference"/> |
|||
| Attributes |
|
|||
| Child Elements | None | |||
| Example | See permission-collection example |
A reference to an existing security domain (other than system) to which access control for a permission is delegated.
| Item | Description | |||
|---|---|---|---|---|
| Syntax |
<owner id="security domain name"/> |
|||
| Attributes |
|
|||
| Child Elements | None | |||
| Example | |
An access control rule library is a container for defining all access control rules available within a security domain. There is only one access control rule library for each security domain. Access control rules defined in one security domain may not be referenced from another security domain.
A container for all security domain access control rule types and references.
| Item | Description | |||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Syntax |
<acr-lib debug="true|false"> ... </acr-lib> |
|||||||||||||||||||||||||||||||||
| Attributes |
|
|||||||||||||||||||||||||||||||||
| Child Elements |
|
|||||||||||||||||||||||||||||||||
| Example |
<acr-lib> <!--======================================--> <!--======================================-->
<!-- Auth Access Control Rule Examples -->
<!--======================================-->
<!-- Cams agents must have the "cams-agent" role -->
<auth-acr id="cams agent rule">
<role-constraint>
<role-name>cams-agent</role-name>
<role-class>com.cafesoft.cams.auth.CSRolePrincipal</role-class>
</role-constraint>
</auth-acr>
<!-- Require an authenticated user to have "employee" role -->
<auth-acr id="simple employee rule">
<role-constraint>
<role-name>employee</role-name>
</role-constraint>
</auth-acr>
<!-- Allow only if:
1) the user is authenticated
2) and the user has the "administrator" role
3) or the user has the "employee" role
4) and the user does not have the "contractor" role,
implemented by a specific Java class
An auth-acr will evaluate to "true" ONLY if:
1) the user is authenticated and at least one role-
constraint matches a user role and no role-constraints
deny access
2) the user is authenticated and auth-acr is completely
empty of role-constraints -->
<auth-acr id="complex employee rule">
<role-constraint>
<role-name>administrator</role-name>
</role-constraint>
<role-constraint>
<role-name>employee</role-name>
</role-constraint>
<role-constraint accessGranted="false">
<role-name>contractor</role-name>
<role-class>com.cafesoft.cams.auth.CSRolePrincipal</role-class>
</role-constraint>
</auth-acr>
<!-- Require an authenticated user to have "administrator" role,
which must be implemented by a specific role class -->
<auth-acr id="administrator rule">
<role-constraint>
<role-name>administrator</role-name>
<role-class>com.cafesoft.cams.auth.CSRolePrincipal</role-class>
</role-constraint>
</auth-acr>
<!-- Require: 1. the host to be on the LAN 2. the user to be authenticated with "administrator" role 3. a confidential (SSL) connection for privacy --> <acr id="administrator lan rule"> <acr-ref id="lan rule"/> <and/> <acr-ref id="administrator rule"/> <and/> <confidential/> </acr> </acr-lib> |
Declares a custom type of access control rule within an access control rule library. Once defined, access control rules can be used within the access control rule library directly or nested within an access control rule expression. This tag registers new access control rule types created using the Cams Access Control Rule API. See the Cams Programmer's Guide - Access Control Rules for more details.
| Item | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Syntax |
<acr-type> ... </acr-type> |
|||||||||
| Attributes |
|
|||||||||
| Child Elements |
|
|||||||||
| Example |
<!-- Declare a custom access control rule type for limiting
access by company business hours -->
<acr-type
name="example:business-hours-acr"
className="examples.acrs.BusinessHoursAcr"
desc="Control access by normal business hours">
<acr-persistence-manager className="examples.acrs.XmlBusinessHoursAcrPm">
<param-list>
<param name"clockHours" value="0-23"/>
<param name="useLocalTimeZone" value="true"/>
</param-list>
</acr-persistence-manager>
</acr-type>
|
Configures the Java class that is responsible for storing, loading, and creating new access control rules.
| Item | Description | |||
|---|---|---|---|---|
| Syntax |
<acr-persistence-manager debug="true|false"> ... </acr-persistence-manager> |
|||
| Attributes |
|
|||
| Child Elements |
|
|||
| Example | See example-acr-type |
An optional list of parameters that can be used to set the default configuration.
| Item | Description | |||
|---|---|---|---|---|
| Syntax |
<param-list> ... </param-list> |
|||
| Attributes | None | |||
| Data |
None |
|||
| Parent Elements | ||||
| Child Elements |
|
|||
| Example | See example-acr-type |
A parameter used to set the default configuration.
| Item | Description | ||||||
|---|---|---|---|---|---|---|---|
| Syntax |
<param name="textual name" value="value"/> |
||||||
| Attributes |
|
||||||
| Child Elements | None | ||||||
| Example | See example-acr-type |
Access control rule expressions are rules declared by referencing other existing rules with boolean operators that specify any conditional logic. For example, you can use an access control rule expression to create access control rules such as Only allow access to users with role administrator while using hosts on LAN during business hours.
Creates a custom access control rule by combining other element attributes. Once defined, access control rule expressions can be referenced directly from permissions or nested within other access control rule expressions using the acr-ref element.
| Item | Description | ||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Syntax |
<acr id="access control rule identifier" debug="true | false"> ... </acr> |
||||||||||||||||||||||||||||||||||||||||||
| Attributes |
|
||||||||||||||||||||||||||||||||||||||||||
| Child Elements |
|
||||||||||||||||||||||||||||||||||||||||||
| Example | |
Instrinsic access control rules available to all security domains and referenced by their identifiers:
| Item | Description |
|---|---|
| Syntax |
<granted/> |
| Attributes | None |
| Child Elements |
None |
| Example | See permission-collection granted, denied
and confidential examples |
Boolean operators embedded in access control rule expressions that define logical
relationships between access control rule invocations.
| Item | Description |
|---|---|
| Syntax |
acr-ref <and/> acr-ref |
| Attributes | None |
| Child Elements |
None |
| Example | See acr-lib example |
Requires user authentication and controls access based on the user's role(s). This is commonly referred to as Role-based Access Control (RBAC).
An authentication access control rule forces user authentication and controls access by the user's roles. It is composed of zero or more role-constraints, each of which identifies the name of a role that is assigned at authentication time. Each role constraint may also specify a role-class, which is the Java class implementing the role. Access is granted if:
or if:
A single authentication access control rule enables you to grant and deny access to any number of authenticated users by role name and/or role-class. When a user is authenticated the Cams policy server authentication configured for the protected resource assigns one or more roles to the user (a user is always assigned at least one role with his own user name).
Let's clarify with an example where a user authenticates with a user name of johndoe and password. The following roles are assigned by the Cams policy server authentication system:
Don't let the user designation fool you, johndoe is also a role. Keep in mind that a Cams access control policy can distinguish internall between a user role and a role, when required, using a role-class constraint.
| Item | Description | ||||||
|---|---|---|---|---|---|---|---|
| Syntax |
<auth-acr id="access control rule identifier" debug="true | false"> ... |
||||||
| Attributes |
|
||||||
| Child Elements |
|
||||||
| Example | See acr-lib example |
A role-constraint grants or denies an authenticated user access by virtue of the identities (roles) associated at login time. A role-constraint applies to an authenticated user if:
A role-constraint grants access if:
If a role-constraint applies to the user and denies access, then the authentication access control rule as a whole will immediately deny access. To optimize performance, place any role-constraints that deny access at the beginning of the rule.
| Item | Description | ||||||
|---|---|---|---|---|---|---|---|
| Syntax |
<role-constraint accessGranted="true | false"> ... |
||||||
| Attributes |
|
||||||
| Child Elements |
|
||||||
| Example | See acr-lib example |
Identifies the name of a role that is possibly assigned to an authenticated user.
| Item | Description |
|---|---|
| Syntax |
<role-name>role name</role-name> |
| Attributes | None |
| Data | the name of a role or user name assigned to the user when authenticated. |
| Child Elements |
None |
| Example | See acr-lib example |
Identifies the fully-qualified name of the Java class that implements a role that is possibly assigned to an authenticated user. If specified, the role-constraint applies only if an authenticated user has a role-name implemented by the specified role-class.
To determine the classes assigned to authenticated users, you'll need to know the Login Modules that were used to authenticate the user and the classes they use to add principals (roles). For more information, see the Login Configuration document.
| Item | Description |
|---|---|
| Syntax |
<role-class>fully.qualified.JavaClassName</role-class> |
| Attributes | None |
| Data |
The name of a role class associated with a role-name at login time. For example:
|
| Child Elements |
None |
| Example | See acr-lib example |
An access control rule that requires a particular method of authentication
to access a protected resource. The Cams login module implementations are responsible
adding an authentication method
to the user session corresponding to one of the following standard authentication
methods:
All standard Cams login modules support both the PASSWORD and AUTOLOGIN authentication methods. See the documentation for the login modules supplied with Cams or any custom login module in use at your site for information on the supported authentication methods.
NOTE: A complete description of the non-cams authentication methods can be found in the Assertions and Protocol for the OASIS Security Assertion Markup Language (SAML) V1.1.
Implements an access control rule based on the user authentication method. This rule should usually be combined with an access control rule expression such that, minimally, the expression evaluates not only the authentication method but first ensures that the user is authenticated. It might also be combined with an obligation-acr to, on a denied exception, prompt the user for a higher level of authentication. For example, if a user is logged in with the Cams autologin authentication method, an access control rule expression can be implemented with an obligation to redirect the user to a login page, which would prompt for user name and password authentication. An example is provide below.
| Item | Description | ||||||
|---|---|---|---|---|---|---|---|
| Syntax |
<auth-method-acr id="access control rule identifier" |
||||||
| Attributes |
|
||||||
| Child Elements |
None |
||||||
| Example |
<!-- Require the PASSWORD authentication method --> <auth-method-acr id="Require Password Authentication Method" method="urn:oasis:names:tc:SAML:1.0:am:password"/> |
Grant or deny access to a user based on the host from which he's attempting to access a protected resource.
WARNING: It is not always possible to resolve a remote host's name using the Internet's Domain Name Service (DNS). Even if a host name can be resolved, performance is sometimes poor, which can adversely effect performance. We recommend that you use host name patterns only in a controlled environments (like an intranet), where you're likely to have more control over DNS configuration and performance.
Grants or denies access based on the host name and/or IP address of the user's remote computer. This rule does not require user authentication, but does require that the remote host and/or remote address be known. A host access control rule will evaluate to true ONLY if:
| Item | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Syntax |
<host-acr id="access control rule identifier" debug="true | false"> |
||||||||||||
| Attributes |
|
||||||||||||
| Child Elements |
|
||||||||||||
| Example | See acr-lib example |
Defines one or more remote host name patterns. If a remote host attempts to access a resource protected by the security constraint associated with this rule and it's host name matches a pattern within this constraint, then that remote host is eligible to have access granted. Access will be granted by the enclosing rule if the host does not match a deny pattern. If the remote host name is not available, then it cannot match this pattern so this constraint does not apply.
| Item | Description | |||
|---|---|---|---|---|
| Syntax |
<allow-host> ... |
|||
| Attributes | None | |||
| Child Elements |
|
|||
| Example | See acr-lib example |
Defines one or more remote host name patterns. If a remote host attempts to access a resource protected by the security-constraint associated with this rule and it's host name matches a pattern within this constraint, then that remote host is immediately denied access. If the remote host name is not available, then it cannot match this pattern so this constraint does not apply.
| Item | Description | |||
|---|---|---|---|---|
| Syntax |
<deny-host> |
|||
| Attributes | None | |||
| Child Elements |
|
|||
| Example | See acr-lib example |
The pattern for a remote host name with support for regular expression matching. See the Regular Expressions document for more information on regular expression pattern matching.
| Item | Description |
|---|---|
| Syntax |
<host>host name or host pattern</host> |
| Attributes | None |
| Data |
Host name or host pattern |
| Child Elements |
None |
| Example | See acr-lib example |
Defines one or more remote host IP address patterns. If a remote host attempts to access a resource protected by the security constraint associated with this rule and it's host IP address matches a pattern within this constraint, then that remote host is eligible to have access granted. Access will be granted by the enclosing rule only if the host does not match a deny pattern. If the remote host IP address is not available, then it cannot match this pattern so this constraint does not apply.
| Item | Description | |||
|---|---|---|---|---|
| Syntax |
<allow-address> ... |
|||
| Attributes | None | |||
| Data |
None |
|||
| Child Elements |
|
|||
| Example | See acr-lib example |
Defines one or more remote host IP address patterns. If a remote host attempts to access a resource protected by the security constraint associated with this rule and it's host IP address matches a pattern within this constraint, then that remote host is immediately denied access. If the remote host name is not available, then it cannot match this pattern so this constraint does not apply.
| Item | Description | |||
|---|---|---|---|---|
| Syntax |
<deny-address> ... |
|||
| Attributes | None | |||
| Child Elements |
|
|||
| Example | See acr-lib example |
The pattern for a remote host IP address with support for regular expression matching. Zero or more are required. See the Regular Expressions document for more information on pattern matching.
| Item | Description |
|---|---|
| Syntax |
<address>host IP address or host IP address pattern</address> |
| Attributes | None |
| Data |
host IP address or host IP address pattern |
| Child Elements |
None |
| Example | See acr-lib example |
Enables evaluation of HTTP and other access control request attributes using if-then-else style access control logic. If a given access control request matches a set of conditions, then another referenced access control rule associated with those conditions is evaluated to determine if access is granted or denied.
Each attribute access control rule may contain zero or more targets. A target has a nested access control rule reference that is evaluated if it is the first target where ALL associated attribute conditions match an access control request. If the attribute access control rule does not contain any targets or an access control request does not match any targets, then a default access control rule is evaluated.
The following pseudo code expresses an example of business logic that can be implemented by attribute access control rule:
if ((requested an historical report) AND
(requested report-type is FINANCIAL or AUDIT) AND
(requested year is 2002 or 2003)) then
if (user is authenticated) then
if (user has the Shareholder role) then
Grant Access;
else
Deny Access;
else
Deny Access, Require User Authentication;
else
Deny Access, No match - Target missing required attribute;
Nearly every value within an access control request can be referenced as an attribute. Each attribute within an access control request has an identifier, belongs to a category, and has one or more attribute values of a specific data type.
Every standard Cams attribute identifier, category and data type is designated by a Uniform Resource Name (URN). For example:
NOTE: A URN is a sub-category of Uniform Resource Identifer (URI), which names a resource but does not specify how to locate it. A more detailed explanation of URNs, URIs, and URLs is available in the Java 2 Javadoc for class java.net.URI, which is used internally by Cams to store URNs.
Use of URNs for Cams attribute identifiers, categories and data types provides a highly structured and extensible naming strategy. See the following sections for more details:
| Item | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Syntax |
<attr-acr id="access control rule identifier" default-acr-ref="access control rule indentifier reference" debug="true|false"> ... </attr-acr> |
|||||||||
| Attributes |
|
|||||||||
| Child Elements |
|
|||||||||
| Example |
<!-- If the ReportBuilder application is accessed, make sure the required HTTP parameters are present and valid. If the target matches, then invoke the "shareholder rule", access control rule, which will enforce authentication and the shareholder role. --> <auth-acr id="shareholder rule"> |
Creates a possible target for an access control request within an attribute access control rule. An attribute target contains one access control rule reference and any number of attribute conditions, which are evaluated in order to determine if the target applies. If ALL attribute conditions associated with a target are met, then the access control rule referenced by the target is evaluated and its response is returned as the enclosing attribute rule response.
| Item | Description | ||||||
|---|---|---|---|---|---|---|---|
| Syntax |
<attr-target desc="textual description"> ... </attr-target> |
||||||
| Attributes |
|
||||||
| Child Elements |
|
||||||
| Example | See attr-acr example |
Creates an attribute category-specific set of conditions for matching an enclosing attribute target. Attribute conditions contains one or more individual attribute condition elements, which are evaluated in order. If ALL individual attribute condition elements match, then the overall attribute conditions for the given category match. A sequence of conditions, all of which must be met in order to match the enclosing attribute target. One attr-conditions element is required for each category of attributes.
| Item | Description | ||||||
|---|---|---|---|---|---|---|---|
| Syntax |
<attr-conditions category="attribute category URI" desc="textual description"> ... </attr-conditions> |
||||||
| Attributes |
|
||||||
| Child Elements |
|
||||||
| Example | See attr-acr example |
Creates an individual attribute condition evaluated against an access control request. Each attribute condition contains one or more attribute match operations. If ANY enclosed attribute match succeeds, then the condition succeeds. If ALL enclosed attribute matches fail, then the condition fails. An individual condition within a set of category-specific attribute conditions. If all attr-condition elements match a given access control request, then the enclosing attr-conditions matches.
| Item | Description | |||
|---|---|---|---|---|
| Syntax |
<attr-condition desc="textual description"> ... </attr-condition> |
|||
| Attributes |
|
|||
| Child Elements |
|
|||
| Example | See attr-acr example |
Creates an attribute match, which is reponsible for matching an attribute value from an access control request against a value or pattern of values. An attribute match specifies a function to be used, an attribute designator (which identifies which attribute to compare), and an attribute value which indicates the value or pattern of values to match. An individual attribute match operation. An attri-condition may contain any number of attr-match elements. If ANY attr-match succeeds, then the attr-condition succeeds, else the attr-condition fails, the enclosing attr-conditions fail, and the enclosing attr-target does not match the access control request.
| Item | Description | ||||||
|---|---|---|---|---|---|---|---|
| Syntax |
<attr-match function-id="matching function URI" desc="textual description"> ... </attr-match> |
||||||
| Attributes |
|
||||||
| Data | None | ||||||
| Parent Elements |
1. <attr-condition> |
||||||
| Child Elements |
|
||||||
| Example | See attr-acr example |
An attribute designator selects values from an access control request by attribute identifier, data type, and category (indicated by the enclosing attr-conditions). The values (if they exist) can then be used by the enclosing attribute matching function to compare against an attribute value or pattern of attribute values.
Attribute designators are also responsible for indicating whether or not a given attribute must be present in an access control request in order to evaluate the enclosing condition. If a designator indicates that a given attribute must be present, but it is not available from the access control request, then the enclosing attribute access control rule denies access due to missing/required attribute. If a designator indicates that a given attribute need not be present and it is not available from the access control request, then the enclosing attribute match is ignored. If a subsequent attribute match within the same condition matches, then the condition matches and evaluat