Keystone Trusts API response contains invalid links

Bug #1183874 reported by Adam Young on 2013-05-24
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Low
Adam Young

Bug Description

When new trust is requested or trust details obtained the response contains invalid URLs in the links section.

Discovered with and applies to openstack-keystone-2013.1.1-1.el6ost.

Send POST request to /v3/OS-TRUST/trusts with body like:
> {"trust":
> {"impersonation":false,
> "project_id":"<your-project-id>",
> "trustor_user_id":"<your-user-id>",
> "trustee_user_id":"<other-user-id>"}}

Reply will look like this:
> {'trust': {'expires_at': None,
> 'id': '<trust-id>',
> 'impersonation': False,
> 'links': {'self': 'http://localhost:5000/v3/trusts/<trust-id>'},
> 'project_id': '<your-project-id>',
> 'roles': [],
> 'roles_links': {
> 'next': None,
> 'previous': None,
> 'self': 'http://localhost:5000/trusts/<trust-id>/roles'},
> 'trustee_user_id': '<other-user-id>',
> 'trustor_user_id': '<your-user-id>'}}

1) In the 'trust/links' there is missing extension part of path "/OS-TRUST/" after the version ... full absolute path should look like "/v3/OS-TRUST/trusts/<trust-id>".
2) In the 'trust/roles_links' there is missing extension part and the version "/v3/OS-TRUST/"

This applies to most if not all Trusts responses - not only for creation, but also for listing or getting details or roles of trust's responses.

Dolph Mathews (dolph) on 2013-06-07
Changed in keystone:
status: New → Confirmed
importance: Undecided → Low
tags: added: grizzly-backport-potential
Adam Young (ayoung) on 2013-07-24
Changed in keystone:
assignee: nobody → Adam Young (ayoung)
milestone: none → havana-3
Adam Young (ayoung) wrote :

roles should not have the extension, only the trust self link.

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

Changed in keystone:
status: Confirmed → In Progress

Reviewed: https://review.openstack.org/39533
Committed: http://github.com/openstack/keystone/commit/7ac3d4e4543ed7b540fe60db9b222b179ea301b7
Submitter: Jenkins
Branch: master

commit 7ac3d4e4543ed7b540fe60db9b222b179ea301b7
Author: Adam Young <email address hidden>
Date: Wed Jul 31 13:31:16 2013 -0400

    add OS-TRUST to links

    Bug 1183874

    Change-Id: I3881e360485c4c1ff6d67aec12d47130c6b0eb70

Changed in keystone:
status: In Progress → Fix Committed
Thierry Carrez (ttx) on 2013-09-05
Changed in keystone:
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2013-10-17
Changed in keystone:
milestone: havana-3 → 2013.2
Alan Pevec (apevec) on 2014-03-30
tags: removed: grizzly-backport-potential
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers