Trust creation allowed with empty roles list

Bug #1214064 reported by Steven Hardy
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Fix Released
Medium
wanghong

Bug Description

The docs state ""A project_id may not be specified without at least one role,
and vice versa.", however /OS-TRUST/trusts *does* allow you to create a trust
with an empty roles list and project_id specified.

This results in 401 responses whenever you try to consume the trust, which is
not exactly obvious until you realize what's happening..

It seems odd to allow creation of a trust which is seemingly useless and can
never be consumed, so I guess either the code or the docs need updating?

Adam Young (ayoung)
Changed in keystone:
assignee: nobody → Adam Young (ayoung)
Dolph Mathews (dolph)
Changed in keystone:
importance: Undecided → High
status: New → Triaged
milestone: none → havana-3
tags: added: grizzly-backport-potential
Changed in keystone:
importance: High → Medium
Dolph Mathews (dolph)
Changed in keystone:
milestone: havana-3 → none
Revision history for this message
wanghong (w-wanghong) wrote :

Hi Adam, are you working on this now? Can I assign this to me?

Dolph Mathews (dolph)
Changed in keystone:
assignee: Adam Young (ayoung) → nobody
assignee: nobody → wanghong (w-wanghong)
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/69162

Changed in keystone:
status: Triaged → In Progress
Dolph Mathews (dolph)
tags: added: havana-backport-potential
removed: grizzly-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to keystone (master)

Reviewed: https://review.openstack.org/69162
Committed: https://git.openstack.org/cgit/openstack/keystone/commit/?id=0aff9ff3af4a6bc0b3d6128ae35231d1b18d543b
Submitter: Jenkins
Branch: master

commit 0aff9ff3af4a6bc0b3d6128ae35231d1b18d543b
Author: wanghong <email address hidden>
Date: Sun Jan 26 11:14:46 2014 +0800

    trust creation allowed with empty roles list

    The docs state "A project_id may not be specified without at least
    one role, and vice versa.", however /OS-TRUST/trusts does allow you
    to create a trust with an empty roles list and project_id specified.

    This results in 401 responses whenever you try to consume the trust,
    because there are no roles for the trustee on the authorized project.

    This patch will add a check in trust creation to ensure at least one
    role exists if project_id is supplied.

    Change-Id: Iebad0b6b7ed62a029d1e50afb003679bafb1655d
    Closes-Bug: #1214064

Changed in keystone:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in keystone:
milestone: none → icehouse-rc1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in keystone:
milestone: icehouse-rc1 → 2014.1
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.