Keypairs for other user created by admin user

Bug #1692012 reported by Goutham Pratapa
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Kingbird
Fix Released
Undecided
Goutham Pratapa

Bug Description

In kingbird, when a user fires a command to sync keypairs from one region to other. The resources are created in other region but the internal working is not correct.

Note:
In Nova admin user can create keypairs for non-admin users.

Present requestflow:

Demo_user fires the request the request flow is as follows.

request go to kb-engine and kb-engine we call the nova-client which was created with admin credentials
Present Flow:
We are not using our request context object here at all.
step-1:
https://github.com/openstack/kingbird/blob/master/kingbird/engine/sync_manager.py#L51
step-2:
https://github.com/openstack/kingbird/blob/master/kingbird/drivers/openstack/sdk.py#L70
step-3:
https://github.com/openstack/kingbird/blob/master/kingbird/drivers/openstack/keystone_v3.py#L33
step-4:
https://github.com/openstack/kingbird/blob/master/kingbird/common/endpoint_cache.py#L42

Expected-Flow:

This way of creating keypairs in other regions is wrong. Rather, the keypairs have to be created based on the sessions established with the respective context,then followed by creating client for nova and creating keypairs in target regions.

Changed in kingbird:
assignee: nobody → Goutham Pratapa (pratapagoutham)
status: New → Confirmed
description: updated
summary: - Keypairs for other user users created by admin user
+ Keypairs for other user created by admin user
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to kingbird (master)

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

Changed in kingbird:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to kingbird (master)

Reviewed: https://review.openstack.org/466632
Committed: https://git.openstack.org/cgit/openstack/kingbird/commit/?id=7e18bc10ea5621d2f51d257969cb2c7cc877e674
Submitter: Jenkins
Branch: master

commit 7e18bc10ea5621d2f51d257969cb2c7cc877e674
Author: Goutham Pratapa <email address hidden>
Date: Mon May 22 14:07:49 2017 +0530

    Create keypairs in other regions using context.

    Currently, in Kingbird if a non-admin user sends a request to
    sync keypairs from one region to other, the resources are
    created with the nova client formed, using the admin credentials.

    This commit fixes the internal issues and
    creates keypairs for the same user based on the context object.
    -Used Keystoneauth1 instead of keystoneclient
    -Used loading to get session in order to communicate with other
    openstack drivers in kingbird.

    Modified test-cases for the same.
    Closes-Bug: #1692012

    Change-Id: I66fbf4ab207a6615f8070d3a22ea7561e608dcd9

Changed in kingbird:
status: In Progress → 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.