Rails Credentials Note

Since it was used in the field, check it so that it can be verbalized.

What are "Credentials"?

** Confidential information ** that is managed in a specific way regarding the ** production environment ** It also refers to the ** management mechanism **

Features introduced in Rails 5.2

It is difficult to manage confidential information such as API private keys ・ I want to make confidential information available to apps -Developers want to check and change as needed. I also want to share it with other developers ・ There is a risk of leakage if confidential information is stored in the repository.

How to use

The secret information of the production environment is "** config/credentials.yml.enc **" Describe in

This file is always saved in encrypted form

The file works with the dedicated command provided by Rails

When a Rails application is launched in a production environment From the master.key file or the RAILS_MASTER_KEY environment variable Extract key information and internally decrypt and use confidential information

Reference articles, books

Field Rails

Recommended Posts

Rails Credentials Note
[Note] Rails error list
[Note] Rails3 routing confirmation
[Rails] How to use devise (Note)
[Personal note] Rails DB index consideration
[Rails g.error]
Rails basics
Rails Review 1
Rails API
Rails migration
[Rails] first_or_initialize
rails tutorial
About Rails 6
Rails foundation
Rails memorandum
rails tutorial
[Note] Dockerfile
rails tutorial
rails tutorial
[Rails] devise
[Note] How to use Rails 6 Devise + cancancan
rails tutorial
rails tutorial
StringBuilder Note
Rails Tips
rails method
rails tutorial
[Rails] ActiveRecord
[Rails] form_with
Rails Review 2
A note about the Rails and Vue process
[Note] Summary of rails login function using devise ①
Note: Cheat sheet when creating Rails Vue app
Deploy Line bot with rails5 + Docker + Heroku Note