Arca.SDK
1.0.2
dotnet add package Arca.SDK --version 1.0.2
NuGet\Install-Package Arca.SDK -Version 1.0.2
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Arca.SDK" Version="1.0.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Arca.SDK" Version="1.0.2" />
<PackageReference Include="Arca.SDK" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Arca.SDK --version 1.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Arca.SDK, 1.0.2"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Arca.SDK@1.0.2
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Arca.SDK&version=1.0.2
#tool nuget:?package=Arca.SDK&version=1.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Arca.SDK
SDK para acceder a credenciales almacenadas en Arca Vault de forma segura mediante Named Pipes.
Requisitos
- .NET 10 o superior
- Arca.NET ejecutándose en la misma máquina
- API Key generada desde Arca.NET
Instalación
dotnet add package Arca.SDK
Uso Rápido
using Arca.SDK;
using Arca.SDK.Clients;
var apiKey = Environment.GetEnvironmentVariable("ARCA_API_KEY");
using var arca = new ArcaSimpleClient(apiKey: apiKey);
if (await arca.IsAvailableAsync())
{
var connectionString = await arca.GetSecretValueAsync("ConnectionStrings:Database");
}
API Reference
| Método | Descripción |
|---|---|
IsAvailableAsync() |
Verifica conexión y autenticación |
GetSecretValueAsync(key) |
Obtiene el valor de un secreto |
GetSecretAsync(key) |
Obtiene secreto con metadata |
GetSecretsAsync(keys) |
Obtiene múltiples secretos |
ListKeysAsync(filter?) |
Lista secretos disponibles |
KeyExistsAsync(key) |
Verifica si existe un secreto |
Manejo de Errores
try
{
var secret = await arca.GetSecretValueAsync("MiClave");
}
catch (ArcaAccessDeniedException ex)
{
// Sin permiso para este secreto
}
catch (ArcaSecretNotFoundException ex)
{
// El secreto no existe
}
catch (ArcaException ex)
{
// Error de conexión u otro
}
Verificación sin excepciones
var result = await arca.GetSecretAsync("MiClave");
if (result.IsAccessDenied)
Console.WriteLine("Acceso denegado");
else if (result.Success)
Console.WriteLine($"Valor: {result.Value}");
else
Console.WriteLine($"Error: {result.Error}");
Dependency Injection (ASP.NET Core)
// Program.cs
builder.Services.AddArcaClient(
apiKey: Environment.GetEnvironmentVariable("ARCA_API_KEY")
);
// En servicios
public class MiServicio(IArcaClient arca)
{
public async Task<string> GetConnectionAsync()
=> await arca.GetSecretValueAsync("ConnectionStrings:Database");
}
Configuración con Opciones
builder.Services.AddArcaClient(options =>
{
options.ApiKey = Environment.GetEnvironmentVariable("ARCA_API_KEY");
options.Timeout = TimeSpan.FromSeconds(10);
});
Configuración de API Key
# Variable de entorno (recomendado)
[Environment]::SetEnvironmentVariable("ARCA_API_KEY", "arca_xxx...", "User")
Características
- Zero dependencias externas - Solo usa APIs nativas de .NET
- Named Pipes - Comunicación local ultra-rápida (< 1ms de latencia)
- Autenticación - API Keys con permisos granulares
- Thread-safe - Seguro para uso concurrente
License
Arca.SDK
Arca.SDK is licensed under the MIT License and may be freely used, modified, and redistributed.
Arca.NET
The main Arca.NET application is Source-Available. See LICENSE-ARCA-NET.txt for details.
| 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.