Skip to content

Commit

Permalink
Changes on top of the original contribution (spiffe#3955):
Browse files Browse the repository at this point in the history
- Change the implementation to create a new key when we need to generate a new one instead of adding a new version to an existing key. Once the key is created, the old one is deleted. Since key versions can't be deleted in Key Vault, this allows us to delete rotated keys.
- Avoid disposing keys that belong to the current server.
- Rename the plugin to azure_key_vault.
- Fix tests.

Signed-off-by: Agustín Martínez Fayó <amartinezfayo@gmail.com>
  • Loading branch information
amartinezfayo committed Aug 23, 2023
1 parent ac8c30e commit f6a79e4
Show file tree
Hide file tree
Showing 8 changed files with 152 additions and 132 deletions.
6 changes: 3 additions & 3 deletions conf/server/server_full.conf
Original file line number Diff line number Diff line change
Expand Up @@ -295,9 +295,9 @@ plugins {
# }
# }

# KeyManager "azure_kms": A key manager for signing SVIDs which generates
# and stores keys in Microsoft Azure KMS (Azure Key Vault).
# KeyManager "azure_kms" {
# KeyManager "azure_key_vault": A key manager for signing SVIDs which generates
# and stores keys in Microsoft Azure Key Vault.
# KeyManager "azure_key_vault" {
# plugin_data = {
# # key_metadata_file: A file path location where information about
# # generated keys will be persisted.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Server plugin: KeyManager "azure_kms"
# Server plugin: KeyManager "azure_key_vault"

The `azure_kms` key manager plugin leverages the Microsoft Azure Key Vault
The `azure_key_vault` key manager plugin leverages the Microsoft Azure Key Vault
Service to create, maintain, and rotate key pairs, signing SVIDs as needed. No
Microsoft Azure principal can view or export the raw cryptographic key material
represented by a key. Instead, Key Vault accesses the key material on behalf of
Expand Down
4 changes: 2 additions & 2 deletions pkg/server/catalog/keymanager.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

"github.com/spiffe/spire/pkg/server/plugin/keymanager"
"github.com/spiffe/spire/pkg/server/plugin/keymanager/awskms"
"github.com/spiffe/spire/pkg/server/plugin/keymanager/azurekms"
"github.com/spiffe/spire/pkg/server/plugin/keymanager/azurekeyvault"
"github.com/spiffe/spire/pkg/server/plugin/keymanager/disk"
"github.com/spiffe/spire/pkg/server/plugin/keymanager/gcpkms"
"github.com/spiffe/spire/pkg/server/plugin/keymanager/memory"
Expand All @@ -32,7 +32,7 @@ func (repo *keyManagerRepository) BuiltIns() []catalog.BuiltIn {
awskms.BuiltIn(),
disk.BuiltIn(),
gcpkms.BuiltIn(),
azurekms.BuiltIn(),
azurekeyvault.BuiltIn(),
memory.BuiltIn(),
}
}
Expand Down
Loading

0 comments on commit f6a79e4

Please sign in to comment.