There are two schools of thought.
The first argument is that you should handle OAuth tokens, such as passwords. If someone needs to access your database, get all OpenID / OAuth pairs and launch a man in the middle attack, they can represent any user on your site.
The second argument is this: by the time someone has access to your database and sufficient access to your network to launch a man in the middle attack, you will still be closed.
I personally erred on the side of caution and simply encrypted them; this is standard practice for passwords, so you could also give yourself just a little slight peace of mind.
Meanwhile, Google has this tip:
"Tokens should be treated as securely as any other confidential information stored on the server."
source: http://code.google.com/apis/accounts/docs/OAuth.html
And some random guy on the Internet has special implementation advice:
- If theyre in a regular disk file, protect them using the permissions file system, make sure theyre encrypted and hide the password well
- If theyre in the database, encrypt the fields, save the key and provide access to the database. *
- If theyre in LDAP, do the same.
http://brail.org/wordpress/2009/05/01/implementing-oauth-take-care-with-those-keys/
Ben Walther Dec 10 '09 at 7:51 2009-12-10 07:51
source share