Enable X-Forwarded-Proto header for keystone_public
authorJuan Antonio Osorio Robles <jaosorior@redhat.com>
Tue, 8 Dec 2015 14:08:22 +0000 (16:08 +0200)
committerJuan Antonio Osorio Robles <jaosorior@redhat.com>
Tue, 8 Dec 2015 17:32:43 +0000 (19:32 +0200)
One of the ways to make use of TLS in keystone is through the usage of
the X-Fowarded-Proto header, which will be forwarded with the request
by the loadbalancer, and it will tell keystone what protocol was used
to access it. This also requires configuration from the keystone side.

Change-Id: I9b899ba95e28b7dfae0c1ed84ca8431054673925

manifests/loadbalancer.pp

index e34b01e..c4a317b 100644 (file)
@@ -685,6 +685,10 @@ class tripleo::loadbalancer (
     haproxy::listen { 'keystone_public':
       bind             => $keystone_public_bind_opts,
       collect_exported => false,
+      mode             => 'http', # Needed for http-request option
+      options          => {
+          'http-request' => ['set-header X-Forwarded-Proto https if { ssl_fc }'],
+      },
     }
     haproxy::balancermember { 'keystone_public':
       listening_service => 'keystone_public',