diff --git a/azkeys/keyvault.go b/azkeys/keyvault.go index ad27d6b..d70371e 100644 --- a/azkeys/keyvault.go +++ b/azkeys/keyvault.go @@ -40,9 +40,6 @@ func (kv *KeyVault) GetKeyByKID( ctx context.Context, keyID string, ) (keyvault.KeyBundle, error) { - log := logger.Sugar.FromContext(ctx) - defer log.Close() - kvClient, err := NewKvClient(kv.Authorizer) if err != nil { return keyvault.KeyBundle{}, err @@ -65,9 +62,6 @@ func (kv *KeyVault) GetLatestKey( ctx context.Context, keyName string, ) (keyvault.KeyBundle, error) { - log := logger.Sugar.FromContext(ctx) - defer log.Close() - kvClient, err := NewKvClient(kv.Authorizer) if err != nil { return keyvault.KeyBundle{}, err @@ -134,11 +128,6 @@ func (kv *KeyVault) GetKeyVersionsKeys( // getKeysFromVersions gets the keys from the given key versions func (kv *KeyVault) getKeysFromVersions(ctx context.Context, keyVersions []keyvault.KeyItem) ([]keyvault.KeyBundle, error) { - log := logger.Sugar.FromContext(ctx) - defer log.Close() - - log.Infof("getKeysFromVersions") - keys := []keyvault.KeyBundle{} for _, keyVersionValue := range keyVersions { @@ -188,9 +177,6 @@ func (kv *KeyVault) Sign( algorithm keyvault.JSONWebKeySignatureAlgorithm, ) ([]byte, error) { - log := logger.Sugar.FromContext(ctx) - defer log.Close() - kvClient, err := NewKvClient(kv.Authorizer) if err != nil { return []byte{}, fmt.Errorf("failed to create keyvault client: %w", err) @@ -243,9 +229,6 @@ func (kv *KeyVault) HashAndSign( algorithm keyvault.JSONWebKeySignatureAlgorithm, ) ([]byte, error) { - log := logger.Sugar.FromContext(ctx) - defer log.Close() - key, err := kv.GetKeyByKID(ctx, keyID) if err != nil { return nil, fmt.Errorf("failed to get key: %w", err) @@ -274,11 +257,6 @@ func (kv *KeyVault) Verify( algorithm keyvault.JSONWebKeySignatureAlgorithm, ) (bool, error) { - log := logger.Sugar.FromContext(ctx) - defer log.Close() - - log.Infof("Verify: %s %s", kv.url, keyID) - kvClient, err := NewKvClient(kv.Authorizer) if err != nil { return false, fmt.Errorf("failed to create keyvault client: %w", err)