buildkite / buildkite/agent

Token value from file path specified in config

Open
#1,769 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
1.1k
Forks
378
Avg merge
2d 6h
Merged PRs (30d)
74

Description

**Is your feature request related to a problem? Please describe.**
The agent configuration file only contains one sensitive piece of information - the API token. I end up having to dynamically generate the configuration file based on a template with a configuration tool (e.g. chef, ansible, etc.) in order to have my configuration as code but to keep my token out of source code and process environment.

**Describe the solution you'd like**
I would like to be able to specify a file path in my configuration that refers to a file containing a token.

```
# token accepts a known prefix that indicates remaining string is path to file, relative path would be relative to config file
token = "@/path/to/token"
```

**Describe alternatives you've considered**
* Using templates - this is my current approach on both Linux and macOS, this works but adds some unnecessary complexity that is not always needed. With a solution like the above cfg files could be committed and only a token file would need to be generated from a secret store.
* Using environment variables - possible but requires modifying the environment of the service, also prefer to keep token out of process environment.

**Additional context**
NA

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.