From 31013afdfb53d849f8dabb86f92b467b1f016818 Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Tue, 29 May 2018 19:33:38 +0100 Subject: Use basic authentication for mini environments To avoid the origin being too easy to access, which could potentially be misleading as a mini environment isn't the real GOV.UK website, although it might look similar. --- app/models/backends/terraform_aws.rb | 3 ++- app/models/backends/terraform_libvirt.rb | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/models/backends/terraform_aws.rb b/app/models/backends/terraform_aws.rb index c8c9bac..e448cd8 100644 --- a/app/models/backends/terraform_aws.rb +++ b/app/models/backends/terraform_aws.rb @@ -65,7 +65,8 @@ class Backends::TerraformAws < ApplicationRecord read_bundle_install_input_as_tar_archive: true, signon_instance_name: slug, admin_environment_label: mini_environment.name, - use_error_pages: 'true' + use_error_pages: 'true', + origin_basic_auth: "#{slug}=#{slug}" }, run_remotely_on_host: "ubuntu@guix-daemon.#{domain}" ) diff --git a/app/models/backends/terraform_libvirt.rb b/app/models/backends/terraform_libvirt.rb index eabb8e4..4344801 100644 --- a/app/models/backends/terraform_libvirt.rb +++ b/app/models/backends/terraform_libvirt.rb @@ -62,7 +62,8 @@ class Backends::TerraformLibvirt < ApplicationRecord host_name: "#{slug}.#{domain}", admin_environment_label: mini_environment.name, signon_instance_name: slug, - use_error_pages: 'true' + use_error_pages: 'true', + origin_basic_auth: "#{slug}=#{slug}" } ) end -- cgit v1.2.3