logsearch / logsearch-boshrelease

A BOSH-scalable Elasticsearch+Logstash+Kibana release
http://www.logsearch.io
Apache License 2.0
57 stars 46 forks source link

Enable direct document access in nginx proxy #39

Closed dpb587 closed 10 years ago

dpb587 commented 10 years ago

Primarily for debugging, but it'd be convenient to allow direct access to documents by ID. The regex should probably just allow all GETs to /{index}/{type}/[^_].+.

For example... this document is being parsed incorrectly...

http://api.meta.logsearch.io/logstash-2014.06.05/relp_cf/YTLKANrZQeqSY2JDFEdaTw?pretty
mrdavidlaing commented 10 years ago

Seems like a good idea to me

dpb587 commented 10 years ago

I realized generated IDs are allowed to use underscores as the first character which makes it difficult to avoid internal calls in proxy rules (not that GET internal calls should be dangerous, but least access has been our convention so far). Given this was only a debugging change and there are other ways to easily lookup a document (e.g. kibana search for _id:YTLKANrZQ..., /{index}/{type}/_search?q=_id:YTLKAnrZQ), it's just easier to avoid hacking up the nginx proxy rules. Closing...

mrdavidlaing commented 10 years ago

Probably the correct call at this stage.

For reference: http://stackoverflow.com/a/19898676/13238

Auto-generated ids are random base64-encoded UUIDs. The base64 algorithm is used in URL-safe mode hence - and _ characters might be present in ids.