Chapter 7. Implementing Security, Encryption, and Authentication

In this chapter we will cover:

  • Implementing Basic Authentication
  • Cryptographic password hashing
  • Implementing Digest Authentication
  • Setting up an HTTPS web server
  • Preventing cross-site request forgery

Introduction

When it comes to production web servers, security is paramount. The importance of security correlates with the importance of the data or services we provide. But even for the smallest projects, we want to ensure our systems aren't vulnerable to attack.

Many web development frameworks provide built-in security, which is a two-sided coin. On one side, we don't have to overly concern ourselves with the details (except for the basics, like cleaning user input before passing it into ...

Get Node Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.