Challenge Overview
Secure, Quality code is key to this challenge
In��descending��order of imporance:
-
Require the use of HTTPS!
-
Cookies should use secure AND httpOnly flags
-
Use OAuth2 (which may require using the latest SDK, see below) to access Google APIs
-
Allow Client Key/Secret be specified at runtime (not stored in config files as it is currently), but of course ensure that a non-admin user can not break app by supplying bad values
-
Store client key/secret, as well as negotiated OAuth tokens, in a persisted datastore encrypted using an industry standard crypto library that is whitelisted for GAE (https://developers.google.com/appengine/docs/java/jrewhitelist)
-
The cryptographic keys used above should be stored in a secure directory that is never web accessible
-
Ensure that a user has super-admin access to the given domain before allowing PGP key update, or user authorization
-
Ensure that you can de-authroize someone (TF reported that didn't seem to work in current app)
-
Ensure that a non-admin user attempting to access the app matches completely (case insensitive, but without the partial match issues) with a user granted access by the admin (See vulnerability #3 in Williams's document)
-
Ensure access control is applied for all necessary HTTP requests, not just for JSP display
-
Implement correct auto-logout behavior when session expires (configurable time period)
-
Do not use volatile storage for data (app should function correctly after a redeploy)
-
Refactor to use latest and supported Google SDK/API (see William's suggestions)
-
Inspect current codebase for the hard-to-reproduce vulnerability where a 500 error results in 'free admin access for all' (see��tgkokk_vulnerability.txt)
-
Implement anti CSRF measures for user-facing forms (https://www.owasp.org/index.php/Cross-Site_Request_Forgery_(CSRF) )
-
Implement XSS prevention through input validation and output filtering (https://www.owasp.org/index.php/XSS_(Cross_Site_Scripting)_Prevention_Cheat_Sheet )
-
Prevent sensitive data from being cached in browser
-
Prevent DoS attacks via cron service (see vulnerability 8 in attached doc)
-
Proper logging using GAE log features
-
Use GAE best-practice for packaging the application, removing unnecessary libs
-
Remove hard-coding of domain value (currently ProcessorServlet.java line 151)
��
Bonus features ($200 per bonus feature on winning submission):
- Better handling of "API��quota exceeded" response (future challenge to handle this even better, but for now at least give a meaningful message)
- Base64 encode the PGP key on the fly instead of requiring the user to do it.