Code

Opened 4 years ago

Closed 3 years ago

#14201 closed New feature (fixed)

Add a "security overview" page to the docs

Reported by: russellm Owned by: davidfischer
Component: Documentation Version: 1.2
Severity: Normal Keywords: security
Cc: djfische@… Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

We should have a single place in the docs that addresses security issues, in the same vein as the discussion on database optimization.

This is to highlight problems that aren't security issues, but could lead to security issues if not addressed or understood adequately.

Example topics:

  • How XSS is handled
  • How CSRF is handled
  • Limitations of Django's CSRF handling with MItM attacks and with untrusted subdomains.
  • Server configuration issues that should be kept in mind (e.g., keeping code out of the server root, throttling file upload size c.f. #14192).

Attachments (2)

fo (1 bytes) - added by db 4 years ago.
14201-security.diff (8.6 KB) - added by davidfischer 3 years ago.
updated security doc with sql injection and clickjacking

Download all attachments as: .zip

Change History (13)

comment:1 Changed 4 years ago by russellm

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

Changed 4 years ago by db

comment:2 Changed 4 years ago by db

woops sorry, didn't mean to do that...

comment:3 Changed 3 years ago by graham_king

  • Keywords security added
  • Severity set to Normal
  • Type set to New feature

comment:4 Changed 3 years ago by davidfischer

  • Cc djfische@… added
  • Easy pickings unset

comment:5 Changed 3 years ago by davidfischer

I think this is a great idea. However, there will be quite a bit of overlap between this page and the "How it works" and "Limitations" sections of the CSRF docs. Are you thinking about moving those sections or do you think this new section should just link to them?

comment:6 Changed 3 years ago by lukeplant

I reckon we should just link to them - similar to how the DB optimization docs link to multiple specific sections of another document.

comment:7 Changed 3 years ago by davidfischer

  • Has patch set
  • Owner changed from nobody to davidfischer

I added a patch containing the topic doc on security. Feel free to add to it or let me know if there are any other security topics you would like to see in it.

comment:8 Changed 3 years ago by lukeplant

This patch is a great start. We should also include:

  • SQL injection (I know, Django makes you forget it even exists, isn't it wonderful?)
  • Clickjacking

I think we should also have a dedicated section on SSL, and how to really get that hardened, which really requires setting both SESSION_COOKIE_SECURE and CSRF_COOKIE_SECURE to be True. That in turn might bring up the subject of how to securely redirect HTTP traffic to HTTPS. which is tricky due to reverse proxies. (See #14597 - warning: epic ticket!). I'm happy to write this bit, having some experience here.

Regarding OWASP - I don't think their stuff on CSRF is up to much, especially their prevention cheat sheet, so perhaps we shouldn't link to that. I've corresponded with them by e-mail at length, and pointed out the flaws in their argument regarding using CSRF tokens in the query string, but they didn't seem interested in fixing that page. I'd fix it myself, except you need permissions, and my requests for an account have gone unheeded (though they said I was welcome to edit it), and eventually I got worn out trying to improve things.

Changed 3 years ago by davidfischer

updated security doc with sql injection and clickjacking

comment:9 Changed 3 years ago by davidfischer

I updated the doc with information on SQL injection (how did I forget) and clickjacking. I also removed the links to OWASP.

comment:10 Changed 3 years ago by lukeplant

  • Triage Stage changed from Accepted to Ready for checkin
  • UI/UX unset

There are a few small corrections I need to make, and there are probably always going to be things that could be added, but this is basically RFC.

comment:11 Changed 3 years ago by lukeplant

  • Resolution set to fixed
  • Status changed from new to closed

In [16360]:

Fixed #14201 - Add a "security overview" page to the docs

Thanks to davidfischer for the initial patch!

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.