16:00:02 #startmeeting keystone 16:00:03 Meeting started Tue Jun 26 16:00:02 2018 UTC and is due to finish in 60 minutes. The chair is lbragstad. Information about MeetBot at http://wiki.debian.org/MeetBot. 16:00:04 Useful Commands: #action #agreed #help #info #idea #link #topic #startvote. 16:00:05 #link https://etherpad.openstack.org/p/keystone-weekly-meeting 16:00:06 The meeting name has been set to 'keystone' 16:00:07 agenda ^ 16:00:11 o/ 16:00:17 ping ayoung, breton, cmurphy, dstanek, gagehugo, hrybacki, knikolla, lamt, lbragstad, lwanderley, kmalloc, rodrigods, samueldmq, spilla, aselius, dpar, jdennis, ruan_he, wxy, sonuk 16:00:36 o/ 16:00:37 o/ 16:01:03 lbragstad: you should ping in -keystone too :P 16:01:10 o/ 16:01:31 anyone else using irccloud sometimes realize their web client hasn't been connected for at least a couple of hours? 16:01:38 hrybacki: all the time 16:01:47 * hrybacki shakes fist at paid for service 16:01:51 irccloud is not that great 16:01:58 i switched back to firrre last week, free znc for freenode 16:01:58 I wish there was /anything/ better 16:02:08 weechat is awesome 16:02:19 yeah, I've got weechat on my new dev machine 16:02:20 but i don't want to pay for a VM in AWS or 16:02:26 * hrybacki nods 16:02:43 and my home lab is not... setup fully atm 16:02:48 ok - we have a lot on the agenda today 16:03:05 real quick announcement though 16:03:10 #topic announcements 16:03:13 o/ 16:03:21 if you haven't noticed, our docs job is failing 16:03:42 this is due to breaking warning that we treat as errors in Sphinx 1.7.5 16:03:52 we have a patch in the gate to fix the issue 16:03:57 the fix is +2/+A and pending check then will gate 16:04:00 but it's really just a work around 16:04:04 #link https://review.openstack.org/#/c/578121/ 16:04:15 the commit message gives the details if you're interested in them 16:04:41 TL;DR we can remove those docstrings once oauthlib is compatible with Sphinx 1.7.5 16:05:01 so - if you have something tripping over docs, ^ that should fix it 16:05:14 #topic Default roles next steps 16:05:16 hrybacki: o/ 16:05:34 o/ 16:05:48 yes, so we are now ready to start doing audits of our APIs 16:06:04 I've gone ahead and done an initial mapping (kmalloc) 16:06:12 #link https://docs.google.com/spreadsheets/d/14c2pAPeX14RR2EZU89fuSx5yW3Q9pjdyaKkD0cyFzaU/edit?usp=sharing 16:06:20 that should be public, but please let me know if it's not 16:06:31 it's not 16:06:34 We've also begun doing a similar audit in barbican 16:06:39 knikolla: sec, will fix 16:06:45 https://wiki.openstack.org/wiki/Barbican/Policy 16:07:27 okay, permissions are whack because I pulled from my Red Hat google drive 16:07:38 I'll fix and submit a new link 16:07:42 welcome to google docs unfun =/ 16:07:51 aye 16:07:55 i've been battling that for weeks, keeps defaulting to the wrong account 16:08:07 anyways, there is a complete mapping of each route->policy 16:08:18 along with other details. Pretty verbose. 16:08:45 Next step is to sit down and walk through these laying down where we /want/ these to fall in line WRT the new default roles and scopes 16:09:07 I highly recommend performing the audit after a given API path is moved to flask, it will make it much easier to see everything under (e.g. /users) 16:09:15 rather than having to find what routers append where 16:09:21 lbragstad: there are also quite a few notes for work that needs to be done in order to enable scope 16:09:35 kmalloc: I'm concerned about the feature freeze in < weeks (correct?) 16:10:27 July 27th 16:10:32 #link https://releases.openstack.org/rocky/schedule.html 16:10:39 it is a concern. but the bulk of the API moves should be proposed by then. 16:10:43 we have 4 weeks 16:10:55 i'm wondering if we can do the audit in review? 16:10:56 audit should be fine post FF. 16:11:04 here 16:11:06 #link https://docs.google.com/spreadsheets/d/1kd3OJCLMsIkPgULN31WFw9PA9-3-X99yaDnjWDGOvm0/edit?usp=sharing 16:11:09 that should be viewable 16:11:11 versus auditing in google docs then porting everything to gerrit 16:11:42 also - however we do things, we should be sure to update the specification with the table once the audit is done 16:11:45 lbragstad: well, the doc has full context where a single file within gerrit may not 16:12:04 I'm trying to lay down a pattern for helping the other services 16:12:06 unless we're building a full context file in gerrit. 16:12:07 barbican was a nightmare 16:12:27 hmm 16:13:06 hrybacki: my only concern with the audit pre-flask is just that the structure (and controllers) are all being re-worked and routes are handled very different 16:13:20 i just don't want to have to re-audit if an api is moved. 16:13:38 just because the code shuffled a ton. 16:13:53 I think it may be good practice tbh (jsut from a community goal perspective) 16:13:54 otherwise ++ we should do it. 16:13:59 but don't want to burn others out 16:14:47 okay, so (not wanting to eat the whole meeting). We are opting to wait until Flask stuff is implemented 16:14:58 who will want to do the audit at that point with me? kmalloc ? 16:15:08 hrybacki: i can help some. 16:15:11 i can't do it all ;) 16:15:36 I'll do the implementation -- I just need core help doing the initial audit :) 16:15:42 i can help with the audit stuff 16:15:47 ack 16:16:10 let's start with a couple easy APIs if we can 16:16:20 so action: harry to set up audit appt kmalloc and lbragstad after Flask stuff has merged? 16:16:30 I don't care where we start 16:16:40 is it realistic for this stuff to begin landing in rocky? 16:16:45 likely 16:16:50 depends on the reviews of the flask work 16:16:55 * hrybacki nods 16:16:57 the flask stuff will be focused on easy APIs first e.g. limits 16:17:09 ack 16:17:10 stuff that is isolated, where things like /users is likely to be towards the end. 16:17:24 just because ... a lot of things touch /users 16:17:45 ack. I can work 'behind' your flask progress with the audit 16:18:01 that's all on that from me lbragstad 16:18:08 expect APIs to start moving as soon as the RBAC enforcer stuff has eyes 16:18:27 sounds good 16:18:37 #topic keystone federation testing 16:18:39 knikolla: o/ 16:18:42 o/ 16:19:03 so first, there's a lot of interest lately from the edge computing group in keystone and keystone federation 16:19:16 me and lbragstad attended the edge computing meeting today and answered a few questions 16:19:24 lbragstad: lets punt the oslo_policy bit to another meeting. [so skip it today, netx week or the following[] 16:19:34 tomorrow there's a meeting with the OPNFV group, who is interested in helping out with keystone federation testing 16:19:42 yay more testing! 16:19:43 there's an etherpad to track the effort https://etherpad.openstack.org/p/ECG_Keystone_Testing 16:19:58 with that announcement out of the way, i had a technical question 16:20:27 does it make sense to test with Shibboleth as a SAML ECP idp, if keystone in keystone to keystone can act as a SAML ECP Idp? 16:20:58 does Shib buy us anything k2k doesn't? 16:21:21 lbragstad: the fact that it's shibboleth 16:21:49 so it sort of does integration testing, but they're using the same protocol 16:22:06 with k2k we have the ability to exercise the idp paths more exhaustively, yeah? 16:22:29 yeah, keystone currently acts as an SP only 16:22:43 the original plan was to deploy a local shibboleth 16:22:48 shibboleth-idp* 16:22:51 and also use k2k 16:23:09 oh - got it 16:23:13 i'm questioning whether a local shibboleth-idp makes sense at all 16:23:29 seems like it would be a good sanity check 16:23:40 and whether we should just do k2k, since keystone as an idp uses the same protocol that shibboleth as an idp uses 16:23:41 but i'm also not familiar with the maintenance cost of doing each 16:24:57 switching over from testshib.org (which we're currently using) to keystone-as-an-idp should be easier than setting up an idp in the gate. 16:25:16 ok 16:25:31 do people have strong opinions? kmalloc? 16:25:47 i am a fan of dropping testshib 16:25:53 as a dep for our testing 16:26:03 IMO; anything is better than what we have today, but aiming for a lower bar is fine, too 16:26:07 i would still like to see a shib setup to test federation. 16:26:29 but that said, any testing is good as long as it is representative of real use 16:27:03 with how much k2k has been talked about recently, specifically for edge related things, test coverage would be useful there 16:27:30 ok, so i will update the testing plan to have k2k instead of testshib, for now. And then later have shib as a local idp. 16:27:44 ++ 16:27:45 makes sense 16:27:58 knikolla: anything else on that front? 16:28:04 awesome, that's all i had. 16:28:10 kmalloc: did you say you wanted to do the next topic? 16:28:16 oslo-policy check types? 16:28:19 skip that one 16:28:24 until the end or a future meeting 16:28:24 ok 16:28:42 #topic pluggable policy 16:28:47 hrybacki: o/ 16:28:49 o/ 16:28:50 you're up again 16:28:57 i wish ozz was here to speak to this 16:29:27 okay, so there are operators rolling their own centralized policy solutions 16:29:42 I am hearing asks from some of our customers as well. 16:29:58 this is related to the pluggable enforcer bit in oslo_policy? 16:30:04 centralized rbac is a topic that keeps coming up at summits/ptgs 16:30:08 being built? 16:30:18 to that end, after returning from KubeCon, ozz was pretty amped about Open Policy Agent 16:30:20 kmalloc: yes 16:30:38 #link http://jaormx.github.io/2018/rewriting-openstack-policy-files-in-open-policy-agent-rego-language/ 16:30:46 he wrote about his idea of using OPA for policy checks within openstack 16:30:47 ^^ 16:30:49 thanks lbragstad 16:30:59 a first step is making Enforce plugable 16:31:04 so, i 100% support pluggable enforce 16:31:19 #link https://review.openstack.org/#/c/577807/ 16:31:22 and my mouse just died 16:31:31 and i 100% support centralizing policy in a smart way (by default, say... etcd) 16:31:49 but not dumping the policy DSL for the "out-of-the-box" experience [yet] 16:31:52 that is ozz's WIP 16:32:18 i think that code is headed the right way. 16:32:26 * hrybacki nods 16:33:01 so - this isn't using http_check 16:33:04 One question ozz raised was, should operators be able to override scope in the same way they can rules for policy? e.g. in policy files 16:33:25 hrybacki: scope, iirc is not overridable 16:33:28 and shouldn't be 16:33:39 i'm inclined to say no, but that could be a knee jerk reaction 16:33:54 scope is intended to be communication from the service that this works with project vs system scope 16:34:04 so, start with no, not overridable 16:34:09 we can expand if needed 16:34:13 it's also intended to be set by the people writing the API 16:34:23 both sound reasons 16:34:26 easier to add funcitonality than take it away 16:34:46 so if i write an api that does things on a system level, i probably don't want to expose things that allow people to bypass that 16:34:53 ++ 16:35:11 we can always re-evaluate and allow overrides 16:35:23 hrybacki: what was ozz's use case for overriding them? 16:35:48 lbragstad: so OPA has its own lingo for policy (and other stuff) 'rego' 16:36:05 he wrote a parser that ports default policy files to rego for use with OPA 16:36:12 using the defaults we have built out so far 16:36:19 but scope type isn't indicated in them 16:36:30 so he's trying to get around parsing the policy-in-code files 16:36:37 hmmm 16:36:41 we are thinking about customers that already custom policy files 16:36:51 s/operators/customers/ 16:36:57 damnit, reverse that 16:37:20 can he load the custom policy files, fill in the gaps with the missing policys, covert them to RuleDefault instances, and then inspect the .scope_types attributes? 16:37:35 and we expose the list_rules stuff, right? 16:37:39 yeah 16:37:49 so it is possible to just python-introspect the objects 16:37:50 we can do that, I just wanted to verify the simple solution wasn't the correct answer 16:37:52 that's how we munge custom policy files today 16:38:18 usualyl something like 16:38:22 ack. thanks for the input :) 16:38:50 1.) give me the default set of rules 2.) override the ones i need to for my deployment 16:38:50 but yes kmalloc I like the Enforcer patch he's posted. I'll look at your work (that I saw in the agenda) too 16:38:57 but keep everything as a set of RuleDefault objects 16:39:35 everything in that set should maintain the .scope_types attributes we set from step #1, but include the overrides the customer needs from step #2 16:40:01 okay 16:40:16 i feel like i just waved my hands everywhere 16:40:23 but hopefully that helps 16:40:27 lbragstad: I have more than enough info for now :) 16:41:01 and if it doesn't we should find a way to expose that information so that scope_types is consumable but not overrideable 16:41:09 ++ 16:41:32 open/closed principle ya know?! 16:41:33 call out for policy check, but still check scope internally 16:41:35 easy 16:41:51 outside of the pluggable backend 16:42:03 interesting approach 16:43:00 if ozz is going to be around this week, maybe we can sit down and see what he thinks 16:43:06 * hrybacki is being quiet so we cover more :) 16:43:23 lbragstad: he's here through Thursday, just a +7hr timeline so couldn't make this meeting 16:43:29 ah 16:43:42 maybe early in the day for us then and we can catch him 16:43:47 he lives in Finland for context 16:43:56 hrybacki: anything else on this? 16:43:57 sure, that would be good. I'll send him an email 16:44:01 nope! 16:44:07 cool - thanks! 16:44:22 #topic shiny new RBAC enforcement with Flask 16:44:23 kmalloc: 16:44:26 kmalloc: o/ 16:44:38 so. it turns out i can't move an API to flask without providing RBAC enforcement 16:45:00 @protected sucks... and has next to no documentation and testing is limited to "do we enforce what we think we enforce" 16:45:20 #link https://review.openstack.org/#/q/topic:bug/1776504+(status:open+OR+status:merged) 16:45:39 that is the stack of changes. at the current end there is a NEW RBACEnforcer object 16:46:15 it only works with flask, but it eliminates @protected as a decorator with the idea enforcement should happen within the method at the right time [e.g. after loading the object to be enforced on] 16:46:34 so, enforcer.enforce_call() is used instead of just letting the decorator do magic 16:46:44 this should make our API enforcement logic more like business logic instead of stuffing it all into a decorator, right? 16:46:48 yes 16:47:05 awesome 16:47:37 in the simplest form, you can decorate the method (e.g. .get()) with @enforcer.policy_enforcer_action() 16:47:45 and then call enforcer.enforce_call() 16:48:01 with no args, assuming everything is setup 16:48:42 you can also call .enforce_call() with a number of variations to get the same functionality @protected, @filterprotected, and the callback versions without needing to duplicate the check_protection code into a callback 16:48:52 cool 16:48:59 i'll review that chain today 16:49:04 we also ahve full unit tests that build Creds, Target, data directly 16:49:08 that's going to have a big impact on the default roles work for sure 16:49:21 instead of assuming it is right if the .enforce() call is working 16:49:36 last of all, i am sorry it's a 1000+ line change 16:49:41 but 50% of the change is tests. 16:50:11 in flask, we also have an explicit check to see if .enforce_call was made 16:50:20 it's also going to help us fix stuff like this 16:50:23 #link https://bugs.launchpad.net/keystone/+bug/1750660 16:50:23 Launchpad bug 1750660 in OpenStack Identity (keystone) "The v3 project API should account for different scopes" [High,Triaged] 16:50:37 if it wasn't called, keystone will error unless the method is explicitly exempted 16:50:48 and there is a decorator to exempt the methods 16:50:57 that will be easier to show in a followup. 16:51:08 as i move APIs. 16:51:37 all the assertions that .enforce_call is made is done via "assert" it is not meant to block use in production if python -O is used 16:51:44 it is meant to be caught in dev. 16:52:01 so no one implements an unenforced (unintentionally) API 16:52:13 good deal 16:52:18 last note. 16:52:39 there is a weird bug in how we extract subject-token data now 16:52:40 https://review.openstack.org/#/c/577655/ 16:53:09 if you are doing .get_user, the subject-token data will be in target_dict['target']['user'] 16:53:19 if project it will be in ['project'] not user 16:53:26 because it uses the "controller" to populate 16:53:46 so we have weird data that isn't target.token it is target. 16:53:56 that patch fixes it for @protected 16:54:05 i have rolled the same fix into the RBACEnforcer 16:54:14 since they use different code paths 16:54:16 ... 16:54:22 hmm 16:54:28 good to know 16:54:32 anything else on that kmalloc? 16:54:36 just need eyes? 16:54:50 The RBACEnforcer also still just leans on oslo_policy, so all pluggable enforcers will work 16:54:53 it needs eyes. 16:54:57 awesome 16:55:06 this chain has taken weeks to unroll what @protected does 16:55:16 hopefully enforcer.enforce_call is easier to understand 16:55:23 yeah - i hope so 16:55:26 sounds like it will be 16:55:41 this also implementes the first example of the new REST testing 16:55:49 which is *way* cooler than the use of WEBTEST 16:55:50 :) 16:56:07 with self.test_client() as c: 16:56:09 ^_^ 16:56:26 only a couple topics left 16:56:31 * kmalloc is done. 16:56:41 thanks kmalloc! 16:56:45 #topic unified limits 16:56:49 wxy|: o/ 16:56:55 hi 16:57:09 wxy|: looks like you have some things that needs reviews, too 16:57:09 it's just a reminder. 16:57:15 yeah 16:57:56 nothing else, just need some eyes 16:58:12 #link https://review.openstack.org/#/c/557696/ 16:58:29 that's the implementation of the strict two level spec ^ ? 16:58:45 #link https://review.openstack.org/#/c/576025/ 16:58:50 part of 16:58:57 #link https://review.openstack.org/#/c/577751/ 16:59:15 those should address the things the kmalloc brought up last week (nice job on the turn around time) 16:59:23 yes. 16:59:47 i'll review those too 16:59:55 if anyone else wants to test out the unified limit stuff manually 16:59:58 * hrybacki slides into next meeting 17:00:01 ksc now supports unified limits 17:00:02 thanks. 17:00:12 i'm working on some patches to get support into python-openstackclient 17:00:26 i should have some patches up for oslo.limit this week, too 17:00:34 so - no shortage of stuff for review 17:00:45 wxy|: anything else you need on unified limits except reviews? 17:01:15 no, that's all 17:01:20 thanks for all the hard work everyone 17:01:22 #endmeeting