chore(secretstores): Clean up secret store usage (#13398)

This commit is contained in:
Joshua Powers 2023-06-07 04:08:09 -06:00 committed by GitHub
parent 0ec5da26f5
commit 820fa1e311
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 16 additions and 2 deletions

View File

@ -236,7 +236,7 @@ you will be prompted to enter the value of the secret.
key := args.Get(1)
value := args.Get(2)
if value == "" {
fmt.Printf("enter secret: ")
fmt.Printf("Enter secret value: ")
b, err := term.ReadPassword(int(os.Stdin.Fd()))
if err != nil {
return err

View File

@ -103,6 +103,7 @@ func (t *Telegraf) ListSecretStores() ([]string, error) {
}
func (t *Telegraf) GetSecretStore(id string) (telegraf.SecretStore, error) {
t.quiet = true
c, err := t.loadConfiguration()
if err != nil {
return nil, err

View File

@ -2,6 +2,9 @@
This folder contains the plugins for the secret-store functionality:
* docker: Docker Secrets within containers
* http: Query secrets from an HTTP endpoint
* jose: Javascript Object Signing and Encryption
* os: Native tooling provided on Linux, MacOS, or Windows.
* docker: Docker Secrets within containers
See each plugin's README for additional details.

View File

@ -16,6 +16,11 @@ to get more information on how to do this.
```toml @sample.conf
# Read secrets from a HTTP endpoint
[[secretstores.http]]
## Unique identifier for the secret-store.
## This id can later be used in plugins to reference the secrets
## in this secret-store via @{<id>:<secret_key>} (mandatory)
id = "secretstore"
## URLs from which to read the secrets
url = "http://localhost/secrets"

View File

@ -1,5 +1,10 @@
# Read secrets from a HTTP endpoint
[[secretstores.http]]
## Unique identifier for the secret-store.
## This id can later be used in plugins to reference the secrets
## in this secret-store via @{<id>:<secret_key>} (mandatory)
id = "secretstore"
## URLs from which to read the secrets
url = "http://localhost/secrets"