naxsi icon indicating copy to clipboard operation
naxsi copied to clipboard

naxpi.json elastic authentication

Open Keithsc opened this issue 7 years ago • 4 comments

Is it possible to set basic authentication details in nxapi.json for elasticsearch ? We are consolidating our elasticsearch servers into a single cluster using searchguard for authentication. Would be happy to help with any testing if this isn't currently implemented.

Keithsc avatar Oct 02 '17 09:10 Keithsc

Any update for this issue? Same problem found on my production after use X-Pack security in Kibana & ElasticSearch. I believe a update for support elastic's username & password setup in nxapi.json is necessary.

maxidea-com avatar Oct 12 '17 08:10 maxidea-com

Hi, I managed to make get it working by changing the following lines in nxtool.py

es = elasticsearch.Elasticsearch(cfg.cfg["elastic"]["host"], use_ssl=use_ssl, )

https://elasticsearch-py.readthedocs.io/en/master/ < Scroll down to the SSL and Authentication

you need to add the user, secret and you probably also need to add a "verify_certs=false,"

es = Elasticsearch( ['localhost', 'otherhost'], http_auth=('user', 'secret'), port=443, use_ssl=True )

On 12/10/17 09:43, maxidea wrote:

Any update for this issue? Same problem found on my production after use X-Pack security in Kibana & ElasticSearch. I believe a update for support elastic's username & password setup in nxapi.json is necessary.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/nbs-system/naxsi/issues/399#issuecomment-336062219, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AFUXkO-Lw2ve92p27u1qKgYZPea_ctuwks5srdFCgaJpZM4PqZ_Z.


This message may contain confidential information. If you are not the intended recipient please inform the sender that you have received the message in error before deleting it. Please do not disclose, copy or distribute information in this e-mail or take any action in relation to its contents. To do so is strictly prohibited and may be unlawful. Thank you for your co-operation.

NHSmail is the secure email and directory service available for all NHS staff in England and Scotland. NHSmail is approved for exchanging patient data and other sensitive information with NHSmail and other accredited email services.

For more information and to find out how you can switch, https://portal.nhs.net/help/joiningnhsmail

Keithsc avatar Oct 12 '17 10:10 Keithsc

I try to modify nxtool.py like this: (user & pass setup at nxapi.json already)

es = elasticsearch.Elasticsearch(cfg.cfg["elastic"]["host"], http_auth=(cfg.cfg["elastic"]["user"],cfg.cfg["elastic"]["pass"]), verify_certs=False, use_ssl=use_ssl)

it was work!

maxidea-com avatar Oct 13 '17 08:10 maxidea-com

Hello,

Sorry for the delay :) Nice to see you found a solution. Would you mind submitting a MR to integrate it upstream ?

buixor avatar Oct 19 '17 13:10 buixor