Path patterns
When handling requests, PingAccess uses resource path patterns to match resources. There are two different types of path patterns: Basic and Regex.
-
Basic patterns: The default path pattern type, which defines a path to a specific resource or a pattern that matches multiple paths. Basic patterns can contain any number of "*" wildcards. For example:
/path/x/*
matches any of these request paths:
/path/x/ /path/x/index.html /path/x/y/z/index.html
-
Regex patterns: Regex patterns contain regular expressions and allow for more flexibility in resource matching as they support resource ordering. For example:
/[^/]+/[a-z]+\.html
matches any of these request paths:
/images/gallery.html /search/index.html
However, it would not match any of these request paths:
/images/gallery2.html /search/pages/index.html /index.html
Although Regex path patterns function in an agent deployment, system performance might decrease if they are used. Agents are unable to interpret Regex path patterns, so they must consult PingAccess for policy decisions for each resource with a Regex path pattern.
When one or more path patterns match a request, PingAccess uses the first matching pattern it identifies, so the order in which path patterns are evaluated is important. By default, PingAccess orders path patterns automatically so that the most specific patterns are matched first. However, if more explicit control is needed, or if you are using regular expressions, enable resource ordering to manually specify the order in which path patterns are evaluated.
For example, an application might have three resources, such as:
-
/images/logo.png(Basic) -
/images/*(Basic) -
/.+/[a-z]\.png(Regex)
A request to resource /images/logo.png is matched by all 3 path patterns, yet each resource can have different policy requirements. Resource ordering allows you to specify which of these path patterns is parsed first, further allowing you to control the policy that is applied to a particular request.
When you define the application resources in PingCentral, you are prompted to provide path pattern information. For more information, see Path patterns reference in the PingAccess User Interface Reference Guide.