wannadream commented on code in PR #6619: URL: https://github.com/apache/nifi/pull/6619#discussion_r1269709827
########## nifi-nar-bundles/nifi-elasticsearch-bundle/nifi-elasticsearch-client-service/src/main/java/org/apache/nifi/elasticsearch/ElasticSearchClientServiceImpl.java: ########## @@ -275,6 +318,12 @@ private CredentialsProvider addCredentials(final CredentialsProvider credentials return cp; } + private BasicHeader createApiKeyAuthorizationHeader(String apiKeyId, String apiKey) { + final String apiKeyCredentials = String.format("%s:%s", apiKeyId, apiKey); + final String apiKeyAuth = Base64.getEncoder().encodeToString((apiKeyCredentials).getBytes(StandardCharsets.UTF_8)); Review Comment: Hi @nandorsoma , I ran into issues with Elastic Search API auth. Standard HTTP client works well for me, but it did not work with this client implementation. I looked into the code then found some questionable lines. What is API key id doing here? It is a required field, but should it be part of the token? And why does it encode the string once more as we already passed in base64 token string. Could you elaborate? -- 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-unsubscr...@nifi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org