Open suyograo opened 7 years ago
We could then use this from config management UI.
This provides a significant attack surface because we do not have a security mechanism for the API.
++ at best I'd see this only working if the puma server was bound to localhost. If a user goes to the trouble of redirecting the tcp traffic from localhost to an outside interface we can't prevent it, but that's ok.
WRT to config management, this restriction could be lifted once x-pack is installed and x-pack is enabled.
@jsvd x-pack doesn't provide protection for Logstash's HTTP API. It could, but does not right now.
x-pack doesn't provide protection for Logstash's HTTP API. It could, but does not right now.
Sorry, I meant to imply that that would have to be implemented as pre-requisite.
I understand the point about security, but I'd like to find a middle ground here to provide this functionality to users.
How about we add functionality which allows users to simulate only existing pipelines. Pipelines defined in yml only. Basically, behavior #1 described above. That way, users will not be able to send arbitrary configuration. They can only send data to simulate existing pipelines.
Add a
simulate
endpoint as a convenience to test Logstash's filters in a pipeline. This is inspired from ingest's simulate API which is super useful. Today, if someone wants to test filters in dev/staging, they'd have to addstdin
andstdout
which means changing the existing pipeline config. This API can make it easy to test iterations to their config.Behavior
pipeline.yml
.Note: If the named pipeline has inputs/outputs, we ignore that and don't use them. This operation should have no side-effects to the original pipeline.
Request
Response is JSON formatted output of the Event(s) after running it through the filters.
Response is JSON formatted output of the Event(s) after running it through the filters.