alopresto commented on a change in pull request #4498:
URL: https://github.com/apache/nifi/pull/4498#discussion_r481420260
##########
File path:
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-jetty/src/test/groovy/org/apache/nifi/web/server/JettyServerGroovyTest.groovy
##########
@@ -242,10 +246,84 @@ class JettyServerGroovyTest extends GroovyTestCase {
// Assertions defined above
}
+ /**
+ * Regression test added after NiFi 1.12.0 because Jetty upgrade to 9.4.26
no longer works
+ * with multiple certificate keystores.
+ */
+ @Test
+ void testShouldStartWithMultipleCertificatePKCS12Keystore() {
+ // Arrange
+ final String externalHostname = "node1.nifi"
+
+ NiFiProperties httpsProps = new StandardNiFiProperties(rawProperties:
new Properties([
+ (NiFiProperties.WEB_HTTPS_PORT): HTTPS_PORT as String,
+ (NiFiProperties.WEB_HTTPS_HOST): externalHostname,
+ (NiFiProperties.SECURITY_KEYSTORE):
"src/test/resources/multiple_cert_keystore.p12",
+ (NiFiProperties.SECURITY_KEYSTORE_PASSWD): "passwordpassword",
+ (NiFiProperties.SECURITY_KEYSTORE_TYPE): "PKCS12",
+ (NiFiProperties.NAR_LIBRARY_DIRECTORY): "target/"
+ ]))
+
+ JettyServer jetty = createJettyServer(httpsProps)
+ Server internalServer = jetty.server
+ List<Connector> connectors = Arrays.asList(internalServer.connectors)
+
+ // Act
+ jetty.start()
Review comment:
No, the issue was in the hostnames selected. This code is correct
(`jetty` is the `JettyServer` reference, `internalServer` is just for access to
internal state for test assertions).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]