Repository: nifi Updated Branches: refs/heads/master 552148e9e -> b3b65219a
NIFI-3361: - Upgrading to the latest Jetty version. Project: http://git-wip-us.apache.org/repos/asf/nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/nifi/commit/8e61aa3c Tree: http://git-wip-us.apache.org/repos/asf/nifi/tree/8e61aa3c Diff: http://git-wip-us.apache.org/repos/asf/nifi/diff/8e61aa3c Branch: refs/heads/master Commit: 8e61aa3c43dcf7fb32d7607278d8c85869600c2e Parents: 552148e Author: Matt Gilman <[email protected]> Authored: Wed Mar 15 13:06:26 2017 -0400 Committer: Matt Gilman <[email protected]> Committed: Tue Mar 21 13:44:26 2017 -0400 ---------------------------------------------------------------------- .../standard/util/TestInvokeHttpCommon.java | 19 ++++++++----------- .../resources/TestInvokeHttp/realm.properties | 17 +++++++++++++++++ .../nifi-websocket-services-jetty/pom.xml | 2 +- pom.xml | 3 ++- 4 files changed, 28 insertions(+), 13 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/nifi/blob/8e61aa3c/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/util/TestInvokeHttpCommon.java ---------------------------------------------------------------------- diff --git a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/util/TestInvokeHttpCommon.java b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/util/TestInvokeHttpCommon.java index 5d460fe..a35dfd9 100644 --- a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/util/TestInvokeHttpCommon.java +++ b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/util/TestInvokeHttpCommon.java @@ -33,7 +33,6 @@ import org.eclipse.jetty.server.Authentication; import org.eclipse.jetty.server.Handler; import org.eclipse.jetty.server.Request; import org.eclipse.jetty.server.handler.AbstractHandler; -import org.eclipse.jetty.util.security.Password; import org.junit.Assert; import org.junit.Test; @@ -705,14 +704,12 @@ public abstract class TestInvokeHttpCommon { final String response = bundle.getAttribute(InvokeHTTP.RESPONSE_BODY); assertEquals("<html>\n" + "<head>\n" + - "<meta http-equiv=\"Content-Type\" content=\"text/html;charset=ISO-8859-1\"/>\n" + - "<title>Error 401 </title>\n" + + "<meta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8\"/>\n" + + "<title>Error 401 Unauthorized</title>\n" + "</head>\n" + - "<body>\n" + - "<h2>HTTP ERROR: 401</h2>\n" + + "<body><h2>HTTP ERROR 401</h2>\n" + "<p>Problem accessing /status/200. Reason:\n" + - "<pre> Unauthorized</pre></p>\n" + - "<hr /><a href=\"http://eclipse.org/jetty\">Powered by Jetty:// 9.3.9.v20160517</a><hr/>\n" + + "<pre> Unauthorized</pre></p><hr><a href=\"http://eclipse.org/jetty\">Powered by Jetty:// 9.4.2.v20170220</a><hr/>\n\n" + "</body>\n" + "</html>\n", response); } @@ -1787,18 +1784,18 @@ public abstract class TestInvokeHttpCommon { private DigestAuthenticator digestAuthenticator; - private DigestAuthHandler() { + private DigestAuthHandler() throws Exception { digestAuthenticator = new DigestAuthenticator(); ConstraintSecurityHandler securityHandler = new ConstraintSecurityHandler(); - HashLoginService hashLoginService = new HashLoginService("realm"); - hashLoginService.putUser("basic_user", new Password("basic_password"), new String[]{"realm"}); + final HashLoginService hashLoginService = new HashLoginService("realm", "src/test/resources/TestInvokeHttp/realm.properties"); + hashLoginService.start(); + securityHandler.setLoginService(hashLoginService); securityHandler.setIdentityService(new DefaultIdentityService()); digestAuthenticator.setConfiguration(securityHandler); } - @Override public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response)throws IOException, ServletException { http://git-wip-us.apache.org/repos/asf/nifi/blob/8e61aa3c/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/resources/TestInvokeHttp/realm.properties ---------------------------------------------------------------------- diff --git a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/resources/TestInvokeHttp/realm.properties b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/resources/TestInvokeHttp/realm.properties new file mode 100644 index 0000000..79ddc3b --- /dev/null +++ b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/resources/TestInvokeHttp/realm.properties @@ -0,0 +1,17 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# user: password -> MD5 of basic_user:realm:basic_password +basic_user: MD5:e051f90f38b54dece2c113f5751dc417 \ No newline at end of file http://git-wip-us.apache.org/repos/asf/nifi/blob/8e61aa3c/nifi-nar-bundles/nifi-websocket-bundle/nifi-websocket-services-jetty/pom.xml ---------------------------------------------------------------------- diff --git a/nifi-nar-bundles/nifi-websocket-bundle/nifi-websocket-services-jetty/pom.xml b/nifi-nar-bundles/nifi-websocket-bundle/nifi-websocket-services-jetty/pom.xml index 131d74e..2db59d9 100644 --- a/nifi-nar-bundles/nifi-websocket-bundle/nifi-websocket-services-jetty/pom.xml +++ b/nifi-nar-bundles/nifi-websocket-bundle/nifi-websocket-services-jetty/pom.xml @@ -29,7 +29,7 @@ <dependency> <groupId>org.eclipse.jetty.websocket</groupId> <artifactId>websocket-server</artifactId> - <version>9.3.13.v20161014</version> + <version>${jetty.version}</version> </dependency> <dependency> <groupId>log4j</groupId> http://git-wip-us.apache.org/repos/asf/nifi/blob/8e61aa3c/pom.xml ---------------------------------------------------------------------- diff --git a/pom.xml b/pom.xml index 3fe27db..a436f86 100644 --- a/pom.xml +++ b/pom.xml @@ -92,7 +92,8 @@ language governing permissions and limitations under the License. --> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> <inceptionYear>2014</inceptionYear> <org.slf4j.version>1.7.12</org.slf4j.version> - <jetty.version>9.3.9.v20160517</jetty.version> + <!--<jetty.version>9.3.9.v20160517</jetty.version>--> + <jetty.version>9.4.2.v20170220</jetty.version> <lucene.version>4.10.4</lucene.version> <spring.version>4.2.4.RELEASE</spring.version> <spring.security.version>4.0.3.RELEASE</spring.security.version>
