diff options
author | Tobias Urdin <tobias.urdin@binero.se> | 2022-04-21 12:18:29 +0000 |
---|---|---|
committer | Tobias Urdin <tobias.urdin@binero.se> | 2022-04-21 12:19:30 +0000 |
commit | e4ac4550c9851383f83fa0a0ff693c4e5c439bd1 (patch) | |
tree | 2e9eb3576757d3659dc5193806c2c5283323e76d | |
parent | fcf3ae9365ac7f8f95a29dad0c611c7542746a58 (diff) | |
download | horizon-e4ac4550c9851383f83fa0a0ff693c4e5c439bd1.tar.gz |
Pass real client IP to keystoneauth original_ip
The original_ip parameter for the keystoneauth plugin
sets the Forwarded header sent to Keystone but right now
it just sends the IP address of Horizon instead of the client's
IP when Horizon is proxied and should use X-Forwarded-For.
Change-Id: Ic994b7f36d4c6459bbd00c810e3b454c6b1201a6
-rw-r--r-- | openstack_dashboard/api/keystone.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/openstack_dashboard/api/keystone.py b/openstack_dashboard/api/keystone.py index d248a223d..d8aca8e71 100644 --- a/openstack_dashboard/api/keystone.py +++ b/openstack_dashboard/api/keystone.py @@ -175,7 +175,7 @@ def keystoneclient(request, admin=False): cacert = settings.OPENSTACK_SSL_CACERT verify = verify and cacert LOG.debug("Creating a new keystoneclient connection to %s.", endpoint) - remote_addr = request.environ.get('REMOTE_ADDR', '') + remote_addr = auth_utils.get_client_ip(request) token_auth = token_endpoint.Token(endpoint=endpoint, token=token_id) keystone_session = session.Session(auth=token_auth, |