Set secrets.secret_key_base refs #13996
authorPeter Amstutz <pamstutz@veritasgenetics.com>
Fri, 19 Apr 2019 16:13:11 +0000 (12:13 -0400)
committerPeter Amstutz <pamstutz@veritasgenetics.com>
Fri, 19 Apr 2019 16:13:11 +0000 (12:13 -0400)
Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <pamstutz@veritasgenetics.com>

services/api/config/arvados_config.rb
services/api/config/secrets.yml [deleted file]

index 717ddad9e13c8814453ee035c66469f75ee7f4bb..f57073dfc2b981af620a2371f42161c80b705959 100644 (file)
@@ -256,5 +256,5 @@ Server::Application.configure do
   # Rails.configuration.API["Blah"]
   ConfigLoader.copy_into_config $arvados_config, config
   ConfigLoader.copy_into_config $remaining_config, config
-  config.secret_key_base = config.secret_token
+  secrets.secret_key_base = $arvados_config["API"]["RailsSessionSecretToken"]
 end
diff --git a/services/api/config/secrets.yml b/services/api/config/secrets.yml
deleted file mode 100644 (file)
index f21de2d..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-# Copyright (C) The Arvados Authors. All rights reserved.
-#
-# SPDX-License-Identifier: AGPL-3.0
-
-# Be sure to restart your server when you modify this file.
-
-# Your secret key is used for verifying the integrity of signed cookies.
-# If you change this key, all old signed cookies will become invalid!
-
-# Make sure the secret is at least 30 characters and all random,
-# no regular words or you'll be exposed to dictionary attacks.
-# You can use `rails secret` to generate a secure secret key.
-
-# Make sure the secrets in this file are kept private
-# if you're sharing your code publicly.
-
-development:
-  secret_key_base: ef8dfe92893202f906d198094f428aaefa75749338e306ed2874938598cad7153ef0dd3cb8036c618cc7c27bb0c6c559728e8cc224da7cdfa2ad1d02874643b0
-
-test:
-  secret_key_base: 0b5454fe8163063950a7124348e2bc780fabbb022fa15f8a074c2fbcfce8eca480ed46b549b87738904f2bae6617ad949c3c3579e272d486c25aaa0ead563355
-
-# Do not keep production secrets in the repository,
-# instead read values from the environment.
-production:
-  secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>