Opened 14 years ago

Closed 13 years ago

#14201 closed New feature (fixed)

Add a "security overview" page to the docs

Reported by: Russell Keith-Magee Owned by: David Fischer
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 byte ) - added by db 14 years ago.
14201-security.diff (8.6 KB ) - added by David Fischer 13 years ago.
updated security doc with sql injection and clickjacking

Download all attachments as: .zip

Change History (13)

comment:1 by Russell Keith-Magee, 14 years ago

Triage Stage: UnreviewedAccepted

by db, 14 years ago

Attachment: fo added

comment:2 by db, 14 years ago

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

comment:3 by Graham King, 14 years ago

Keywords: security added
Severity: Normal
Type: New feature

comment:4 by David Fischer, 13 years ago

Cc: djfische@… added
Easy pickings: unset

comment:5 by David Fischer, 13 years ago

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 by Luke Plant, 13 years ago

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 by David Fischer, 13 years ago

Has patch: set
Owner: changed from nobody to David Fischer

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 by Luke Plant, 13 years ago

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.

by David Fischer, 13 years ago

Attachment: 14201-security.diff added

updated security doc with sql injection and clickjacking

comment:9 by David Fischer, 13 years ago

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

comment:10 by Luke Plant, 13 years ago

Triage Stage: AcceptedReady 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 by Luke Plant, 13 years ago

Resolution: fixed
Status: newclosed

In [16360]:

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

Thanks to davidfischer for the initial patch!

Note: See TracTickets for help on using tickets.
Back to Top