You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by GitBox <gi...@apache.org> on 2022/05/16 18:01:22 UTC

[GitHub] [nifi] exceptionfactory opened a new pull request, #6048: NIFI-3869 Add HTTP/2 support to ListenHTTP and HandleHttpRequest

exceptionfactory opened a new pull request, #6048:
URL: https://github.com/apache/nifi/pull/6048

   # Summary
   
   [NIFI-3869](https://issues.apache.org/jira/browse/NIFI-3869) Adds configurable support the HTTP/2 protocol in the `ListenHTTP` and `HandleHttpRequest` Processors.
   
   The implementation includes a new `nifi-jetty-configuration` module under `nifi-commons` containing a reusable `ServerConnectorFactory` and standard implementation. The configuration module includes a custom Application Layer Protocol Negotiation (ALPN) Processor that supports Java 8 Update 251 and later, which aligns with the current minimum required Java version for NiFi. The Jetty `http2-server` and `jetty-alpn-server` libraries are now included in the `nifi-jetty-bundle` along with all other required Jetty libraries.
   
   Both `ListenHTTP` and `HandleHttpRequest` include a new `HTTP Protocols` property that depends on the `SSL Context Service` property. Enabling HTTP/2 requires enabling TLS, and both components default to HTTP/1.1 for both standard and TLS configurations in order to avoid unexpected changes when upgrading. The HTTP/2 protocol supports negotiating support based on client requests using ALPN, but maintaining HTTP/1.1 as the default property setting allows administrators to enable HTTP/2 support if desired. The `HTTP Protocols` property supports the following configuration options:
   
   - `http/1.1`
   - `h2 http/1.1`
   - `h2`
   
   The property values correspond to the values defined in [RFC 7540 Section 3.1](https://www.rfc-editor.org/rfc/rfc7540.html#section-3.1) and also align with the approach used for configuring HTTP Protocols in [Apache HTTP Server](https://httpd.apache.org/docs/2.4/mod/core.html#protocols). The value of `h2 http/1.1` enables the server and client to negotiate the supported version, while selecting `h2` or `http/1.1` requires the client to support the selected version.
   
   # Tracking
   
   Please complete the following tracking steps prior to pull request creation.
   
   ### Issue Tracking
   
   - [X] [Apache NiFi Jira](https://issues.apache.org/jira/browse/NIFI) issue created
   
   ### Pull Request Tracking
   
   - [X] Pull Request title starts with Apache NiFi Jira issue number, such as `NIFI-00000`
   - [X] Pull Request commit message starts with Apache NiFi Jira issue number, as such `NIFI-00000`
   
   ### Pull Request Formatting
   
   - [X] Pull Request based on current revision of the `main` branch
   - [X] Pull Request refers to a feature branch with one commit containing changes
   
   # Verification
   
   Please indicate the verification steps performed prior to pull request creation.
   
   ### Build
   
   - [X] Build completed using `mvn clean install -P contrib-check`
     - [X] JDK 8
     - [X] JDK 11
     - [X] JDK 17
   
   ### Licensing
   
   - [ ] New dependencies are compatible with the [Apache License 2.0](https://apache.org/licenses/LICENSE-2.0) according to the [License Policy](https://www.apache.org/legal/resolved.html)
   - [ ] New dependencies are documented in applicable `LICENSE` and `NOTICE` files
   
   ### Documentation
   
   - [X] Documentation formatting appears as expected in rendered files


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nifi] thenatog commented on pull request #6048: NIFI-3869 Add HTTP/2 support to ListenHTTP and HandleHttpRequest

Posted by GitBox <gi...@apache.org>.
thenatog commented on PR #6048:
URL: https://github.com/apache/nifi/pull/6048#issuecomment-1131926982

   Will review


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nifi] thenatog commented on pull request #6048: NIFI-3869 Add HTTP/2 support to ListenHTTP and HandleHttpRequest

Posted by GitBox <gi...@apache.org>.
thenatog commented on PR #6048:
URL: https://github.com/apache/nifi/pull/6048#issuecomment-1132166287

   Roger that, +1 from me will merge


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nifi] thenatog commented on pull request #6048: NIFI-3869 Add HTTP/2 support to ListenHTTP and HandleHttpRequest

Posted by GitBox <gi...@apache.org>.
thenatog commented on PR #6048:
URL: https://github.com/apache/nifi/pull/6048#issuecomment-1132126767

   I tested this using _openssl s_client -alpn h2 -connect 127.0.0.1:8101 -status_ and _openssl s_client -alpn http/1.1 -connect 127.0.0.1:8101 -status_ commands on both ListenHTTP and HandleHttpRequest and:
   
   - I was able to negotiate both ALPN protocols for when (h2 || http/1.1) was used
   - I was able to negotiate ALPN h2 for when (h2) was used
   - I was not able to negotiate ALPN for http/1.1 when http/1.1 was used
   
   I'm not sure why the last case wasn't working.. probably not a big issue.


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nifi] exceptionfactory commented on pull request #6048: NIFI-3869 Add HTTP/2 support to ListenHTTP and HandleHttpRequest

Posted by GitBox <gi...@apache.org>.
exceptionfactory commented on PR #6048:
URL: https://github.com/apache/nifi/pull/6048#issuecomment-1132130583

   > I tested this using _openssl s_client -alpn h2 -connect 127.0.0.1:8101 -status_ and _openssl s_client -alpn http/1.1 -connect 127.0.0.1:8101 -status_ commands on both ListenHTTP and HandleHttpRequest and:
   > 
   >     * I was able to negotiate both ALPN protocols for when (h2 || http/1.1) was used
   > 
   >     * I was able to negotiate ALPN h2 for when (h2) was used
   > 
   >     * I was not able to negotiate ALPN for http/1.1 when http/1.1 was used
   > 
   > 
   > I'm not sure why the last case wasn't working.. probably not a big issue.
   
   Thanks for the feedback and testing @thenatog! For the last case, the `StandardServerConnectorFactory` does not add the ALPN Connector when `h2` is not selected. In other words, `http/1.1` indicates that ALPN will not be used, and the components will use standard TLS and HTTP/1.1 connectors.


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nifi] thenatog closed pull request #6048: NIFI-3869 Add HTTP/2 support to ListenHTTP and HandleHttpRequest

Posted by GitBox <gi...@apache.org>.
thenatog closed pull request #6048: NIFI-3869 Add HTTP/2 support to ListenHTTP and HandleHttpRequest
URL: https://github.com/apache/nifi/pull/6048


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org