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

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

Github user sbouchex commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/2585#discussion_r177522065
  
    --- Diff: 
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/ListenHTTP.java
 ---
    @@ -213,6 +260,8 @@ private void createHttpServerFromService(final 
ProcessContext context) throws Ex
             final Double maxBytesPerSecond = 
context.getProperty(MAX_DATA_RATE).asDataSize(DataUnit.B);
             final StreamThrottler streamThrottler = (maxBytesPerSecond == 
null) ? null : new LeakyBucketStreamThrottler(maxBytesPerSecond.intValue());
             final int returnCode = 
context.getProperty(RETURN_CODE).asInteger();
    +        final String authenticationUsername = 
trimToEmpty(context.getProperty(PROP_BASIC_AUTH_USERNAME).evaluateAttributeExpressions().getValue());
    +        final String authenticationPassword = 
trimToEmpty(context.getProperty(PROP_BASIC_AUTH_PASSWORD).evaluateAttributeExpressions().getValue());
    --- End diff --
    
    trimToEmpty is taking take of remplacing null by ""
    
    Regarding the SSLcontext, you are partially right as the authentication 
should be allowed in both mode (because some devices do not allow HTTPS 
sometimes for performance reasons)


> ListenHTTP processor : Add basic authentication
> -----------------------------------------------
>
>                 Key: NIFI-5019
>                 URL: https://issues.apache.org/jira/browse/NIFI-5019
>             Project: Apache NiFi
>          Issue Type: Improvement
>          Components: Core Framework
>    Affects Versions: 1.6.0
>         Environment: All
>            Reporter: Sébastien Bouchex Bellomié
>            Priority: Minor
>
> The feature added basic authentication to the ListenHTTP processor.
> If username & password are left empty (default settings), the processor works 
> as previously.



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

Reply via email to