feat: improved XMLArgs processing #3358
Open
+306
−21
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
what
This PR adds a new feature within XML processing.
Old (current) behavior: in case of
XML:/*
target the body processor expands the node values from the XML payload. Eg.:will produce this value:
In this case, there is no option to exclude any node. For example, if a node contains a term that a rule is looking for, the administrator could not create an exclusion. The only solution is to exclude the whole rule.
New behavior: there is a new configuration keyword,
SecParseXMLintoArgs
with possible valuesOn
,Off
andOnlyArgs
. The default value isOff
. This won't change anything. If the administrator set this toOn
, then the engine will parse the XML intoARGS
AND theXML:/*
target will still contain the only text content as before. If the value isOnlyArgs
then only the parsed content will appear inARGS
target; theXML:/*
target won't contain the parsed content anymore.If administrator sets it to
On
, then the node values will appear inARGS
, and it's easy to make any exclusion against the named target.why
A customer request has been received to solve this.
references
See #3178.