-
-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Elasticsearch configuration doesn't seem to include authentication #775
Comments
I've taken a stab at adding authentication, but now I'm getting 400 (bad request) and 413 (payload too large) errors.
The I've added debugging statements to view what's being sent to elasticsearch:
From this StackOverflow post, it looks like it should be starting with Any suggestions? |
Could you share your elastic and dnscollector config files please ? |
Here's my dnscollector config.yml file, after I modified the source to support Basic authentication: Details
Unfortunately I don't have access to the Elasticsearch config file, it's run by another team. I did add debugging statements that printed the body of an elasticsearch request, which looks somewhat like this: Details
{ "create" : {}}
{"dns.flags.aa":false,"dns.flags.ad":false,"dns.flags.cd":false,"dns.flags.qr":false,"dns.flags.ra":false,"dns.flags.rd":true,"dns.flags.tc":false,"dns.id":0,"dns.length":128,"dns.malformed-packet":false,"dns.opcode":0,"dns.qclass":"IN","dns.qname":"v1.pv-txt.pool.dns.example.com","dns.qtype":"TXT","dns.questions-count":1,"dns.rcode":"NOERROR","dns.resource-records.an":"-","dns.resource-records.ar":"-","dns.resource-records.ns":"-","dnstap.extra":"-","dnstap.identity":"dnsdist_server","dnstap.latency":0,"dnstap.operation":"CLIENT_QUERY","dnstap.peer-name":"localhost","dnstap.policy-action":"NXDOMAIN","dnstap.policy-match":"QNAME","dnstap.policy-rule":"-","dnstap.policy-type":"-","dnstap.policy-value":"-","dnstap.query-zone":"-","dnstap.timestamp-rfc3339ns":"2024-07-25T00:57:51.2575189Z","dnstap.version":"dnsdist 1.9.6","edns.dnssec-ok":0,"edns.options.0.code":8,"edns.options.0.data":"159.250.13.0/24","edns.options.0.name":"CSUBNET","edns.options.1.code":12,"edns.options.1.data":"-","edns.options.1.name":"PADDING","edns.rcode":0,"edns.udp-size":4096,"edns.version":0,"network.family":"IPv4","network.ip-defragmented":false,"network.protocol":"DOH","network.query-ip":"10.167.0.248","network.query-port":"42927","network.response-ip":"10.0.22.133","network.response-port":"443","network.tcp-reassembled":false} |
Had a bit of a breakthrough! Added this module to the code, got a real curl command and the output of that was way more informative! This input record failed:
Ran a test-case minimization program and came up with this: Details
|
It turns out that if there are dots in the field names, ElasticSearch (ES) 8.13.4 interprets them as subobjects. If you try to give the same name to an object and a string ES complains. The ES naming conventions say this (among other things):
|
Another breakthrough: It appears that the other team is using Nginx in front of ES, and the default size limit is in place, which is 1MB minus some bytes for overhead. By setting Now the only error I'm getting is
But that's probably because I'm using my standard load testing script to exercise this on a puny 2-cpu virtual machine. Chaos engineering in practice. 😄 |
Regarding authentication, could you submit a pull request to add support? It could be useful for others. |
Fixed in release 1.2.0. If you encounter any further issues, please feel free to open a new ticket. Thank you for your feedback! |
Is your feature request related to a problem? Please describe.☹️
The elasticsearch logger doesn't let me specify a username+password. Our pipeline is all ready to send its data into Elasticsearch but it can't authenticate.
Describe the solution you'd like
Could you modify:
I'm not proficient in Golang, so didn't create a PR, sorry.
Describe alternatives you've considered
server
tohttps://user:[email protected]/
, but it didn't work.Additional context
The text was updated successfully, but these errors were encountered: