Bug 34288 - Method to get IP Address of client
Method to get IP Address of client
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UMC (Generic)
UCS 3.2
Other Linux
: P4 enhancement (vote)
: UCS 3.2-1-errata
Assigned To: Florian Best
Sönke Schwardt-Krummrich
:
Depends on: 25762
Blocks:
  Show dependency treegraph
 
Reported: 2014-03-07 14:38 CET by Florian Best
Modified: 2014-04-30 08:49 CEST (History)
6 users (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Best univentionstaff 2014-03-07 14:38:27 CET
The UMC-Webserver needs to be adapted for this.

+++ This bug was initially created as a clone of Bug #25762 +++
Comment 1 Florian Best univentionstaff 2014-03-07 14:54:50 CET
implemented, YAML added.
Comment 2 Sönke Schwardt-Krummrich univentionstaff 2014-04-24 11:21:52 CEST
Added a UCS test script 60_umc/05_get_client_ip_address.

The following request/response has been captured between local squid proxy and local apache. If the proxy correctly adds a X-Forwarded-For header then the IP addresses are also part of the response (as intended).
(notebook 192.168.0.58 → proxy 10.200.18.52 → apache 10.200.18.52 → umc-web-server 10.200.18.52)

POST /umcp/get/ipaddress HTTP/1.1
Host: 10.200.18.52
Content-Length: 14
Origin: http://10.200.18.52
X-Requested-With: XMLHttpRequest
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.116 Safari/537.36
Content-Type: application/json
Accept: */*
Referer: http://10.200.18.52/univention-management-console/?lang=en-US
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-US,en;q=0.8
Cookie: UMCLang=en-US; UMCSessionId=a7dc943a-175b-4f8f-ba20-f6a838b2c0e6; UMCUsername=Administrator
Via: 1.1 localhost (squid/3.1.6)
X-Forwarded-For: 192.168.0.58
Cache-Control: max-age=259200
Connection: keep-alive

{"options":{}}

HTTP/1.1 200 OK
Date: Thu, 24 Apr 2014 08:59:49 GMT
Server: CherryPy/3.1.2
Content-Length: 32
Content-Type: application/json
Via: 1.1 slave52.nstx.local
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive

["192.168.0.58", "10.200.18.52"]
Comment 3 Sönke Schwardt-Krummrich univentionstaff 2014-04-24 14:37:35 CEST
(In reply to Florian Best from comment #1)
> implemented, YAML added.

OK: code change
OK: functional test
OK: YAML

(In reply to Sönke Schwardt-Krummrich from comment #2)
> Added a UCS test script 60_umc/05_get_client_ip_address.

Please note: the test script uses direct connections and does not use any proxy at the moment. Proxy connections still have to be tested manually.
Comment 4 Moritz Muehlenhoff univentionstaff 2014-04-30 08:49:09 CEST
http://errata.univention.de/ucs/3.2/100.html