MagnetoDB is not handling SSL termination proxies

Bug #1402791 reported by Charles Wang
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MagnetoDB
Fix Released
High
Charles Wang

Bug Description

If MagnetoDB API node is behind SSL termination proxy, the original protocol https and port number will be translated to http and port 8480 by ssl proxy. Therefor all urls/links will be wrong in MagnetoDB. This includes links/href in:
- CreateTable
- DescribeTable
- DeleteTable
- ListTables

The href values in the above API calls' responses can not be used by API user, and they expose internal protocol and port number.

For example, ListTables:
GET https://{{HOST}}/v1/{{PROJECT_ID}}/data/tables

Response:
...
"links": [
{
"href": "http://localhost:8480/v1/data/default_tenant/tables/Thread",
"rel": "self"
},
{
"href": "http://localhost:8480/v1/data/default_tenant/tables/Thread",
"rel": "bookmark"
}
],
...

Changed in magnetodb:
assignee: nobody → Charles Wang (charles-wang)
summary: - MagnetoDB is not handling handle SSL termination proxies
+ MagnetoDB is not handling SSL termination proxies
Changed in magnetodb:
milestone: none → kilo-2
status: New → Incomplete
status: Incomplete → Triaged
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to magnetodb (master)

Fix proposed to branch: master
Review: https://review.openstack.org/143760

Changed in magnetodb:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to magnetodb (master)

Reviewed: https://review.openstack.org/143760
Committed: https://git.openstack.org/cgit/stackforge/magnetodb/commit/?id=35cbfffb13a73352d1d29f51553250524dbe7b70
Submitter: Jenkins
Branch: master

commit 35cbfffb13a73352d1d29f51553250524dbe7b70
Author: Charles Wang <email address hidden>
Date: Tue Dec 23 21:22:16 2014 -0500

    Handle URL rewriting of protocol port and host

    Added middleware UrlRewriterMiddleware to handle url rewriting because
    of SSL termination proxy.

    Two ways can be used depending on the deployment requirements:
    1. use configured values for protocol/port/host to override original
    values
    2. use HTTP headers injected by SSL proxy

    Change-Id: Ic1c24755203ce3ca7f22a0aa5b0c724e6684bca4
    Closes-Bug: #1402791

Changed in magnetodb:
status: In Progress → Fix Committed
Changed in magnetodb:
status: Fix Committed → Fix Released
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.