DEV Community

Discussion on: Stop Using .env Files Now!

 
wiseai profile image
Mahmoud Harmouch

In this case, you can create an Inbound firewall rule or add an entry in the ACL to allow only specific users to access this file.

Thread Thread
 
gregorygaines profile image
Gregory Gaines

Again giving full access to every secret in the file to that user.

Thread Thread
 
wiseai profile image
Mahmoud Harmouch

Now, the problem becomes tied to the party that you are sharing it with rather than the .env file itself. There is a risk in giving away your secrets to a centralized third party(Like Config servers), as it can become the main target for hacky wacky organizations. It is important to consider who you are sharing this information with and whether or not they can be trusted.

Thread Thread
 
gregorygaines profile image
Gregory Gaines • Edited

The best solution sounds like hosting your own config server so you don't have to consider if the person you're sharing information with can be trusted while utilizing permissions and access restrictions. Win:Win.

Thread Thread
 
wiseai profile image
Mahmoud Harmouch

Exactly. However, many startups nowadays are content to take the easy way out, opting for quick and easy solutions that don't really offer much in the long-term. They don't understand the risks involved in this approach, and only realize it when it costs them time and money.