How are people storing user-scale secrets?
Like when you capture an oauth key, or some other 'password-like thing' that you need to store per-user and need to retrieve in plaintext so you can access an external service. Are you just putting this in a DB? AES-ing it?
My goal is to not leak oauth access when my DB inevitably gets stolen.
First ask yourself if you need to store it at all. Can the client store it as a cookie that you forward only when necessary?
You can encrypt it in the database, but my preference is to just reset the tokens if and when the DB is stolen. If they've managed to steal it, solid chance they'll be able to decrypt it from the running db process or sniff through other infrastructure.
Like others said, try to make it's so you do not have to store anything. Otherwise, AWS has Secrets Manager for example but thatll probably be expensive for user scale in which case you can encrypt and store in DB.
In a notebook that I keep in a fireproof safe.