We have been supporting variables for SSO, role maping & resource policies rules.
In some use cases, however, these variables may need to be manipulated in order to accommodate the requirements of other devices and cloud services. Pulse Secure Access Service (SSL VPN) 7.2 allows administrators to specify Regular Expressions (Reg-Ex) on system variables to create new, custom variables. A set of predefined Reg- Ex macros are also provided.
(Go back to SA 7.2 Features at a Glance - Discuss with Juniper Engineers)
This is a great new feature!
One thing I want to do is to set a variable if a condition is met. So, for example, if the Radius Class attribute is "corpamericas", "corpeurope", or "corpasia", I want to set a variable to the value "homepage.corporate.company.com" and then use that value in the URL of a bookmark. I know regular expressions can be quite powerful - have any idea how I might do something like this?
Ken
Ken,
The custom variables can be created by using a predefined macro on a system variable. The macros available are
REGMATCH Ð Matches a regular expression pattern against a string text.
APPEND Ð Appends a text string to another text string.
DAYSDIFF Ð Calculates the difference between two dates.
So say you have the Radius Class attribute with the value set to "corpamericas", you could use the above macros to say append some text to the attribute value.
For example, if we set the varible name to homepage and the Expression to APPEND(userattr.class, ".homepage.com"), the varible homepage would now have the value corpamericas.homepage.com. You could use this to create a bookmark in the user roles by setting the resource to http://<customVar.homepage>
So basically, you can manipulate the existing system variables or user attributes using the macros to assign values to the custom variables.
Could you provide more documentation on the Customized Variables please.?, like , can the REGMATCH macro be used just like the regmatch() function in Perl?, can this be usued at the role level foristance to customize re-write rules, say you wanted to selectively re-write certain functuions on a page and not other via pattern matching with REGMATCH......
PS: you guys have a greate product but your documentation for advanced options is seriously lacking.
Does anyone have success with REGMATCH? I can use APPEND without any issues, but REGMATCH (groups, ".*_Acc_U_.*", 1) keeps coming back with an error that we have an invalid grouping number.
What am I missing?