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" />
                    
Directory.Packages.props
<PackageReference Include="Arca.SDK" />
                    
Project file
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
                    
#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
                    
Install as a Cake Addin
#tool nuget:?package=Arca.SDK&version=1.0.2
                    
Install as a Cake Tool

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 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.

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
1.0.2 197 12/23/2025
1.0.1 140 12/21/2025
1.0.0 110 12/20/2025