bhavinkpatel / jumpcloud_qa_assignment

0 stars 0 forks source link

Application should return the base64 encoded password hash for corresponding POST request #9

Open bhavinkpatel opened 2 years ago

bhavinkpatel commented 2 years ago

Test Data / Request / Prerequisite

Test Steps

  1. Start application (/broken-hashserve_darwin)
  2. Enter the POST request
  3. Note identifier returned is 1
  4. Enter the GET request

Expected Result

bhavinkpatel commented 2 years ago

Response received,

*   Trying 127.0.0.1...
* TCP_NODELAY set
* Connected to 127.0.0.1 (127.0.0.1) port 8088 (#0)
> GET /hash/1 HTTP/1.1
> Host: 127.0.0.1:8088
> User-Agent: curl/7.64.1
> Accept: */*
> 
< HTTP/1.1 200 OK
< Date: Mon, 08 Nov 2021 04:47:23 GMT
< Content-Length: 88
< Content-Type: text/plain; charset=utf-8
< 
* Connection #0 to host 127.0.0.1 left intact
wGD0wtWFpZ7460gP7vw0tdhawoaowRvzGMKuvPbryfxmpn3j0lBIsQG0ABBES0qVwYFnBQQItz2AZqVrblEO8w==
0.001024
* Closing connection 0

Received a 200 response. Verified encoded password using website, https://approsto.com/sha-generator/. Was not able to figure out encoding/decoding using curl on the first go so in the interest of time found this tool to verify this scenario.

password: bhavinpatel (sha512) base64 encoded: wGD0wtWFpZ7460gP7vw0tdhawoaowRvzGMKuvPbryfxmpn3j0lBIsQG0ABBES0qVwYFnBQQItz2AZqVrblEO8w

Based on the above, it matches.