keystone_user_role doesn't support email address as username

Bug #1341552 reported by Valery Tschopp
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
puppet-keystone
Fix Released
Undecided
Valery Tschopp

Bug Description

We defined the keystone user with the email address, but the keystone_user_role parsing doesn't handle it correctly.

user: "<email address hidden>"
tenant: "test"

user_role_name: "<email address hidden>@test"

Because of the use of the split('@',2) method it will be parsed as:
  user: "user"
  tenant: "example.org@test"

A patch is attached.

Revision history for this message
Valery Tschopp (valery-tschopp) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to puppet-keystone (master)

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

Changed in puppet-keystone:
assignee: nobody → Valery Tschopp (valery-tschopp)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to puppet-keystone (master)

Reviewed: https://review.openstack.org/108677
Committed: https://git.openstack.org/cgit/stackforge/puppet-keystone/commit/?id=9b2078a6e5a892626a40be462bf7a8f88c2254da
Submitter: Jenkins
Branch: master

commit 9b2078a6e5a892626a40be462bf7a8f88c2254da
Author: Valery Tschopp <email address hidden>
Date: Tue Jul 22 14:46:00 2014 +0200

    keystone_user_role supports email as username

    When defining the keystone user with the email address, the keystone_user_role doesn't handle it correctly.

    user: "<email address hidden>"
    tenant: "test"

    keystone_user_role { "<email address hidden>@test":
      roles = '_member_'
    }

    Because of the use of the split('@',2) method, user and tenant will be parsed as:
      user: "user"
      tenant: "example.org@test"

    By using rpartition('@'), it will be correctly parsed as:
      user: "<email address hidden>"
      tenant: "test"

    A unit test for the keystone_user_role provider is available.

    Change-Id: I68139910bb82c62f26ba3433456e5406c99541a2
    Closes-Bug: 1341552

Changed in puppet-keystone:
status: In Progress → Fix Committed
Mathieu Gagné (mgagne)
Changed in puppet-keystone:
milestone: none → 5.0.0
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.