Public bug reported:

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.

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.

** Affects: nova
     Importance: Undecided
         Status: New

-- 
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:
  RequestLog middleware logs Incorrect client ip (RemoteAddr) even when
  use_forwarded_for=True

Status in OpenStack Compute (nova):
  New

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.

  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

-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp

Reply via email to