This site is the archived OWASP Foundation Wiki and is no longer accepting Account Requests.
To view the new OWASP Foundation website, please visit https://owasp.org
Difference between revisions of "OWASP Proactive Controls"
From OWASP
(→Roadmap) |
m |
||
Line 217: | Line 217: | ||
=== Server-side trusted data should drive access control === | === Server-side trusted data should drive access control === | ||
− | The vast majority of data you need to make an access control decision (who is the user and are they logged in, what entitlements does the user have, what is the access control policy, what feature and data is being requested, what time is it, what geolocation is it, etc) should be retrieved "server-side" in a standard web or web service application. Policy data such as a | + | The vast majority of data you need to make an access control decision (who is the user and are they logged in, what entitlements does the user have, what is the access control policy, what feature and data is being requested, what time is it, what geolocation is it, etc) should be retrieved "server-side" in a standard web or web service application. Policy data such as a user's role or an access control rule should never be part of the request. In a standard web application, the only client-side data that is needed for access control is the id or ids of the data being accessed. Most all other data needed to make an access control decision should be retrieved server-side. |
'''Key References''' | '''Key References''' | ||
Line 229: | Line 229: | ||
== 5: Establish Identity and Authentication Controls == | == 5: Establish Identity and Authentication Controls == | ||
− | Authentication is the process of | + | Authentication is the process of verifying that an individual or an entity is who it claims to be. Authentication is commonly performed by submitting a user name or ID and one or more items of private information that only a given user should know. |
Session Management is a process by which a server maintains the state of an entity interacting with it. This is required for a server to remember how to react to subsequent requests throughout a transaction. Sessions are maintained on the server by a session identifier which can be passed back and forward between the client and server when transmitting and receiving requests. Sessions should be unique per user and computationally very difficult to predict. | Session Management is a process by which a server maintains the state of an entity interacting with it. This is required for a server to remember how to react to subsequent requests throughout a transaction. Sessions are maintained on the server by a session identifier which can be passed back and forward between the client and server when transmitting and receiving requests. Sessions should be unique per user and computationally very difficult to predict. | ||
Line 254: | Line 254: | ||
=== Use Encryption at Rest === | === Use Encryption at Rest === | ||
− | Cryptographic storage is difficult to build securely. It's critical to classify data in your system and determine that data needs to be encrypted, such as the need to encrypt credit cards per the PCI compliance standard. Also, any time you start building your own low-level crypto on your own, ensure you are or have the assistance of a deep applied crypto expert. Consider well vetted cryptographic libraries such as the [https://code.google.com/p/keyczar/ Google KeyCzar] project. Also, be prepared to handle the more difficult aspects of applied crypto such as key management, overall cryptographic architecture design as well as tiering and trust | + | Cryptographic storage is difficult to build securely. It's critical to classify data in your system and determine that data needs to be encrypted, such as the need to encrypt credit cards per the PCI compliance standard. Also, any time you start building your own low-level crypto on your own, ensure you are or have the assistance of a deep applied crypto expert. Consider well vetted cryptographic libraries such as the [https://code.google.com/p/keyczar/ Google KeyCzar] project. Also, be prepared to handle the more difficult aspects of applied crypto such as key management, overall cryptographic architecture design as well as tiering and trust issues in complex software. |
'''Key References''' | '''Key References''' | ||
Line 260: | Line 260: | ||
* [[Password Storage Cheat Sheet]] | * [[Password Storage Cheat Sheet]] | ||
− | '''Key | + | '''Key Tools''' |
* [https://www.owasp.org/index.php/O-Saft OWASP SSL Audit for Testers] | * [https://www.owasp.org/index.php/O-Saft OWASP SSL Audit for Testers] | ||
+ | * [https://code.google.com/p/keyczar/ Google KeyCzar] | ||
=== Implement Protection in Process === | === Implement Protection in Process === | ||
− | + | Make sure that confidential or sensitive data is not exposed by accident during processing. It may be more accessible in memory; it may be stored in temporary locations or in logs. | |
Line 279: | Line 280: | ||
Use a common logging approach to ensure that all log entries are consistent, and contain essential information including source and timestamp. | Use a common logging approach to ensure that all log entries are consistent, and contain essential information including source and timestamp. | ||
− | |||
− | |||
Process monitoring, audit and transaction logs/trails etc are usually collected for different purposes than security event logging, and this often means they should be kept separate. The types of events and details collected will tend to be different. For example a PCI DSS audit log will contain a chronological record of activities to provide an independently verifiable trail that permits reconstruction, review and examination to determine the original sequence of attributable transactions. | Process monitoring, audit and transaction logs/trails etc are usually collected for different purposes than security event logging, and this often means they should be kept separate. The types of events and details collected will tend to be different. For example a PCI DSS audit log will contain a chronological record of activities to provide an independently verifiable trail that permits reconstruction, review and examination to determine the original sequence of attributable transactions. | ||
It is important not to log too much, or too little - be careful not to log private or confidential data or secrets. Use knowledge of the intended purposes to guide what, when and how much. To protect from Log Injection aka Log Forging, make sure to perform validation or encoding on untrusted data before logging it. | It is important not to log too much, or too little - be careful not to log private or confidential data or secrets. Use knowledge of the intended purposes to guide what, when and how much. To protect from Log Injection aka Log Forging, make sure to perform validation or encoding on untrusted data before logging it. | ||
+ | |||
+ | The [[OWASP AppSensor Project]] is a conceptual framework and methodology that offers prescriptive guidance to implement intrusion detection and automated response into an existing application: where to add sensors or detection points [[AppSensor DetectionPoints]] and what response actions [[AppSensor ResponseActions] to take when an exception is encountered. | ||
+ | |||
'''Key References''' | '''Key References''' |