Skip to content

Commit

Permalink
Safely handle missing cert from Vault KV store (#710)
Browse files Browse the repository at this point in the history
  • Loading branch information
dradtke authored and Aaron Hurt committed Oct 14, 2019
1 parent 7f24c21 commit c5fdb87
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cert/vault_source.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,10 @@ func (s *VaultSource) load(path string) (pemBlocks map[string][]byte, err error)
log.Printf("[WARN] cert: Failed to read %s from Vault: %s", p, err)
continue
}
if secret == nil {
log.Printf("[WARN] cert: Failed to find %s in Vault: %s", p, err)
continue
}
get(name, "cert", secret, v2)
get(name, "key", secret, v2)
}
Expand Down

0 comments on commit c5fdb87

Please sign in to comment.