EricksonLopez.Security

dotnet-security · Multi-Tenancy y Seguridad

En esta página (20 secciones)

1. Identidad, Nivel y Perfil de Madurez#

L3 Persistencia e IntegracionesEstableMantenimiento: ActivoAOT: ParcialLicencia MITConfianza: HIGH
Cross-CuttingInfrastructurenet8.0net9.0net10.0

2. Propuesta de Valor y Problema que Resuelve#

High-performance, Native AOT-first cryptographic foundation, multi-version key lifecycle manager, password security engine, and Zero Trust authorization ecosystem for modern .NET.

Implementaciones criptográficas heredadas sufren modos vulnerables a padding oracle, rotación frágil de claves y ataques de canal lateral temporal al comparar secretos.

3. Instalación Rápida#

Paquete principal: EricksonLopez.Security

dotnet add package EricksonLopez.Security --version 1.0.0
También publicado en esta familia:
EricksonLopez.Security.NetworkEricksonLopez.Security.AbstractionsEricksonLopez.Security.CryptographyEricksonLopez.Security.Cryptography.XmlDSigEricksonLopez.Security.PkiEricksonLopez.Security.Cryptography.Pkcs11

4. Métricas Verificadas del Ecosistema#

v1.0.0
Versión Publicada en NuGet
v2.2.0
Versión HEAD del Repo
4,310
Descargas en NuGet
22
Paquetes Empaquetables
2,030
Miembros Públicos de API
7
Filas Benchmark (RyuJIT)

Instantánea recuperada UTC: 2026-12-01

5. Cuándo Usar y Cuándo NO Usar#

Cuándo usar

  • Necesitas cifrado AEAD (AES-256-GCM, ChaCha20-Poly1305), rotación de claves multi-versión, hashing Argon2/PBKDF2, Shamir Secret Sharing, MFA/FIDO2 o ABAC Zero Trust.

Cuándo NO usar

  • Solo requieres middleware estándar de cookies/JWT en ASP.NET Core sin sobres cifrados, rotación KMS ni evaluación ABAC.

6. Capacidades Principales e Invariantes de Diseño#

AEAD, Ciclo de Claves y KMS

Sobres versionados SecurityEnvelope, comparaciones en tiempo constante y proveedores AWS KMS, Azure Key Vault, Google Cloud KMS y tmpfs.

ABAC Zero Trust, MFA y FIDO2

Evaluación ABAC NIST SP 800-162, defensa anti-replay TOTP, WebAuthn/FIDO2 y comportamientos de autorización para Mediator.

7. Paquetes NuGet y Adaptadores Incluidos#

ID del PaqueteEstadoNuGet / LocalTFMsEstado AOTDescargasDescripción
EricksonLopez.SecurityPrincipalPublicadov1.0.0 / v2.2.0net8.0, net9.0, net10.0AOT: Completo282Enterprise-grade security engine, AEAD authenticated encryption (AES-GCM), multi-version key management, PBKDF2/Argon2 password security, token hashing, and secrets protection for the EricksonLopez.Security framework.
EricksonLopez.Security.NetworkPublicadov1.0.0 / v2.2.0net8.0, net9.0, net10.0AOT: Completo673Enterprise-grade Server-Side Request Forgery (SSRF) prevention and safe HTTP client handlers for .NET. Protects against RFC 1918 private IPs, loopbacks, link-local, cloud metadata endpoints, and DNS rebinding attacks.
EricksonLopez.Security.AbstractionsPublicadov1.0.0 / v2.2.0net8.0, net9.0, net10.0AOT: Completo384Core security abstractions, cryptographic ports, key lifecycle contracts, password hashing interfaces, token primitives, and secure error models for the EricksonLopez.Security ecosystem.
EricksonLopez.Security.CryptographyPublicadov1.0.0 / v2.2.0net8.0, net9.0, net10.0AOT: Completo238Core cryptography primitives for EricksonLopez.Security ecosystem, providing Native AOT-compatible and zero-allocation implementations using built-in System.Security.Cryptography APIs.
EricksonLopez.Security.Cryptography.XmlDSigPublicadov1.0.0 / v2.2.0net8.0, net9.0, net10.0AOT: Incompatible216Canonical W3C XML Digital Signature (XMLDSig) and X.509 certificate verification engine for .NET. Supports enveloped signatures, RSA-SHA256, C14N canonicalization, and fiscal compliance standards (e-CF / DGII).
EricksonLopez.Security.PkiPublicadov1.0.0 / v2.2.0net8.0, net9.0, net10.0AOT: Completo212Public Key Infrastructure (PKI) certificate validation engine for .NET. Supports CRL caching, OCSP validation, custom trust anchors, and certificate chain verification with Native AOT compatibility.
EricksonLopez.Security.Cryptography.Pkcs11Publicadov1.0.0 / v2.2.0net8.0, net9.0, net10.0AOT: Completo211Native AOT compatible PKCS#11 integration for EricksonLopez.Security ecosystem, providing hardware security module (HSM) bridging via direct unmanaged P/Invoke bindings.
EricksonLopez.Security.GoogleCloudPublicadov1.0.0 / v2.2.0net8.0, net9.0, net10.0AOT: Incompatible179Google Cloud KMS (including Cloud HSM) and Secret Manager key store and secret store adapters for EricksonLopez.Security.
EricksonLopez.Security.WebAuthn.Fido2Publicadov1.0.0 / v2.2.0net8.0, net9.0, net10.0AOT: Completo177Enterprise-grade W3C WebAuthn Level 2/3 and FIDO2 passkey engine with CBOR/COSE parsing, attestation/assertion verification, replay protection, and zero-allocation cryptographic checks with Native AOT compatibility.
EricksonLopez.Security.AwsPublicadov1.0.0 / v2.2.0net8.0, net9.0, net10.0AOT: Completo176AWS KMS key store and Secrets Manager secret store adapters for EricksonLopez.Security.
EricksonLopez.Security.AzurePublicadov1.0.0 / v2.2.0net8.0, net9.0, net10.0AOT: Completo158Azure Key Vault key store and secret store adapters for EricksonLopez.Security.
EricksonLopez.Security.HashiCorpVaultPublicadov1.0.0 / v2.2.0net8.0, net9.0, net10.0AOT: Completo154HashiCorp Vault Transit and KV v2 key store and secret store adapters for EricksonLopez.Security.
EricksonLopez.Security.Saml2Publicadov1.0.0 / v2.2.0net8.0, net9.0, net10.0AOT: Incompatible148Enterprise-grade SAML 2.0 Web Browser Single Sign-On (SSO) engine with comprehensive XML Signature Wrapping (XSW 1..8) defense, XMLDSig validation, assertion decryption, and ClaimsPrincipal mapping.
EricksonLopez.Security.Privacy.HibpPublicadov1.0.0 / v2.2.0net8.0, net9.0, net10.0AOT: Completo145Enterprise-grade Have I Been Pwned (HIBP) k-Anonymity range search client with traffic padding protection (Add-Padding: true) and breached password validator for .NET.
EricksonLopez.Security.AspNetCorePublicadov1.0.0 / v2.2.0net8.0, net9.0, net10.0AOT: Completo144ASP.NET Core integration for EricksonLopez.Security providing security headers, API key middleware, token extractors, and request security context.
EricksonLopez.Security.OpenTelemetryPublicadov1.0.0 / v2.2.0net8.0, net9.0, net10.0AOT: Incompatible144Optional OpenTelemetry instrumentation satellite for EricksonLopez.Security. Provides automatic ActivitySource registration, metrics (Meter), and semantic conventions for encrypt/decrypt, password hashing, key lifecycle, and API key validation operations.
EricksonLopez.Security.TestingPublicadov1.0.0 / v2.2.0net8.0, net9.0, net10.0AOT: Completo135Testing utilities, deterministic cryptographic doubles, fake key stores, and test assertions for EricksonLopez.Security.
EricksonLopez.Security.MfaPublicadov1.0.0 / v2.2.0net8.0, net9.0, net10.0AOT: Completo130Enterprise-grade Multi-Factor Authentication (MFA) engine implementing RFC 6238 TOTP, RFC 4226 HOTP, Base32 encoding, authenticator URI generation, and emergency recovery codes with Native AOT compatibility.
EricksonLopez.Security.WebAuthn.Fido2.Mds3Publicadov1.0.0 / v2.2.0net8.0, net9.0, net10.0AOT: Completo130FIDO Alliance Metadata Service v3 (MDS3) integration satellite for EricksonLopez.Security.WebAuthn.Fido2. Provides authenticator manufacturer validation, AAGUID lookup, and attestation certificate chain verification against the FIDO Alliance trust anchor.
EricksonLopez.Security.ZeroTrustPublicadov1.0.0 / v2.2.0net8.0, net9.0, net10.0AOT: Completo130Enterprise-grade Zero-Trust Attribute-Based Access Control (ABAC) policy evaluation engine for .NET. High-throughput in-memory evaluation, hierarchical combining algorithms (Deny-Overrides, Permit-Overrides), and Native AOT support.
EricksonLopez.Security.AnalyzersAnalizador / GeneradorPublicadov1.0.0 / v2.2.0netstandard2.0AOT: N/A (Analizador/Legado)144Roslyn diagnostic analyzers for EricksonLopez.Security. Catches common security misuse patterns at compile time: non-constant-time token comparison, undisposed SecretBuffer, insecure algorithm selection, and more.
EricksonLopez.Security.MediatorNo publicado— / v2.2.0net8.0, net9.0, net10.0AOT: Completo0Zero-Trust multi-plane CQRS authorization pipeline behaviors, NIST SP 800-63B AAL enforcement, and cross-tenant spoofing guards for EricksonLopez.Mediator.

8. Ejemplo Quick Start#

Basado en APIs públicas verificadas de EricksonLopez.Security. Compila con `<ImplicitUsings>disable</ImplicitUsings>` e importaciones explícitas.

using EricksonLopez.Security.Abstractions.Randomness;
using Microsoft.Extensions.DependencyInjection;

var services = new ServiceCollection();
services.AddEricksonLopezSecurity();

using var serviceProvider = services.BuildServiceProvider();
ICryptographicRandomNumberGenerator rng =
    serviceProvider.GetRequiredService<ICryptographicRandomNumberGenerator>();

9. Arquitectura y Flujo de Dependencias#

flowchart LR
  lib_security["EricksonLopez.Security (L3)"]
  lib_result["EricksonLopez.Result (L0)"]
  lib_security --> lib_result
  lib_mediator["EricksonLopez.Mediator (L2)"]
  lib_security -.-> lib_mediator
  lib_webhooks["EricksonLopez.Webhooks (L3)"]
  lib_webhooks --> lib_security
Topología de Dependencias de EricksonLopez.Security2 dependencias hacia librerías aguas arriba y 1 librerías dependientes aguas abajo verificadas en dependencies.json.
Ver descripción textual y tabla accesible

2 dependencias hacia librerías aguas arriba y 1 librerías dependientes aguas abajo verificadas en dependencies.json.

DirecciónLibreríaNivelTipos de Relación
Aguas arribaEricksonLopez.ResultL0Adaptador, Tiempo de compilación, Paquete NuGet
Aguas arribaEricksonLopez.MediatorL2Adaptador
Aguas abajoEricksonLopez.WebhooksL3Tiempo de compilación, Paquete NuGet
flowchart LR
  lib_security["EricksonLopez.Security (L3)"]
  lib_result["EricksonLopez.Result (L0)"]
  lib_security --> lib_result
  lib_mediator["EricksonLopez.Mediator (L2)"]
  lib_security -.-> lib_mediator
  lib_webhooks["EricksonLopez.Webhooks (L3)"]
  lib_webhooks --> lib_security

10. Target Frameworks y Matriz Native AOT / Trimming#

Inspección MSBuild `.csproj` sobre 22 paquetes: 17 Full, 0 Partial, 4 Incompatible, 1 NotApplicable (analizadores/generadores).

ID del PaqueteIsAotCompatibleEnableTrimAnalyzerEstado AOT VerificadoTarget Frameworks
EricksonLopez.SecuritytruetrueFullnet8.0, net9.0, net10.0
EricksonLopez.Security.NetworktruetrueFullnet8.0, net9.0, net10.0
EricksonLopez.Security.AbstractionstruetrueFullnet8.0, net9.0, net10.0
EricksonLopez.Security.CryptographytruetrueFullnet8.0, net9.0, net10.0
EricksonLopez.Security.Cryptography.XmlDSigfalsefalseIncompatiblenet8.0, net9.0, net10.0
EricksonLopez.Security.PkitruetrueFullnet8.0, net9.0, net10.0
EricksonLopez.Security.Cryptography.Pkcs11truetrueFullnet8.0, net9.0, net10.0
EricksonLopez.Security.GoogleCloudfalsefalseIncompatiblenet8.0, net9.0, net10.0
EricksonLopez.Security.WebAuthn.Fido2truetrueFullnet8.0, net9.0, net10.0
EricksonLopez.Security.AwstruetrueFullnet8.0, net9.0, net10.0
EricksonLopez.Security.AzuretruetrueFullnet8.0, net9.0, net10.0
EricksonLopez.Security.HashiCorpVaulttruetrueFullnet8.0, net9.0, net10.0
EricksonLopez.Security.Saml2falsefalseIncompatiblenet8.0, net9.0, net10.0
EricksonLopez.Security.Privacy.HibptruetrueFullnet8.0, net9.0, net10.0
EricksonLopez.Security.AspNetCoretruetrueFullnet8.0, net9.0, net10.0
EricksonLopez.Security.OpenTelemetryfalsefalseIncompatiblenet8.0, net9.0, net10.0
EricksonLopez.Security.TestingtruetrueFullnet8.0, net9.0, net10.0
EricksonLopez.Security.MfatruetrueFullnet8.0, net9.0, net10.0
EricksonLopez.Security.WebAuthn.Fido2.Mds3truetrueFullnet8.0, net9.0, net10.0
EricksonLopez.Security.ZeroTrusttruetrueFullnet8.0, net9.0, net10.0
EricksonLopez.Security.AnalyzersfalsefalseNotApplicablenetstandard2.0
EricksonLopez.Security.MediatortruetrueFullnet8.0, net9.0, net10.0

11. Dependencias Aguas Arriba y Dependientes Aguas Abajo#

Dependencias Aguas Arriba (2)

Dependientes Aguas Abajo (1)

12. Adaptadores Opcionales e Integraciones Externas#

Aristas de Adaptadores Internos y Paquetes de Integración

Dependencias NuGet Externas Verificadas (16)

AWSSDK.KeyManagementServiceAWSSDK.SecretsManagerAzure.IdentityAzure.Security.KeyVault.KeysAzure.Security.KeyVault.SecretsGoogle.Cloud.Kms.V1Google.Cloud.SecretManager.V1Konscious.Security.Cryptography.Argon2Microsoft.Extensions.DependencyInjection.AbstractionsMicrosoft.Extensions.HttpMicrosoft.Extensions.Logging.AbstractionsMicrosoft.Extensions.OptionsMicrosoft.Extensions.TimeProvider.TestingOpenTelemetry.ApiSystem.Formats.CborSystem.Security.Cryptography.Xml

13. Resumen de Configuración y Registro en DI#

Puntos de Entrada DI y Configuración Verificados

  • TmpfsSecretConfigurationExtensions.AddTmpfsSecrets

    Adds Docker/Kubernetes tmpfs RAM-backed secret files to `builder`.

  • KestrelDualPortExtensions.UseHardenedDualPortKestrel

    Applies Kestrel perimeter hardening and optional dual-port listener separation bound from `configuration`.

  • IdentityPasswordHasherBridge.AddEricksonLopezIdentityPasswordHasher<TUser>

    Registers `IdentityPasswordHasherBridge<TUser>` as the `IPasswordHasher<TUser>` implementation.

  • SecurityMediatorServiceCollectionExtensions.AddZeroTrustMediatorAuthorization

    Registers the open-generic `ZeroTrustAuthorizationBehavior<TRequest, TResponse>` in the service collection.

  • SecurityMfaServiceCollectionExtensions.AddDistributedTotpReplayStore

    Overrides the default in-memory TOTP replay store with a delegate-based distributed store handler.

  • SecurityMfaServiceCollectionExtensions.AddDistributedTotpReplayStore<TStore>

    Overrides the default in-memory TOTP replay store with a custom distributed store implementation.

  • SecurityMfaServiceCollectionExtensions.AddSecurityMfa

    Registers the `ITotpService` implementation into the service collection.

  • SecurityOpenTelemetryExtensions.AddEricksonLopezSecurityInstrumentation

    Subscribes the EricksonLopez.Security `SecurityMeter` to the OpenTelemetry metrics pipeline.

  • SecurityPkiServiceCollectionExtensions.AddSecurityPki

    Registers the `ICertificateChainValidator` implementation into the service collection.

  • HibpServiceCollectionExtensions.AddHaveIBeenPwned

    Registers the Have I Been Pwned k-Anonymity client and password validator.

  • ISaml2ClaimsMapper.MapToPrincipal

    Maps a SAML 2.0 assertion into a strongly-typed `ClaimsPrincipal`.

  • Saml2ClaimsMapper.MapToPrincipal

    Maps a SAML 2.0 assertion into a strongly-typed `ClaimsPrincipal`.

Tipos Públicos y Contratos Clave

  • EricksonLopez.Security.Abstractions.Authorization.IGenerationalPermissionCache (interface)

    Defines a two-tier (L1 in-memory + L2 distributed epoch-keyed) stampede-protected permission cache with strict fail-closed semantics (`PermissionSnapshot.Deny`) upon backing store or cache outages.

  • EricksonLopez.Security.Abstractions.Authorization.IPermissionSnapshotSource (interface)

    Defines the authoritative persistence data source used by `IGenerationalPermissionCache` on L1+L2 cache misses or live delegated session evaluations.

  • EricksonLopez.Security.Abstractions.Authorization.PermissionScopeKey (record)

    Identifies the exact multi-plane security scope for resolving and caching a `PermissionSnapshot`.

  • EricksonLopez.Security.Abstractions.Authorization.PermissionSnapshot (record)

    Represents an immutable, effective authorization snapshot for a principal within a specific security plane and scope, supporting deterministic permission hashing and fail-closed default denial.

  • EricksonLopez.Security.Abstractions.Cryptography.AeadAlgorithm (enum)

    Specifies the Authenticated Encryption with Associated Data (AEAD) algorithm.

  • EricksonLopez.Security.Abstractions.Cryptography.AuthenticatedContext (struct)

    Provides a strongly-typed cryptographic context used as Authenticated Associated Data (AAD) in Authenticated Encryption with Associated Data (AEAD) schemes.

  • EricksonLopez.Security.Abstractions.Cryptography.EncryptedData (record)

    Encapsulates the output of an AEAD encryption operation: ciphertext, authentication tag, and initialization nonce.

  • EricksonLopez.Security.Abstractions.Cryptography.IAuthenticatedEncryptionEngine (interface)

    Defines the contract for high-performance, low-allocation Authenticated Encryption with Associated Data (AEAD) engines.

  • EricksonLopez.Security.Abstractions.Cryptography.IBlindIndexService (interface)

    Defines a deterministic blind-indexing contract (HMAC-SHA256 with HKDF-derived subkey) for equality searches over encrypted Personally Identifiable Information (PII).

  • EricksonLopez.Security.Abstractions.Cryptography.IDigitalSignatureEngine (interface)

    Defines the contract for high-performance digital signature generation and verification.

  • EricksonLopez.Security.Abstractions.Cryptography.IEncryptionKeyProvider (interface)

    Defines the contract for providing cryptographic keys for encryption and decryption operations based on purpose and version.

  • EricksonLopez.Security.Abstractions.Cryptography.ISecurityEnvelopeSerializer (interface)

    Defines contracts for serializing and deserializing tamper-resistant binary `SecurityEnvelope` instances.

14. Benchmarks de Rendimiento Verificados#

Todas las mediciones verificadas provienen estrictamente de `BenchmarkDotNet.Artifacts` ejecutados sobre .NET RyuJIT (existen 0 ejecuciones NativeAOT en esta instantánea).

Filas totales: 7 · Medidos: 6 · NA / Error: 1 · Suites: 2

Runtimes observados: .NET 10.0.11 X64 RyuJIT x86-64-v4 · .NET 10.0.12 X64 RyuJIT x86-64-v4

CPUs observadas: AMD Ryzen 7 9800X3D 4.70GHz, 1 CPU, 8 logical and 8 physical cores

SuiteMétodoRuntimeMedia (ns)Asignado (B)Estado
SecurityBenchmarksSecurityEnvelope Serialize (Span, Zero-Alloc).NET 10.0.12 X64 RyuJIT x86-64-v417.50measured
SecurityBenchmarksSecurityEnvelope Deserialize (Span).NET 10.0.12 X64 RyuJIT x86-64-v435.71472measured
SecurityBenchmarksSecretBuffer Allocate & Dispose (ZeroMemory).NET 10.0.12 X64 RyuJIT x86-64-v437.3332measured
SecurityBenchmarksConstantTime FixedTimeEquals (32 bytes).NET 10.0.12 X64 RyuJIT x86-64-v489.380measured
SecurityBenchmarksToken Generation (URL-Safe 32 bytes).NET 10.0.12 X64 RyuJIT x86-64-v4122.31388measured
SecurityBenchmarksToken Hash (SHA-256).NET 10.0.12 X64 RyuJIT x86-64-v4144.28184measured

15. Historial de Versiones y Estado NuGet vs Repositorio#

Desfase de versiones detectado: la última versión publicada en NuGet.org es v1.0.0, mientras el HEAD del repositorio local está en v2.2.0.

VersiónOrigenFecha de PublicaciónResumen
v1.0.0 ↗github2026-09-24Ecosystem Packages in this release | Package | Version | |---------|---------| | `EricksonLopez.Security.Abstractions` | `1.0.0` | | `EricksonLopez.Security` | `1.0.0` | | `EricksonLopez.Security.Analyzers` | `1.0.0` | | `EricksonLopez.Security.AspNetCore` | `1.0.0` | | `EricksonLopez.Security.Aws` | `1.0.0` | | `EricksonLopez.Security.Azure` | `1.0.0` | | `EricksonLopez.Security.Cryptography` ...
v1.0.0 ↗nuget2026-09-24Published EricksonLopez.Security 1.0.0 to NuGet.org.

Librerías en el mismo nivel, capa arquitectónica o vinculadas directamente mediante aristas de dependencia.

17. Documentación, API Reference y Enlaces del Portal#

Las páginas conceptuales por librería en Starlight se completan en M4; las páginas de API Reference en M3.2.

18. Repositorio Fuente, Licencia y Contribución#

Publicado bajo Licencia MIT. Todos los ensamblados cumplen los invariantes de compilación EricksonLopez.*: importaciones explícitas, firma fuerte (`EricksonLopez.snk`) y metadatos de autor en ASCII (`Erickson Lopez`).

19. Resolución de Problemas, Riesgos y Migración#

  • Los paquetes criptográficos núcleo y FIDO2 son Full AOT; 4 subpaquetes (Cryptography.XmlDSig, GoogleCloud, OpenTelemetry, Saml2) declaran IsAotCompatible=false.
  • Desfase de versiones detectado: la última versión publicada en NuGet.org es v1.0.0, mientras el HEAD del repositorio local está en v2.2.0.

20. Evidencia de Calidad y Verificación#

Firma Fuerte (`EricksonLopez.snk`)
EricksonLopez.snk
`ImplicitUsings=disable`
disable
Extracción de Documentación XML
Verificado (77 namespaces, 365 tipos, 2030 miembros)
Atributos MSBuild AOT / Trimming
17 Full / 0 Partial / 4 Incompatible / 1 N/A
Artefactos BenchmarkDotNet
7 total (6 measured, 1 na_error)

Límites Explícitos de Verificación y Alcance

  • Todas las mediciones verificadas provienen estrictamente de `BenchmarkDotNet.Artifacts` ejecutados sobre .NET RyuJIT (existen 0 ejecuciones NativeAOT en esta instantánea).
  • 1 no publicados

Buscar en el Ecosistema EricksonLopez.*

Escribe el nombre de una librería, ID de paquete NuGet, tipo .NET o concepto arquitectónico para buscar en el portal.