Posts

Showing posts with the label web

Guide to Implementing Authentication with NestJS and SSO Saml2

Image
Introduction SSO (Single Sign-On) is a centralized authentication mechanism that allows users to access multiple different systems with a single set of login credentials. Key advantages include: Improving user experience by reducing the number of passwords to remember. Enhancing security through centralized management and minimizing the risk of brute-force attacks at various points. Purpose: To enable users to log in only once to one location (Identity Provider - IdP) but be able to access multiple different applications without re-entering their password. Example: You log into your Google account, then open Gmail, YouTube, Drive without logging in again. SAML & SAML2 (Security Assertion Markup Language) SAML 1.0/1.1 were the first versions that laid the foundation for exchanging identity data using XML, but are now obsolete. SAML 2.0 (Saml2) is a strong combination and improvement, supporting modern web scenarios and becoming the most popular standard for SSO in Corporate/Enterpri...

Implement Cache with Nginx

Image
Introduction Nginx is an open-source web server that functions as a reverse proxy, load balancer and HTTP cache. Nginx is famous for its ability to handle thousands of concurrent connections with very low memory consumption compared to servers like Apache . The secret lies in its Event-driven and Asynchronous architecture. Instead of creating a new process/thread for each request, Nginx uses a small number of worker processes to manage all connections. Roles Web Server : Serves static content (HTML, CSS, images) extremely fast. Reverse Proxy : Stands in front of backend servers (like NodeJS, Python, Java) to receive requests from clients, forward requests to the backend and return results to the client. This helps conceal system architecture and enhance security. Load Balancer : Distributes traffic evenly across multiple backend servers, preventing overload on a single server and ensuring high availability. HTTP Cache : Caches frequently requested content, reducing load on backend se...