Porush Manjhi
Porush Manjhi

Reputation: 164

Where should I store private certificate files in laravel?

I want to store a private certificate file so I can use it to validate user files but where can I store it privately. Should I store in storage/app folder or somewhere else ?

Upvotes: 4

Views: 2569

Answers (1)

Karol Dabrowski
Karol Dabrowski

Reputation: 1310

It mostly depends on where you deploy your app.

Option 1 - application in a cloud: If you deploy your app in a cloud the solution is really simple. Just take advantage of services designed for secrets management (e.g. AWS Secrets Manager).

Option 2 - custom infrastructure: In this case, you have 2 options. You can either store your key/cert in a security manager installed locally (e.g. Knox) or as a plaintext somewhere on your server. In the latter case, it doesn't matter where exactly you store it. It is only important that this location is not publicly accessible. The storage/app is OK. Just make sure it's not storage/app/public :)

Upvotes: 2

Related Questions