Optum / dce-cli

Disposable Cloud Environment CLI
Apache License 2.0
37 stars 19 forks source link

404 error for cognito users login through CLI - unable to login active lease #85

Closed gundkalneha closed 4 years ago

gundkalneha commented 4 years ago

Version

404 error when dce leased user (cognito) tries to login through dce CLI 404 error is displayed when running below command: dce leases login --open-browser

To Reproduce

  1. Execute command "dce auth"
  2. Copy cognito user encrypted token and paste in terminal.
  3. Execute "dce leases login --open-browser " OR dce leases login --print-creds
  4. 404 error appears

Expected behavior Cognito user should be able to login to leased account after running above commands.

Additional context Currently I am logging in using STS master creds which works with above commands but not for cognito users. Also, after lease is destroyed, the destroyed account session is still Active (user can create resources until session is closed manually) which should be signed out.

image

gundkalneha commented 4 years ago

Team, any comments on this?

gundkalneha commented 4 years ago

Accept: application/json Content-Type: application/json

DEBU[0002] Response: &{404 Not Found 404 HTTP/2.0 2 0 map[Access-Control-Allow-Origin:[*] Content-Length:[84] Content-Type:[application/json] Date:[Tue, 16 Jun 2020 07:36:23 GMT] Via:[1.1 dc57d6ecb65615ae4fed67afa847c0ba.cloudfront.net (CloudFront)] X-Amz-Apigw-Id:[ONdypG1VoAMFplg=] X-Amz-Cf-Id:[DJLlr_8MpI1ODspGPFimdDyXMKhSMyMbfJfzJNvg6w_Z4DM4bQIE0Q==] X-Amz-Cf-Pop:[BLR50-C2] X-Amzn-Requestid:[f3f2316f-9ce9-46a2-98f4-4a9c0f7958e0] X-Amzn-Trace-Id:[Root=1-5ee87677-5e3d9db3fc18a0b3856db27c;Sampled=0] X-Cache:[Error from cloudfront]] {0xc0000ea3c0} 84 [] false false map[] 0xc00047f500 0xc00027d760} FATA[0002] err: unknown error (status 404): {resp:0xc0007ce000}

gundkalneha commented 4 years ago

Unable to login after this merge in repo for DCE CLI: #345 @robologic , can you please help clarification on this? it will be helpful to know if I am missing anything from my end or its the merge number after which the dce end user login not working?

When user (including admin user) tries listing leases using "dce leases list", the list is blank [], Hence suspecting "dce leases login" isn't working.

gundkalneha commented 4 years ago

This issue is resolved, we were providing Principal Id which was not same as username for cognito. Hence closing Issue.