vectordotdev/vector

Add API key validation in Datadog logs source

Open

Aperta il 18 mar 2021

Vedi su GitHub
 (1 commento) (0 reazioni) (0 assegnatari)Rust (21.837 star) (2126 fork)batch import
good first issuesource: datadog_agenttype: enhancement

Descrizione

Following #6744 Vector is able to receive log from a Datadog agent.

The source could be improved by allowing api key filtering:

[sources.addUnit]
type = "datadog_logs"
address = "0.0.0.0.0:8080"
# New config param suggestion to support multiple api key
# the behaviour would be subject to the drop_on_invalid_api_key value
valid_api_keys = ["123456", "789abc" ]
# If this is true a log coming with a unknown API key would be dropped
# else the API key would just be ignored and not saved in the event
drop_on_invalid_api_key = true

This would allow to address two usecases :

  • Basic authentication (drop_on_invalid_api_key = true)
  • Prevent unknown API keys to be used (i.e. avoid leaking logs lines to a 3rd party org)

One could argue that we could also support API key blacklisting, it could be addressed later thought.

Guida contributor