All threads / Best Practices for storing API Keys, DB user / passwords, etc...

Ask A Question


You’re not receiving notifications from this thread.

Best Practices for storing API Keys, DB user / passwords, etc...

Craig Hoffman asked in Rails

I would like to get everyone's take on what are is the best practice for storing DB usernames/passwords, API keys, Contstants, Etc... Should they be stored in config/environments/ then in test, development production accordingly? Some of these files do end up in verstion control. Thoughts?

Hey Craig!

Check out this episode on Rails credentials. This is what I strongly recommend as all your credentials are easily organized and encrypted. Then in production you only have to set RAILS_MASTER_KEY to decrypt the file. Much easier to manage this way.

Join the discussion

Want to stay up-to-date with Ruby on Rails?

Join 38,558+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.

    logo Created with Sketch.

    Ruby on Rails tutorials, guides, and screencasts for web developers learning Ruby, Rails, Javascript, Turbolinks, Stimulus.js, Vue.js, and more. Icons by Icons8

    © 2020 GoRails, LLC. All rights reserved.