check the url format when create endpoint

Bug #1284430 reported by wanghong
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Fix Released
Low
Lance Bragstad

Bug Description

Currently, the url allows any parameters when create endpoint, such as:
curl -i -H "X-Auth-Token:admin" -H "Content-Type:application/json" http://127.0.0.1:35357/v3/endpoints -d '{"endpoint":{"interface":"test","service_id":"d893b85ae4f842d5bb1727e271cf5be3","url":"111"}}'

HTTP/1.1 201 Created
Vary: X-Auth-Token
Content-Type: application/json
Content-Length: 252
Date: Tue, 25 Feb 2014 03:13:30 GMT

{"endpoint": {"links": {"self": "http://192.168.70.108:5000/v3/endpoints/81638ad18b9e4495aac576c006c1fed1"}, "url": "111", "region": null, "interface": "test", "service_id": "d893b85ae4f842d5bb1727e271cf5be3", "id": "81638ad18b9e4495aac576c006c1fed1"}}

Should we add a check that the url parameter must be url format like?

wanghong (w-wanghong)
Changed in keystone:
assignee: nobody → wanghong (w-wanghong)
Changed in keystone:
status: New → Confirmed
Changed in keystone:
assignee: wanghong (w-wanghong) → Marcos Lobo (marcos-fermin-lobo)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to keystone (master)

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

Changed in keystone:
status: Confirmed → In Progress
no longer affects: python-openstackclient
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on keystone (master)

Change abandoned by Marcos Fermín Lobo (<email address hidden>) on branch: master
Review: https://review.openstack.org/93426
Reason: We are working in a better solution here https://review.openstack.org/#/c/96266/

Changed in keystone:
assignee: Marcos Lobo (marcos-fermin-lobo) → Lance Bragstad (lbragstad)
Changed in keystone:
assignee: Lance Bragstad (lbragstad) → Dolph Mathews (dolph)
Changed in keystone:
assignee: Dolph Mathews (dolph) → Lance Bragstad (lbragstad)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to keystone (master)

Reviewed: https://review.openstack.org/96266
Committed: https://git.openstack.org/cgit/openstack/keystone/commit/?id=8ef267c3ee3f0f1e6bdb74da7ed68aeb958e5567
Submitter: Jenkins
Branch: master

commit 8ef267c3ee3f0f1e6bdb74da7ed68aeb958e5567
Author: Lance Bragstad <email address hidden>
Date: Wed Jul 23 19:41:37 2014 +0000

    Implement validation on the Catalog V3 API

    Use JSONSchema to validate CRUD operations on V3 Catalog resources. This
    includes wrapping the create and update methods for Regions, Services,
    and Endpoints. This change removes functionality specific to the Catalog
    API for validating parameters for incoming requests.

    Closes-Bug: #1284430
    bp: api-validation
    Change-Id: If8b665ffb0ed22a3f060254786fe1feaf0b78318

Changed in keystone:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in keystone:
milestone: none → juno-3
status: Fix Committed → Fix Released
Dolph Mathews (dolph)
Changed in keystone:
importance: Undecided → Low
Thierry Carrez (ttx)
Changed in keystone:
milestone: juno-3 → 2014.2
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.