Page MenuHomePhabricator

invisible-unicorn/dynamicproxy-api should refuse to add backends to another project's domain
Closed, ResolvedPublic

Description

stack@horizon-proxy-dashboard:/opt/stack/horizon/openstack_dashboard/dashboards/project/proxy$ curl "http://labs-dynamicproxy-test.openstack.eqiad.wmflabs:5668/dynamicproxy-api/v1/77f056c69fce41bf9abf6c2d35910a00/mapping"
{
  "project": "77f056c69fce41bf9abf6c2d35910a00", 
  "routes": [
    {
      "backends": [
        "test"
      ], 
      "domain": "testdomaina"
    }
  ]
}stack@horizon-proxy-dashboard:/opt/stack/horizon/openstack_dashboard/dashboards/project/proxy$ curl "http://labs-dynamicproxy-test.openstack.eiad.wmflabs:5668/dynamicproxy-api/v1/admin/mapping"
{
  "project": "admin", 
  "routes": [
    {
      "backends": [
        "b", 
        "c"
      ], 
      "domain": "a"
    }, 
    {
      "backends": [
        "test", 
        "test", 
        "test"
      ], 
      "domain": "testdomain"
    }
  ]
}stack@horizon-proxy-dashboard:/opt/stack/horizon/openstack_dashboard/dashboards/project/proxy$ curl -X PUT "http://labs-dynamicproxy-test.opentack.eqiad.wmflabs:5668/dynamicproxy-api/v1/77f056c69fce41bf9abf6c2d35910a00/mapping" -d '{ "backends": [ "test" ], "domain": "testdomain" }'
stack@horizon-proxy-dashboard:/opt/stack/horizon/openstack_dashboard/dashboards/project/proxy$ curl "http://labs-dynamicproxy-test.openstack.eqiad.wmflabs:5668/dynamicproxy-api/v1/77f056c69fce41bf9abf6c2d35910a00/mapping"
{
  "project": "77f056c69fce41bf9abf6c2d35910a00", 
  "routes": [
    {
      "backends": [
        "test"
      ], 
      "domain": "testdomaina"
    }
  ]
stack@horizon-proxy-dashboard:/opt/stack/horizon/openstack_dashboard/dashboards/project/proxy$ curl "http://labs-dynamicproxy-test.openstack.eqiad.wmflabs:5668/dynamicproxy-api/v1/admin/mapping"
{
  "project": "admin", 
  "routes": [
    {
      "backends": [
        "b", 
        "c"
      ], 
      "domain": "a"
    }, 
    {
      "backends": [
        "test", 
        "test", 
        "test", 
        "test"
      ], 
      "domain": "testdomain"
    }
  ]

Event Timeline

chasemp triaged this task as Medium priority.Apr 4 2016, 1:58 PM

Despite the old title, this may still be current and needs review before closing.

Change 742267 had a related patch set uploaded (by Majavah; author: Majavah):

[operations/puppet@production] dynamicproxy: Validate route project

https://gerrit.wikimedia.org/r/742267

taavi moved this task from Backlog to Dynamicproxy on the Cloud-VPS board.
taavi subscribed.

Yeah, this is indeed still a problem

Change 742267 merged by Andrew Bogott:

[operations/puppet@production] dynamicproxy: Validate route project

https://gerrit.wikimedia.org/r/742267

This is fixed now I think.