Skip to content
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

Scraping service: harden security restrictions on instance files #558

Merged
merged 4 commits into from
Apr 26, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,14 @@ defined in the Configuration Reference. The name field of the configuration is
ignored and the name in the URL takes precedence. The request body must be
formatted as YAML.

**WARNING**: Be careful about who is allowed to access this API.
`prometheus_instance_config` files support `password_file`, which is read when
sending metrics and sent to the configured remote_write endpoint. A malicious
user can craft a config to read any password_file from the machine the Agent is
running on and send its contents to an artbirary URL. Instead of exposing this
API to untrusted users, you may wish to implement your own layer in between that
allowlists specific fields.

Status code: 201 with a new config, 200 on updated config.
Response on success:

Expand Down