Skip to content

Commit 940794f

Browse files
authored
Merge pull request #2239 from guangyee/SOC-10551
Use source load balancing for OpenID Connect (SOC-10551)
2 parents b4ebc08 + 5b06f3d commit 940794f

File tree

1 file changed

+14
-0
lines changed
  • chef/cookbooks/keystone/recipes

1 file changed

+14
-0
lines changed

chef/cookbooks/keystone/recipes/ha.rb

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,24 @@
1515

1616
include_recipe "crowbar-pacemaker::haproxy"
1717

18+
# NOTE(gyee): for features such as OpenID Connect and SAML-based federation,
19+
# where client interaction with Keystone is stateful and the state information
20+
# is persisted in the Keystone instance's local cache, we must use source
21+
# load balancing so that the client is talking to the same Keystone instance
22+
# for the duration of the session. By default, the balancing algorithm is an
23+
# empty string.
24+
balancing_algorithm =
25+
if node[:keystone][:federation][:openidc][:enabled]
26+
"source"
27+
else
28+
""
29+
end
30+
1831
haproxy_loadbalancer "keystone-service" do
1932
address node[:keystone][:api][:api_host]
2033
port node[:keystone][:api][:service_port]
2134
use_ssl (node[:keystone][:api][:protocol] == "https")
35+
balance balancing_algorithm
2236
servers CrowbarPacemakerHelper.haproxy_servers_for_service(node, "keystone", "keystone-server", "service_port")
2337
action :nothing
2438
end.run_action(:create)

0 commit comments

Comments
 (0)