Monday, 2021-08-09

opendevreviewGrzegorz Grasza proposed openstack/keystone master: Update local_id limit to 255 characters  https://review.opendev.org/c/openstack/keystone/+/79258709:30
toskyhi, I've submitted a change to always enable the tempest key which controls the application credentials testing (and deprecate it): https://review.opendev.org/c/openstack/tempest/+/80379014:35
toskyas this was added by your team, reviews are more than appreciated - do I understand it correctly that the application credentials feature can't be disabled? (Otherwise I would simply flip the value to true but not deprecate the key)14:36
opendevreviewGrzegorz Grasza proposed openstack/keystone master: Update local_id limit to 255 characters  https://review.opendev.org/c/openstack/keystone/+/79258718:41
admin1why does a domain admin have access to all the admin functions ? shouldn't the account be limited to only creating users and projects under the domain ? 19:03
admin1also if its the default, how to limit a domain admin to manage only users and projects under his domain and not have access to anyting else19:04
admin1"https://docs.openstack.org/keystone/latest/admin/service-api-protection.html"  => "Domain administrators aren’t allowed to access system-specific resources or resources outside their domain. Users that need control over project, group, and user creation are a great fit for domain administrators." 20:52
admin1this i found is incorrect, because as a domain admin, i can view the whole system resources and create network , flavors etc 20:52
opendevreviewLance Bragstad proposed openstack/keystonemiddleware master: Implement X-Project-Id passthru for system users  https://review.opendev.org/c/openstack/keystonemiddleware/+/78782221:16
*** lbragstad_ is now known as lbragstad21:17
lbragstadadmin1 that's the model we're working towards, but it's an effort that includes all other openstack services21:17
lbragstadif you want - you can configure keystone to enforce secure RBAC (where the domain admin does what you're describing) 21:17
lbragstadkeystone.conf [oslo_policy] enforce_scope and keystone.conf [oslo_policy] enforce_new_defaults are the options you'd want to take a look at21:20
admin1lbragstad.. thanks .. 21:36
lbragstada lot of the openstack services are working to adopt those personas, so they'll hopefully become more useful as that happens 21:36
admin1lbragstad, so if i set true to both those variables, the default "admin" can do what he can do .. but its enforced only on the domain level ? 21:38
lbragstadif you set those to True, keystone will use all 9 personas described in that document21:39
lbragstadsystem-admins can do what "admin" can do today 21:39
lbragstaddomain-admins can do things with projects and users within their domain21:39
lbragstadsystem-readers can view anything in the deployment (or at least within keystone) 21:40
lbragstaddomain-readers can view all resources within their domain etc... 21:40
admin1lbragstad, thanks 21:43
admin1i will enable, check and report back 21:43
lbragstadadmin1 this stuff is all WIP across openstack - so i would be careful enabling this in a deployment unless you're dealing with staging or test environments21:44
admin1this is in staging 21:44
lbragstadok - good deal21:45
admin1is there anything that is known to be broken by enabling this ? 21:45
lbragstadif you attempt to use system-scoped tokens with other services, like nova, that will break 21:45
lbragstad(e.g., letting system users use system-scoped tokens to do things in a project) 21:45
admin1my test is kind of simple ... use one domain admin to only create projects and users for that specific domain .. after that, the user logs in and does this thing as normal 21:46
lbragstadok - so the user is just someone with a project role assignment, right? 21:46
admin1yep 21:46
admin1normal user with a single project 21:47
admin1the domain admin is not supposed to do anything else ( like create vms etc ) .. only supposed to be able to create/delete/update   projects and users specific to the domain21:47
lbragstadok - the domain admin will behave as you would expect (enforcing tenancy) within keystone, but since that user has the admin role, they might be able to do administrative things in other services (like glance, cinder, nova) 21:47
admin1oh . that is the thing i want to prevent21:48
admin1somehow limit a username and password to be able to create only projects and users inside a specific domain 21:48
admin1and have access to nothing else21:48
admin1if there is another way to do this, that is also OK for me 21:48
lbragstadright21:48
admin1like create a role called abc-domain-admin and then say he can only create users and projects inside abc.com for example 21:49
lbragstadyeah - that makes snese21:49
lbragstadthe problem is that we're trying to update the policies across openstack so they're all consistent 21:50
admin1so even with the new roles, this is still not possible if i understand correctly 21:50
lbragstadit behaves the way you want it to in keystone21:50
lbragstadbut we need to update the other services so that it works there, too21:50
admin1ok21:50
admin1understood 21:50
admin1is there an alternate way to create a custom role and do this ? 21:51
admin1any good documents 21:51
lbragstadfor example, cinder will consider someone an admin so long as they have the 'admin' role on something (that could be a system, domain, or project) 21:51
admin1i undertood that .. the limitations 21:51
lbragstadas far as custom policy, i'm not sure we provide anything from upstream that details how to implement domain admins21:52
lbragstadi would start by creating a domain-admin role and updating the keystone specific policies21:52
admin1that new  role is only specific to keystone work   . creating project snad users that happen in keystone only ..  right ? 21:53
lbragstadright21:54
admin1meaning i only need to "decipher" keystone related policies and ignore the rest21:54
lbragstadso - you would only use it in custom policies in keystone21:54
admin1i even don't know where policies are in keystone :D 21:54
lbragstadadmin1 depending on the release you're using, you can generate them from the commandline 21:55
lbragstadlike you do with config21:55
admin1victoria .. (openstack ansible 22.2.0 tag)21:55
admin1https://docs.openstack.org/oslo.policy/latest/cli/oslopolicy-sample-generator.html  -- this one ? 21:56
lbragstadyeah 21:56
lbragstadhere are keystone's default policies 21:56
lbragstadhttps://docs.openstack.org/keystone/latest/configuration/policy.html21:56
admin1i could not find any policy file in the whole /etc/keystone directory .. so no file means everything is default ? 21:56
lbragstadhttps://docs.openstack.org/keystone/latest/configuration/samples/policy-yaml.html21:56
lbragstadwe moved the "defaults" in the policy file into code21:57
lbragstadso we can formally change them with deprecation tooling 21:57
lbragstadall the defaults live here - https://github.com/openstack/keystone/tree/master/keystone/common/policies21:57
lbragstadoslopolicy-sample-generator --namespace keystone 21:58
lbragstadwill give you the defaults 21:58
admin1i get one .. everything is # 22:00
admin1assume i have example.com as a domain in keystone and example-admin as the admin role ..  i don't know even where to start here 22:01
lbragstadit's all commented out - yeah 22:01
lbragstad#"identity:update_user": "(role:admin and system_scope:all) or (role:admin and token.domain.id:%(target.user.domain_id)s)" 22:02
lbragstadwould be an example policy 22:02
lbragstad"identity:update_user": "(role:admin and system_scope:all) or (role:admin and token.domain.id:%(target.user.domain_id)s) or (role:domain_admin and token.domain.id:%(target.user.domain_id)s)"22:02
lbragstadwould be a potential way to update it to use a custom role22:02
lbragstadwhile still honoring the upstream defauls 22:02
lbragstaddefault* 22:03
admin1"identity:update_user": "(role:example-admin and system_scope:all) or (role:example-admin and token.domain.id:%(target.user.domain_id)s)"22:03
admin1if i do that, will example-admin be able to update user .. 22:03
admin1but will it now remove the update_user from default admin ? 22:03
admin1or i need to have 2 lines , one for admin and one for example-admin22:04
lbragstadadmin1 yeah - it would remove the ability for admins to perform update_user22:05
lbragstadwhich is why i used a logical OR in my example22:05
lbragstadto retain the behavior for existing admins22:05
admin1got it 22:05
lbragstadi have to run - but i hope this helps get you started22:06
admin1i will try 22:06
lbragstadgood luck22:06

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