SSL VPN
Reply
Moderator Moderator
Moderator
SVK
Posts: 189
Registered: ‎08-22-2011
0

Support for Customized Variables

[ Edited ]

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)

Recognized Expert
kenlars
Posts: 420
Registered: ‎03-24-2008
0

Re: Support for Customized Variables

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

Moderator Moderator
Moderator
VVJ
Posts: 75
Registered: ‎07-07-2011
0

Re: Support for Customized Variables


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.

 

 

Contributor
morpheuss
Posts: 20
Registered: ‎05-22-2008
0

Re: Support for Customized 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.

JB3
New User
JB3
Posts: 1
Registered: ‎09-26-2012
0

Re: Support for Customized Variables

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?

Copyright© 1999-2013 Juniper Networks, Inc. All rights reserved.