@@ -159,7 +159,7 @@ func (f *File) TLSConfig() (*tls.Config, error) {
159
159
// Config returns a new KES configuration as specified by
160
160
// the File. It connects to the KeyStore using the given
161
161
// context.
162
- func (f * File ) Config (ctx context.Context ) (* kes.Config , error ) {
162
+ func (f * File ) Config (ctx context.Context , verbose bool ) (* kes.Config , error ) {
163
163
conf := & kes.Config {
164
164
Admin : f .Admin ,
165
165
}
@@ -211,7 +211,7 @@ func (f *File) Config(ctx context.Context) (*kes.Config, error) {
211
211
}
212
212
213
213
if f .KeyStore != nil {
214
- keystore , err := f .KeyStore .Connect (ctx )
214
+ keystore , err := f .KeyStore .Connect (ctx , verbose )
215
215
if err != nil {
216
216
return nil , err
217
217
}
@@ -365,7 +365,7 @@ type Key struct {
365
365
type KeyStore interface {
366
366
// Connect establishes and returns a new connection
367
367
// to the keystore.
368
- Connect (ctx context.Context ) (kes.KeyStore , error )
368
+ Connect (ctx context.Context , verbose bool ) (kes.KeyStore , error )
369
369
}
370
370
371
371
// FSKeyStore is a structure containing the configuration
@@ -382,7 +382,7 @@ type FSKeyStore struct {
382
382
}
383
383
384
384
// Connect returns a kv.Store that stores key-value pairs in a path on the filesystem.
385
- func (s * FSKeyStore ) Connect (context.Context ) (kes.KeyStore , error ) {
385
+ func (s * FSKeyStore ) Connect (context.Context , bool ) (kes.KeyStore , error ) {
386
386
return fs .NewStore (s .Path )
387
387
}
388
388
@@ -455,9 +455,6 @@ type VaultKeyStore struct {
455
455
// is checked.
456
456
// If not set, defaults to 10s.
457
457
StatusPing time.Duration
458
-
459
- // Verbose enables logging of all HTTP requests to Vault
460
- Verbose bool
461
458
}
462
459
463
460
// VaultAppRoleAuth is a structure containing the configuration
@@ -531,7 +528,7 @@ type VaultTransit struct {
531
528
}
532
529
533
530
// Connect returns a kv.Store that stores key-value pairs on a Hashicorp Vault server.
534
- func (s * VaultKeyStore ) Connect (ctx context.Context ) (kes.KeyStore , error ) {
531
+ func (s * VaultKeyStore ) Connect (ctx context.Context , verbose bool ) (kes.KeyStore , error ) {
535
532
if s .AppRole == nil && s .Kubernetes == nil {
536
533
return nil , errors .New ("edge: failed to connect to hashicorp vault: no authentication method specified" )
537
534
}
@@ -548,7 +545,6 @@ func (s *VaultKeyStore) Connect(ctx context.Context) (kes.KeyStore, error) {
548
545
Certificate : s .Certificate ,
549
546
CAPath : s .CAPath ,
550
547
StatusPingAfter : s .StatusPing ,
551
- Verbose : s .Verbose ,
552
548
}
553
549
if s .AppRole != nil {
554
550
c .AppRole = & vault.AppRole {
@@ -572,7 +568,7 @@ func (s *VaultKeyStore) Connect(ctx context.Context) (kes.KeyStore, error) {
572
568
KeyName : s .Transit .KeyName ,
573
569
}
574
570
}
575
- return vault .Connect (ctx , c )
571
+ return vault .Connect (ctx , c , verbose )
576
572
}
577
573
578
574
// FortanixKeyStore is a structure containing the
@@ -598,7 +594,7 @@ type FortanixKeyStore struct {
598
594
}
599
595
600
596
// Connect returns a kv.Store that stores key-value pairs on a Fortanix SDKMS server.
601
- func (s * FortanixKeyStore ) Connect (ctx context.Context ) (kes.KeyStore , error ) {
597
+ func (s * FortanixKeyStore ) Connect (ctx context.Context , verbose bool ) (kes.KeyStore , error ) {
602
598
return fortanix .Connect (ctx , & fortanix.Config {
603
599
Endpoint : s .Endpoint ,
604
600
GroupID : s .GroupID ,
@@ -633,7 +629,7 @@ type KeySecureKeyStore struct {
633
629
}
634
630
635
631
// Connect returns a kv.Store that stores key-value pairs on a Gemalto KeySecure instance.
636
- func (s * KeySecureKeyStore ) Connect (ctx context.Context ) (kes.KeyStore , error ) {
632
+ func (s * KeySecureKeyStore ) Connect (ctx context.Context , verbose bool ) (kes.KeyStore , error ) {
637
633
return gemalto .Connect (ctx , & gemalto.Config {
638
634
Endpoint : s .Endpoint ,
639
635
CAPath : s .CAPath ,
@@ -682,7 +678,7 @@ type GCPSecretManagerKeyStore struct {
682
678
}
683
679
684
680
// Connect returns a kv.Store that stores key-value pairs on GCP SecretManager.
685
- func (s * GCPSecretManagerKeyStore ) Connect (ctx context.Context ) (kes.KeyStore , error ) {
681
+ func (s * GCPSecretManagerKeyStore ) Connect (ctx context.Context , verbose bool ) (kes.KeyStore , error ) {
686
682
return gcp .Connect (ctx , & gcp.Config {
687
683
Endpoint : s .Endpoint ,
688
684
ProjectID : s .ProjectID ,
@@ -726,7 +722,7 @@ type AWSSecretsManagerKeyStore struct {
726
722
}
727
723
728
724
// Connect returns a kv.Store that stores key-value pairs on AWS SecretsManager.
729
- func (s * AWSSecretsManagerKeyStore ) Connect (ctx context.Context ) (kes.KeyStore , error ) {
725
+ func (s * AWSSecretsManagerKeyStore ) Connect (ctx context.Context , verbose bool ) (kes.KeyStore , error ) {
730
726
return aws .Connect (ctx , & aws.Config {
731
727
Addr : s .Endpoint ,
732
728
Region : s .Region ,
@@ -762,7 +758,7 @@ type AzureKeyVaultKeyStore struct {
762
758
}
763
759
764
760
// Connect returns a kv.Store that stores key-value pairs on Azure KeyVault.
765
- func (s * AzureKeyVaultKeyStore ) Connect (_ context.Context ) (kes.KeyStore , error ) {
761
+ func (s * AzureKeyVaultKeyStore ) Connect (_ context.Context , verbose bool ) (kes.KeyStore , error ) {
766
762
if (s .TenantID != "" || s .ClientID != "" || s .ClientSecret != "" ) && s .ManagedIdentityClientID != "" {
767
763
return nil , errors .New ("edge: failed to connect to Azure KeyVault: more than one authentication method specified" )
768
764
}
@@ -812,7 +808,7 @@ type EntrustKeyControlKeyStore struct {
812
808
}
813
809
814
810
// Connect returns a kv.Store that stores key-value pairs on Entrust KeyControl.
815
- func (s * EntrustKeyControlKeyStore ) Connect (ctx context.Context ) (kes.KeyStore , error ) {
811
+ func (s * EntrustKeyControlKeyStore ) Connect (ctx context.Context , verbose bool ) (kes.KeyStore , error ) {
816
812
var rootCAs * x509.CertPool
817
813
if s .CAPath != "" {
818
814
ca , err := https .CertPoolFromFile (s .CAPath )
0 commit comments