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

    https://github.com/apache/nifi/pull/2943#discussion_r214324506
  
    --- Diff: 
nifi-nar-bundles/nifi-gcp-bundle/nifi-gcp-processors/src/main/java/org/apache/nifi/processors/gcp/storage/AbstractGCSProcessor.java
 ---
    @@ -88,6 +92,15 @@ protected StorageOptions 
getServiceOptions(ProcessContext context, GoogleCredent
                 
storageOptionsBuilder.setTransportOptions(HttpTransportOptions.newBuilder().setHttpTransportFactory(new
 HttpTransportFactory() {
                     @Override
                     public HttpTransport create() {
    +                    if (!StringUtils.isBlank(proxyUser) && 
!StringUtils.isBlank(proxyPassword)) {
    +                        Authenticator authenticator = new Authenticator() {
    +                            public PasswordAuthentication 
getPasswordAuthentication() {
    +                                return (new 
PasswordAuthentication(proxyUser,
    +                                        proxyPassword.toCharArray()));
    +                            }
    +                        };
    +                        Authenticator.setDefault(authenticator);
    --- End diff --
    
    We'd like to avoid setting default authenticator as it affect system wide. 
ApacheHttpTransport can be used to add proxy authentication support. I will 
update it in the new PR.


---

Reply via email to