| Summary: | [origin_runtime_186] Return "HTTP/1.1 302 Moved Temporarily" when login aerogear push server | ||
|---|---|---|---|
| Product: | OpenShift Online | Reporter: | Yan Du <yadu> |
| Component: | Containers | Assignee: | Farah Juma <fjuma> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | libra bugs <libra-bugs> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 2.x | CC: | daniel.bevenius, jhonce, qmx |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2013-09-19 16:47:37 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
I think this error is due to that https now enforced for the UnifiedPush Server. This was not documented for 0.8.0 but this has now been now: https://github.com/aerogear/aerogear-unifiedpush-server#https Could you try this again with the using SSLv3 as described above and let us know if this is still an issue? Thanks, /Dan Hi, Daniel
test on fork_ami_809, still got the same error (HTTP/1.1 302 Moved Temporarily)when using SSLv3, you can check detail info as below:
BTW,we can login/update password successfully in UI page.
1. Login:
[root@ip-10-164-15-246 ~]# curl -v -3 -b cookies.txt -c cookies.txt -H "Accept: application/json" -H "Content-type: application/json" -X POST -d '{"loginName": "admin", "password":"123"}' http://push1-ccc.dev.rhcloud.com/rest/auth/login
* About to connect() to push1-ccc.dev.rhcloud.com port 80 (#0)
* Trying 10.164.15.246... connected
* Connected to push1-ccc.dev.rhcloud.com (10.164.15.246) port 80 (#0)
> POST /rest/auth/login HTTP/1.1
> User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.14.3.0 zlib/1.2.3 libidn/1.18 libssh2/1.4.2
> Host: push1-ccc.dev.rhcloud.com
> Accept: application/json
> Content-type: application/json
> Content-Length: 40
>
< HTTP/1.1 302 Moved Temporarily
< Date: Fri, 30 Aug 2013 09:29:02 GMT
< Server: Apache-Coyote/1.1
< Location: https://push1-ccc.dev.rhcloud.com/rest/auth/login
< Content-Length: 0
< Vary: Accept-Encoding,User-Agent
< ProxyTime: D=9784
< Content-Type: text/plain; charset=UTF-8
<
* Connection #0 to host push1-ccc.dev.rhcloud.com left intact
* Closing connection #0
2. update password:
[root@ip-10-164-15-246 ~]# curl -3 -v -b cookies.txt -c cookies.txt -H "Accept: application/json" -H "Content-type: application/json" -X PUT -d '{"loginName": "admin", "password":"123", "newPassword":"111"}' http://push1-ccc.dev.rhcloud.com/rest/auth/update
* About to connect() to push1-ccc.dev.rhcloud.com port 80 (#0)
* Trying 10.164.15.246... connected
* Connected to push1-ccc.dev.rhcloud.com (10.164.15.246) port 80 (#0)
> PUT /rest/auth/update HTTP/1.1
> User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.14.3.0 zlib/1.2.3 libidn/1.18 libssh2/1.4.2
> Host: push1-ccc.dev.rhcloud.com
> Accept: application/json
> Content-type: application/json
> Content-Length: 61
>
< HTTP/1.1 302 Moved Temporarily
< Date: Fri, 30 Aug 2013 09:29:43 GMT
< Server: Apache-Coyote/1.1
< Location: https://push1-ccc.dev.rhcloud.com/rest/auth/update
< Content-Length: 0
< Vary: Accept-Encoding,User-Agent
< ProxyTime: D=6982
< Content-Type: text/plain; charset=UTF-8
<
* Connection #0 to host push1-ccc.dev.rhcloud.com left intact
* Closing connection #0
Hi Yan, could you try the same curl commands but use https instead of http? For example, https://push1-ccc.dev.rhcloud.com/rest/auth/login Hi, Daniel, it works when using https instead of http. Thanks :)
1).Login (return HTTP/1.1 403 Forbidden)
[root@ip-10-84-255-128 ~]# curl -k -v -3 -b cookies.txt -c cookies.txt -H "Accept: application/json" -H "Content-type: application/json" -X POST -d '{"loginName": "admin", "password":"123"}' https://push1-ccc.dev.rhcloud.com/rest/auth/login
* About to connect() to push1-ccc.dev.rhcloud.com port 443 (#0)
* Trying 10.84.255.128... connected
* Connected to push1-ccc.dev.rhcloud.com (10.84.255.128) port 443 (#0)
* Initializing NSS with certpath: sql:/etc/pki/nssdb
* warning: ignoring value of ssl.verifyhost
* skipping SSL peer certificate verification
* SSL connection using TLS_DHE_RSA_WITH_AES_256_CBC_SHA
* Server certificate:
* subject: E=root@ip-10-167-10-15,CN=ip-10-167-10-15,OU=SomeOrganizationalUnit,O=SomeOrganization,L=SomeCity,ST=SomeState,C=--
* start date: Aug 18 04:35:37 2013 GMT
* expire date: Aug 18 04:35:37 2014 GMT
* common name: ip-10-167-10-15
* issuer: E=root@ip-10-167-10-15,CN=ip-10-167-10-15,OU=SomeOrganizationalUnit,O=SomeOrganization,L=SomeCity,ST=SomeState,C=--
> POST /rest/auth/login HTTP/1.1
> User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.14.3.0 zlib/1.2.3 libidn/1.18 libssh2/1.4.2
> Host: push1-ccc.dev.rhcloud.com
> Accept: application/json
> Content-type: application/json
> Content-Length: 40
>
< HTTP/1.1 403 Forbidden
< Date: Fri, 30 Aug 2013 10:37:10 GMT
< Server: Apache-Coyote/1.1
< Content-Type: application/json
< Content-Length: 22
< Vary: Accept-Encoding,User-Agent
< ProxyTime: D=1832841
<
* Connection #0 to host push1-ccc.dev.rhcloud.com left intact
* Closing connection #0
Credential has expired[root@ip-10-84-255-128 ~]#
2) Update password (return HTTP/1.1 200 OK )
[root@ip-10-84-255-128 ~]# curl -3 -k -v -b cookies.txt -c cookies.txt -H "Accept: application/json" -H "Content-type: application/json" -X PUT -d '{"loginName": "admin", "password":"123", "newPassword":"111"}' https://push1-ccc.dev.rhcloud.com/rest/auth/update
* About to connect() to push1-ccc.dev.rhcloud.com port 443 (#0)
* Trying 10.84.255.128... connected
* Connected to push1-ccc.dev.rhcloud.com (10.84.255.128) port 443 (#0)
* Initializing NSS with certpath: sql:/etc/pki/nssdb
* warning: ignoring value of ssl.verifyhost
* skipping SSL peer certificate verification
* SSL connection using TLS_DHE_RSA_WITH_AES_256_CBC_SHA
* Server certificate:
* subject: E=root@ip-10-167-10-15,CN=ip-10-167-10-15,OU=SomeOrganizationalUnit,O=SomeOrganization,L=SomeCity,ST=SomeState,C=--
* start date: Aug 18 04:35:37 2013 GMT
* expire date: Aug 18 04:35:37 2014 GMT
* common name: ip-10-167-10-15
* issuer: E=root@ip-10-167-10-15,CN=ip-10-167-10-15,OU=SomeOrganizationalUnit,O=SomeOrganization,L=SomeCity,ST=SomeState,C=--
> PUT /rest/auth/update HTTP/1.1
> User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.14.3.0 zlib/1.2.3 libidn/1.18 libssh2/1.4.2
> Host: push1-ccc.dev.rhcloud.com
> Accept: application/json
> Content-type: application/json
> Content-Length: 61
>
< HTTP/1.1 200 OK
< Date: Fri, 30 Aug 2013 10:38:12 GMT
< Server: Apache-Coyote/1.1
< Content-Length: 0
< Vary: Accept-Encoding,User-Agent
< ProxyTime: D=114396
< Content-Type: text/plain; charset=UTF-8
<
* Connection #0 to host push1-ccc.dev.rhcloud.com left intact
* Closing connection #0
|
Description of problem: Use below commands to login server or update the password, got "HTTP/1.1 302 Moved Temporarily" back. 1) Login: curl -v -b cookies.txt -c cookies.txt -H "Accept: application/json" -H "Content-type: application/json" -X POST -d '{"loginName": "admin", "password":"123"}' $app-url/rest/auth/login 2) Update the password : curl -v -b cookies.txt -c cookies.txt -H "Accept: application/json" -H "Content-type: application/json" -X PUT -d '{"loginName": "admin", "password":"123", "newPassword":"SOMENEWPASSWORD"}' $app-url/rest/auth/update Version-Release number of selected component (if applicable): devenv_stage_448 How reproducible: Always Steps to Reproduce: 1. Add aerogear instant app in website quickstart 2. Deploy an aerogear push server app 3. Login the aerogear push server curl -v -b cookies.txt -c cookies.txt -H "Accept: application/json" -H "Content-type: application/json" -X POST -d '{"loginName": "admin", "password":"123"}' http://push1-111.dev.rhcloud.com/ag-push/rest/auth/login 4. Update the password: curl -v -b cookies.txt -c cookies.txt -H "Accept: application/json" -H "Content-type: application/json" -X PUT -d '{"loginName": "admin", "password":"123", "newPassword":"111"}' http://push1-111.dev.rhcloud.com/rest/auth/update Actual results: got "HTTP/1.1 302 Moved Temporarily" step3: Login server [root@ip-10-144-69-180 ~]# curl -v -b cookies.txt -c cookies.txt -H "Accept: application/json" -H "Content-type: application/json" -X POST -d '{"loginName": "admin", "password":"123"}' http://push1-111.dev.rhcloud.com/ag-push/rest/auth/login * About to connect() to push1-111.dev.rhcloud.com port 80 (#0) * Trying 10.144.69.180... connected * Connected to push1-111.dev.rhcloud.com (10.144.69.180) port 80 (#0) > POST /ag-push/rest/auth/login HTTP/1.1 > User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.14.3.0 zlib/1.2.3 libidn/1.18 libssh2/1.4.2 > Host: push1-111.dev.rhcloud.com > Accept: application/json > Content-type: application/json > Content-Length: 40 > < HTTP/1.1 302 Moved Temporarily < Date: Thu, 22 Aug 2013 06:00:27 GMT < Server: Apache-Coyote/1.1 < Location: https://push1-111.dev.rhcloud.com/ag-push/rest/auth/login < Content-Length: 0 < Vary: Accept-Encoding,User-Agent < ProxyTime: D=1014659 < Content-Type: text/plain; charset=UTF-8 < * Connection #0 to host push1-111.dev.rhcloud.com left intact * Closing connection #0 step4: Update password [root@ip-10-144-69-180 ~]# curl -v -b cookies.txt -c cookies.txt -H "Accept: application/json" -H "Content-type: application/json" -X PUT -d '{"loginName": "admin", "password":"123", "newPassword":"111"}' http://push1-111.dev.rhcloud.com/rest/auth/update * About to connect() to push1-111.dev.rhcloud.com port 80 (#0) * Trying 10.144.69.180... connected * Connected to push1-111.dev.rhcloud.com (10.144.69.180) port 80 (#0) > PUT /rest/auth/update HTTP/1.1 > User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.14.3.0 zlib/1.2.3 libidn/1.18 libssh2/1.4.2 > Host: push1-111.dev.rhcloud.com > Accept: application/json > Content-type: application/json > Content-Length: 61 > < HTTP/1.1 302 Moved Temporarily < Date: Thu, 22 Aug 2013 06:00:41 GMT < Server: Apache-Coyote/1.1 < Location: https://push1-111.dev.rhcloud.com/rest/auth/update < Content-Length: 0 < Vary: Accept-Encoding,User-Agent < ProxyTime: D=7016 < Content-Type: text/plain; charset=UTF-8 < * Connection #0 to host push1-111.dev.rhcloud.com left intact * Closing connection #0 Expected results: step3: Show "HTTP/1.1 403 Forbidden" step4: Show "HTTP/1.1 200 OK" Additional info: issue can be reproduced when using CLI to create aerogear push app on fork_ami_809.