viernes, 25 de junio de 2021

Content Security Policy (CSP)

Content-Security-Policy is the name of a HTTP response header that modern browsers use to enhance the security of the document (or web page). The Content-Security-Policy header allows you to restrict how resources such as JavaScript, CSS, or pretty much anything that the browser loads.

Although it is primarily used as a HTTP response header, you can also apply it via a meta tag.


Content Security Policy browser test


CSP Reporting API

Generic reporting framework which allows web developers to associate a set of named reporting endpoints with an origin. Various platform features can use these endpoints to deliver feature-specific reports in a consistent manner.


CSP Evaluator

CSP Evaluator allows developers and security experts to check if a Content Security Policy (CSP) serves as a strong mitigation against cross-site scripting attacks. It assists with the process of reviewing CSP policies, which is usually a manual task, and helps identify subtle CSP bypasses which undermine the value of a policy.

viernes, 4 de junio de 2021

Colas de mensajes para .Net Core

Al momento de escribir este artículo, MSMQ (Microsoft Message Queuing) y su librefía System.Messaging no está disponible para ejecutarse en entornos .Net Core 5. Se puede consumir en .Net Core 5 pero el sistema debería estar instalado en Windows. Ver MSMQ is dead.

Entonces, ¿cual es la mejor forma de implementar una cola de mensajes / tareas en .Net Core 5?

Opciones para analizar:

  1. RabbitMQ - AMQP (Advanced Message Queuing Protocol)
  2. Apache Kafka - ¿Qué es Apache Kafka?  (Linux) - Apache Kafka
  3. NServiceBus - A simple explanation of NServiceBus and why you need it
  4. Kafka vs RabbitMQ


Ver documentos de Microsoft:


Conclusiones
Para comunicación entre microservicios se recomienda utilizar el protocolo AMQP. Es un protocolo abierto y probado funcionando hace largo tiempo. La implementación más exitosa es la de RabbitMQ que además también se puede instalar en Windows.