From 2f4bee55e11dd42146a3da0a86c9a4d484d4dc3d Mon Sep 17 00:00:00 2001 From: Colin Darie Date: Thu, 24 May 2018 11:45:27 +0200 Subject: [PATCH] Don't use shared credentials, back to old secrets ignored files Helps for open-source and multiple instances projects. --- .gitignore | 2 ++ config/credentials.yml.enc | 1 - config/environments/development.rb | 2 ++ config/environments/production.rb | 2 +- config/environments/test.rb | 2 ++ config/secrets.example.yml | 5 +++++ 6 files changed, 12 insertions(+), 2 deletions(-) delete mode 100644 config/credentials.yml.enc create mode 100644 config/secrets.example.yml diff --git a/.gitignore b/.gitignore index af75e39..1e43942 100644 --- a/.gitignore +++ b/.gitignore @@ -24,6 +24,8 @@ # Ignore master key for decrypting credentials and more. /config/master.key +/config/credentials.yml.enc +/config/secrets.yml /config/database.yml /config/chexpire.yml /public/packs diff --git a/config/credentials.yml.enc b/config/credentials.yml.enc deleted file mode 100644 index 058d066..0000000 --- a/config/credentials.yml.enc +++ /dev/null @@ -1 +0,0 @@ -V/1ojA4fZ+44jJiaT8duKLAgUSnllv4rRDCw5u/G5GyODS5FDiswY+xZ6taIeuCIQZNoehRz0HOWOcW9th11lo/oPoHsCB8bSB4MNkMjuU3JX3jtkEv80YZINnfXD47YdwkndCRGG1LD0rEVDcvkzCK/6t+sp7mHkJAmfllIij8OYHrQ/SEAagrgYcHVl714npcHda6X8WzTE2cetvBa7rL2HxRZgIEz/U7h8uyBkZHn65xabGHsxg3p0OhUrsoD141tZ9+AGJSP+3WzSl7t8mWODWT+mQB8PhjNlD1U4jmsPHuxz1FoE+wKttk/ugJ/TAfhjd6tKQ95IIZ/3ScvDB5MjZU8suBS9EESY8bjSGEVameWL7EtrOIeIF0hcf/vYfn+QOKdJi0bCkTdXbLphQ6vr6/91K6Z2glp--63QQNO2LKDQrHtFI--9aU0pNnoUMQxyRd3yTtbzw== \ No newline at end of file diff --git a/config/environments/development.rb b/config/environments/development.rb index 7a6294a..3d9294e 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -11,6 +11,8 @@ Rails.application.configure do # Do not eager load code on boot. config.eager_load = false + config.require_master_key = false + # Show full error reports. config.consider_all_requests_local = true diff --git a/config/environments/production.rb b/config/environments/production.rb index fe21a0d..cc4ffa9 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -18,7 +18,7 @@ Rails.application.configure do # Ensures that a master key has been made available in either ENV["RAILS_MASTER_KEY"] # or in config/master.key. This key is used to decrypt credentials (and other encrypted files). - # config.require_master_key = true + config.require_master_key = false # Disable serving static files from the `/public` folder by default since # Apache or NGINX already handles this. diff --git a/config/environments/test.rb b/config/environments/test.rb index 77e282b..c3e00d2 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -12,6 +12,8 @@ Rails.application.configure do # preloads Rails for running tests, you may have to set it to true. config.eager_load = false + config.require_master_key = false + # Configure public file server for tests with Cache-Control for performance. config.public_file_server.enabled = true config.public_file_server.headers = { diff --git a/config/secrets.example.yml b/config/secrets.example.yml new file mode 100644 index 0000000..dfeec2e --- /dev/null +++ b/config/secrets.example.yml @@ -0,0 +1,5 @@ +development: + secret_key_base: "run rails secret and paste the result here" + +test: + secret_key_base: "run rails secret and paste the result here"