I've a shared flow with a Regex protection policy but as is a shared flow i'll have dynamic query params count and names depending on proxy which is being executed. for each query param i'll need to have one tag on the policy's XML like following:
<
QueryParam
name
=
"a-query-param"
>
<
Pattern
>proxy.securityflow.vars.regex</
Pattern
>
</
QueryParam
>
but as query param count and name is dynamic the number of "QueryParam" tag blocks on policy's XML would be also dynamic. so: Can i somehow edit policy's xml dynamically to add several blocks? or even better is there any to reference on "name" attribute more than one query param name also reference all of them despite of its names(like regex values)?
Solved! Go to Solution.
No, you cannot do what you describe. There may be reasonable workarounds though.
If there is a limited set of valid query params, then, you could break up the existing single RegularExpressionProtection policy into several, and some of them might be wrapped in conditions. Within the shared flow, it would look like this.
<Step> <Name>RegexProtection1</Name> </Step> <Step> <Name>RegexProtection2</Name> <Condition>request.queryparam.queryA != null</Condition> </Step> <Step> <Name>RegexProtection3</Name> <Condition>request.queryparam.queryB != null</Condition> </Step>
No, you cannot do what you describe. There may be reasonable workarounds though.
If there is a limited set of valid query params, then, you could break up the existing single RegularExpressionProtection policy into several, and some of them might be wrapped in conditions. Within the shared flow, it would look like this.
<Step> <Name>RegexProtection1</Name> </Step> <Step> <Name>RegexProtection2</Name> <Condition>request.queryparam.queryA != null</Condition> </Step> <Step> <Name>RegexProtection3</Name> <Condition>request.queryparam.queryB != null</Condition> </Step>
Thank you!
User | Count |
---|---|
2 | |
1 | |
1 | |
1 | |
1 |