13:04:07 #startmeeting 13:04:07 #meetingname scrum 13:04:07 Meeting started Wed Jul 16 13:04:07 2014 UTC. The chair is alinefm. Information about MeetBot at http://wiki.debian.org/MeetBot. 13:04:07 Useful Commands: #action #agreed #help #info #idea #link #topic. 13:04:07 The meeting name has been set to 'scrum' 13:04:20 #info Agenda 1) Status 2) Open discussion 13:04:20 anything else? 13:04:45 Good for me 13:05:07 #topic Status 13:05:07 #info Please provide your status using the #info command: #info 13:05:45 #info alinefm sent patch to remove useless fonts 13:06:02 #info royce finished template creating from image, and create vm from image based template 13:06:13 #info wenwang working on Authorization: remove host/template tabs for non-root users 13:06:14 #info alinefm sent patch to let front end redirect user after login 13:06:51 #info alinefm sent patch with the backend authorization changes according to RFC comments 13:06:57 #info wenwang working on Authorization: remove actions menu from storage/network tabs for non-rooot users 13:07:03 #info royce investigated libvirt feature of changing disk permission, seems it can substitute my previous patch of inotify change permission, need more test on different distro 13:07:26 #info wenwang working on Authorization: remove [+] icon from non-root users view 13:07:46 #info alinefm sent patch to keep KimchiException consistent independent of its use (inside of a cherrypy app or not) 13:08:05 #info lagarcia helped on the patch to build kimchi without fonts (Fedora requirement) 13:09:28 anything else? 13:11:00 moving on... 13:11:11 #topic Open Discussion 13:11:26 I have some topics for today but I want to hear from you first 13:11:33 what do you want to discuss? 13:12:12 alinefm: The redirect patch has some problems 13:12:25 #info YuXin authorization: assign vm to users/groups 80% finished, will try to get a patch out this week 13:12:34 Authorization 13:13:15 alinefm: We should not use the lastPage for the next_url which is stored in the backend 13:13:50 wenwang, just read you review 13:14:14 wenwang, so how I decode base64 in UI? 13:14:32 About the authorization, I commented in ML, I think we get to the point to stop using Linux user/group 13:14:38 or should we use other encode/decode base easier to work on UI? 13:14:55 royce, just a minute and we turn to this topic 13:15:04 sure 13:16:11 wenwang, ? 13:16:29 alinefm: base 64 can be decoded by using the base64.js. But what we are using is base64_urlsafe. I think I can have the file changed possibly it will work 13:17:16 wenwang, the current base64.js file in kimchi source code is imported from novnc 13:17:20 we should not change it 13:17:56 wenwang, maybe use other encode rather than base64_urlsafe 13:18:05 shaohef, any reason to use this ^? 13:18:50 alinefm, shaohef had just returned from train station, he may not able to response:) 13:19:35 royce, thanks for the info 13:19:54 yw 13:19:57 alinefm: okay then, maybe we can change for another way of encoding 13:20:17 alinefm: like URIcomponent 13:20:21 wenwang, what is easy to decode on UI? what is general used/ 13:20:40 wenwang, encodeURIcomponent / decodeURIcomponent ? 13:20:40 URIcomponent 13:20:55 alinefm: yes 13:21:13 wenwang, ok - I will try it and resend the patch today fixing the problems you mentioned on review 13:21:28 alinefm: That will be great 13:21:52 wenwang, about the role/mode map, royce mentioned a good point during review 13:21:56 alinefm: The frontend based on your redirect in frontend has been ready 13:22:30 instead of adding the map to xml, we need to have a protected API for it 13:22:42 otherwise a user can hack the js code to get other views 13:23:03 alinefm: hmm, that make sense 13:23:26 alinefm: So we need to create a GET method that get user's role? 13:23:27 so I suggest adding a new API /authorization that returns the info {tab: {role: mode, role: mode..} 13:23:41 wenwang, for the authorization map 13:24:04 GET /authorization 13:24:05 { 13:24:05 "guests": {"admin": "admin", 13:24:05 "user": "byInstance"}, 13:24:05 who is authorized to accesss this API 13:24:06 "templates": {"admin": "admin", 13:24:07 "user": "byInstance"} 13:24:11 ... 13:24:13 } 13:24:41 YuXin, a logged user 13:24:56 after login you get this map to display the kimchi UI accordingly 13:25:05 example: 13:25:11 so all users are authorized to access this API 13:25:15 alinefm: We need to build the tabs before we logged in 13:26:11 alinefm: That means we need to get user's mode once clicking on the login button 13:26:30 instead add this API, just get that xml file to be protected 13:27:09 I mean add that xml file to protection list 13:27:31 I agree, if enabled this set of API, admin can add or manage, normal users can query his own authorization 13:28:14 YuXin, by xml file protection you mean? 13:28:48 I think aline means that xml file need to be protected 13:29:06 thinking... 13:29:30 so only authenticated user can load it 13:30:36 Kimchi need the xml file to load the tabs 13:30:40 even an authenticated user can modify the .js I think, normal user can get admin's view 13:31:07 royce, yes - but it also can happen with a API 13:31:13 right 13:31:21 wait 13:31:48 alinefm, do you mean normal users can get admin view through API? 13:32:05 without this xml, if a hacker only read js code, this can get it to build the whole UI 13:32:10 I mean API need to be classified, who can call what kinds of APIs 13:32:42 this is the side effect that we js code to build UI 13:32:48 Talked with openstack guys they said openstack validate every API call with keystone to see if user are authorized to do so 13:33:15 royce, UI will user GET /authorization to build the UI, a hacker ca modify it to ignore the /authorization response to use their own values 13:33:17 for web2.0 style UI(rich client), this is unavoidable 13:33:40 alinefm, oh, true 13:34:12 so can UI try API call and then decide what to present? 13:34:17 so strictly, we are still protecting data and function 13:34:19 royce, YuXin, wenwang, I think we need to use the cheetah template to solve this problem 13:34:37 so the xml will be built on backend according to roles/views 13:35:11 good idea 13:35:35 example: input on cheetah template #if role == admin: display + icon 13:36:21 but in js code, it need to check all available config options 13:36:27 http://www.cheetahtemplate.org/docs/users_guide_html_multipage/flowControl.if.html 13:36:32 alinefm: That's good 13:36:40 a hacker can read the code and mock the xml file to build all UI 13:37:02 YuXin, using cheetah we will build the view on backend 13:37:11 a hacker can just get html of his own role 13:37:15 the JS will need to only care about the "byInstance" view 13:37:38 so what we get back is role right? 13:37:52 aline, current, the js code is loading the xml file and build the UI at cllient side 13:38:03 what you are talking about will be quite a big change 13:39:51 from backend perspective, while send HTML as response we will need to send the authorization map as well and in the templates we add the IFs/ELSEs to display/hide content according to user role 13:40:00 we UI will keep the same 13:40:10 unless while loading the VMs 13:40:24 alinefm, I think the view is one thing, protect API from backend is still needed, so that even if they call this API from like curl, the API call fails 13:40:45 royce, which API/ 13:40:55 All REST API 13:41:05 royce, it is already protected 13:41:26 only admin user (ie, with sudo permission) can manage kimchi 13:41:54 yeah, I know, that is the next issue I listed 13:42:14 wenwang, YuXin, get a deal about the cheetah template? 13:42:24 Because it's wired up with super user 13:42:41 We cannot control each API in your role model 13:43:22 royce, yeap! I know! but for now we will not allow change user role 13:43:23 aline, do you mean when return kimchi-ui.html, the tabs are already in and based on the role to determine which tab is included 13:43:28 we will add it in future 13:43:52 YuXin, forgot that point! heheh 13:44:02 YuXin, I was only thinking about the elements in the tab 13:44:44 so aline, you are trying to protect actions, right? 13:45:31 YuXin, I though in load the correct html based on role on backend but I forgot some tabs will not be displayed 13:45:47 *thought 13:46:51 royce, YuXin, wenwang, I think we can keep it as we are doing with the tabs.xml 13:46:54 I mean, if we protected the API with fine grained, we do not worry about user hack js. Like it is {vm: admin, storage: user} if he hacks to be :{vm:admin, storage:admin}, the "+" button is there but click it will fail 13:47:16 as we are protecting the API on backend - if the user hack the UI he/she will not be able to perform actions not allowed to him/her 13:47:26 true 13:47:28 correct 13:47:38 yes 13:47:43 api access need to be role based as well 13:48:26 Yes, so point is we cannot count on UI to implement authorization 13:48:38 yeap 13:48:52 great! I will apply the comments made by change and resend the patches using tabs.xml 13:49:03 royce: That's correct 13:49:19 can we move on to other authorization topic? 13:49:26 alinefm: That will be great 13:49:47 sure 13:49:48 royce, go ahead 13:50:33 I have no more major questions now, other small ones are in ML 13:51:20 royce, ok - so let me clarify some doubts I think you have =) 13:51:57 we will have a role per tab - as described in my last patchset {guests: admin, templates: admin, ...} 13:52:23 *by now* the role is set according to sudo permissions 13:52:45 so if a user has sudo permission his/her role will be admin for all tabs 13:53:04 yes 13:53:06 so if a user does NOT have sudo permission his/her role will be "user" for all tabs 13:53:22 in future, we will allow changing a user role 13:53:34 yes 13:53:38 so we can have a mix of all combinations 13:53:50 I think to each tab, what matters is really the "mode" 13:54:14 wenwang, yeap! the map role -> mode 13:54:14 How about just add "mode" to each tab 13:54:16 So what needs to update is we still need to use tabs.xml to protect corresponding API in backend 13:54:22 we still need to take in mind the plugins we support 13:55:19 royce, nope! the API is protected by @UrlSubNode() on control 13:55:27 example: @UrlSubNode("vms", True, ['POST', 'PUT', 'DELETE']) 13:55:48 royce, tabs.xml is used for client to build UI based on role 13:55:49 there you are telling only "admin" role can do POST, PUT, DELETE to a VM 13:56:09 do not mix it with api protection 13:56:43 checking 13:57:40 alinefm: So what are included in the xml now? role and mode or just role 13:58:05 wenwang, both 13:58:13 13:58:21 13:58:24 *user 13:58:49 Okay, I see 13:59:03 As what I see today in the ML 13:59:16 wenwang, the /login will return the map for each tab so while loading the tab you need to get the correct access element according to user user for this tab 13:59:33 and then get the mode value 13:59:40 wenwang, does that make sense? 13:59:54 I see...still as I mentioned as Guest may have multiple level rather than just admin or none 14:00:14 alinefm: ACK 14:00:15 some can CREATE/DELETE, some can start/stop, some can just view 14:00:51 for vm, root: full, admin: no add, user: start/stop/vnc 14:00:58 Seems UrlSubNode does not cover such scenario 14:01:23 YuXin, think about a phisical machine admin--he can start and stop 14:01:31 users can just login 14:02:07 virtualization admin can create and delete/ vm admin can start and stop/users login 14:02:18 that is our designed security model, Adam told that he has verified with vCell administrator 14:03:28 royce, the backend covers what we have now = 2 roles: admin - full access, user - limited access 14:03:40 royce, please make clear whether you have questions about security model design or implementation? 14:03:54 royce, I agree with you we will need to do more changes in backend when we add more authorization levels as you described 14:04:06 I'm talking about the design YuXin 14:04:41 All or nothing does not sounds reasonable in cloud envirnonment 14:04:56 if you have question about design, that is next sprint's topic I think, for this sprint, we need to get the current design implemented 14:05:01 royce, for example to solve the problem you mention, we will need to get the right methods according to roles 14:05:33 royce, we dont build a house in one day - it is step by step =) 14:05:40 it is what we are doing 14:05:41 yes, sure 14:06:14 YuXin, I don't think a feature can implemented right with wrong design:) 14:06:57 royce, what do you think it is wrong based on our 2 roles (admin/user) ? 14:07:06 the design has been poped up long ago, it is late now you question about that as it is already at coding phase 14:07:21 alinefm: so now we don't have users that is distinguished as "admin" and "user" right? If so, shall we give the user in this spint the right without admin's power? 14:08:02 alinefm, I'm OK with current one but still we can try to change it to fine grained model in the future, I agree with you~ 14:08:52 in this sprint, if a user is assigned to a vm, the user will have full access to the vm 14:09:00 wenwang, ^ 14:09:06 this has no conflict to royce's opinion 14:09:21 wenwang, YuXin, in my last patch I added a "access" parameter to the VM 14:09:39 so we can change it when adding more role levels 14:09:48 for now the access=full for all vms 14:09:49 sure 14:09:55 so royce, please re-think your design, and get an rfc out before next sprint, it is still not late 14:10:00 alinefm: that will be nice 14:10:23 YuXin: I see. Full access for user this sprint 14:11:17 wenwang, YuXin, so when the mode=byInstance check the "access" parameter to each resource 14:11:29 yes 14:11:43 in the current sprint we have guests tabs with 14:12:02 Oh, one more word about two other things, alinefm 14:12:07 so while loading the guests you need to check the "access" parameter (now always set to "full") 14:12:17 royce, sure 14:12:45 one is about the upload 14:12:52 alinefm: ACK 14:13:21 seem ssdxiao haven't taken it, do you mind I pick up the backend and hongliang the UI? 14:13:51 royce, which item do you mean? 14:14:07 upload a iso to ootb pool 14:14:08 royce, I am completely fine with that! just send a email do ssdxiao first to avoid conflicts 14:14:34 royce, but I will target it to sprint 2, OK? 14:14:55 i believe in wiki, it is already under hongliang's name for the UI part 14:15:08 I think sprint 1 is OK, alinefm:) 14:15:23 royce, sprint 1 ends next week, right? 14:16:00 yes, 07/23 if i remember correctly 14:16:06 I think I can try to make it 14:16:17 because another item of mine, the inotify one 14:16:31 seems not requeire so much effort now 14:16:35 YuXin, yeap! 07/23 14:16:41 alinefm: wenwang: The alphabet base64_urlsafe uses '-' instead of '+' and '_' instead of '/'. 14:16:59 as I mentioned libvirt has a configuration which will automatically modify disk permission 14:17:03 royce, let's target it for sprint 2 and if you get it done earlier you can send the patches to ML =) 14:17:11 ok, thanks alinefm 14:17:21 shaohef: That's correct 14:17:31 alinefm: wenwang: '+' and '/' are a special characters in url 14:18:01 shaohef, thanks! wenwang suggested to use URIcomponent instead of base64 14:18:10 as it is easier to decode on UI 14:18:17 alinefm: I 哈ve 14:18:50 alinefm: I remembered I have tried URIcomponent, seems it can not works 14:19:28 shaohef, hmm or try base64 (without urlsafe) + URIcomponent 14:20:00 alinefm: I have not try this method. 14:20:13 alinefm: maybe it can also works. 14:20:23 if backend do URIEncoding is different from URIComponentEncoding 14:20:36 shaohef, I will do some investigation on it today 14:20:45 for this case, it should be URIEncoding 14:21:15 alinefm: that's great. 14:21:20 YuXin, I will try it too 14:21:29 team, seems we are over time 14:21:42 http://www.w3schools.com/jsref/jsref_obj_global.asp 14:22:15 thanks 14:22:40 I will finish the scrum meeting but if you have more topics we can continue the discussion 14:23:01 thanks all for the great discussions! 14:23:05 #endmeeting