|
1 | | -title layout tags contributors document order permalink |
2 | | -File Management |
3 | | -col-document |
4 | | -OWASP Developer Guide |
5 | | -Shruti Kulkarni |
6 | | -OWASP Developer Guide |
7 | | -747 |
8 | | -/draft/appendices/implementation_dos_donts/Session Management/ |
| 1 | +--- |
| 2 | + |
| 3 | +title: Session Management |
| 4 | +layout: col-document |
| 5 | +tags: OWASP Developer Guide |
| 6 | +contributors: Shruti Kulkarni |
| 7 | +document: OWASP Developer Guide |
| 8 | +order: 743 |
| 9 | +permalink: /draft/appendices/implementation_dos_donts/cryptographic_practices/ |
| 10 | + |
| 11 | +--- |
| 12 | + |
9 | 13 | {% include breadcrumb.html %} |
10 | 14 |
|
11 | | -Session Management |
12 | | -Here is a collection of Do's and Don'ts when it comes to session management, gathered from practical experiences. |
| 15 | +###Session Management |
| 16 | + |
| 17 | +*Session Management |
| 18 | +*Here is a collection of Do's and Don'ts when it comes to session management, gathered from practical experiences. |
13 | 19 |
|
14 | | -Creation of session |
15 | | -Session identifier creation must always be done on a trusted system (e.g., The server) |
| 20 | +*Creation of session |
| 21 | +*Session identifier creation must always be done on a trusted system (e.g., The server) |
16 | 22 |
|
17 | | -Creation of session |
18 | | -If a session was established before login, close that session and establish a new session after a successful login |
| 23 | +*Creation of session |
| 24 | +*If a session was established before login, close that session and establish a new session after a successful login |
19 | 25 |
|
20 | | -Creation of session |
21 | | -Generate a new session identifier on any re-authentication |
| 26 | +*Creation of session |
| 27 | +*Generate a new session identifier on any re-authentication |
22 | 28 |
|
23 | | -Random number generation |
24 | | -Session management controls should use well vetted algorithms that ensure sufficiently random session identifiers. Rely on CSPRNG rather than PRNG for random number generation |
| 29 | +*Random number generation |
| 30 | +*Session management controls should use well vetted algorithms that ensure sufficiently random session identifiers. Rely on CSPRNG rather than PRNG for random number generation |
25 | 31 |
|
26 | | -Domain and path |
27 | | -Set the domain and path for cookies containing authenticated session identifiers to an appropriately restricted value for the site |
| 32 | +*Domain and path |
| 33 | +*Set the domain and path for cookies containing authenticated session identifiers to an appropriately restricted value for the site |
28 | 34 |
|
29 | | -Logout |
30 | | -Logout functionality should fully terminate the associated session or connection |
| 35 | +*Logout |
| 36 | +*Logout functionality should fully terminate the associated session or connection |
31 | 37 |
|
32 | | -Session timeout |
33 | | -Establish a session inactivity timeout that is as short as possible, based on balancing risk and business functional requirements. In most cases it should be no more than several hours |
| 38 | +*Session timeout |
| 39 | +*Establish a session inactivity timeout that is as short as possible, based on balancing risk and business functional requirements. In most cases it should be no more than several hours |
34 | 40 |
|
35 | | -Session ID |
36 | | -Do not expose session identifiers in URLs, error messages or logs. Session identifiers should only be located in the HTTP cookie header. For example, do not pass session identifiers as GET parameters |
| 41 | +*Session ID |
| 42 | +*Do not expose session identifiers in URLs, error messages or logs. Session identifiers should only be located in the HTTP cookie header. For example, do not pass session identifiers as GET parameters |
37 | 43 |
|
38 | | -Session ID |
39 | | -Supplement standard session management for sensitive server-side operations, like account management, by utilising per-session strong random tokens or parameters. This method can be used to prevent Cross Site Request Forgery attacks |
| 44 | +*Session ID |
| 45 | +*Supplement standard session management for sensitive server-side operations, like account management, by utilising per-session strong random tokens or parameters. This method can be used to prevent Cross Site Request Forgery attacks |
40 | 46 |
|
0 commit comments