Thursday, 2016-04-14

*** ppai has joined #openstack-swauth05:15
*** kaleta_ has joined #openstack-swauth06:00
*** onovy_ has joined #openstack-swauth06:05
*** onovy has quit IRC06:08
*** kaleta has quit IRC06:08
*** onovy_ is now known as onovy06:08
*** kaleta_ is now known as kaleta06:08
*** openstackstatus has joined #openstack-swauth08:26
*** ChanServ sets mode: +v openstackstatus08:26
onovyppai: hi. i just need to explain your patch and i'm open to merge it10:38
onovypeterlisak: ^10:38
ppaionovy, hi11:14
onovypassword = password.encode('utf-8')11:14
ppaionovy, this should explain what it intends to do: http://paste.openstack.org/show/490421/11:14
onovyshouldn't be this done for password_type too?11:15
ppaionovy, no because password_type is not sent by the client or user11:15
ppaionovy, further, password_type is not passed to hmac.new11:20
onovysame arguments are valid or password variable11:23
onovyand encode is called :)11:23
onovyor=>for11:24
ppaipassword and msg variables are passed to hmac.new() which seems to have the bug mentioned as comment11:25
*** ppai has quit IRC11:48
onovyah12:22
*** ppai has joined #openstack-swauth16:21
ppaionovy, around >16:29
ppai?16:29
onovyonly for few seconds16:29
onovy:)16:29
ppaionovy, oops sorry, I just saw your comment16:30
ppaionovy, the rationale behind not including salt in "key" is that that information is already encoded in the hashed key16:30
onovyhmm, but that's not reason why not keep it here :)16:32
ppaionovy, OTOH I completely agree with your case where stolen hashed DB will let access into the system16:33
onovyso why not just "raise exception" here?16:33
onovyand don't allow this combination?16:33
ppaionovy, but i don't see an alternative16:33
onovythis=!plaintext + swift316:34
ppaionovy, do you mean swift3 + swauth will only support plaintext ?16:34
onovyyep, that's alternative16:34
onovybecause it's same secure as sending hash as key16:35
onovyonly difference is in hybrid env, where some is using swift api and other one s3 api16:35
onovysomeone16:35
onovybut if i understand it correctly, amazon must have plaintext password only now, right?16:36
ppaionovy, well the hash is never sent over network as key. the key is converted to HMAC signature and that is sent over to the proxy server. So this is not susceptible to main in the middle attack16:36
onovyyep16:36
onovyi know16:36
onovysending=using :)16:36
onovyso lets compare it16:37
onovy1. plaintext in DB16:37
onovyDB=swauth16:37
onovy-if DB is stolen, everybody know passwords16:37
onovyswift api and s3 api can be used with stolen passwords16:38
onovy2. hashed pass in DB16:38
onovystolen hashes can't be used with swift api16:38
onovybut can be used with s3 api16:38
ppaionovy, you're right about supporting hash as key is no more secure than plaintext. however, this will leave all existing deployments with auth_type not plaintext to miss out on using swift316:39
onovyyep, so i think we want to have hashed pass + swift3 support16:39
onovybecause for swift api is MUCH better to use hased passwd16:39
onovyand for swift3 api it's same16:39
onovyso if someone have hybrid env, let's them use hashed password16:40
onovybetter security for swift api, same for s3 api16:40
onovyright?16:40
onovyonly security concern for me is: if someone enable hashed password, he should think "password are safe if DB is stolen"16:41
onovybut with swift3 it's not true. password is safe, access not :)16:42
ppaionovy, you're right. I don't disagree with you. All I'm saying is let the user make the choice :)16:42
onovyi'm just trying to summarize it16:43
onovyso, what about this:16:43
onovy1. allow to use hashed password as credential in swift316:43
onovy2. explain security concerns inside docs16:43
onovy3. implement encrypted password - every stored passwd in DB will be encrypted with key from config16:44
onovy(3) => another patch of course16:44
ppaionovy, 1 and 2 are perfect16:44
onovyso only question is: should salt be inside key or not16:44
onovyi think it "doesn't matter"16:45
ppaionovy, 3 is implementable and useful but only for new passwords, existing ones will have no effect16:45
ppairight16:45
onovybut if you are using same salt for more passwords, "without salt" is better16:45
ppaionovy, yes16:46
onovywhy to give anyone (enduser) salt, right? :)16:46
onovyand maybe that's another question: if you have "key" inside s3 client config, which is already calculated hash, why we need global salt?16:46
ppaithe client calculates key based on salt and password16:47
onovys3 official client?16:47
onovyor any other alternative client?16:48
ppaithere is no official client, is there ?16:48
onovy(exactly i never used amazon)16:48
ppaifor the s3 perl script I use, I have a tiny python program that gets me key from salt and password16:49
ppaii use that16:49
onovybut that's useless, you know? :)16:49
onovyin config you should have just key=<hash>16:49
onovyif i can authenticate with hash, why should i have plaintext password inside config16:50
ppaibecause password is human readable16:50
onovyand machine-stolenable :)16:50
ppaiif you have an app - web or whatever, users usually enter username and password16:51
onovyyep, that's good point16:51
onovybtw: how are you dealing with keystone vs. swift3?16:51
ppaithey dont need to know that the app has salt stored in app16:51
ppaithat's supported, as mentioned in swift3 doc16:51
ppaii haven't tested it16:52
onovywith hashed passwords? :)16:52
onovymaybe we should implement it same16:52
onovybtw: http://aws.amazon.com/cli/ // oficial client16:53
onovysorry i must go now16:55
ppaiwith keystone its more complicated16:55
ppaithere's another helper middleware in pipeline16:56
ppaicool16:58
ppaicya :)16:58
*** ppai has quit IRC17:12
*** nadeem has joined #openstack-swauth17:53
*** nadeem has quit IRC19:11
*** nadeem has joined #openstack-swauth19:13
*** nadeem has quit IRC20:15

Generated by irclog2html.py 2.14.0 by Marius Gedminas - find it at mg.pov.lt!