We have regex expressions that are environment-specific. Since we're using GMU for migration between environments, we want this expressions to be defined as cluster-wide properties so they can be templatized.
Is it possible to use a Cluster-wide property as regex for a Regular Expression Assertion? The policy manager doesn't show any errors but the replacement it's not working so far.
Thanks in advance,
Just tried to use cluster wide properties in the regular expression assertion on a version 9.2 gateway and it worked. I have attached a sample policy that used 2 cluster wide properties foo=1234 and reg=foo.
Director, CA Support
Unfortunately, if you add any regular expression values in the reg property, this doesn't work. Trying reg=foo.* or reg=.* or reg=^.*$ for example. I believe this behavior is described in the documentation: Evaluate Regular Expression Assertion - CA API Gateway - 9.2 - CA Technologies Documentation See the "Example: Context variables in the regular expression" section.
This prevents us from using properties for these expressions in our different environments.
You correct after reviewing this further and testing in our lab that the context variable will be taken literally. The only other way would be to build extra logic that has the values static in the policy and branch based on a cluster wide property for the environment.
The best suggestion would be to open an idea up on our community so our product management team and review.