pinojs/pino-elasticsearch

[feature request]Elasticsearch client options and caFingerprint and tls option

joehecn opened this issue · 5 comments

https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/client-connecting.html

Elasticsearch version: 8.6.2

const { Client } = require('@elastic/elasticsearch')
const client = new Client({
  node: 'https://example.com'
  auth: { ... },
  // the fingerprint (SHA256) of the CA certificate that is used to sign
  // the certificate that the Elasticsearch node presents for TLS.
  caFingerprint: '20:0D:CA:FA:76:...',
  tls: {
    // might be required if it's a self-signed certificate
    rejectUnauthorized: false
  }
})

Would you like to send a Pull Request to address this issue? Remember to add unit tests.

Any chance that we will get this PR soon? I want to implement this lib in our fastify application and without the tls option it is just not possible to test it locally because of tls errors.

The chance goes from zero to 100% as soon a someone puts in the work and submits the PR.

There is a PR for it, it just fails because of linting issues (spaces before braces) https://github.com/pinojs/pino-elasticsearch/actions/runs/4525623356/jobs/8003025919?pr=164
Maybe @joehecn can fix that?

You can also help get the PR over the finish line https://gist.github.com/jsumners/461ef7a64545108635cc437fde112721