Skip to content

Commit 24c9c8a

Browse files
CopilotSteake
andauthored
Implement HSM provider backends for Vault, AWS KMS, and Azure Key Vault (#102)
* Initial plan * Implement HSM provider backends (Vault, AWS, Azure) Co-authored-by: Steake <530040+Steake@users.noreply.github.com> * Address code review feedback: fix security issues and improve error messages Co-authored-by: Steake <530040+Steake@users.noreply.github.com> * Improve DER parser bounds checking and validation Co-authored-by: Steake <530040+Steake@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Steake <530040+Steake@users.noreply.github.com>
1 parent 90bacf7 commit 24c9c8a

6 files changed

Lines changed: 1693 additions & 26 deletions

File tree

crates/bitcell-admin/Cargo.toml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ default = []
1010
# Enable insecure transaction signing endpoint that accepts private keys via HTTP.
1111
# WARNING: This should NEVER be enabled in production environments.
1212
insecure-tx-signing = []
13+
# HSM provider features
14+
vault = ["vaultrs"]
15+
aws-hsm = ["aws-sdk-kms", "aws-config"]
16+
azure-hsm = ["azure_security_keyvault", "azure_identity", "azure_core"]
1317

1418
[dependencies]
1519
# Web framework
@@ -44,6 +48,12 @@ sysinfo = "0.30"
4448
# Hex encoding
4549
hex = "0.4"
4650

51+
# Base64 encoding (for Vault backend)
52+
base64 = "0.21"
53+
54+
# Async streams (for Azure backend)
55+
futures = "0.3"
56+
4757
# Error handling
4858
thiserror.workspace = true
4959

@@ -64,6 +74,14 @@ bitcell-network = { path = "../bitcell-network" }
6474
bitcell-crypto = { path = "../bitcell-crypto" }
6575
bitcell-ca = { path = "../bitcell-ca" }
6676

77+
# HSM providers (optional)
78+
vaultrs = { version = "0.7", optional = true }
79+
aws-sdk-kms = { version = "1.0", optional = true }
80+
aws-config = { version = "1.0", optional = true }
81+
azure_security_keyvault = { version = "0.20", optional = true }
82+
azure_identity = { version = "0.20", optional = true }
83+
azure_core = { version = "0.20", optional = true }
84+
6785
# Unix process management
6886
[target.'cfg(unix)'.dependencies]
6987
libc = "0.2"

0 commit comments

Comments
 (0)