App Engine: what are best practices for transmitti

2020-03-15 01:45发布

I'm wondering what is the state-of-the-art of transmitting passwords from a web form and storing them in the data store.

A lot of recent posts point to bcrypt, however, there are no pure Python implementations, which is a requirement for App Engine.

Any suggestions?

3条回答
别忘想泡老子
2楼-- · 2020-03-15 01:57

Best practice? Use the Users API with either Google Accounts or OpenID, so you're not storing or transmitting passwords in the first place.

If you must do it yourself, transmit the login data over SSL, and store the password hashed, salted, and strengthened, using a scheme such as PBKDF2.

查看更多
走好不送
3楼-- · 2020-03-15 02:05

You can use PyCrypto which has been ported to google-app-engine.

You should never store the actual passwords, of course. Storing a hash should be sufficient. When the user enters his password, you hash it again and compare it to the stored value.

You should of course only receive passwords over https, which is supported in google-app-engine (albeit only through you appspot domain)

查看更多
混吃等死
4楼-- · 2020-03-15 02:12

BCrypt has been ported to Python some time ago. I've been using it gracefully since then.

查看更多
登录 后发表回答