DesignateContext.is_admin is false on admin tenant

Bug #1456115 reported by stanzgy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Designate
Won't Fix
Undecided
stanzgy

Bug Description

DesignateContext.is_admin is false on admin tenant.

example:

Add breakpoint in designate/api/v1/domains.py:
--- a/designate/api/v1/domains.py
+++ b/designate/api/v1/domains.py
@@ -83,6 +83,7 @@ def get_domains():

     central_api = central_rpcapi.CentralAPI.get_instance()

+ import ipdb;ipdb.set_trace()
     domains = central_api.find_domains(context, criterion={"type": "PRIMARY"})

$ source openrc admin admin
$ designate domain-list

> /opt/stack/designate/designate/api/v1/domains.py(87)get_domains()
     86 import ipdb;ipdb.set_trace()
---> 87 domains = central_api.find_domains(context, criterion={"type": "PRIMARY"})
     88

ipdb> context.roles
[u'admin']
ipdb> context.is_admin
False

stanzgy (stanzgy)
Changed in designate:
assignee: nobody → stanzgy (stanzgy)
stanzgy (stanzgy)
summary: - DesignateContext.is_admin is always false
+ DesignateContext.is_admin is false on admin tenant
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to designate (master)

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

Changed in designate:
status: New → In Progress
Revision history for this message
Kiall Mac Innes (kiall) wrote :

[15:29:14] <Kiall> stanzgy_: BTW, re https://review.openstack.org/#/c/184432/ / bug 1456115
[15:29:41] <Kiall> I'm not 100% convinced that really is a bug, is_admin is just badly named these days now that oslo.policy is a thing
[15:30:19] <Kiall> is_admin is meant as a hint to olso.policy to "say yes to everything", rather than the other way around
[15:30:50] <Kiall> Nothing bar oslo.policy should ever look at the value of context.is_admin, if it does, it's bypassing policy and is a bug
[15:33:13] <Kiall> I'll post those comments in the bug report, seems stanzgy's real IRC handle already dropped off

Changed in designate:
status: In Progress → Incomplete
Revision history for this message
Kiall Mac Innes (kiall) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on designate (master)

Change abandoned by stanzgy (<email address hidden>) on branch: master
Review: https://review.openstack.org/184432

Changed in designate:
status: Incomplete → Won't Fix
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.