yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #86419
[Bug 1913605] Re: Support for use_forwarded_for to log correct user IP in RequestLog middleware
Reviewed: https://review.opendev.org/c/openstack/nova/+/786766
Committed: https://opendev.org/openstack/nova/commit/375a8452bbb2b3d12fbf82f725e977c3ce4b09b7
Submitter: "Zuul (22348)"
Branch: master
commit 375a8452bbb2b3d12fbf82f725e977c3ce4b09b7
Author: Rajat Jain <rajat@xxxxxxxxxxx>
Date: Sun Apr 18 17:56:37 2021 +0530
api: Log correct client IP if load balancer in use
When Nova-Api runs behind the load balancer or Reverse proxy,
Loadbalancer IP is getting logged in nova_api.log instead of end user
source ip by RequestLog
It should check for CONF.api.use_forwarded_for and then uses key
'HTTP_X_FORWARDED_FOR' to get the client ip.
Co-Authored-By: melanie witt <melwittt@xxxxxxxxx>
Closes-Bug: #1913605
Change-Id: Id2703ea4439d587a1a7a878796a79709fae5ea61
** Changed in: nova
Status: In Progress => Fix Released
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1913605
Title:
Support for use_forwarded_for to log correct user IP in RequestLog
middleware
Status in OpenStack Compute (nova):
Fix Released
Bug description:
Issue:
------
When Nova-Api runs behind the load balancer or Reverse proxy, Loadbalancer IP is getting logged in nova_api.log instead of end user source ip by RequestLog
Analysis:
--------
requestlog.py, it uses hardcoded key 'REMOTE_ADDR' `req.environ.get('REMOTE_ADDR', '-')` to log REMOTE_ADDR.
Resolution:
---------
It should check for CONF.api.use_forwarded_for and then uses key 'HTTP_X_FORWARDED_FOR' to get the client ip.
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1913605/+subscriptions
References