Description:
This processor starts an HTTP server and creates a FlowFile for each HTTP Request that it receives. The Processor leaves
the HTTP Connection open and is intended to be used in conjunction with a
HandleHttpResponse Processor.
The pairing of this Processor with a HandleHttpResponse Processor
provides the ability to use NiFi to visually construct a web server that can carry out any functionality that is available
through the existing Processors. For example, one could construct a Web-based front end to an SFTP Server by constructing a
flow such as:
HandleHttpRequest ->
PutSFTP ->
HandleHttpResponse
The HandleHttpRequest Processor provides several Properties to configure which methods are supported, the paths that are
supported, and SSL configuration. The FlowFiles that are generated by this Processor have the following attributes added to
them, providing powerful routing capabilities and traceability of all data:
| Attribute Name |
Attribute Description |
| http.context.identifier |
An identifier that allows the HandleHttpRequest and HandleHttpResponse to coordinate which FlowFile belongs
to which HTTP Request/Response. |
| mime.type |
The MIME Type of the data, according to the HTTP Header "Content-Type" |
| http.servlet.path |
The part of the request URL that is considered the Servlet Path |
| http.context.path |
The part of the request URL that is considered to be the Context Path |
| http.method |
The HTTP Method that was used for the request, such as GET or POST |
| http.query.string |
The query string portion of hte Request URL |
| http.remote.host |
The hostname of the requestor |
| http.remote.addr |
The hostname:port combination of the requestor |
| http.remote.user |
The username of the requestor |
| http.request.uri |
The full Request URL |
| http.auth.type |
The type of HTTP Authorization used |
| http.principal.name |
The name of the authenticated user making the request |
| http.subject.dn |
The Distinguished Name of the requestor. This value will not be populated unless the Processor is
configured to use an SSLContext Service |
| http.issuer.dn |
The Distinguished Name of the entity that issued the Subject's certificate. This value will not be
populated unless the Processor is configured to use an SSLContext Service |
| http.headers.XXX |
Each of the HTTP Headers that is received in the request will be added as an attribute, prefixed
with "http.headers." For example, if the request contains an HTTP Header named "x-my-header",
then the value will be added to an attribute named "http.headers.x-my-header" |
Properties:
In the list below, the names of required properties appear in bold. Any other properties (not in bold) are considered optional. If a property has a default value, it is indicated. If a property supports the use of the NiFi Expression Language (or simply, "expression language"), that is also indicated.
- Listening Port
- The port to listen on for incoming HTTP Requests
- Default value: no default
- Supports expression language: false
- Hostname
- The Hostname to bind to. If not specified, will bind to all hosts
- Default value: no default
- Supports expression language: false
- HTTP Context Map
- The HTTP Context Map Controller Service to use for caching the HTTP Request Information
- Default value: no default
- Supports expression language: false
- SSL Context Service
- The Controller Service to use for obtaining an SSL Context. The SSL Context controller service is a mechanism for providing all the security properties that allow for secure communications between NiFi extensions and other systems. See the User Guide or the Controller Services documentation via the "help" link in the upper-right corner of the GUI for more information about the StandardSSLContextService. The value for this property is the identifier name that is configured in the StandardSSLContextService.
- Default value: no default
- Supports expression language: false
- Allowed Paths
- A Regular Expression that specifies the valid HTTP Paths that are allowed in the incoming URL Requests. If this value is specified and the path of the HTTP Requests does not match this Regular Expression, the Processor will respond with a 404: NotFound
- Default value: no default
- Supports expression language: false
- Allow GET
- Specifies whether or not to allow HTTP GET Method
- Default value: true
- Supports expression language: false
- Allow POST
- Specifies whether or not to allow HTTP POST Method
- Default value: true
- Supports expression language: false
- Allow PUT
- Specifies whether or not to allow HTTP PUT Method
- Default value: true
- Supports expression language: false
- Allow DELETE
- Specifies whether or not to allow HTTP DELETE Method
- Default value: true
- Supports expression language: false
- Allow HEAD
- Specifies whether or not to allow HTTP HEAD Method
- Default value: false
- Supports expression language: false
- Allow OPTIONS
- Specifies whether or not to allow HTTP OPTIONS Method
- Default value: false
- Supports expression language: false
- Additional HTTP Methods
- A comma-separated list of non-standard HTTP Methods that should be allowed
- Default value: no default
- Supports expression language: false
- Client Authentication
- Specifies whether or not the Processor should authenticate clients. This value is ignored if the <SSL Context Service> Property is not specified or the SSL Context provided uses only a KeyStore and not a TrustStore.
-
The following values are allowed:
- No Authentication - Processor will not authenticate clients. Anyone can communicate with this Processor anonymously
- Want Authentication - Processor will try to verify the client but if unable to verify will allow the client to communicate anonymously
- Need Authentication - Processor will reject communications from any client unless the client provides a certificate that is trusted by the TrustStore specified in the SSL Context Service
- Default value: No Authentication
- Supports expression language: false
Relationships:
- success
- All FlowFiles that are created are routed to this relationship.
See Also:
HandleHttpResponse
StandardHttpContextMap
StandardSSLContextService