Tuesday, 2022-06-28

*** dasm|off is now known as dasm13:04
dansmithgmann: I just had a thought on the rbac stuff14:19
dansmithgmann: for something like nova, do we really want to *remove* scope_types, or just set them all to 'project'?14:19
dansmithif we could potentially have system scoped tokens in the system, we want to 403 those all the time, but I'm not sure what the default is14:20
dansmithlike, I'm not sure if it's better to enable scope checking and have everything require project, or disable scope checking and/or remove scope_types entirely14:20
*** diablo_rojo is now known as Guest352514:43
*** vhari_ is now known as help15:18
*** help is now known as Guest353115:19
*** vhari is now known as Guest353615:32
*** Guest3531 is now known as vhari15:32
*** diablo_rojo__ is now known as diablo_rojo15:54
*** diablo_rojo is now known as Guest354417:40
gmanndansmith: if policy rule does not have scope_type then oslo policy just ignore the scope checks and it will pass even system scoped is used for project scoped policy with right personas.18:05
dansmithgmann: ack, so is the better move to just convert everything to project?18:05
gmanndansmith: slaweq : the only benefits of keeping scope_type in policy is if in future we want to add system scope there.18:06
dansmithI dunno,18:06
dansmithif people might be using system scope for ironic or something similar,18:06
dansmithand they try to show up with a system scoped token to nova, things will break in weird ways, like trying to create an instance action record18:07
dansmithbut if we have scope_types=project, then we'll just 403 them immediately, right?18:07
gmanndansmith: only concern for converting everything to project scoped is it will break if operator system scoped token like if they are using ironic scoped token in same deployment. why nova fail for scope things even nova does not ship scope feature.18:07
gmanndansmith: and if we do not have scope_type at all then nova will continue working for such case also18:08
dansmithnova will work for creating a flavor with a system scoped token,m18:08
dansmithbut it will fail in the middle of an action for something like reboot with a 500 right?18:08
gmanndansmith: no, even in flavor also if we make everything as project scoped then it will fail18:09
dansmithright,18:09
dansmithI'm saying if we remove scope_types completely,18:09
dansmitha system scoped token will still work to create a flavor,18:09
gmannohk18:09
dansmithbut will fail with 500 (or some other very confusing database-looking error like "project_id column cannot be NULL") if you try to reboot an instance18:10
dansmithbut if we leave everything as =project,18:10
gmannah you mean system token as they do not have project id,18:10
gmannyeah18:10
dansmiththen any time you try to use a system scoped token you'll get 40318:10
gmanngood point to fail early and with right one18:10
gmannright error18:10
dansmithright18:10
gmannbecause from keystone perspective now, unscoped token is not project scoped by default 18:11
*** akahat|ruck is now known as akahat|out18:11
dansmiththey _are_ project-scoped today no?18:12
dansmithI thought there was no such thing as an unscoped token18:12
gmannI mean from perspective of  system scoped with no project id and project scoped with project id. unscoped one not sure have project id or not18:13
dansmithI thought all tokens were project-scoped today18:13
gmannpreviously it was i think long back. I remember the tempest change.18:13
gmannyou mean by default? tempest make it by default explicitly not sure if keystone has token default to project ?18:14
gmannknikolla: dmendiza[m] ^^?18:14
dansmithI thought they were all project by default18:14
dansmitheven if not, if you've got scoping turned on (or whatever) and are using it in some of your services (i.e. ironic) then you'd turn on scope checking in nova, to make sure nobody showed up with a non-project scoped token18:14
gmannyeah18:14
gmannI agree on making everything project scoped but we should make enforce_scope enable by default at the same time  when we enable new default by default18:15
gmanndansmith: and keep enforce_scope configurable (enable by default per service ) or at the end we want to remove it like what we initially planned?18:16
gmannnot having that configurable seems less confusion to operator18:16
dansmithI guess my point is, I think that if all rules are scope=project then enforce_scope is effectively a no-op for people today, except that it would catch system scope accidents18:17
dansmithand if so, then sure enable by default18:17
gmannyeah, it is better to let it go away all together for 1. service will keep scope like ironic 2. services will have scope to single scoped token there it does not matter 18:19
gmanndansmith: let me update the patch. and I will send it on ML also to notify and review from projects. 18:21
dansmithit would be nice if we could get an answer from keystone people, but yeah, sounds good18:21
gmannyeah, let's see when knikolla or dmendiza[m] can answer meanwhile I will update it with keeping scope_type as project18:23
gmannI will work on nova WIP changes in parallel so that we can catch if something we missed or need to change in goal documents18:23
dansmithgmann: I was going to do the nova scope-ectomy this morning when I asked18:24
dansmithI'll s/system/project/ and see what happens18:24
gmanndansmith: ok, main part of we need to update unit test a lot for those. and some base rule change18:25
dansmithyeah18:26
dansmith*only* 122 unit fails18:35
knikollathere is the concept of an unscoped token already https://docs.openstack.org/keystone/latest/admin/tokens-overview.html#authorization-scopes18:57
opendevreviewGhanshyam proposed openstack/governance master: Updating the RBAC goal as per new direction in zed cycle  https://review.opendev.org/c/openstack/governance/+/84741818:58
knikollathis is what a user gets when they initially authenticate with keystone, before scoping to a project18:58
gmanndansmith: slaweq ^^ updated document please check18:58
gmannknikolla: ok and that unscoped token will not have project_id ?18:58
knikollauser -> auth unscoped -> query project list -> scope to project18:58
dansmithknikolla: but does anyone show up to nova with an unscoped token ever?18:58
knikollano, because an unscoped token doesn't have a catalog18:59
dansmithright okay18:59
knikollai guess they could try to feed that token into nova manually, but with the current way that policy works, it would be rejected (no role, no project). 19:00
gmannok, then scoping policy to 'project' explicitly is right way19:00
knikollaso nova is backtracking from system scope if i skimmed the above discussion correctly?19:01
dansmithwe're recommending it for almost everyone19:02
gmannknikolla: as we are not give scope implementation/feature from nova or other services, we were discussing these option 1. remove the scope_type itself so oslo policy will not do the scope check 2. scope everything to project19:02
dansmithgmann has an update to the goal proposed which summarizes19:02
gmannyeah19:02
gmannknikolla: also please check from keystone perspective that removing the scope implementation from keystone policy is ok and scope everything in keystone also to 'project' or 'domain' (basically remove the scope which break heat create stack etc)? this section https://review.opendev.org/c/openstack/governance/+/847418/3/goals/selected/consistent-and-secure-rbac.rst#21619:04
dansmithgmann: I thought we said keep it optionally for keystone?19:05
dansmithso that you could separate your system admins in keystone from your nova/project admins19:05
gmanndansmith: I rethink on that and realized that if we keep in keystone then heat stack will be broken for same reason of requiring two scoped token19:05
dansmithif they have users in their stack you mean19:06
dansmithis that common?19:06
gmannif they create new users or so19:06
gmannif we keep scope things in keystone then the need system or domain scoped token to create user in keystone and then project scoped token to do nova/neutron things19:08
knikollaI fully agree that we should focus on the project level personas and defer scoping discussions. I fear that fully backtracking on it is going to cause unnecessary work right now and defer work on those project level personas. 19:08
dansmithknikolla: backtrack on what specifically?19:08
knikolla"removing the scope implementation from keystone policy is ok"19:09
dansmithdoesn't keystone still have scope checks in the rules?19:09
dansmith*in the check strings19:11
dansmith *in the check strings 19:11
gmanndansmith: yes that is there which we need to update19:11
dansmithright, so that has to go in order to use the persona stuff19:11
gmannhttps://github.com/openstack/keystone/blob/master/keystone/common/policies/base.py#L4719:11
knikollaah, reading the spec i understood better. so it's about making sure that keystone works with project scope. While being our choice whether to support system or not, we need to support project. 19:12
gmanndansmith: yeah so 1. remove the scope string from check_str 2. make scope_type to 'project' or 'domain' whatever it was before the new scope implementation 19:12
dansmithyeah19:12
knikollagmann: is it go and remove, or is it go and make sure that if it's there, it doesn't break project scope?19:13
knikollathat makes the difference between system scope being optional, and system scope being undesired19:13
gmannknikolla: it will break project scoped for sure, as it has 'system:all' in check_str19:13
gmannknikolla: dansmith in that case we can do keystone scope to both system and project so that project and system scoped token both keep working?  19:14
dansmithI guess, not sure what the point of that is, other than just for people that already have it turned on in keystone maybe?19:20
knikollaI'm thinking of a deployment with just Keystone + Ironic (not familiar with what else would be needed, I'm assuming here). 19:21
gmannyeah that one, I am not sure of anyone has moved to keystone with scope enable 19:22
knikollaWhether they have moved or not, it's a feature that keystone supports for specific deployments, and we can't remove it from our API. 19:22
knikollaWe'd still support assigning system roles, and getting system scoped tokens, and validating them. 19:22
gmannyes that is true. its just change in keystone API19:23
gmannI think adding 'project'  in scope_type also everywhere and keep existing scope also will server both purpose 1. continue working for project scoped token 2. work for ironic (any standalone service use scope) + keystone deployment using system scoped or so19:25
dansmithwell, hence my thought to leave the system scope as optional in keystone,19:29
dansmitheven if you have to say "this is incompatible with heat", which it is today19:29
gmanndansmith: optional you mean disable enforce_scope by default always?19:31
knikollawe could have just had keystonemiddleware inject a dummy/special project id when it encounters a system scoped token19:31
knikollaif we're going back to that anyway, requiring admins to scope to a specific project19:31
dansmithgmann: meaning move it into scope_types, and allow the admin to turn it on or off via enforce_scope, default to off because it's not fully compatible19:31
gmanndansmith: yeah, that is one way. as long we do not enable it by default it should be ok.19:32
gmannand anyone enabling knows it can break heat stack or so19:32
*** dasm is now known as dasm|afk19:34
gmannso basically only change in keystone: 1. remove the scope string from check_str  so that with scope check disable everything work for project scoped token as it was previously 19:34
knikollawe can't disable scope check entirely because of domain scoped tokens19:35
gmanndansmith: only drawback with this approach is we need to keep enforce_scope in oslo policy forever 19:35
dansmithgmann: well, we kinda need to do that anyway don't we? if ironic wants to be able to use it19:36
gmannknikolla: oh so you do that via olso.policy only and controlled by enforce_scope ?19:36
knikollai don't know? i just assumed it's the same mechanism19:36
gmanndansmith: at some point like 3rd milestone, still we can enable it for ironic also like scope check always and not configurable19:37
gmannenforce_scope is basically the migration to new policy things only19:38
knikollaah, i see. my initial reaction to "disable scope check everything" took the phrase literally. 19:39
knikollawhen it's "ignore system scope on everything" 19:39
gmannknikolla: yeah, domain scope for the policy it was before system-scope implementation should stay same19:40
gmannknikolla: dansmith for example create user - https://github.com/openstack/keystone/blob/master/keystone/common/policies/user.py#L11419:43
gmannknikolla: dansmith  system and domain scoped was added in this policy and legacy old policy did not have any scope so in this case we should delete both scope rught19:43
dansmithhave they already shipped a release where system_scope was allowed?19:44
dansmithif so, I don't think we can just remove it19:44
gmanndansmith: I think yes but disable by default. 19:45
knikollaso you're saying to completely remove scope_types? 19:45
gmannI think either add the 'project' scope everywhere or keep it same but do not enable it by default anytime. 19:46
gmannknikolla: completely removing scope_type is not good for ironic_keystone or the domain scope things you mentioned19:46
knikollagmann: that's why i keep asking about it, haha. 19:47
gmannI like adding project scoped everywhere so it will not break the things but work for every token19:47
knikollaI would really appreciate not breaking how things are right now. And we can't remove system scoped tokens or domain scoped tokens from keystone unless we do a v4 API. 19:49
knikollaAnd if I were to do a v4 API, you would prefer I didn't, lol.19:49
gmannyeah, let's go for that only then. "keystone to add project scope in existing scope_type implementation" 19:51
gmanndansmith: knikolla you both ok with this ^^ ?19:51
dansmithsure19:51
knikollasure, i'm okay with preserving today's behavior and making sure the policies we wrote for a system scope world work without it. 19:52
gmanncool, I will update the goal documentation19:53
knikollaBut man, that v4 API would be so cool, it'd have blockchains, and AI, and social networks19:54
gmann:)19:55
fungiimagine how many peole will try to cram into the forum sessions for that19:58
fungilike the old jokes we used to make about decoy "quantum" sessions just to draw all the lookie-lous out of where we had productive topics19:59
knikollawe'll get everyone that attends NFTs 20:00
fungiand you get an nft, and you get an nft... nfts for everyone!20:02
opendevreviewGhanshyam proposed openstack/governance master: Updating the RBAC goal as per new direction in zed cycle  https://review.opendev.org/c/openstack/governance/+/84741820:35
gmanndansmith: knikolla ^^ added the keystone change details20:35
mnaseri have an instance_extra database filled with `VolumeLimitExceeded: Maximum number of volumes allowed (20) exceeded for quota 'volumes'.`20:41
mnasersorry, instance_faults*20:41
mnaseris there a way for us to segment actual cloud faults vs user faults?20:41
opendevreviewGhanshyam proposed openstack/governance master: Updating the RBAC goal as per new direction in zed cycle  https://review.opendev.org/c/openstack/governance/+/84741821:04

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