[ 
https://issues.apache.org/jira/browse/NIFI-4761?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16331669#comment-16331669
 ] 

ASF GitHub Bot commented on NIFI-4761:
--------------------------------------

GitHub user alopresto opened a pull request:

    https://github.com/apache/nifi/pull/2415

    NIFI-4761 Improve host header handling

    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:
    - [ ] 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-4761

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/nifi/pull/2415.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 #2415
    
----
commit 1d8728a0c07fbf975ecd8a13e22863e353229302
Author: Andy LoPresto <alopresto@...>
Date:   2018-01-17T19:36:00Z

    NIFI-4761 Added HostHeaderHandler regression unit tests before adding new 
functionality.

commit a69de48f0fb996a246607dfa4de393bd75beb890
Author: Andy LoPresto <alopresto@...>
Date:   2018-01-18T00:46:29Z

    NIFI-4761 Added logic for parsing nifi.web.proxy.host property.
    Added default property in nifi.properties and pom.xml.
    Added logic for IPv6 and custom default hostnames.
    Improved error messaging.
    Added HostHeaderHandler unit tests.

commit 58c180a2c9d37bc28c1b1225a7d8430e4712bc85
Author: Andy LoPresto <alopresto@...>
Date:   2018-01-18T01:06:50Z

    NIFI-4761 Disabled HostHeaderSanitizationCustomizer in HTTP mode.

commit 219a11bebe10d8b49a9e87a4d37c15bd1d67dd5a
Author: Andy LoPresto <alopresto@...>
Date:   2018-01-18T01:17:15Z

    NIFI-4761 Fixed HTML escaping in error message.

commit 06bea9af2a9dba618718cd4eb7221873653dbb47
Author: Andy LoPresto <alopresto@...>
Date:   2018-01-18T01:18:21Z

    NIFI-4761 Improved error message.

commit 2d603554aa4c5bacf5c3658b7fcf8750497f1a6e
Author: Andy LoPresto <alopresto@...>
Date:   2018-01-18T17:33:49Z

    NIFI-4761 Added failing unit test for parsing custom hostnames.

commit e35b79fac256d1789fc482066b027552dcccd2c7
Author: Andy LoPresto <alopresto@...>
Date:   2018-01-18T18:11:11Z

    NIFI-4761 Fixed custom hostname parsing.
    Fixed unit tests.

commit d82a3a3fbdbb5392c60a0315ff6c00cfec642d9f
Author: Andy LoPresto <alopresto@...>
Date:   2018-01-18T18:51:55Z

    NIFI-4761 Added TODO for IPv6 custom hostname parsing and unit test.

commit ccc397a5b70ca61c7371cca12e8f0171d4ef5c10
Author: Andy LoPresto <alopresto@...>
Date:   2018-01-18T22:38:38Z

    NIFI-4761 Added IPv6 custom hostname parsing and unit tests.

commit 198e3e9025d3501a96099eb64045c97c4a032a37
Author: Andy LoPresto <alopresto@...>
Date:   2018-01-18T22:43:13Z

    NIFI-4761 Fixed checkstyle issues.

commit 07b848e18ba451e88c21c24ae3164e9f3d31c26b
Author: Andy LoPresto <alopresto@...>
Date:   2018-01-19T02:08:51Z

    NIFI-4761 Removed empty element in host list when no value defined.
    Improved error message formatting.
    Added unit tests.

commit 0ea380b3a3477d5614f41b3178ed71c5e980d2cf
Author: Andy LoPresto <alopresto@...>
Date:   2018-01-19T02:14:39Z

    NIFI-4761 Removed HostHeaderSanitizationCustomizer.

commit 92029b341f8ec4a08a3a4f33a4b8ea04637189be
Author: Andy LoPresto <alopresto@...>
Date:   2018-01-19T02:16:55Z

    NIFI-4761 Removed InvalidPropertiesFormatException from NiFiProperties.

commit d5d5b7b98d5e24b12c225f8b45a36425fc63d113
Author: Andy LoPresto <alopresto@...>
Date:   2018-01-19T03:01:46Z

    NIFI-4761 Removed InvalidPropertiesFormatException from HostHeaderHandler.

----


> Allow whitelisting expected Host values
> ---------------------------------------
>
>                 Key: NIFI-4761
>                 URL: https://issues.apache.org/jira/browse/NIFI-4761
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Core Framework
>            Reporter: Matt Gilman
>            Assignee: Andy LoPresto
>            Priority: Major
>
> NiFi has been updated to only accept requests where the Host header contains 
> an expected value. Currently, the expected values are driven by the .host 
> properties in nifi.properties. When running behind a proxy, the value may be 
> the proxy host if the headers simply pass through. In this scenario, we 
> should offer the ability to whitelist values in case updating the proxy 
> configuration isn't possible.
> Also, the proxy documentation in the admin guide should be updated to include 
> details regarding the Host name whitelisting. Also, should verify the context 
> path whitelisting is documented there.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to