Securing Django Applications
1h 18mAdvanced2020-10-06
Authors

Rudolf Olah
Full-Stack Web Developer
Course details
The protection of user privacy and data is a clear mandate for business success. In this course, learn how to protect your Django web app using essential security and authentication measures. Using a sample project—a pre-built Django web app and a REST API for that web app—instructor Rudolf Olah shows how to add code that keeps your app safe from cyberattacks. Discover how to add SMS two-factor authentication, set up per-object permissions, and leverage per-group permissions to allow groups of users to access, modify, and delete data. Plus, learn how to create audit logs for compliance, implement zero-knowledge encryption, write a unit test to ensure that server data is fully encrypted for a user, and more.
Skills covered
DjangoBack-End Web DevelopmentFull-Stack Web DevelopmentAdvancedWeb DevelopmentOpen Source
Concepts
0. Introduction
- 01 - Security and Django
- 02 - What you should know
- 03 - What's included in the project
- 04 - Installing the project
- 05 - Running the server
1. Permissions, Access Controls, Activity Logs
- 06 - Setting up per-object permissions in Django
- 07 - Enabling per-object permissions in Django
- 08 - Unit test for per-object permissions in Django
- 09 - Creating a group permissions model
- 10 - Unit test for access control and group permissions
- 11 - Adding activity logs for auditing
- 12 - Deleting objects in an audit compliance-compatible way
2. Throttling a Flood of Requests
- 13 - Using ApacheBench to simulate a flood of requests
- 14 - How to ensure actions happen only once
- 15 - Unit testing idempotent actions that should only happen once
- 16 - Using background queues to throttle floods of requests
- 17 - Unit testing background queue flood prevention
3. Protecting Data and Data Privacy
- 18 - Per-field encryption of data in Django
- 19 - Unit testing per-field encryption
- 20 - Zero knowledge encryption of data in Django
- 21 - Unit testing zero knowledge encryption
- 22 - Packaging user data for download
4. 2FA - Two-Factor Authentication
- 23 - Using Twilio to send an SMS code
- 24 - Confirming SMS code and enabling 2FA
- 25 - Validating 2FA login before performing actions in Django
- 26 - Unit testing 2FA login requirement for Django REST API
5. CSRF - Cross-Site Request Forgery Protection
- 27 - Enabling CSRF tokens in Django
- 28 - Unit testing Django forms that use CSRF
Conclusion
- 29 - Next steps