chore(secretstores): Clean up secret store usage (#13398)
This commit is contained in:
parent
0ec5da26f5
commit
820fa1e311
|
|
@ -236,7 +236,7 @@ you will be prompted to enter the value of the secret.
|
||||||
key := args.Get(1)
|
key := args.Get(1)
|
||||||
value := args.Get(2)
|
value := args.Get(2)
|
||||||
if value == "" {
|
if value == "" {
|
||||||
fmt.Printf("enter secret: ")
|
fmt.Printf("Enter secret value: ")
|
||||||
b, err := term.ReadPassword(int(os.Stdin.Fd()))
|
b, err := term.ReadPassword(int(os.Stdin.Fd()))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
|
|
||||||
|
|
@ -103,6 +103,7 @@ func (t *Telegraf) ListSecretStores() ([]string, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (t *Telegraf) GetSecretStore(id string) (telegraf.SecretStore, error) {
|
func (t *Telegraf) GetSecretStore(id string) (telegraf.SecretStore, error) {
|
||||||
|
t.quiet = true
|
||||||
c, err := t.loadConfiguration()
|
c, err := t.loadConfiguration()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,9 @@
|
||||||
|
|
||||||
This folder contains the plugins for the secret-store functionality:
|
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
|
* jose: Javascript Object Signing and Encryption
|
||||||
* os: Native tooling provided on Linux, MacOS, or Windows.
|
* os: Native tooling provided on Linux, MacOS, or Windows.
|
||||||
* docker: Docker Secrets within containers
|
|
||||||
|
See each plugin's README for additional details.
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,11 @@ to get more information on how to do this.
|
||||||
```toml @sample.conf
|
```toml @sample.conf
|
||||||
# Read secrets from a HTTP endpoint
|
# Read secrets from a HTTP endpoint
|
||||||
[[secretstores.http]]
|
[[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
|
## URLs from which to read the secrets
|
||||||
url = "http://localhost/secrets"
|
url = "http://localhost/secrets"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,10 @@
|
||||||
# Read secrets from a HTTP endpoint
|
# Read secrets from a HTTP endpoint
|
||||||
[[secretstores.http]]
|
[[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
|
## URLs from which to read the secrets
|
||||||
url = "http://localhost/secrets"
|
url = "http://localhost/secrets"
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue