From cdaf0e4693fe5c331d95614c3283f790c68df411 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Sat, 25 Apr 2026 00:57:49 +0900 Subject: [PATCH] Clear host_href Setting a specific url to href makes barbican return that single url regardless of the actual endpoint used. This sometimes causes wrong redirect (especially when a client uses admin url or internal url). Set it to a blank value so that barbican uses the auto-detected endpoint url, which is changed according to the real end point used. Change-Id: Icf656b1004a0f94c724353c3de7e17fdd5af1a81 Signed-off-by: Takashi Kajinami --- templates/barbican.conf.j2 | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/templates/barbican.conf.j2 b/templates/barbican.conf.j2 index 5101bf8..9471bd6 100644 --- a/templates/barbican.conf.j2 +++ b/templates/barbican.conf.j2 @@ -8,9 +8,8 @@ use_stderr = False debug = {{ debug }} # Host name, for use in HATEOAS-style references -# Note: Typically this would be the load balanced endpoint that clients would use -# communicate back with this service. -host_href = {{ barbican_service_publicurl }} +# Note: This is cleared so that the auto-detected endpoint url is used. +host_href = transport_url = {{ barbican_oslomsg_rpc_transport }}://{% for host in barbican_oslomsg_rpc_servers.split(',') %}{{ barbican_oslomsg_rpc_userid }}:{{ barbican_oslomsg_rpc_password }}@{{ host }}:{{ barbican_oslomsg_rpc_port }}{% if not loop.last %},{% else %}/{{ _barbican_oslomsg_rpc_vhost_conf }}{% if barbican_oslomsg_rpc_use_ssl | bool %}?ssl=1&ssl_version={{ barbican_oslomsg_rpc_ssl_version }}&ssl_ca_file={{ barbican_oslomsg_rpc_ssl_ca_file }}{% else %}?ssl=0{% endif %}{% endif %}{% endfor %}