Tooark.Secrets.Aws
4.7.0
dotnet add package Tooark.Secrets.Aws --version 4.7.0
NuGet\Install-Package Tooark.Secrets.Aws -Version 4.7.0
<PackageReference Include="Tooark.Secrets.Aws" Version="4.7.0" />
<PackageVersion Include="Tooark.Secrets.Aws" Version="4.7.0" />
<PackageReference Include="Tooark.Secrets.Aws" />
paket add Tooark.Secrets.Aws --version 4.7.0
#r "nuget: Tooark.Secrets.Aws, 4.7.0"
#:package Tooark.Secrets.Aws@4.7.0
#addin nuget:?package=Tooark.Secrets.Aws&version=4.7.0
#tool nuget:?package=Tooark.Secrets.Aws&version=4.7.0
Tooark.Secrets.Aws
Tooark.Secrets provider on AWS: it loads
Secrets Manager secrets and Parameter Store parameters into IConfiguration, and implements ISecretService
on Secrets Manager.
The model, the common options and the conversion of names into keys are in the
Tooark.Secrets README. This README covers
what is specific to AWS.
π Languages: πΊπΈ English (this file) Β· π§π· PortuguΓͺs
π Contents
- Installation
- Configuration
- Permissions
- Behavior on AWS
- Dependencies
- Error Codes and Solutions
- Contributing
- Help & Security
- Support
- License
π§ Installation
dotnet add package Tooark.Secrets.Aws
βοΈ Configuration
appsettings.json
{
"Secrets": {
"Region": "sa-east-1",
"SecretsPrefix": "arkuest/prod",
"ParametersPath": "/arkuest/prod"
}
}
Program.cs
using Tooark.Secrets.Aws.Injections;
// Secrets and parameters in the configuration, on top of appsettings.json
builder.Configuration.AddTooarkSecretsAws();
// Runtime secret reads, with cache
builder.Services.AddTooarkSecretsAws(builder.Configuration);
The IConfigurationBuilder AddTooarkSecretsAws requires SecretsPrefix, ParametersPath or both. The
IServiceCollection one registers ISecretService and the Secrets Manager client as IAmazonSecretsManager; a
client already registered by the application is kept.
AwsSecretsOptions properties
Besides the common options:
| Property | Type | Default | Description |
|---|---|---|---|
Region |
string? |
β | Store region, such as sa-east-1. Without it, the region from the AWS default chain applies |
ServiceUrl |
string? |
β | Address of a compatible service, such as LocalStack |
SecretsPrefix |
string? |
β | Name prefix of the Secrets Manager secrets that become configuration, such as arkuest/prod |
ParametersPath |
string? |
β | Path of the Parameter Store parameters that become configuration, such as /arkuest/prod |
Credentials always come from the AWS default chain: environment variables, the ~/.aws/credentials profile, the
ECS task role, the EKS pod role or the EC2 instance profile. There is no access key in the options: the store
credential cannot come from the store.
π Permissions
The application's identity needs:
| Permission | Resource | For |
|---|---|---|
secretsmanager:ListSecrets |
* (the action takes no specific resource) |
Listing the prefix's secrets |
secretsmanager:GetSecretValue |
ARN of the prefix's secrets | Reading the secrets and ISecretService |
ssm:GetParametersByPath |
ARN of the parameters path | Listing and reading the parameters |
kms:Decrypt |
Your own KMS key, when used | Secrets and SecureString with your own key |
π§ Behavior on AWS
- Secrets Manager β the prefix filters the listing on AWS and is then checked against the level boundary. A secret scheduled for deletion does not show up, and one deleted between listing and reading is skipped. A binary secret is read as UTF-8 text.
- "Key/value" secret β Secrets Manager stores this type as JSON. With
ExpandJson, each pair becomes a key; without it, the key receives the whole JSON. - Parameter Store β the path is read recursively, with
SecureStringdecrypted. AStringListarrives as the comma-separated text. - Same name β with the same name in a secret and a parameter, the secret wins.
ISecretServiceβ the name is the secret's name or its ARN; a missing secret returns null.
π Dependencies
| Package | Version | Description |
|---|---|---|
Tooark.Secrets |
4.x | Model and configuration source |
AWSSDK.SecretsManager |
4.x | Secrets Manager client |
AWSSDK.SimpleSystemsManagement |
4.x | Parameter Store client |
Microsoft.Extensions.DependencyInjection.Abstractions |
8.x/10.x | Container registration |
β οΈ Error Codes and Solutions
The common errors are in the
Tooark.Secrets README.
A failure to load the source arrives as Secrets.LoadFailed;AWS, with the AWS error in InnerException.
| Message | Description | Solution |
|---|---|---|
Options.Secrets.Aws.ServiceUrlInvalid;{value} |
ServiceUrl is not an absolute http or https URL |
Use the full address, such as http://localhost:4566 |
π€ Contributing
Contributions are welcome! Start with CONTRIBUTING.md β it covers the development workflow, the coding and commit conventions and the pull request checklist. Bugs and feature requests go through the issue templates of the Tooark repository.
By participating you agree to the Code of Conduct.
π Help & Security
- β Questions, bugs, feature ideas β see SUPPORT.md for the right channel
- π Security vulnerabilities β do not open a public issue; follow SECURITY.md
π Support
If Tooark helps your projects, consider supporting its development:
- π GitHub Sponsors
- β Ko-fi
Every contribution helps keep the project maintained and improving. Thank you! π
π License
This project is licensed under the BSD 3-Clause License.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. 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.14)
- AWSSDK.SimpleSystemsManagement (>= 4.0.104)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.12)
- Microsoft.Extensions.Options (>= 10.0.12)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 10.0.12)
- Tooark.Secrets (>= 4.7.0)
-
net8.0
- AWSSDK.SecretsManager (>= 4.0.100.14)
- AWSSDK.SimpleSystemsManagement (>= 4.0.104)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0.2)
- Microsoft.Extensions.Options (>= 8.0.2)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 8.0.0)
- Tooark.Secrets (>= 4.7.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 4.7.0 | 95 | 9/30/2026 |