I have the need to store private keys for multiple users, so that my server application can sign files on their behalf. I want to store these keys securely, but couldn't find much information on this matter.
I also need to support the classic "I lost my password" feature - if a user loses their password, we need to be able to generate a new one for them and for the private key not to be lost.
What are the best practices in these scenario?
P.S. A very similar question has been asked on SO 3 years ago.