ChrisSamo632 commented on pull request #5535:
URL: https://github.com/apache/nifi/pull/5535#issuecomment-974456345


   Report for testing NIFI-9387 (adding Proxy for Elasticsearch Client Service):
   
   - Installed [Squid 
Proxy](https://www.cyberciti.biz/faq/ubuntu-squid-proxy-server-installation-configuration/)
     - configured to allow access to localhost port 9200
   - Installed 
[apache2-utils](https://gist.github.com/jackblk/fdac4c744ddf2a0533278a38888f3caf)
 and configured Squid Proxy for BASIC auth
   - Ran Elasticsearch as a Docker container and [setup minimal 
authentication](https://www.elastic.co/guide/en/elasticsearch/reference/current/security-minimal-setup.html)
   
   Testing was performed both with and without authentication in both Squid 
Proxy and Elasticsearch.
   
   Squid Proxy `access.log`: with no authentication
   > 1637353491.751    494 127.0.0.1 TCP_MISS/200 814 POST 
http://localhost:9200/_bulk - HIER_DIRECT/127.0.0.1 application/json
   
   Squid Proxy log with authentication required:
   > 1637354267.294      0 127.0.0.1 TCP_DENIED/407 4287 POST 
http://localhost:9200/_bulk - HIER_NONE/- text/html
   > 1637354267.724    428 127.0.0.1 TCP_MISS/200 497 POST 
http://localhost:9200/_bulk squid HIER_DIRECT/127.0.0.1 application/json
   
   Elasticsearch logs showing a successful PUT of a document to a new index 
(with Elasticsearch and Squid Proxy auth):
   ```json
   {"type": "server", "timestamp": "2021-11-19T20:37:47,418Z", "level": "INFO", 
"component": "o.e.c.m.MetadataCreateIndexService", "cluster.name": 
"docker-cluster", "node.name": "1491093bb646", "message": "[test] creating 
index, cause [auto(bulk api)], templates [], shards [1]/[1]", "cluster.uuid": 
"975mGhQHQvWt9lVra6s_Iw", "node.id": "bLmLdxrMQQeKYjjGnKYbAw"  }
   {"type": "server", "timestamp": "2021-11-19T20:37:47,652Z", "level": "INFO", 
"component": "o.e.c.m.MetadataMappingService", "cluster.name": 
"docker-cluster", "node.name": "1491093bb646", "message": 
"[test/kuPA1pc7RGS1aWEw3DCEdg] create_mapping [_doc]", "cluster.uuid": 
"975mGhQHQvWt9lVra6s_Iw", "node.id": "bLmLdxrMQQeKYjjGnKYbAw"  }
   ```
   (shows new index `test` being created as part of a `_bulk` operation)


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to