It would be useful to add a system property that can be used to enable/disable the XML Signature secure validation mode. This would be especially useful for testing purposes in older releases of the JDK (prior to 17), in which the secure validation mode is not yet enabled by default, and it is difficult to test (requires a code change or running with a SecurityManager).
The system property should supersede and have the same name as the XMLCryptoContext property that can be used to enable/disable the mode: "org.jcp.xml.dsig.secureValidation".