NIFI-5779 Added Validate DTD property to TransformXml to allow for skipping DTD validation.#10950
NIFI-5779 Added Validate DTD property to TransformXml to allow for skipping DTD validation.#10950dan-s1 wants to merge 3 commits intoapache:mainfrom
Conversation
exceptionfactory
left a comment
There was a problem hiding this comment.
Thanks for proposing this change @dan-s1. However, given the age of the associated Jira issue, and the potential for introducing security vulnerabilities with a different configuration, I don't think this new property should be introduced.
|
@exceptionfactory Aren't the vulnerabilities associated more with what value one picks for the |
There are different classes of vulnerabilities. Secure Processing covers them in general, but allowing DTD resolution is a more narrow type of potential issue. Although it is possible to scope down the issues, it is still a potential attack vector. Given that fact, introducing a new property without an overriding use cases is less than optimal from a maintenance perspective. |
|
So perhaps instead of introducing the
|
|
The Secure Processing property came years after this ticket was created, and blocks DTD resolution, so the issue could be closed, noting that DTD resolution is not supported with Secure Processing enabled. |
|
@exceptionfactory I do not understand, even though I had |
|
Thanks for clarifying @dan-s1, most of the Secure Processing handling focuses on the XSLT Source. Let me take a closer look at the options and follow up. |
Summary
NIFI-5779
I discovered the solution to be able to skip DTD validation by implementing a custom
org.xml.sax.EntityResolveron the following Saxon thread and the actual key value to use when callingsetAttributeon an instance ofjavax.xml.transform.TransformerFactoryon the following Saxon page. TheVALIDATE_DTDproperty added toTransformXMLwas copied as is fromEvaluateXQuery.Tracking
Please complete the following tracking steps prior to pull request creation.
Issue Tracking
Pull Request Tracking
NIFI-00000NIFI-00000VerifiedstatusPull Request Formatting
mainbranchVerification
Please indicate the verification steps performed prior to pull request creation.
Build
./mvnw clean install -P contrib-checkLicensing
LICENSEandNOTICEfilesDocumentation