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

ASF GitHub Bot commented on NUTCH-2989:
---------------------------------------

tballison opened a new pull request, #768:
URL: https://github.com/apache/nutch/pull/768

   Thanks for your contribution to [Apache Nutch](https://nutch.apache.org/)! 
Your help is appreciated!
   
   Before opening the pull request, please verify that
   * there is an open issue on the [Nutch issue 
tracker](https://issues.apache.org/jira/projects/NUTCH) which describes the 
problem or the improvement. We cannot accept pull requests without an issue 
because the change wouldn't be listed in the release notes.
   * the issue ID (`NUTCH-XXXX`)
     - is referenced in the title of the pull request
     - and placed in front of your commit messages surrounded by square 
brackets (`[NUTCH-XXXX] Issue or pull request title`)
   * commits are squashed into a single one (or few commits for larger changes)
   * Java source code follows [Nutch Eclipse Code Formatting 
rules](https://github.com/apache/nutch/blob/master/eclipse-codeformat.xml)
   * Nutch is successfully built and unit tests pass by running `ant clean 
runtime test`
   * there should be no conflicts when merging the pull request branch into the 
*recent* master branch. If there are conflicts, please try to rebase the pull 
request branch on top of a freshly pulled master branch.
   * if new dependencies are added,
     - are these dependencies licensed in a way that is compatible for 
inclusion under [ASF 
2.0](https://www.apache.org/legal/resolved.html#category-a)?
     - are `LICENSE-binary` and `NOTICE-binary` updated accordingly?
   
   We will be able to faster integrate your pull request if these conditions 
are met. If you have any questions how to fix your problem or about using Nutch 
in general, please sign up for the [Nutch mailing 
list](https://nutch.apache.org/mailing_lists.html). Thanks!
   




> Can't have username/pw AND https on elastic-indexer?!
> -----------------------------------------------------
>
>                 Key: NUTCH-2989
>                 URL: https://issues.apache.org/jira/browse/NUTCH-2989
>             Project: Nutch
>          Issue Type: Task
>          Components: indexer, plugin
>    Affects Versions: 1.19
>            Reporter: Tim Allison
>            Assignee: Tim Allison
>            Priority: Major
>             Fix For: 1.20
>
>
> While working on NUTCH-2920, I copied+pasted the elastic indexer.  As part of 
> that process, I noticed that basic auth doesn't work with https.
> {code:java}
> if (auth) {
>         restClientBuilder
>             .setHttpClientConfigCallback(new HttpClientConfigCallback() {
>               @Override
>               public HttpAsyncClientBuilder customizeHttpClient(
>                   HttpAsyncClientBuilder arg0) {
>                 return 
> arg0.setDefaultCredentialsProvider(credentialsProvider);
>               }
>             });
>       }
>       // In case of HTTPS, set the client up for ignoring problems with 
> self-signed
>       // certificates and stuff
>       if ("https".equals(scheme)) {
>         try {
>           SSLContextBuilder sslBuilder = SSLContexts.custom();
>           sslBuilder.loadTrustMaterial(null, new TrustSelfSignedStrategy());
>           final SSLContext sslContext = sslBuilder.build();
>           restClientBuilder.setHttpClientConfigCallback(new 
> HttpClientConfigCallback() {
>             @Override
>             public HttpAsyncClientBuilder 
> customizeHttpClient(HttpAsyncClientBuilder httpClientBuilder) {
>               // ignore issues with self-signed certificates
>               
> httpClientBuilder.setSSLHostnameVerifier(NoopHostnameVerifier.INSTANCE);
>               return httpClientBuilder.setSSLContext(sslContext);
>             }
>           });
>         } catch (Exception e) {
>           LOG.error("Error setting up SSLContext because: " + e.getMessage(), 
> e);
>         }
>       }
> {code}
> On NUTCH-2920, I fixed this for the opensearch-indexer by adding another {{if 
> (auth)}} statement under the {{https}} branch.
> If this is an actual issue, I'm happy to open a PR.  If I've misunderstood 
> the code or the design, please close as "not a problem".



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to