Lyo.KeyStore.Aws
1.0.1
See the version list below for details.
dotnet add package Lyo.KeyStore.Aws --version 1.0.1
NuGet\Install-Package Lyo.KeyStore.Aws -Version 1.0.1
<PackageReference Include="Lyo.KeyStore.Aws" Version="1.0.1" />
<PackageVersion Include="Lyo.KeyStore.Aws" Version="1.0.1" />
<PackageReference Include="Lyo.KeyStore.Aws" />
paket add Lyo.KeyStore.Aws --version 1.0.1
#r "nuget: Lyo.KeyStore.Aws, 1.0.1"
#:package Lyo.KeyStore.Aws@1.0.1
#addin nuget:?package=Lyo.KeyStore.Aws&version=1.0.1
#tool nuget:?package=Lyo.KeyStore.Aws&version=1.0.1
Lyo.KeyStore.Aws
AwsKeyStore (an IAmazonSecretsManager client + secret-name prefix) implements both Lyo.KeyStore.IKeyStore and Lyo.KeyStore.IKeyInventoryStore, so admin UIs and key-rotation jobs can both encrypt against it and enumerate available keyIds / versions.
The backing secret is stored as JSON ({ "<keyId>": "plaintext-or-derived-material", ... }) under a single secret per prefix. Logical version strings map onto AWS VersionId stages; unresolved version requests fall through to AWSCURRENT. String values run through key derivation so callers receive cryptographic-length KEK bytes usable by AesGcmEncryptionService and the other symmetric services in Lyo.Encryption.
AwsKeyStore API
IKeyStore—GetKey,GetCurrentKey,GetCurrentVersion,AddKey,UpdateKey,HasKey, metadata, salt-for-version (all sync + async variants).IKeyInventoryStore—GetAvailableKeyIdsAsync(CancellationToken),GetAvailableVersionsAsync(string keyId, CancellationToken)so listings, rotation reports, and DEK migrations can pivot off the live store rather than a local index.
Options — AwsKeyStoreOptions
| Property | Default | Notes |
|---|---|---|
SectionName |
AwsKeyStore |
Default appsettings subsection. |
AccessKeyId / SecretAccessKey |
unset | Static credentials. When both are set they win over Profile. Omit to use Profile or the AWS default credential chain (IAM role, env vars, default profile). |
Profile |
unset | Named profile from ~/.aws/credentials / ~/.aws/config. Used when static keys are omitted. If set but missing, registration fails rather than falling back to default. |
Region |
us-east-2 (when unspecified) |
Resolved via RegionEndpoint.GetBySystemName. |
SecretNamePrefix |
lyo/kek fallback |
Logical secret prefix used to scope keys across environments (dev/MyApp/KeyStore, prod/MyApp/KeyStore, …). |
Dependency injection
| Extension | Purpose |
|---|---|
services.AddAwsKeyStore(Func<IServiceProvider,string> resolvePrefix) |
Resolve the prefix from DI (multi-tenant hosts), register AwsKeyStore as a singleton. |
services.AddAwsKeyStoreFromConfiguration(IConfiguration, configSectionName = "AwsKeyStore") |
Bind AwsKeyStoreOptions + register IAmazonSecretsManager (when missing) + register AwsKeyStore and IKeyStore. |
services.AddAmazonSecretsManagerFromConfiguration(IConfiguration, configSectionName = "AwsKeyStore") |
Standalone IAmazonSecretsManager registration (no keystore). Honours static keys, then Profile, then the default credential chain; also honours region. |
services.AddTwoKeyEncryptionServiceKeyed(keyedServiceName, secretNamePrefix) / <TKeyStore> |
Register a full keyed ITwoKeyEncryptionService stack using AwsKeyStore + paired AesGcmEncryptionService for both DEK and KEK. |
services.AddTwoKeyEncryptionServiceKeyed(keyedServiceName, secretNamePrefix, AwsKeyStoreOptions?) |
Same, but with explicit AWS options (region/credentials) rather than configuration binding. |
services.AddTwoKeyEncryptionFromConfiguration(IConfiguration, keyedServiceName, configSectionName) / <TKeyStore> |
Bind AwsKeyStoreOptions from configuration and wire the keyed two-key stack in one call. |
Note that AddAwsKeyStore(Func<...>) registers AwsKeyStore as a concrete singleton only (no IKeyStore indirection); AddAwsKeyStoreFromConfiguration and the two-key
extensions also register IKeyStore so the rest of Lyo.Encryption can resolve it generically.
See also
Lyo.KeyStore— interfaces and local store.Lyo.Encryption— encryption services that consumeIKeyStore.../README.md— encryption umbrella (algorithms, stream formats, threat model).
Dependencies
Generated from ProjectReference / PackageReference (same model as docs/Lyo.ProjectGraph.html).
Lyo.Encryption— (direct, lyo)Lyo.KeyStore— (direct, lyo)AWSSDK.SecretsManager4.0.100.3— (direct, third-party)Microsoft.Extensions.Configuration.Binder10.0.5— (direct, microsoft)Microsoft.Extensions.DependencyInjection.Abstractions10.0.5— (direct, microsoft)Lyo.Common— (transitive, lyo)Lyo.Exceptions— (transitive, lyo)Lyo.Hashing— (transitive, lyo)Lyo.Result— (transitive, lyo)Lyo.Streams— (transitive, lyo)BouncyCastle.Cryptography2.6.2— (transitive, third-party, netstandard2.0)Konscious.Security.Cryptography.Argon21.3.1— (transitive, third-party)Microsoft.Bcl.AsyncInterfaces10.0.5— (transitive, microsoft, netstandard2.0)Microsoft.Extensions.Logging.Abstractions10.0.5— (transitive, microsoft)System.Buffers4.6.1— (transitive, microsoft, netstandard2.0)System.IO.Hashing10.0.5— (transitive, microsoft, net10.0)System.Memory4.6.3— (transitive, microsoft, netstandard2.0)System.Text.Json10.0.5— (transitive, microsoft, netstandard2.0)System.Threading.Tasks.Extensions4.6.3— (transitive, microsoft, netstandard2.0)
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- AWSSDK.SecretsManager (>= 4.0.100.3)
- Lyo.Encryption (>= 1.0.1)
- Lyo.KeyStore (>= 1.0.1)
- Microsoft.Extensions.Configuration.Binder (>= 10.0.5)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.5)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.