greatbit / quack

Web Based Test Management System
Apache License 2.0
122 stars 36 forks source link

Unable to log in with root:rootpass #185

Closed JoeFengZhou closed 2 years ago

JoeFengZhou commented 2 years ago

Describe the bug The error 'Unable to retrieve the requested metadata (/latest/dynamic/instance-identity/document). Failed to connect to service endpoint' occurred during the start of QuAck (via the command docker-compose up). The error 'ru.greatbit.whoru.auth.error.UnauthorizedException: Can't get session' happened when open the QuAck login page, and was unable to log in with root:rootpass.

To Reproduce Steps to reproduce the behavior:

  1. Clone the QuAck project form Git repository using the command 'git clone https://github.com/greatbit/quack.git'.
  2. Go to the QuAck project directory and run the command 'docker-compose up'.
  3. The error 'Unable to retrieve the requested metadata (/latest/dynamic/instance-identity/document). Failed to connect to service endpoint' occurs during the start of QuAck.
  4. Open QuAck login page on a Chrome browser with the URL http:nzsc8kdw.
  5. The error 'ru.greatbit.whoru.auth.error.UnauthorizedException: Can't get session' is printed on the terminal.
  6. Input username root and password rootpass, but is unable to login.

Expected behavior Expect to start QuAck clean and be able to log in with root:rootpass.

Screenshots The error 'Unable to retrieve the requested metadata (/latest/dynamic/instance-identity/document). Failed to connect to service endpoint' occurred during the start of QuAck (via the command docker-compose up). The error 'ru.greatbit.whoru.auth.error.UnauthorizedException: Can't get session' happened when open the QuAck login page. Please find the screenshots as follow,

Screenshot (160) Screenshot (161)

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context

azee commented 2 years ago

Works on my end. Will try to reproduce on Rocky.

Exceptions that you see are expected.

The first one (/latest/dynamic/instance-identity/document) will occur if you are not running in AWS EC2. At the moment, you can just ignore it.

The second is thrown each time when user is not authenticated. This is also expected to show in logs when someone tries to access the system without a session.

However root:rootpass on a localhost in docker compose should work (and it does on my end). I'll try to run it on the version you specified. Meanwhile - what to you see when you enter root:rootpass in UI? Does the page show any errors? Does it reloads? Does a new exception appear in the logs?

JoeFengZhou commented 2 years ago

Hi Azee,

Thank you very much for your reply. After giving the username and password and clicking the Sign in button, the page reloaded and the same message 'ru.greatbit.whoru.auth.error.UnauthorizedException: Can't get session' was displayed in the terminal. Please find the screenshot as follows,

Screenshot (162) Screenshot (163)

Many thanks,

Joe

azee commented 2 years ago

Thank you, Joe, for the screenshot. From what I can see - you are using a domain name other than localhost.

Authentication in quack is restricted by domain. Domain is specified in a property file, like here https://github.com/greatbit/quack/blob/master/assembly/quack.properties#L15

You have several options.

  1. If you just want to try it out - you can use a cloud version - 3 concurrent users per organization are free https://cloud.testquack.com/
  2. You can run docker-compose on a localhost
  3. You can update domain name here https://github.com/greatbit/quack/blob/master/assembly/quack.properties#L15, re-build the service mvn clean install build docker image docker build -t greatbit/quack . and re-run cmpose
  4. You can create quack.properties file on your local machine, add there the only property auth.domain=YOUR_DOMAIN_HERE and add the volume to the docker compose file https://github.com/greatbit/quack/blob/master/docker-compose.yml#L14 like here https://docs.docker.com/storage/volumes/#use-a-volume-with-docker-compose

But I'd recommend going with option 1 (SaaS) unless you specifically want to install quack as a standalone.

JoeFengZhou commented 2 years ago

Hi Azee,

Our company has a test automation team about 30 people, and some developers and managers may also access the test management system. We will frequently have more than 3 concurrent users using the system. Could you please advise in our situation what will be charge for using QuAck could service?

Regards,

Joe

azee commented 2 years ago

Hi Joe,

As stated here https://www.testquack.com/#pricing The flat rate is as low as 9.95$ uesr/month. First 3 still go free.

azee commented 2 years ago

As an alternative - we can set it up for you using your infrastructure for a consultancy fee (60$/h). But in that case you'll have to support your own infrastructure (3+ servers + database + balancer, monitoring, updates, e.t.c.) which most likely will be more expensive than SaaS.

JoeFengZhou commented 2 years ago

Thank you very much for your information. We will have a study and play with QuAck and discuss with the test team about the options. Thanks