summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Harbott <j.harbott@x-ion.de>2017-09-05 12:47:30 +0000
committerJens Harbott <j.harbott@x-ion.de>2017-09-05 12:47:30 +0000
commitff4dc4f05b929337a4da7e6c63ddd375916d6693 (patch)
tree54c0e7e445fac887e3601c3fe899787187d5a1b3
parentb5828b96443f8ae2c1ebeb745389a0b79e4f6723 (diff)
Set auth_uri in keystone_authtoken config section
The auth_uri option will be sent to the user when an unauthenticated request is made. It should contain the unversioned public identity endpoint [1]. [1] https://adam.younglogic.com/2016/06/auth_uri-vs-auth_url/
-rw-r--r--recipes/common.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/recipes/common.rb b/recipes/common.rb
index 3e7605c..7b859d1 100644
--- a/recipes/common.rb
+++ b/recipes/common.rb
@@ -68,18 +68,20 @@ end
68db_user = node['openstack']['db']['dns']['username'] 68db_user = node['openstack']['db']['dns']['username']
69db_pass = get_password 'db', 'designate' 69db_pass = get_password 'db', 'designate'
70 70
71public_identity_endpoint = public_endpoint 'identity'
71identity_endpoint = internal_endpoint 'identity' 72identity_endpoint = internal_endpoint 'identity'
72 73
73bind_services = node['openstack']['bind_service']['all'] 74bind_services = node['openstack']['bind_service']['all']
74api_bind = bind_services['dns-api'] 75api_bind = bind_services['dns-api']
75 76
76auth_uri = auth_uri_transform identity_endpoint.to_s, node['openstack']['dns']['api']['auth']['version'] 77auth_url = auth_uri_transform identity_endpoint.to_s, node['openstack']['dns']['api']['auth']['version']
77 78
78# define attributes that are needed in designate.conf 79# define attributes that are needed in designate.conf
79node.default['openstack']['dns']['conf'].tap do |conf| 80node.default['openstack']['dns']['conf'].tap do |conf|
80 conf['service:api']['api_host'] = bind_address api_bind 81 conf['service:api']['api_host'] = bind_address api_bind
81 conf['service:api']['api_port'] = api_bind.port 82 conf['service:api']['api_port'] = api_bind.port
82 conf['keystone_authtoken']['auth_url'] = auth_uri 83 conf['keystone_authtoken']['auth_uri'] = public_identity_endpoint
84 conf['keystone_authtoken']['auth_url'] = auth_url
83end 85end
84 86
85# define secrets that are needed in designate.conf 87# define secrets that are needed in designate.conf