Support Host header in REST queries

Bug #1446387 reported by Cedric Brandily
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Designate
Fix Released
Wishlist
Mimi Lee

Bug Description

Designate uses the static api_base_uri option (service:api section) as base url when returning urls through REST.

But Designate could/should use (when api_base_uri is not configured?) Host request-header which the Internet host and port number of the resource being requested, as obtained from the original URI given by the user or referring resource:

  when Host header == $myhost:$myport, designate should return urls prefixed by http(s)://$myhost:$myport/.

Using Host request-header allows to reduce deployer work and to return urls with the correct domain when Designate is reachable from multiple hosts/ports.

Changed in designate:
assignee: nobody → Cedric Brandily (cbrandily)
Tim Simmons (timsim)
Changed in designate:
importance: Undecided → Wishlist
milestone: none → liberty-1
Tim Simmons (timsim)
Changed in designate:
status: New → Opinion
Kiall Mac Innes (kiall)
tags: added: low-hanging-fruit
Revision history for this message
Thierry Carrez (ttx) wrote :

Opinion is a "closed" status and my understanding is that this is not finished (hence the milestone targeting ?)

Changed in designate:
status: Opinion → Triaged
milestone: liberty-1 → liberty-2
Changed in designate:
assignee: Cedric Brandily (cbrandily) → Mimi Lee (mimi-lee)
status: Triaged → In Progress
Kiall Mac Innes (kiall)
Changed in designate:
milestone: liberty-2 → liberty-3
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to designate (master)

Reviewed: https://review.openstack.org/199744
Committed: https://git.openstack.org/cgit/openstack/designate/commit/?id=1e266b1634dd54e26703c8660ce3461e91fc081b
Submitter: Jenkins
Branch: master

commit 1e266b1634dd54e26703c8660ce3461e91fc081b
Author: mimi8890 <email address hidden>
Date: Thu Jul 23 16:42:02 2015 +0000

    Add support for Host header in REST queries

    Can use host request headers if enable_host_header is set to true
    in config file. If host header is not specified or host header is
    turned off, it will use the default api_base_uri.

    Also added unit tests.

    Change-Id: Ia353c116485f3e7112bcfde11457cdf7fe006422
    Closes-bug: 1446387

Changed in designate:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in designate:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in designate:
milestone: liberty-3 → 1.0.0
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to designate (stable/kilo)

Fix proposed to branch: stable/kilo
Review: https://review.openstack.org/237054

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to designate (stable/kilo)

Reviewed: https://review.openstack.org/237054
Committed: https://git.openstack.org/cgit/openstack/designate/commit/?id=bf47fe05f1962632c087edaeeb92664e8146c328
Submitter: Jenkins
Branch: stable/kilo

commit bf47fe05f1962632c087edaeeb92664e8146c328
Author: mimi8890 <email address hidden>
Date: Thu Jul 23 16:42:02 2015 +0000

    Add support for Host header in REST queries

    Can use host request headers if enable_host_header is set to true
    in config file. If host header is not specified or host header is
    turned off, it will use the default api_base_uri.

    Also added unit tests.

    Change-Id: Ia353c116485f3e7112bcfde11457cdf7fe006422
    Closes-bug: 1446387

tags: added: in-stable-kilo
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.