← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~cjwatson/launchpad:charm-more-appserver-secrets into launchpad:master

 

Colin Watson has proposed merging ~cjwatson/launchpad:charm-more-appserver-secrets into launchpad:master.

Commit message:
charm: Add a few more secrets used by appservers

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/439327
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:charm-more-appserver-secrets into launchpad:master.
diff --git a/charm/launchpad-appserver/config.yaml b/charm/launchpad-appserver/config.yaml
index 5748257..93586e2 100644
--- a/charm/launchpad-appserver/config.yaml
+++ b/charm/launchpad-appserver/config.yaml
@@ -8,10 +8,29 @@ options:
     description: >
       Cognitive Services subscription key for the Bing Custom Search API.
     default:
+  csrf_secret:
+    type: string
+    description: >
+      Secret used to create CSRF tokens.  Currently only used in Candid
+      interactions.
+    default:
   devmode:
     type: boolean
     description: Is this server running in dev mode?
     default: true
+  git_macaroon_secret_key:
+    type: string
+    description: >
+      Secret key for Git access tokens issued to Launchpad users.  Any
+      random string of a reasonable size (64 characters) is ok.
+    default:
+  internal_macaroon_secret_key:
+    type: string
+    description: >
+      Secret key for macaroons used to grant permissions to various internal
+      components of Launchpad.  Any random string of a reasonable size (64
+      characters) is ok.
+    default:
   mailman_archive_url_template:
     type: string
     description: Template expanded to form URLs for Launchpad list archives.
diff --git a/charm/launchpad-appserver/templates/launchpad-appserver-secrets-lazr.conf b/charm/launchpad-appserver/templates/launchpad-appserver-secrets-lazr.conf
index e95e5ce..10da8a6 100644
--- a/charm/launchpad-appserver/templates/launchpad-appserver-secrets-lazr.conf
+++ b/charm/launchpad-appserver/templates/launchpad-appserver-secrets-lazr.conf
@@ -13,3 +13,10 @@
 [bing]
 {{- opt("subscription_key", bing_subscription_key) }}
 
+[codehosting]
+{{- opt("git_macaroon_secret_key", git_macaroon_secret_key) }}
+
+[launchpad]
+{{- opt("csrf_secret", csrf_secret) }}
+{{- opt("internal_macaroon_secret_key", internal_macaroon_secret_key) }}
+