Created
March 8, 2016 13:24
-
-
Save vrutkovs/2ed00cafe4e31130c33a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| + OS_VERSION=1.1.2 | |
| + '[' -n '' ']' | |
| + '[' -n https://10.3.9.133:8443 ']' | |
| + OS_OSAPI_URL=https://10.3.9.133:8443/oapi/v1 | |
| + OS_AUTH_URL='https://10.3.9.133:8443/oauth/authorize?client_id=openshift-challenging-client&response_type=token' | |
| + CURL_OPTS='--insecure -vsS' | |
| + ACCESS_TOKEN= | |
| + CURL='curl --insecure -vsS' | |
| + CURL_AUTH='curl --insecure -vsS -u test:test' | |
| +++ dirname mock_jsons.sh | |
| ++ cd . | |
| ++ pwd | |
| + DIR=/home/vrutkovs/src/osbs-client/tests | |
| + STORE_PATH=/home/vrutkovs/src/osbs-client/tests/mock_jsons/1.1.2 | |
| + mkdir -p /home/vrutkovs/src/osbs-client/tests/mock_jsons/1.1.2 | |
| + set_access_token | |
| + '[' -n '' ']' | |
| ++ curl --insecure -vsS -u test:test 'https://10.3.9.133:8443/oauth/authorize?client_id=openshift-challenging-client&response_type=token' | |
| + local 'curl_output=* Trying 10.3.9.133... | |
| * Connected to 10.3.9.133 (10.3.9.133) port 8443 (#0) | |
| * Initializing NSS with certpath: sql:/etc/pki/nssdb | |
| * skipping SSL peer certificate verification | |
| * NSS: client certificate not found (nickname not specified) | |
| * ALPN, server accepted to use http/1.1 | |
| * SSL connection using TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 | |
| * Server certificate: | |
| * subject: CN=127.0.0.1 | |
| * start date: Mar 03 15:37:20 2016 GMT | |
| * expire date: Mar 03 15:37:21 2018 GMT | |
| * common name: 127.0.0.1 | |
| * issuer: CN=openshift-signer@1457019435 | |
| * Server auth using Basic with user '\''test'\'' | |
| > GET /oauth/authorize?client_id=openshift-challenging-client&response_type=token HTTP/1.1 | |
| > Host: 10.3.9.133:8443 | |
| > Authorization: Basic dGVzdDp0ZXN0 | |
| > User-Agent: curl/7.43.0 | |
| > Accept: */* | |
| > | |
| < HTTP/1.1 302 Found | |
| < Cache-Control: no-cache, no-store, max-age=0, must-revalidate | |
| < Expires: Fri, 01 Jan 1990 00:00:00 GMT | |
| < Location: https://10.3.9.133:8443/oauth/token/implicit#access_token=X0QL7UkdLkE17VCgF4j7G3gp7A6nWQjFVH9EtaoN_-c&expires_in=86400&token_type=Bearer | |
| < Pragma: no-cache | |
| < Set-Cookie: ssn=MTQ1NzQ0MjkxOXxxTjRUWEhsMmxBSzZ6UVVWUzdOWWE4WFNRVmt5eDdCUmdOeGRhd2l2bkh0enVuaWhVZXRGVjBsYTdIMWJybVhSSHhnbkxvQ08yX2YzWU5RZjVnSXp1ajFnSlVhUUlZNW5QVlNEckNNajlzSWZsYzdSUmFuSzRNQmtJSnNQVDZhc0RBPT18l5IbTwDUNUH42Q89CtoZCMydOY1Towd6tifWcASzcgA=; Path=/; Expires=Tue, 08 Mar 2016 13:20:19 GMT; Max-Age=300; HttpOnly; Secure | |
| < Date: Tue, 08 Mar 2016 13:15:19 GMT | |
| < Content-Length: 0 | |
| < Content-Type: text/plain; charset=utf-8 | |
| < | |
| * Connection #0 to host 10.3.9.133 left intact' | |
| + printf '* Trying 10.3.9.133... | |
| * Connected to 10.3.9.133 (10.3.9.133) port 8443 (#0) | |
| * Initializing NSS with certpath: sql:/etc/pki/nssdb | |
| * skipping SSL peer certificate verification | |
| * NSS: client certificate not found (nickname not specified) | |
| * ALPN, server accepted to use http/1.1 | |
| * SSL connection using TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 | |
| * Server certificate: | |
| * subject: CN=127.0.0.1 | |
| * start date: Mar 03 15:37:20 2016 GMT | |
| * expire date: Mar 03 15:37:21 2018 GMT | |
| * common name: 127.0.0.1 | |
| * issuer: CN=openshift-signer@1457019435 | |
| * Server auth using Basic with user '\''test'\'' | |
| > GET /oauth/authorize?client_id=openshift-challenging-client&response_type=token HTTP/1.1 | |
| > Host: 10.3.9.133:8443 | |
| > Authorization: Basic dGVzdDp0ZXN0 | |
| > User-Agent: curl/7.43.0 | |
| > Accept: */* | |
| > | |
| < HTTP/1.1 302 Found | |
| < Cache-Control: no-cache, no-store, max-age=0, must-revalidate | |
| < Expires: Fri, 01 Jan 1990 00:00:00 GMT | |
| < Location: https://10.3.9.133:8443/oauth/token/implicit#access_token=X0QL7UkdLkE17VCgF4j7G3gp7A6nWQjFVH9EtaoN_-c&expires_in=86400&token_type=Bearer | |
| < Pragma: no-cache | |
| < Set-Cookie: ssn=MTQ1NzQ0MjkxOXxxTjRUWEhsMmxBSzZ6UVVWUzdOWWE4WFNRVmt5eDdCUmdOeGRhd2l2bkh0enVuaWhVZXRGVjBsYTdIMWJybVhSSHhnbkxvQ08yX2YzWU5RZjVnSXp1ajFnSlVhUUlZNW5QVlNEckNNajlzSWZsYzdSUmFuSzRNQmtJSnNQVDZhc0RBPT18l5IbTwDUNUH42Q89CtoZCMydOY1Towd6tifWcASzcgA=; Path=/; Expires=Tue, 08 Mar 2016 13:20:19 GMT; Max-Age=300; HttpOnly; Secure | |
| < Date: Tue, 08 Mar 2016 13:15:19 GMT | |
| < Content-Length: 0 | |
| < Content-Type: text/plain; charset=utf-8 | |
| < | |
| * Connection #0 to host 10.3.9.133 left intact' | |
| + save_output_to authorize txt | |
| ++ cat | |
| + local 'content=* Trying 10.3.9.133... | |
| * Connected to 10.3.9.133 (10.3.9.133) port 8443 (#0) | |
| * Initializing NSS with certpath: sql:/etc/pki/nssdb | |
| * skipping SSL peer certificate verification | |
| * NSS: client certificate not found (nickname not specified) | |
| * ALPN, server accepted to use http/1.1 | |
| * SSL connection using TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 | |
| * Server certificate: | |
| * subject: CN=127.0.0.1 | |
| * start date: Mar 03 15:37:20 2016 GMT | |
| * expire date: Mar 03 15:37:21 2018 GMT | |
| * common name: 127.0.0.1 | |
| * issuer: CN=openshift-signer@1457019435 | |
| * Server auth using Basic with user '\''test'\'' | |
| > GET /oauth/authorize?client_id=openshift-challenging-client&response_type=token HTTP/1.1 | |
| > Host: 10.3.9.133:8443 | |
| > Authorization: Basic dGVzdDp0ZXN0 | |
| > User-Agent: curl/7.43.0 | |
| > Accept: */* | |
| > | |
| < HTTP/1.1 302 Found | |
| < Cache-Control: no-cache, no-store, max-age=0, must-revalidate | |
| < Expires: Fri, 01 Jan 1990 00:00:00 GMT | |
| < Location: https://10.3.9.133:8443/oauth/token/implicit#access_token=X0QL7UkdLkE17VCgF4j7G3gp7A6nWQjFVH9EtaoN_-c&expires_in=86400&token_type=Bearer | |
| < Pragma: no-cache | |
| < Set-Cookie: ssn=MTQ1NzQ0MjkxOXxxTjRUWEhsMmxBSzZ6UVVWUzdOWWE4WFNRVmt5eDdCUmdOeGRhd2l2bkh0enVuaWhVZXRGVjBsYTdIMWJybVhSSHhnbkxvQ08yX2YzWU5RZjVnSXp1ajFnSlVhUUlZNW5QVlNEckNNajlzSWZsYzdSUmFuSzRNQmtJSnNQVDZhc0RBPT18l5IbTwDUNUH42Q89CtoZCMydOY1Towd6tifWcASzcgA=; Path=/; Expires=Tue, 08 Mar 2016 13:20:19 GMT; Max-Age=300; HttpOnly; Secure | |
| < Date: Tue, 08 Mar 2016 13:15:19 GMT | |
| < Content-Length: 0 | |
| < Content-Type: text/plain; charset=utf-8 | |
| < | |
| * Connection #0 to host 10.3.9.133 left intact' | |
| + local ext=txt | |
| + local file_name=authorize.txt | |
| + '[' txt == json ']' | |
| + echo '* Trying 10.3.9.133... | |
| * Connected to 10.3.9.133 (10.3.9.133) port 8443 (#0) | |
| * Initializing NSS with certpath: sql:/etc/pki/nssdb | |
| * skipping SSL peer certificate verification | |
| * NSS: client certificate not found (nickname not specified) | |
| * ALPN, server accepted to use http/1.1 | |
| * SSL connection using TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 | |
| * Server certificate: | |
| * subject: CN=127.0.0.1 | |
| * start date: Mar 03 15:37:20 2016 GMT | |
| * expire date: Mar 03 15:37:21 2018 GMT | |
| * common name: 127.0.0.1 | |
| * issuer: CN=openshift-signer@1457019435 | |
| * Server auth using Basic with user '\''test'\'' | |
| > GET /oauth/authorize?client_id=openshift-challenging-client&response_type=token HTTP/1.1 | |
| > Host: 10.3.9.133:8443 | |
| > Authorization: Basic dGVzdDp0ZXN0 | |
| > User-Agent: curl/7.43.0 | |
| > Accept: */* | |
| > | |
| < HTTP/1.1 302 Found | |
| < Cache-Control: no-cache, no-store, max-age=0, must-revalidate | |
| < Expires: Fri, 01 Jan 1990 00:00:00 GMT | |
| < Location: https://10.3.9.133:8443/oauth/token/implicit#access_token=X0QL7UkdLkE17VCgF4j7G3gp7A6nWQjFVH9EtaoN_-c&expires_in=86400&token_type=Bearer | |
| < Pragma: no-cache | |
| < Set-Cookie: ssn=MTQ1NzQ0MjkxOXxxTjRUWEhsMmxBSzZ6UVVWUzdOWWE4WFNRVmt5eDdCUmdOeGRhd2l2bkh0enVuaWhVZXRGVjBsYTdIMWJybVhSSHhnbkxvQ08yX2YzWU5RZjVnSXp1ajFnSlVhUUlZNW5QVlNEckNNajlzSWZsYzdSUmFuSzRNQmtJSnNQVDZhc0RBPT18l5IbTwDUNUH42Q89CtoZCMydOY1Towd6tifWcASzcgA=; Path=/; Expires=Tue, 08 Mar 2016 13:20:19 GMT; Max-Age=300; HttpOnly; Secure | |
| < Date: Tue, 08 Mar 2016 13:15:19 GMT | |
| < Content-Length: 0 | |
| < Content-Type: text/plain; charset=utf-8 | |
| < | |
| * Connection #0 to host 10.3.9.133 left intact' | |
| ++ curl --insecure -vsS -u test:test 'https://10.3.9.133:8443/oauth/authorize?client_id=openshift-challenging-client&response_type=token' | |
| ++ egrep -o 'access_token=[^&]+' | |
| + ACCESS_TOKEN=access_token=DarLjjkoVhSy77wvH514_YE8jD0JIqEJKBj2meJXS_A | |
| + '[' -n https://10.3.9.133:8443/oapi/v1 ']' | |
| + curl --insecure -vsS 'https://10.3.9.133:8443/oapi/v1/users/~?access_token=DarLjjkoVhSy77wvH514_YE8jD0JIqEJKBj2meJXS_A' | |
| + save_output_to get_user | |
| ++ cat | |
| * Trying 10.3.9.133... | |
| * Connected to 10.3.9.133 (10.3.9.133) port 8443 (#0) | |
| * Initializing NSS with certpath: sql:/etc/pki/nssdb | |
| * skipping SSL peer certificate verification | |
| * NSS: client certificate not found (nickname not specified) | |
| * ALPN, server accepted to use http/1.1 | |
| * SSL connection using TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 | |
| * Server certificate: | |
| * subject: CN=127.0.0.1 | |
| * start date: Mar 03 15:37:20 2016 GMT | |
| * expire date: Mar 03 15:37:21 2018 GMT | |
| * common name: 127.0.0.1 | |
| * issuer: CN=openshift-signer@1457019435 | |
| > GET /oapi/v1/users/~?access_token=DarLjjkoVhSy77wvH514_YE8jD0JIqEJKBj2meJXS_A HTTP/1.1 | |
| > Host: 10.3.9.133:8443 | |
| > User-Agent: curl/7.43.0 | |
| > Accept: */* | |
| > | |
| < HTTP/1.1 200 OK | |
| < Cache-Control: no-store | |
| < Content-Type: application/json | |
| < Date: Tue, 08 Mar 2016 13:15:21 GMT | |
| < Content-Length: 316 | |
| < | |
| { [316 bytes data] | |
| * Connection #0 to host 10.3.9.133 left intact | |
| + local 'content={ | |
| "kind": "User", | |
| "apiVersion": "v1", | |
| "metadata": { | |
| "name": "test", | |
| "selfLink": "/oapi/v1/users/test", | |
| "uid": "5ca85f58-e458-11e5-835f-fa163e18a98c", | |
| "resourceVersion": "35940", | |
| "creationTimestamp": "2016-03-07T11:33:06Z" | |
| }, | |
| "identities": [ | |
| "allow_all:test" | |
| ], | |
| "groups": null |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment