[
https://issues.apache.org/jira/browse/NIFI-5146?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16466122#comment-16466122
]
ASF GitHub Bot commented on NIFI-5146:
--------------------------------------
GitHub user alopresto opened a pull request:
https://github.com/apache/nifi/pull/2683
NIFI-5146
Thank you for submitting a contribution to Apache NiFi.
In order to streamline the review of the contribution we ask you
to ensure the following steps have been taken:
### For all changes:
- [x] Is there a JIRA ticket associated with this PR? Is it referenced
in the commit message?
- [x] Does your PR title start with NIFI-XXXX where XXXX is the JIRA number
you are trying to resolve? Pay particular attention to the hyphen "-" character.
- [x] Has your PR been rebased against the latest commit within the target
branch (typically master)?
- [ ] Is your initial contribution a single, squashed commit?
### For code changes:
- [x] Have you ensured that the full suite of tests is executed via mvn
-Pcontrib-check clean install at the root nifi folder?
- [x] Have you written or updated unit tests to verify your changes?
- [ ] If adding new dependencies to the code, are these dependencies
licensed in a way that is compatible for inclusion under [ASF
2.0](http://www.apache.org/legal/resolved.html#category-a)?
- [ ] If applicable, have you updated the LICENSE file, including the main
LICENSE file under nifi-assembly?
- [ ] If applicable, have you updated the NOTICE file, including the main
NOTICE file found under nifi-assembly?
- [ ] If adding new Properties, have you added .displayName in addition to
.name (programmatic access) for each of the new properties?
### For documentation related changes:
- [x] Have you ensured that format looks appropriate for the output in
which it is rendered?
### Note:
Please ensure that once the PR is submitted, you check travis-ci for build
issues and submit an update to your PR as soon as possible.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/alopresto/nifi NIFI-5146
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/nifi/pull/2683.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #2683
----
commit 52d47c089973f8d8b56c528f6cbfd3500188da69
Author: Andy LoPresto <alopresto@...>
Date: 2018-05-03T23:02:19Z
NIFI-5146 Added logic to check for simultaneous configuration of HTTP and
HTTPS connectors in JettyServer.
commit c4630a8081f5399d672dae1b10840990ca17f787
Author: Andy LoPresto <alopresto@...>
Date: 2018-05-05T01:16:34Z
NIFI-5146 Added test logging resources.
Added unit tests.
commit e3e0d6540d1cd26057025d4fa18cacc61d5946bc
Author: Andy LoPresto <alopresto@...>
Date: 2018-05-05T03:26:01Z
NIFI-5146 Refactored shared functionality to generic method which accepts
lambdas.
Fixed unit test with logging side effects.
commit 7bd5be9297a0adeb202f28a781d24d0a174b20fe
Author: Andy LoPresto <alopresto@...>
Date: 2018-05-07T16:40:58Z
NIFI-5146 Added note about exclusive HTTP/HTTPS behavior to Admin Guide.
Fixed typos.
----
> Ability to configure HTTP and HTTPS simultaneously causes HostHeader issues
> ---------------------------------------------------------------------------
>
> Key: NIFI-5146
> URL: https://issues.apache.org/jira/browse/NIFI-5146
> Project: Apache NiFi
> Issue Type: Improvement
> Reporter: Aldrin Piri
> Assignee: Andy LoPresto
> Priority: Major
>
> The host header whitelisting evaluation is only done when NiFi is configured
> in secure mode, determined by the setting of an HTTPS port. (see
> https://github.com/apache/nifi/blob/master/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-jetty/src/main/java/org/apache/nifi/web/server/JettyServer.java#L161
> and
> [https://github.com/apache/nifi/blob/master/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-jetty/src/main/java/org/apache/nifi/web/server/HostHeaderHandler.java#L190).]
> However, in the case where both are enabled, the HTTP port is not enumerated
> in possible combinations and explicit inclusions of a given socket that would
> be HTTP is stripped via
> [https://github.com/apache/nifi/blob/master/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-jetty/src/main/java/org/apache/nifi/web/server/HostHeaderHandler.java#L143.]
> It is possible that concurrently running HTTP and HTTPS no longer makes
> sense, in which case we could evaluate the relevant properties and prevent
> startup for an unintended configuration. Alternatively, we would need to
> adjust the custom hostname interpretation to also include consideration for
> the HTTP port.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)