Sun OpenSSO Enterprise Policy Agent 3.0 User's Guide for Web Agents

Appendix C Wildcard Matching in Policy Agent 3.0 Web Agents

The OpenSSO Enterprise policy service supports policy definitions that use either of the two following wildcards:

These wildcards can be used in policy related situations. For example, when using OpenSSO Enterprise Console or the ssoadm utility to create policies or when configuring the Policy Agent property that establishes the not-enforced list.


Caution – Caution –

When issuing the ssoadm command, if you include values that contain wildcards (* or -*-), then the name/value pair should be enclosed in double quotes to avoid substitution by the shell. For more information about the ssoadm command, see Appendix D, Using the ssoadm Command-Line Utility With Agents.


For creating a policy, the following are feasible examples of the wildcards in use:

http://agentHost:8090/agentsample/*

http://agentHost:8090/agentsample/example-*-/example.html

For the not-enforced list, the following are feasible examples of the wildcards in use:

http://agentHost:8090/agentsample.com/*.gif

http://agentHost:8090/agentsample/-*-/images


Note –

The Multi-Level Wildcard: *

The following list summarizes the behavior of the multi-level wildcard (the asterisk, *):

The following examples show the multi-level wildcard character when used with the forward slash (/) as the delimiter character:

Table C–1 Examples of the Asterisk (*) as the Multi-Level Wildcard

Pattern 

Matches 

Does Not Match 

http://A-examp.com:8080/*

http://A-examp.com:8080

http://A-examp.com:8080/

http://A-examp.com:8080/index.html

http://A-examp.com:8080/x.gif

http://B-examp.com:8080/

http://A-examp.com:8090/index.html

http://A-examp.com:8080/a?b=1

http://A-examp.com:8080/*.html

http://A-examp.com:8080/index.html

http://A-examp.com:8080/pub/ab.html

http://A-examp.com:8080/pri/xy.html

http://A-examp.com/index.html

http://A-examp.com:8080/x.gif

http://B-examp.com/index.html

http://A-examp.com:8080/*/ab

http://A-examp.com:8080/pri/xy/ab/xy/ab

http://A-examp.com:8080/xy/ab

http://A-examp.com/ab

http://A-examp.com/ab.html

http://B-examp.com:8080/ab

http://A-examp.com:8080/ab/*/de

http://A-examp.com:8080/ab/123/de

http://A-examp.com:8080/ab/ab/de

http://A-examp.com:8080/ab/de/ab/de

http://A-examp.com:8080/ab//de

http://A-examp.com:8080/ab/de

http://A-examp.com:8090/ab/de

http://B-examp.com:8080/ab/de/ab/de

The One-Level Wildcard: -*-

The one-level wildcard (-*-) matches only the defined level starting at the location of the one-level wildcard to the next delimiter boundary. The “defined level” refers to the area between delimiter boundaries. Many of the rules that apply to the multi—level wildcard also apply to the one-level wildcard.

The following list summarizes the behavior of hyphen-asterisk-hyphen (-*-) as a wildcard:

The following examples show the one-level wildcard when used with the forward slash (/) as the delimiter character:

Table C–2 Examples of the One—Level Wildcard (-*-)

Pattern 

Matches 

Does Not Match 

http://A-examp.com:8080/b/-*-

http://A-examp.com:8080/b

http://A-examp.com:8080/b/

http://A-examp.com:8080/b/cd/

http://A-examp.com:8080/b/c?d=e

http://A-examp.com:8080/b/cd/e

http://A-examp.com:8090/b/

http://A-examp.com:8080/b/-*-/f

http://A-examp.com:8080/b/c/f

http://A-examp.com:8080/b/cde/f

http://A-examp.com:8080/b/c/e/f

http://A-examp.com:8080/f/

http://A-examp.com:8080/b/c-*-/f

http://A-examp.com:8080/b/cde/f

http://A-examp.com:8080/b/cd/f

http://A-examp.com:8080/b/c/f

http://A-examp.com:8080/b/c/e/f

http://A-examp.com:8080/b/c/

http://A-examp.com:8080/b/c/fg