Security is a major concern for web applications and services that use the HTTP protocol. Although HTTP is a versatile protocol that can be used in many different platforms, it is vulnerable to security threats. Enter HMAC, or Hash-based Message Authentication Code, a widely used method of securing web APIs.
Security is a major concern for web applications and services that use the HTTP protocol. Although HTTP is a versatile protocol that can be used in many different platforms, it is vulnerable to security threats. Enter HMAC, or Hash-based Message Authentication Code, a widely used method of securing web APIs.
HMAC is a cryptographic authentication technique that uses a hash function together with a shared secret key, i.e., the key is known to both the server and the client. HMAC not only gives you authentication, but also verifies that the message hasn’t been changed in transit. Plus it is fast, lightweight, and stateless, with no secrets sent over the network and no need for token stores or session management.
In this post, we’ll examine how we can work with HMAC authentication in minimal APIs in ASP.NET Core. To use the code examples provided in this article, you should have Visual Studio 2022 or Visual Studio 2026 installed in your system. If you don’t already have a copy, you can download Visual Studio 2026 here.
Hash-based Message Authentication Code (HMAC) is a method of creating a message authentication code that uses a hash function and a symmetric key (i.e., a key used both to encrypt and decrypt the message). In HMAC authentication, the two entities that exchange a message share the symmetric key (i.e., the key is known to both the server and the client). The symmetric key is typically generated using a cryptographic random number generator and stored in a database.
HMAC provides fast, secure, stateless, lightweight services from service-to-service communications. It is used to verify that the message was received without modification (i.e., the message has integrity) and that it has originated from a trusted entity (i.e., the message has authenticity).
In context
- Topic: Ciberseguridad — Riesgo, identidad, respuesta a incidentes y cumplimiento.
- Source: InfoWorld
- Published: 27/08/2026
Continue reading at the original source →
Excerpt published automatically by the site radar. The full text belongs to its publisher and is linked above.
Por qué importa
La mayoría de los incidentes que terminan siendo caros no empezaron con una técnica sofisticada. Empezaron con una cuenta que debió cerrarse cuando alguien renunció, un servidor que nadie sabía que seguía prendido, o un permiso amplio que se dio para salir del paso y quedó.
Separo el riesgo técnico del riesgo de negocio, porque no siempre coinciden. Una vulnerabilidad crítica en un sistema aislado importa menos que una mediana en el sistema que factura. Priorizar por severidad sin mirar dónde está el dinero es una forma cara de trabajar mucho y proteger poco.
Lo que suele salir mal
Lo que más veo fallar es el respaldo. Está configurado, corre todas las noches, nadie lo revisa. El día que hay que restaurar aparece que llevaba cuatro meses fallando en silencio, o que se respaldaba todo menos justo lo que hacía falta. Un respaldo que no se restauró nunca es una suposición.
Qué mirar
- Si hubo terceros o proveedores en la cadena, porque el perímetro hoy incluye a los socios.
- Cuánto tardaron en detectarlo, que suele ser la métrica más reveladora de todo el caso.
- Si el acceso inicial vino de una cuenta legítima mal manejada, que es el patrón más frecuente.
Cómo leo esta entrada
Si esto pasara cerca de una organización que asesoro, la conversación que forzaría no es sobre herramientas: es sobre el ensayo. Cuántas veces se simuló el incidente, quién llama a quién, qué se le dice al cliente y en qué momento. El plan que nunca se ensayó no es un plan, es un documento.
La noticia original está publicada en otro idioma; acá se cita el extracto tal como lo entrega el medio y el comentario se escribe en español.
¿Lo estás viviendo en tu equipo?
Abrí el chat y contame cómo lo están manejando. Me interesa comparar notas.