Explicit admin specific RBAC tests are not required

Bug #1664278 reported by Mh Raies
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Patrole
Fix Released
Undecided
Mh Raies

Bug Description

In RBAC testing, we are using admin specific clients and associated test cases a number of times.
for example -

https://github.com/openstack/patrole/tree/master/patrole_tempest_plugin/tests/api/volume/admin/*

But in case of RBAC we need not to write "admin" specific tests explicitly.

Although during execution of test cases it will pass because of switch_role method internals.
But writing and mentioning them as a admin does not mean here anything.

In the rbac base we are writing"credentials = ['primary', 'admin']", which in turn will create 2 tenants -
1. primary tenant
2. admin tenant

In tempest we need above credentials because some tests are admin restricted only.

But in case of RBAC as we are intended to test Policy only and in RBAC we need single tenant (initially admin tenant only) only and for that we can take credential as -

"credentials = ['admin']"

In RBAC initially we are taking tenant as admin, later during action we are switching role to rbac_role WITH IN SAME TENANT. Thus initially created tenant should be admin itself. So considering separate admin tenant and separate primary does not make any significant value rather overhead.

So, we have remove "primary" specific credentials and related things as it will cause confusion.

Mh Raies (raiesmh08)
Changed in patrole:
assignee: nobody → Mh Raies (raiesmh08)
summary: - admin specific client no needed in RBAC tests.
+ admin specific client not needed in RBAC tests.
summary: - admin specific client not needed in RBAC tests.
+ admin specific client not needed in RBAC test cases
description: updated
Mh Raies (raiesmh08)
description: updated
Mh Raies (raiesmh08)
summary: - admin specific client not needed in RBAC test cases
+ admin specific RBAC tests are not
Mh Raies (raiesmh08)
description: updated
description: updated
description: updated
summary: - admin specific RBAC tests are not
+ Explicit admin specific RBAC tests are not required
Changed in patrole:
status: New → Opinion
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to patrole (master)

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

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

Reviewed: https://review.openstack.org/433741
Committed: https://git.openstack.org/cgit/openstack/patrole/commit/?id=34a138c4b5c283c051a84c16c415d81848dcbd21
Submitter: Jenkins
Branch: master

commit 34a138c4b5c283c051a84c16c415d81848dcbd21
Author: Felipe Monteiro <email address hidden>
Date: Thu Mar 2 17:01:37 2017 -0500

    Refactors Patrole framework to only use admin tenant credential type.

    This patch adds following capablities to RBAC tempest framework:

    1. Restricts admin only tenant to be used for rbac as much as possible,
       and thus removes need of creating additional tenant with "primary"
       credential type.
    2. Patrole framework requires "tempest_roles" value in the conf file
       to be set to "admin" role. Which again restricts tempest.conf to a
       hardcoded value. This patch takes care of this problem also.

    Note: Adding this patch will required some cleanup and refactoring in
    test files, which will be taken care in separate commits component wise.

    Co-Authored-By: Mh Raies <email address hidden>
    Co-Authored-By: Felipe Monteiro <email address hidden>

    Implements bp: modifying-switching-role-mechanism
    Closes-Bug: #1664600
    Closes-Bug: #1664278

    Change-Id: Ic665d35332def6b6ec7b0065d1ebe65514a926b9

Changed in patrole:
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.