*** ppai has joined #openstack-swauth | 04:27 | |
peterlisak | hi ppai, I try to test your s3 patches using s3curl as you in http://paste.openstack.org/show/490421/ and get "500 An error occurred" ... Can you tell me what i'm doing wrong? I found | 06:31 |
---|---|---|
peterlisak | I think s3curl doesn't send token in headers | 06:31 |
ppai | Can you point me to error msg in log or something ? | 06:33 |
peterlisak | Error: An error occurred: #012Traceback (most recent call last):#012 File "/home/peter/swift/swift/common/middleware/catch_errors.py", line 41, in handle_request#012 resp = self._app_call(env)#012 File "/home/peter/swift/swift/common/wsgi.py", line 1046, in _app_call#012 resp = self.app(env, self._start_response)#012 File "/home/peter/swift/swift/common/middleware/gatekeeper.py", line 102, in __call__#012 return self.app(env | 06:39 |
peterlisak | , gatekeeper_response)#012 File "/home/peter/swift/swift/common/middleware/healthcheck.py", line 57, in __call__#012 return self.app(env, start_response)#012 File "/home/peter/swift/swift/common/middleware/proxy_logging.py", line 346, in __call__#012 six.reraise(exc_type, exc_value, exc_traceback)#012 File "/home/peter/swift/swift/common/middleware/proxy_logging.py", line 338, in __call__#012 iterable = self.app(env, my_star | 06:39 |
peterlisak | t_response)#012 File "/home/peter/swift/swift/common/middleware/memcache.py", line 109, in __call__#012 return self.app(env, start_response)#012 File "/home/peter/swauth/swauth/middleware.py", line 241, in __call__#012 groups = self.get_groups(env, token)#012 File "/home/peter/swauth/swauth/middleware.py", line 349, in get_groups#012 msg = base64.urlsafe_b64decode(unquote(token))#012 File "/usr/lib/python2.7/urllib.py", lin | 06:39 |
peterlisak | e 1229, in unquote#012 bits = s.split('%')#012AttributeError: 'NoneType' object has no attribute 'split' (txn: txa1e45cf25ae94c98a01fb-005799a892) | 06:39 |
peterlisak | I don't have a token but don't know why ... to be honest I don't know how s3 works :) | 06:41 |
peterlisak | ppai, ^ | 06:41 |
ppai | do u have it properly set in the proxy pipeline ? | 06:42 |
peterlisak | hm, I don't ... just swift3 in pipeline or something else? | 06:47 |
ppai | you need both swift3 and swauth in pipeline | 06:49 |
ppai | here's example of tempauth: https://github.com/openstack/swift3 just replace it with swauth | 06:50 |
peterlisak | ok, thx | 06:55 |
*** ppai has quit IRC | 07:06 | |
peterlisak | ppai, now getting 403 SignatureDoesNotMatch | 07:10 |
*** ppai has joined #openstack-swauth | 07:30 | |
peterlisak | ppai, now I'm getting 403 SignatureDoesNotMatch, see: http://paste.openstack.org/show/543111/ | 07:57 |
ppai | peterlisak, with the patch or without the patch ? | 08:37 |
ppai | I also notice that the id has account "test" and you have used "test2" suring user creation | 08:38 |
peterlisak | ppai, without patch, actually I created an account "test" (I copied wrong line into pastebin) ... | 08:44 |
*** ppai has quit IRC | 08:44 | |
peterlisak | ppai, see line 4-6 in http://paste.openstack.org/show/543111/ ... I have a user test:tester | 08:46 |
*** ppai has joined #openstack-swauth | 08:58 | |
ppai | peterlisak, around ? | 09:06 |
peterlisak | ppai, yes | 09:08 |
ppai | peterlisak, any luck with it ? Are you trying it with my patch or without ? | 09:08 |
peterlisak | ppai, without | 09:09 |
ppai | peterlisak, it could be the problem with random salt | 09:11 |
ppai | but that should work as you directly give hash from object file | 09:11 |
peterlisak | I use a salt from config ... for now I found that computed signature by s3curl != computed signature by swauth ... | 09:13 |
ppai | which is weird, they should be the same | 09:14 |
peterlisak | It seems signed message is not the same ... s3curl: StringToSign='PUT\n\n\nThu, 28 Jul 2016 09:15:32 +0000\n/localhost/bucket1' and I logged msg from swath: PUT#012#012#012Thu, 28 Jul 2016 09:15:32 +0000#012/bucket1 | 09:18 |
peterlisak | in swauth there is no "localhost" | 09:18 |
peterlisak | *messages are not the same | 09:19 |
peterlisak | I use this s3curl: https://github.com/glance-/s3curl/blob/master/s3curl.pl | 09:28 |
ppai | peterlisak, I use this one https://aws.amazon.com/code/2880343845151917 | 09:34 |
peterlisak | looks like same code ... still getting SignatureDoesNotMatch | 09:42 |
*** ppai has quit IRC | 09:43 | |
peterlisak | ppai, do u have same issue? I use master version of swift3, ... for some reason it creates a token from path without "localhost" | 09:45 |
*** ppai has joined #openstack-swauth | 09:55 | |
ppai | peterlisak, still around ? | 12:17 |
peterlisak | hi ppai, yeah | 12:17 |
ppai | peterlisak, I tried it out on latest master. Seems like s3 support was disabled. http://paste.openstack.org/show/543254/ So you need to import both my patches | 12:17 |
ppai | peterlisak, I see the error you hit into now. Something has changed recently. Let me dig further and get back to you. Thanks | 12:25 |
peterlisak | still SignatureDoesNotMatch ... imho swift3 gives me wrong token | 12:26 |
peterlisak | ok, thx | 12:26 |
ppai | peterlisak, still around ? | 12:48 |
peterlisak | y | 12:49 |
ppai | peterlisak, I found what the problem was. | 12:49 |
ppai | https://github.com/glance-/s3curl/blob/master/s3curl.pl#L30-L35 By default s3 curls uses amazon as host, you need to change it to localhost | 12:50 |
ppai | my @endpoints = ( 'localhost'); | 12:50 |
ppai | so with both my patches and conf changes, it works: http://paste.openstack.org/show/543259/ | 12:52 |
ppai | the string to sign will match: s3curl: StringToSign='PUT\n\n\nThu, 28 Jul 2016 12:47:24 +0000\n/bucket2' | 12:55 |
ppai | peterlisak, let me know if it works for you | 13:14 |
*** ppai has quit IRC | 13:21 | |
peterlisak | ppai, cool, also works with master version of swauth, thanks! | 13:28 |
*** ppai has joined #openstack-swauth | 13:35 | |
*** ppai has quit IRC | 14:10 | |
*** openstackgerrit has quit IRC | 15:18 | |
*** openstackgerrit has joined #openstack-swauth | 15:19 | |
*** nadeem has joined #openstack-swauth | 16:16 | |
*** nadeem has quit IRC | 16:25 | |
*** nadeem has joined #openstack-swauth | 16:26 | |
openstackgerrit | Prashanth Pai proposed openstack/swauth: s3: Make s3 support configurable https://review.openstack.org/326336 | 17:40 |
*** ppai has joined #openstack-swauth | 17:40 | |
*** ppai has quit IRC | 17:42 | |
*** nadeem has quit IRC | 22:41 |
Generated by irclog2html.py 2.14.0 by Marius Gedminas - find it at mg.pov.lt!