Book Image

Securing Applications in Node.js [Video]

By : Forbes Lindesay
Book Image

Securing Applications in Node.js [Video]

By: Forbes Lindesay

Overview of this book

<p><span id="description" class="sugar_field">Everyone agrees that web application security is very important but there are very few to take it seriously. There have been lots of high-profile instances of websites having their password databases exposed to the World (e.g. Ashley Madison and Adobe). You don’t want the application you are building to be the next big security horror story. This course will get you up-to-speed on the key attack vectors, quickly covering issues such as cross-site scripting, CSRF, and SQL injection. It will provide you with clear, practical approaches to mitigating these problems. It will show you how to implement OAuth and two-factor authentication for the additional protection of users who need it. Further, we will delve into the critical process of adding secured, well-thought-out authentication and authorization to a Node.js application. After completing this course, you should be confident in your ability to make an application secure with Node.js and keep your data protected.</span></p> <p><span id="description" class="sugar_field">All the code and supporting files for this course are available on Github at <a style="font-weight: normal;" href="https://github.com/PacktPublishing/Securing-Applications-in-Node.js-V-" target="_new">https://github.com/PacktPublishing/Securing-Applications-in-Node.js-V-</a></span></p> <h1>Style and Approach</h1> <p>This course provides step-by-step instructions along with the required implementations showcasing various security issues and ways to mitigate them. The author also highlights some practical examples wherever applicable during the course.</p>
Table of Contents (7 chapters)
Chapter 3
SQL Injection and Cross-Site Scripting
Content Locked
Section 2
Preventing SQL Injection with Template Literals
SQL must be parameterized in order to prevent SQL Injection. Template literals provide a clean syntax for achieving this without sacrificing readability or clarity of code. Students should understand how these work and how to use them. - Describe how parameterized SQL queries use placeholders in the query and pass values separately - Describe how tagged template literals support building DSLs within JavaScript - Introduce the @moped/sql library as an implementation of this and use it in our application