Web Fortified: Best Practices for Web App Security

Rate this content
Bookmark

In today's world, prioritizing your application's security is crucial. All the data stored in it should be kept safe and protected, just like the inhabitants of a fortress that rely on high walls for their defense. However, history and movies have shown that even the most robust walls can't withstand an attack if weak points can be exploited. This is also true for VueJS applications.


Join me for a concise, practical session on fortifying your Vue.js apps against security threats and implementing best practices.

This talk has been presented at JSNation 2024, check out the latest edition of this JavaScript Conference.

FAQ

Ramona Schwering uses the analogy of a fortress to explain web application security, emphasizing the importance of protecting valuable data and features from external threats.

The top three security risks mentioned are broken access control, cryptographic failures, and injection attacks.

Broken access control is a security risk related to improper authorization mechanisms, allowing unauthorized users to access restricted resources.

Displaying generic error messages (e.g., 'Either username or password is wrong') prevents attackers from knowing which specific part of the login credentials is incorrect, making brute-force attacks more difficult.

Injection is a security risk where untrusted input is supplied to a program and processed by an interpreter, leading to the execution of malicious code. Examples include SQL injection and cross-site scripting (XSS).

Best practices to prevent injection attacks include never using untrusted content as component templates, using proper escaping of content, and ensuring user-provided data is validated, filtered, or sanitized.

Keeping NPM packages up to date is crucial to avoid vulnerabilities, as outdated packages may have known security issues that can be exploited by attackers.

Ramona Schwering recommends resources such as the HTML5 best practices page and the OWASP project for comprehensive web security best practices.

The speaker is Ramona Schwering, a developer advocate at Auth0, a Google Developer Expert in Web Technologies, and a Cypress Ambassador.

The main topic of the talk is web security and how to keep web applications secure from various threats.

Ramona Schwering
Ramona Schwering
22 min
17 Jun, 2024

Comments

Sign in or register to post your comment.

Video Summary and Transcription

This Talk, titled 'Fortify or App Fortified', discusses the concept of treating your application as a fortress to protect it from outside threats. It highlights the importance of web application security and the risks associated with broken access control, injection, and cryptographic values. The Talk also emphasizes the need to apply best practices and use frameworks' security features. Additionally, it addresses the security concerns related to user-provided URLs, style injection, and JavaScript injections. The summary concludes by emphasizing the importance of keeping dependencies updated and following best practices to ensure project security.

1. Introduction to Web Security and Fortresses

Short description:

Hello, everyone. I'm so glad to be here at JS Nation this year and talk about web security and how to keep your app as a fortress. My name is Ramona Schwering, a developer advocate at Auth0 and a Google Developer Expert in Web Technologies. This talk is called Fortify or App Fortified. Try to see your app as a fortress. Let's explore the concept of fortresses through movies, like Lord of the Rings, where a fortress called Helms Deep serves as a refuge. However, even with a disclaimer of never being conquered, a weak point was exploited.

Hello, everyone. I'm so glad to be here at JS Nation this year and talk about one topic, which is really close to my heart. It's web security and how to stay safe in the world of dangerous enemies, attackers, you name it, because there are lots of dangers out there in the web.

And yeah, I want to show you how to keep your app as a fortress. But before that, real quick, my name is Ramona, Ramona Schwering. I'm working as a developer advocate at Auth0. And besides that, I'm a Google Developer Expert in Web Technologies and a Cypress Ambassador. So you might already have met me before talking about testing, but there are more and other really important topics to talk about, and it's security for this time.

Okay, so this talk is called Fortify or App Fortified. Try to see your app as a fortress. And if you think about fortresses, what do they do normally? Well, even if it's like a building you see in environment, if you travel or in movies, they protect something precious. And yeah, movies are actually the place where I saw fortresses a lot. And this little screen here has been taken from a movie I really enjoy. It's called Lord of the Rings. You might have heard about it. It's about a journey of a hobbit who needs to destroy a certain ring. And it's a trilogy. So there are three films, and especially the second one, the second part, I really enjoyed a lot, no matter if it was a book or the movie, like the one called Two Towers. And there's a fortress called Helms Deep in it. And it is meant as a refuge. So it's meant to protect all of Ulthuan, which are the people of Rohan, so like a region or country in the furthest meaning, I think. They should be protected from the assault of the Zaruman forces. And they had a disclaimer that it was never conquered. Well, never conquered, 100% security. I guess we heard it before at some point, right? Well, back to the fortress. You can guess, it didn't hold true. At least a part of the fortress didn't hold. And of course, as it's in movies, it's almost a cliche. It's again the Kilmaryr the Sear, which was a weak point. Hello, Devstar? It was the same as that was too.

2. The Importance of Protecting Your Application

Short description:

There's no fortress which is secure all the time. Your application's protection can be regarded as a fortress, where you want to protect everything inside against outside threats. We should always be doubtful and really, really careful.

So they have a cover being a weak point. And if you regard the books, they didn't even need it, as there's a gutter to take. And this led them to basically have the big first wall being blown off. And they almost have been overwhelmed. So yeah, there's no fortress which is secure all the time.

Why do I tell you that? So your application's protection can be regarded as a fortress, where you want to protect everything what's inside against outside threats. May it be data, may it be the features which you would like to have paid users or anything precious. And there's lots of precious things inside of a web application, right? So yeah, we should regard our application as a fortress.

And no matter if we are at Lord of the Rings, either in movie or media, or in the real world, the world is changing a lot. More vulnerabilities are coming up. So we should always be doubtful. Like Theodin is. That if we say a fortress or an application has never been fallen or attacked or hacked, we should be doubtful and really, really careful. Even if it was a late lesson for Theodin. We should never feel too safe.

Check out more articles and videos

We constantly think of articles and videos that might spark Git people interest / skill us up or help building a stellar career

Building Better Websites with Remix
React Summit Remote Edition 2021React Summit Remote Edition 2021
33 min
Building Better Websites with Remix
Top Content
Remix is a web framework built on React Router that focuses on web fundamentals, accessibility, performance, and flexibility. It delivers real HTML and SEO benefits, and allows for automatic updating of meta tags and styles. It provides features like login functionality, session management, and error handling. Remix is a server-rendered framework that can enhance sites with JavaScript but doesn't require it for basic functionality. It aims to create quality HTML-driven documents and is flexible for use with different web technologies and stacks.
Speeding Up Your React App With Less JavaScript
React Summit 2023React Summit 2023
32 min
Speeding Up Your React App With Less JavaScript
Top Content
Watch video: Speeding Up Your React App With Less JavaScript
Mishko, the creator of Angular and AngularJS, discusses the challenges of website performance and JavaScript hydration. He explains the differences between client-side and server-side rendering and introduces Quik as a solution for efficient component hydration. Mishko demonstrates examples of state management and intercommunication using Quik. He highlights the performance benefits of using Quik with React and emphasizes the importance of reducing JavaScript size for better performance. Finally, he mentions the use of QUIC in both MPA and SPA applications for improved startup performance.
Full Stack Documentation
JSNation 2022JSNation 2022
28 min
Full Stack Documentation
Top Content
The Talk discusses the shift to full-stack frameworks and the challenges of full-stack documentation. It highlights the power of interactive tutorials and the importance of user testing in software development. The Talk also introduces learn.svelte.dev, a platform for learning full-stack tools, and discusses the roadmap for SvelteKit and its documentation.
SolidJS: Why All the Suspense?
JSNation 2023JSNation 2023
28 min
SolidJS: Why All the Suspense?
Top Content
Suspense is a mechanism for orchestrating asynchronous state changes in JavaScript frameworks. It ensures async consistency in UIs and helps avoid trust erosion and inconsistencies. Suspense boundaries are used to hoist data fetching and create consistency zones based on the user interface. They can handle loading states of multiple resources and control state loading in applications. Suspense can be used for transitions, providing a smoother user experience and allowing prioritization of important content.
From GraphQL Zero to GraphQL Hero with RedwoodJS
GraphQL Galaxy 2021GraphQL Galaxy 2021
32 min
From GraphQL Zero to GraphQL Hero with RedwoodJS
Top Content
Tom Pressenwurter introduces Redwood.js, a full stack app framework for building GraphQL APIs easily and maintainably. He demonstrates a Redwood.js application with a React-based front end and a Node.js API. Redwood.js offers a simplified folder structure and schema for organizing the application. It provides easy data manipulation and CRUD operations through GraphQL functions. Redwood.js allows for easy implementation of new queries and directives, including authentication and limiting access to data. It is a stable and production-ready framework that integrates well with other front-end technologies.
RedwoodJS: The Full-Stack React App Framework of Your Dreams
React Summit Remote Edition 2021React Summit Remote Edition 2021
43 min
RedwoodJS: The Full-Stack React App Framework of Your Dreams
Top Content
Redwood JS is a full stack React app framework that simplifies development and testing. It uses a directory structure to organize code and provides easy data fetching with cells. Redwood eliminates boilerplate and integrates Jest and Storybook. It supports pre-rendering and provides solutions for authentication and deployment. Redwood is a cross-client framework that allows for building web and mobile applications without duplicating work.

Workshops on related topic

Building WebApps That Light Up the Internet with QwikCity
JSNation 2023JSNation 2023
170 min
Building WebApps That Light Up the Internet with QwikCity
Featured WorkshopFree
Miško Hevery
Miško Hevery
Building instant-on web applications at scale have been elusive. Real-world sites need tracking, analytics, and complex user interfaces and interactions. We always start with the best intentions but end up with a less-than-ideal site.
QwikCity is a new meta-framework that allows you to build large-scale applications with constant startup-up performance. We will look at how to build a QwikCity application and what makes it unique. The workshop will show you how to set up a QwikCitp project. How routing works with layout. The demo application will fetch data and present it to the user in an editable form. And finally, how one can use authentication. All of the basic parts for any large-scale applications.
Along the way, we will also look at what makes Qwik unique, and how resumability enables constant startup performance no matter the application complexity.
Back to the Roots With Remix
React Summit 2023React Summit 2023
106 min
Back to the Roots With Remix
Featured Workshop
Alex Korzhikov
Pavlik Kiselev
2 authors
The modern web would be different without rich client-side applications supported by powerful frameworks: React, Angular, Vue, Lit, and many others. These frameworks rely on client-side JavaScript, which is their core. However, there are other approaches to rendering. One of them (quite old, by the way) is server-side rendering entirely without JavaScript. Let's find out if this is a good idea and how Remix can help us with it?
Prerequisites- Good understanding of JavaScript or TypeScript- It would help to have experience with React, Redux, Node.js and writing FrontEnd and BackEnd applications- Preinstall Node.js, npm- We prefer to use VSCode, but also cloud IDEs such as codesandbox (other IDEs are also ok)
0 to Auth in an hour with ReactJS
React Summit 2023React Summit 2023
56 min
0 to Auth in an hour with ReactJS
WorkshopFree
Kevin Gao
Kevin Gao
Passwordless authentication may seem complex, but it is simple to add it to any app using the right tool. There are multiple alternatives that are much better than passwords to identify and authenticate your users - including SSO, SAML, OAuth, Magic Links, One-Time Passwords, and Authenticator Apps.
While addressing security aspects and avoiding common pitfalls, we will enhance a full-stack JS application (Node.js backend + React frontend) to authenticate users with OAuth (social login) and One Time Passwords (email), including:- User authentication - Managing user interactions, returning session / refresh JWTs- Session management and validation - Storing the session securely for subsequent client requests, validating / refreshing sessions- Basic Authorization - extracting and validating claims from the session token JWT and handling authorization in backend flows
At the end of the workshop, we will also touch other approaches of authentication implementation with Descope - using frontend or backend SDKs.
OWASP Top Ten Security Vulnerabilities in Node.js
JSNation 2024JSNation 2024
97 min
OWASP Top Ten Security Vulnerabilities in Node.js
Workshop
Marco Ippolito
Marco Ippolito
In this workshop, we'll cover the top 10 most common vulnerabilities and critical security risks identified by OWASP, which is a trusted authority in Web Application Security.During the workshop, you will learn how to prevent these vulnerabilities and develop the ability to recognize them in web applications.The workshop includes 10 code challenges that represent each of the OWASP's most common vulnerabilities. There will be given hints to help solve the vulnerabilities and pass the tests.The trainer will also provide detailed explanations, slides, and real-life examples in Node.js to help understand the problems better. Additionally, you'll gain insights from a Node.js Maintainer who will share how they manage security within a large project.It's suitable for Node.js Developers of all skill levels, from beginners to experts, it requires a general knowledge of web application and JavaScript.
Table of contents:- Broken Access Control- Cryptographic Failures- Injection- Insecure Design- Security Misconfiguration- Vulnerable and Outdated Components- Identification and Authentication Failures- Software and Data Integrity Failures- Security Logging and Monitoring Failures- Server-Side Request Forgery
Let AI Be Your Docs
JSNation 2024JSNation 2024
69 min
Let AI Be Your Docs
Workshop
Jesse Hall
Jesse Hall
Join our dynamic workshop to craft an AI-powered documentation portal. Learn to integrate OpenAI's ChatGPT with Next.js 14, Tailwind CSS, and cutting-edge tech to deliver instant code solutions and summaries. This hands-on session will equip you with the knowledge to revolutionize how users interact with documentation, turning tedious searches into efficient, intelligent discovery.
Key Takeaways:
- Practical experience in creating an AI-driven documentation site.- Understanding the integration of AI into user experiences.- Hands-on skills with the latest web development technologies.- Strategies for deploying and maintaining intelligent documentation resources.
Table of contents:- Introduction to AI in Documentation- Setting Up the Environment- Building the Documentation Structure- Integrating ChatGPT for Interactive Docs
Learn Fastify One Plugin at a Time
Node Congress 2021Node Congress 2021
128 min
Learn Fastify One Plugin at a Time
Workshop
Matteo Collina
Matteo Collina
Fastify is an HTTP framework for Node.js that focuses on providing a good developer experience without compromising on performance metrics. What makes Fastify special are not its technical details, but its community which is wide open for contributions of any kind. Part of the secret sauce is Fastify plugin architecture that enabled developers to write more than a hundred plugins.This hands-on workshop is structured around a series of exercises that covers from basics "hello world", to how to structure a project, perform database access and authentication.

https://github.com/nearform/the-fastify-workshop