News for hackers. Stuff that matters.
Re:PostgreSQL Schema Design by uhoh-itsmaciek on Sunday March 29, 2020 @04:30PM (#22722427)
>Warning: Be very careful with logging, while we encrypt our passwords here it may be possible that in a query or server log the password will be recorded in plain text!

I was glad to see this noted, but surprised this is the extent of the advice and that sending passwords to the database in plaintext is still recommended. Are there more fleshed out best practices around avoiding logging pitfalls of doing this?

Re:PostgreSQL Schema Design by vbezhenar on Sunday March 29, 2020 @04:40PM (#22722510)
Hash password in your application. Probably it's not compatible with that postgraphile thing, it's more general advice.
Re:PostgreSQL Schema Design by ComputerGuru on Sunday March 29, 2020 @04:42PM (#22722530)
And if you’re using a language that supports it, pass passwords around in a custom data type/wrapper around string that does not leak its contents when your platform equivalent of .toString() is called (and override the JSON or slog conversion interface).
Re:PostgreSQL Schema Design by miles-po on Sunday March 29, 2020 @09:31PM (#22724417)
Another method, which has worked for me, is to never store passwords in the database at all but in a separate authenticator like Google Auth or AWS Cognito. Then the authenticated username is passed in via signed JWT. The database can perform authorization, but authentication (and authentication method) are kept far away from the data in your database.
Re:PostgreSQL Schema Design by yrro on Monday March 30, 2020 @04:23AM (#22726176)
Postgresql has built in crypt and gen_salt functions which may be good enough for your security requirements.