Browse Source

connect: if the token given to the vault provider returns no data avoid a panic (#9806)

Improves #9800
pull/9808/head
R.B. Boyer 4 years ago committed by GitHub
parent
commit
a0d26430cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      .changelog/9806.txt
  2. 2
      agent/connect/ca/provider_vault.go

3
.changelog/9806.txt

@ -0,0 +1,3 @@
```release-note:improvement
connect: if the token given to the vault provider returns no data avoid a panic
```

2
agent/connect/ca/provider_vault.go

@ -82,6 +82,8 @@ func (v *VaultProvider) Configure(cfg ProviderConfig) error {
secret, err := client.Auth().Token().LookupSelf()
if err != nil {
return err
} else if secret == nil {
return fmt.Errorf("Could not look up Vault provider token: not found")
}
var token struct {
Renewable bool

Loading…
Cancel
Save