]> git.openstreetmap.org Git - chef.git/commitdiff
Configure doorkeeper keys for dev instances
authorTom Hughes <tom@compton.nu>
Mon, 27 Nov 2023 22:41:25 +0000 (22:41 +0000)
committerTom Hughes <tom@compton.nu>
Mon, 27 Nov 2023 22:41:25 +0000 (22:41 +0000)
cookbooks/dev/recipes/default.rb

index 3a708a018c413c15910e54bb67881c553de82825..8a6fd665d75fb13a8dbe03fdad1d1d67c17d710e 100644 (file)
@@ -386,6 +386,12 @@ if node[:postgresql][:clusters][:"15/main"]
         mode "755"
       end
 
         mode "755"
       end
 
+      openssl_rsa_private_key "#{site_directory}/doorkeeper.key" do
+        owner "root"
+        group "root"
+        mode "0400"
+      end
+
       rails_port site_name do
         directory rails_directory
         user "apis"
       rails_port site_name do
         directory rails_directory
         user "apis"
@@ -402,6 +408,7 @@ if node[:postgresql][:clusters][:"15/main"]
         csp_enforce true
         run_migrations true
         trace_use_job_queue true
         csp_enforce true
         run_migrations true
         trace_use_job_queue true
+        doorkeeper_signing_key lazy { File.read("#{site_directory}/doorkeeper.key") }
       end
 
       template "#{rails_directory}/config/initializers/setup.rb" do
       end
 
       template "#{rails_directory}/config/initializers/setup.rb" do