public base URL is returned in the links even though request is coming from admin URL

Bug #1495664 reported by Guang Yee
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Won't Fix
Low
Julien Danjou

Bug Description

Public base URL is returned in the links even though the request is coming from admin URL. Set both admin_endpoint and public_endpoint in keystone.conf and notice that public_endpoint is always use as the base URL in the links. i.e.

$curl -k -s -H 'X-Auth-Token: d5363c1fe9524972b891900002242087' http://localhost:5000/v3/policies | python -mjson.tool
{
    "links": {
        "next": null,
        "previous": null,
        "self": "https://public:5000/v3/policies"
    },
    "policies": []
}

$ curl -k -s -H 'X-Auth-Token: d5363c1fe9524972b891900002242087' http://localhost:35357/v3/policies | python -mjson.tool
{
    "links": {
        "next": null,
        "previous": null,
        "self": "https://public:5000/v3/policies"
    },
    "policies": []
}

This is related to https://bugs.launchpad.net/keystone/+bug/1381961

See

https://github.com/openstack/keystone/blob/master/keystone/common/controller.py#L419

Guang Yee (guang-yee)
Changed in keystone:
importance: Undecided → Low
Revision history for this message
Brant Knudson (blk-u) wrote :

Is keystone running under eventlet or apache mod_wsgi?

Revision history for this message
Guang Yee (guang-yee) wrote :

apache mod_wsgi

Dolph Mathews (dolph)
Changed in keystone:
status: New → Triaged
Kent Wang (k.wang)
Changed in keystone:
assignee: nobody → Kent Wang (k.wang)
Revision history for this message
Kent Wang (k.wang) wrote :

Looks like similar bug and patch here: https://review.openstack.org/#/c/226464/

Changed in keystone:
assignee: Kent Wang (k.wang) → nobody
Changed in keystone:
assignee: nobody → Julien Danjou (jdanjou)
status: Triaged → In Progress
Revision history for this message
Guang Yee (guang-yee) wrote :

This bug can be addressed outside of Keystone by passing the appropriate X-Forwarded-* headers from the proxy or LB.

Changed in keystone:
status: In Progress → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.