Friday, 2023-04-28

ozzzo_workI need to setup a non-admin user that can use "openstack recordset list" and I think I need to change policy for that. I'm reading here: https://docs.openstack.org/designate/train/admin/policy.html and here: https://docs.openstack.org/designate/train/admin/samples/policy-yaml.html but I'm still not clear on how it works. Is there a document that explains how to setup a new policy?14:45
ozzzo_workHow can I find out the existing policies? if I do "openstack policy list" as admin, I get a blank output14:47
JayFozzzo_work: are you actually running the 'train' version of openstacck?14:48
JayFI am going AFK for a couple of hours; but if you're not running train make sure to look at newer documentation. How that works in openstack has been changed recently (I'm not sure if/when designate made the change)14:49
johnsomRecordset list is non-admin for the zone owner. Are you trying to setup a global reader for recordset list?14:58
ozzzo_workJayF: : Yes we're running Train15:24
ozzzo_workjohnsom: It appears to be restricted to the network owner, and the networks are owned by admin15:25
ozzzo_workI have automation that creates VMs, tests various things, and then deletes them, and times it for graphing and alerting. I need for that user to be able to look at DNS records of VMs that it created15:26
ozzzo_workas a non-admin user, if I do "openstack zone list" I get an empty list15:26
ozzzo_workif I do "openstack recordset list <zone>" I get "Name <zone> didn't resolve"15:27
johnsomYeah, that means the project you are using doesn’t own the zone you are creating records in15:30
ozzzo_workIt looks like the zones are owned by the network owner15:31
ozzzo_workif I show a zone, the project_id is admin15:32
johnsomYeah, that could be how you have it setup. You could create the port/vm under a zone your project owns15:33
ozzzo_workwe don't allow users to setup their own networks15:34
johnsomThat should not matter depending on how you have neutron setup.15:35
johnsomPort settings override network settings15:37
ozzzo_workthat seems to work; I can create a test zone as an end-user, but that would't duplicate what our users are doing15:38
ozzzo_workI need to create a role that I can add to a non-admin user, that will allow that user to view zones owned by admin15:39
johnsomWell, you want to restrict it as much as possible15:40
ozzzo_workWhen I look at the sample policy file, I see a bunch of stuff commented out. Are those the defaults? Can I create a policy with only the things that I want to change?15:40
johnsomYou can create a policy.yaml, configure oslo.policy to use it, and override a command policy15:41
johnsomYes, comments are the defaults. Yes, the overrive can have one line15:41
ozzzo_workI think I need to do something like: "find_zones": "rule:admin_or_owner or role:zonereader"15:42
johnsomI would run the sample generator on your system as the policy hchanges have made a mess. Instead of relying on the docs site version15:42
ozzzo_workthe sample generator will pull my existing policies?15:43
johnsomYes15:43
ozzzo_workok I'll try that, ty!15:43
johnsomSorry I am on pto and mobile, so I can’t help you craft the line15:44
johnsomFeel free to send me your proposal and I will try to review/comment15:44
ozzzo_workok ty15:44
*** JayF is now known as Guest1244418:27
*** JasonF is now known as JayF18:27

Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!