2: 4 Secure Coding Practices Flashcards
Input Validation
Filters user-supplied input
Whitelist
Specifies allowable input
Blacklist
Specifies disallowed input
Where should input validation be done
Server
Parameterized Query
Client sends arguments to the server that enters arguments into a template
Application Authentication
Verifies user identity and confirms authorization
Hashing
Turning a password into a pre-defined length hash
Salting
Adds random value to passwords prior to hashing to protect against rainbow table attacks
TLS
Transport Layer Security - Uses HTTPS to secure entire session
Output Encoding
Replaces dangerous characters with string i.e. < into %3c
What should perform output encoding
Trusted libraries
Exception Handling
Handles unpredictable states that may jeopardize application security. Provides explicit instructions to handle unpredictable states
What form of exception handling does Java use?
Try-Catch
Database Normal Forms
Rules for database columns and tables that improves design and provides security advantages
Database activity monitoring
Logs and analyzes database requests