16:01:20 #startmeeting policy 16:01:20 Meeting started Wed Nov 30 16:01:20 2016 UTC and is due to finish in 60 minutes. The chair is lbragstad. Information about MeetBot at http://wiki.debian.org/MeetBot. 16:01:21 Useful Commands: #action #agreed #help #info #idea #link #topic #startvote. 16:01:24 The meeting name has been set to 'policy' 16:01:36 raildo, ktychkova, dolphm, dstanek, rderose, htruta, atrmr, gagehugo, lamt, thinrichs, edmondsw, ruan_09 16:01:40 THANks everyoen 16:01:43 \o/ 16:01:44 o/ 16:01:47 o/ 16:01:49 o/ 16:01:56 o/ 16:03:05 o/ 16:03:53 o/ 16:03:56 hi all 16:04:18 hello, good morning, good afternoon 16:04:20 #topic action items from last week 16:04:31 #link https://etherpad.openstack.org/p/keystone-policy-meeting 16:04:41 agenda in case anyone doesn't have the link ^ 16:05:19 for those who missed it - we spent last week discussing ayoung's proposal and going through ktychkova's Apache Fortress example 16:05:51 #link https://review.openstack.org/#/c/391624/ to ayoung's RBAC spec 16:06:33 I, personally, have a bunch of questions left on that spec, but ayoung isn't here so we can circle back if he shows up 16:07:06 did anyone have a chance to look at #link https://review.openstack.org/#/c/237521/ ? 16:07:28 yes, I've studied it 16:07:32 ^ which was ktychkova's PoC on apache fortress 16:07:49 i think the big hurdle we uncovered with that last week was the AF doesn't really allow scope - right? 16:07:54 all role assignments are global 16:08:25 i thought it was interesting, but should be more configurable 16:08:31 we should distingush 2 things: the approach to externalize PDP and AF's capacity to modelize policies 16:08:37 i started reviewing but never finished 16:08:46 yes, it's right 16:08:46 But I think, it is AF problem anf AF's users :) 16:08:51 (and I think one of the workarounds was to duplicate role assignments) 16:08:54 I didn't get a chance to dive into it, but just going off the commit message it doesn't seem to address checks that have more than 2 levels 16:09:33 whether scoped or not scopted, it's up to each PDP 16:09:36 edmondsw: what's 2+ level checks ? 16:09:43 looking for an example... 16:10:25 e.g. from neutron: create_network:provider:network_type 16:10:45 edmondsw: ok so those are checks on resources that come from database 16:10:56 afaik AF only takes care of RBAC 16:11:03 well, from code... may or may not be db code 16:11:11 this is RBAC 16:11:19 no this is not 16:11:22 ? 16:11:27 RBAC is purely authz based on roles 16:11:37 and this isn't why? 16:11:38 this is something more than RBAC, because this is not a role 16:11:49 it is a role check 16:11:54 we've sightly modified the 237521, and it works for another external PDP 16:12:10 edmondsw: ok. neutron: create_network:provider:network_type is a role check 16:12:28 ruan_09 which one? 16:12:31 I thought it was not. anyways this is not the point here, sorry (don't want to discuss naming) 16:13:03 samueldmq, let's say you want to allow someone to create some kinds of networks but not others, based on their role... you define multiple policy checks, so you can check different roles depending on what the request is asking to create 16:13:07 the one we used in OPNFV: https://wiki.opnfv.org/display/moon/Moon 16:15:24 I sugget to make the 237521 as a generic hook to external PDP 16:15:29 Can we finish the example? create_network:provider:network_type is a role check on the user asking to create a network? Or it's a role check on the network they're trying to create? 16:16:54 thinrichs a check of the user's role to make sure they are allowed to create the type of network they're trying to create 16:17:14 https://github.com/openstack/neutron/blob/master/etc/policy.json#L50-L56 16:17:38 so I think only the service (in this case neutron) can do that, because only it is parsing the request and will know which of these kinds of checks it needs to test and which it does not 16:18:57 I'm not ready to show how (if) AF can work in such example. I'm sure I can answer next week. I need to run some tests 16:19:11 edmondsw means it's up to the service to check ownership 16:19:14 meaning* 16:19:47 lbragstad, yeah, I don't know much about AF but I can't see how something else would easily do that 16:20:09 lbragstad, though I'm not sure ownership is the right word 16:20:18 edmondsw right - not AF specific, but just the way policy currently is in openstack 16:21:08 samueldmq does that answer your question? 16:21:50 lbragstad: edmondsw yes if the only check behind it is a role check that's pure rbac 16:22:27 samueldmq of course policy.json today would let you check other things besides the roles, but usually it's just checking role, as the default does in that example 16:23:18 if you want to know more about RBAC and its future, I suggest you to read http://www.profsandhu.com/miscppt/kth_abac_141029.pdf 16:23:32 the father of RBAC's recent presentation 16:23:39 edmondsw: yes, you're right ++ 16:24:08 rbac can't solve all the problem 16:25:54 ruan_09: thx for the link 16:26:13 more background is always helpful to folks for these types of asks 16:26:47 dstanek ruan_09 ++ 16:27:16 so we had another action item to document what we expect from policy at this level 16:28:17 maybe we can firstly enable external PDP, than take a look at implementations to decide which one to use? 16:28:19 do we expect it to be flexible enough for applications running on openstack? 16:28:32 do we expect it to only work across services? 16:28:54 I would think apps are out of scope and we should focus on ops. 16:29:10 thinrichs i think i would agree with that 16:29:36 What do you mean "work across services"? Do you mean decisions can be based on data/conditions from multiple services? 16:30:18 thinrichs kind of like what it does today where you have policy that protects operations across openstack services 16:30:22 Or do you mean you want access control to apply to *sequences* of API calls that span services? 16:31:11 lbragstad: got it. Do we want a logically centralized way of expressing policy that applies to all services? 16:31:31 thinrichs centralized in what sense? 16:31:48 as in owned by a single service? 16:32:10 defined policy in one place and enforced by all services? 16:32:40 Not sure what ownership means here. I'd say users want a single place to go see/write policy... 16:32:54 and that implementationally we'd want each service to enforce that policy independently. 16:33:17 does any of this account for having policy created by someone other than cloud admins? domain admins for example? 16:33:36 Sorry I'm late. 16:33:52 dstanek: I'd think the multiple-author issue is one of how do we express policy--how do we make it easy for multiple people to collaboratively define policy? 16:34:01 thinrichs does having it in a single place imply being easy to manage? 16:34:41 I've definitely heard from folks saying that having N places to edit/maintain policy makes it hard to manage. Not saying 1 place necessarily makes it easy, but certainly easier. 16:34:49 thinrichs or is the easy of management mean more than it being centralized or not? 16:34:52 So, we have 3 levels of policy mechanisms that we have discussed. 16:35:02 Aside from the existing "edit it everywhere" 16:35:15 Definitely want more than just centralization to make it easy to manage. 16:35:23 thinrichs i would agree with that 16:35:24 1. Is external, like the Fortress case, where we make the policy decisions on a remote system 16:35:40 2. is the dynamic policy pproach we pursued until last year 16:35:54 3. is leavethe existing policy alone and add an additional layer oin top 16:36:10 What's the difference between (1) and (2)? 16:36:31 3 Only works if we are OK with the existing checks, but want to perform more filtering, which is the only thing I think will actually make it through 16:36:48 thinrichs: in 2 the policy decision is still made inside the service; 16:37:02 we just fetch the remote policy rules from a central repo...Keystone policy 16:37:10 it had some real shortcomings 16:37:33 I'd want to separate out PAP (administering/authoring policy) from PEP (enforcing). 16:37:33 the first was that the nodes did not know their own identity to fetch the proper policy file 16:37:42 1. is then PAP and PEP are the same (external) 16:37:53 does anyone here talk to their operators, or know what kind of changes are made to policy in the real world? When folks change it, are they changing the whole thing or just making small tweaks? (edmondsw) 16:37:55 2. is then PAP is external and PEP is local 16:37:56 to, in that approach, the PAP was Keystone, the PEP/PDP was oslo-policy call inside the service 16:38:11 thinrichs: yep 16:38:20 thinrichs: no, PAP/PDP is external, PEP is inside each service 16:38:40 So, we do have a way we can continue on there. 16:38:43 currently the PAP is whatever configuration management system you use for your deployment 16:38:53 3. Not sure what this one is...probably PEP is local and PAP is external 16:39:00 The issue was that we were trying to name the policy files by Endpoint. There was a proces problem there: 16:39:04 lbragstad, I think the feedback at the summits has been that folks are increasingly changing more in policyin Tokyo was the folks were and Austin (I missed Barca) was that 16:39:13 ignore the end of that... 16:39:14 lbragstad: that's interesting--using CAPS as your PAP 16:39:45 as for me, I'm overriding lots of policy.json defaults 16:39:55 maybe 90% 16:40:03 O.O 16:40:11 endpoints are essentially only named by their URLs in theservice catalog. The install tools balked at the idea that you would: register the endpoint, get an endpoint ID from Keystone, add that to the config mgmt, update the config and then use that ID to fetch policy 16:40:25 but...it turns out we really don't need to do that. 16:40:45 we just need a name to fetch policy by. Does not need to be anything other than human readable, and pre-calculatable 16:40:58 and that is the approach I am using in the RBAC-Middleware approach 16:40:59 thinrichs well - partially, because you typically have a CMS to lay down config, and policy.json is currently considered configuration... but the other part would be the keystone role API. 16:41:06 we could do the same for Dynamic policy 16:41:39 lbragstad: and that was a huge driving factor; people were more comfortable with policy in CMS than in a dynamic store like Keystone. 16:41:59 Which is another reason I pursued the RBAC in Middleware approach instead 16:42:10 RBAC is "on top" of existing policy 16:42:27 as none of the existing policy files check roles on most calls 16:42:58 ayoung ? 16:43:06 they check *a* role 16:43:09 the shortcoming, of course, is that it does only RBAC, not the full ABAC, but then again, oslo-policy can only do ABAC if the services provide the attributes 16:43:21 right 16:43:30 and we don't know what attributes they are going to provide...it is all over the place, as jamielennox found 16:43:30 which i don't necessarily consider a bad thing 16:43:45 lbragstad: not even A role...just that the token has a project 16:43:52 default policy.json can't check roles, plural, today because there is only one default role :) 16:44:06 it implies a role, but a wierd token with 0 roles but a project ID would pass the policy check. 16:45:15 ayoung, a large number of the default checks look for the admin role 16:45:20 edmondsw from your perspective, what would assist you in making less policy overrides? 16:45:33 So...those are some of the driving reasons I posted this https://review.openstack.org/#/c/391624/ 16:45:50 edmondsw: yep, and we still need to complete the 968696 work around that 16:45:55 lbragstad, fixing each service individually... this is a nova problem, a neutron problem, a glance problem, etc... not a keystone problem 16:46:01 an admin api is an admin API. 16:46:11 Opening it up will still required a policy.json change 16:46:30 making each service (nova, etc.) consistent with the others would be a big help 16:46:51 edmondsw would you say nova's approach to putting policy in code (oslo) moves in the right direction? 16:46:56 I think what nova did, and cinder is now doing, to move policy defaults into code instead of policy.json is a good step as well... makes the files much more readable 16:46:58 edmondsw or is the moot to you? 16:47:00 and the yaml support 16:47:01 The other thing that is lacking is the ability to map from the policy rules to the APIs 16:47:25 ayound the admin_api rule you're referring to checks for the admin role... 16:47:50 with the RBAC in MIddlewaree, we enforce policy on the URL pattern, instead of some cutpoint inside the code 16:47:56 and I have an analogy. 16:48:14 RBAC is like file permisions, oslo-policy is like SE Linux 16:48:18 ayoung have you seen dstanek's example on your review? 16:48:19 regarding the URL pattern? 16:48:42 ayoung, you can enforce a certain level of RBAC on the URL pattern, but there are RBAC cases that won't have the information you need in the URL 16:48:48 we were discussing one before you joined 16:49:25 edmondsw: yep...anything on the payload or even query parameters are not covered yet 16:49:37 and anything on the object fetched from the database is out, too 16:49:47 e.g. you ask to create a network, and neutron checks not only that you can create a network (one policy check) but also that you can specify what you did in the request body (potentially multiple additional policy checks) 16:50:23 good, we're on the same page :) 16:50:38 edmondsw: so nothing prevents that from happening now, but my understanding is that the code that performs things like that are very much hard coded, and should be left to the neutron team to affect. 16:50:56 agreed 16:51:03 if there are cases where they need aspecific role to perform something, that is going to be new effort as well 16:51:57 There is nothing keeping the Neutron team from using the RBAC mechanism later on if they want to, just that I am not driving the implementation off those use cases 16:52:07 ayoung: i'd love to get all of the usecase documented so that we can apply the solutions to them and see how they compare 16:52:18 dstanek ++ 16:52:24 +1 16:52:29 It is a free form pattern. They could bastarize it to do anything they wanted, so long as they can map a patter to a role 16:52:48 neutron policy is not something that the end deployer should be breaking.... 16:52:57 breaking? 16:53:17 editing the policy.json file and changing in such a way it triggers a 500 error 16:53:19 8 minute warning 16:53:53 if you add roles, then you have no choice but to edit policy 16:54:10 edmondsw: hence my spec and approach using RBAC in middleware 16:54:30 ayoung: i still think there are cases where the role must exist in the policy file 16:54:30 that is what https://review.openstack.org/#/c/391624/ is proposing 16:54:57 ayoung sorry, I haven't read the latest version yet... I had I think 50+ comments on the version I did read, but I think you were going to rewrite after that 16:54:58 dstanek: heh...probably, but we can defer that until we can do roles in general 16:55:13 dstanek definitely 16:55:15 I would suggest we resurrect dynamic policy once we get that one in 16:55:41 the idea of fetching policy by 'tag' as opposed to service name to do endpoint specific policy will work 16:55:52 we're not suggesting that the ability for neutron, etc. to make checks against the role would be removed, are we? Because that is a non-starter 16:55:52 ayoung: my problem with what we have been talking about so far is that i don't see the vision. so i don't know if the steps get us there 16:55:56 the default is that nova would fetch the "compute" policy 16:56:27 dstanek: I would say that the vision is 3 things: 16:56:48 1. perform the RBAC check based on the URL, not a rnadom string, so that people can fugyure out what they need to delegate 16:56:55 edmondsw the spec pulls the role check into keystonemiddleware 16:56:58 s/the/an/ 16:57:11 2. make it possible for people to create more fine grained roles for a set of a tasks so they can delegate a subset of them 16:57:47 3. make it possible for people to change the RBAC for operations without breaking the parts of policy that require engineering knowledge of the remote systems 16:58:00 you can pull A role check into keystonemiddleware, but you can't prevent the service from doing additional checks also based on role 16:58:30 edmondsw that's kinda what dstanek left as a comment 16:58:43 I did my best to make it as clear as possible in that spec. 16:59:05 alright - two minutes left, but it sounds like we still have a lot to discuss on the sepc 16:59:25 I'd like to have folks bring some more ideas to the meeting next week 16:59:32 can we agree to all read and comment on the spec for next week? And maybe have a vote on it to pursue or not? 16:59:37 so if you have any - please add them as agenda items 16:59:38 ayoung: I'm still missing the big picture. Are you aiming for a single PAP for all services? Are you envisioning the possibility of an external PDP? Are you committed to local PEPs? 16:59:39 ayoung i have been 17:00:01 thinrichs: single PAP. local PEPs 17:00:11 thinrichs: Only RBAC 17:00:16 I think #3 touches on another pain point I have changing policy... that lots of times one check leads to another down the line in unexpected ways... e.g. creating a new server/vm is going to end up causing checks in neutron, cinder, glance, etc. 17:00:18 ruan_09 your proposal for external PDP would be good for that 17:00:29 ok, 17:00:44 alright - let's continue in #openstack-keystone if needed 17:00:48 #endmeeting