Skip to content
This repository has been archived by the owner on Oct 28, 2024. It is now read-only.

Cannot log in after successful registration #1090

Closed
kate-goldenring opened this issue Aug 11, 2022 · 5 comments · Fixed by #1091
Closed

Cannot log in after successful registration #1090

kate-goldenring opened this issue Aug 11, 2022 · 5 comments · Fixed by #1091

Comments

@kate-goldenring
Copy link
Contributor

When running through the Fermyon local quickstart, I am running into issues logging in with a user after what appears to be a successful registration. On the UI side, when I go to login, the password box turns red and the login is unsuccessful:
image
I enabled debug logs in hippo.nomad via Logging__LogLevel__Default = "Debug" and re-ran. While the registration is logged, the log in attempt is not:

dbug: Microsoft.Extensions.Hosting.Internal.Host[1]
      Hosting starting
info: Microsoft.Hosting.Lifetime[14]
      Now listening on: http://127.0.0.1:5309
info: Microsoft.Hosting.Lifetime[0]
      Application started. Press Ctrl+C to shut down.
info: Microsoft.Hosting.Lifetime[0]
      Hosting environment: Production
info: Microsoft.Hosting.Lifetime[0]
      Content root path: /Users/kagold/Programs/installer/local/data/nomad/alloc/710afbc8-7086-6f4d-d803-05b91f8628ce/hippo/local/osx-x64/
dbug: Microsoft.Extensions.Hosting.Internal.Host[2]
      Hosting started
dbug: Microsoft.Extensions.Diagnostics.HealthChecks.DefaultHealthCheckService[100]
      Running health checks
dbug: Microsoft.Extensions.Diagnostics.HealthChecks.DefaultHealthCheckService[102]
      Running health check ApplicationDbContext
dbug: Microsoft.Extensions.Diagnostics.HealthChecks.DefaultHealthCheckService[102]
      Running health check Bindle
dbug: Microsoft.Extensions.Diagnostics.HealthChecks.DefaultHealthCheckService[103]
      Health check ApplicationDbContext with status Healthy completed after 41.5539ms with message '(null)'
dbug: Microsoft.Extensions.Diagnostics.HealthChecks.DefaultHealthCheckService[102]
      Running health check Nomad
dbug: Microsoft.Extensions.Diagnostics.HealthChecks.DefaultHealthCheckService[103]
      Health check Bindle with status Healthy completed after 438.6825ms with message 'A healthy result.'
dbug: Microsoft.Extensions.Diagnostics.HealthChecks.DefaultHealthCheckService[103]
      Health check Nomad with status Healthy completed after 1464.8431ms with message 'A healthy result.'
dbug: Microsoft.Extensions.Diagnostics.HealthChecks.DefaultHealthCheckService[101]
      Health check processing with combined status Healthy completed after 1673.9477ms
kagold@Kates-MacBook-Pro ~ % nomad alloc logs 710afbc8
dbug: Microsoft.Extensions.Hosting.Internal.Host[1]
      Hosting starting
info: Microsoft.Hosting.Lifetime[14]
      Now listening on: http://127.0.0.1:5309
info: Microsoft.Hosting.Lifetime[0]
      Application started. Press Ctrl+C to shut down.
info: Microsoft.Hosting.Lifetime[0]
      Hosting environment: Production
info: Microsoft.Hosting.Lifetime[0]
      Content root path: /Users/kagold/Programs/installer/local/data/nomad/alloc/710afbc8-7086-6f4d-d803-05b91f8628ce/hippo/local/osx-x64/
dbug: Microsoft.Extensions.Hosting.Internal.Host[2]
      Hosting started
dbug: Microsoft.Extensions.Diagnostics.HealthChecks.DefaultHealthCheckService[100]
      Running health checks
dbug: Microsoft.Extensions.Diagnostics.HealthChecks.DefaultHealthCheckService[102]
      Running health check ApplicationDbContext
dbug: Microsoft.Extensions.Diagnostics.HealthChecks.DefaultHealthCheckService[102]
      Running health check Bindle
dbug: Microsoft.Extensions.Diagnostics.HealthChecks.DefaultHealthCheckService[103]
      Health check ApplicationDbContext with status Healthy completed after 41.5539ms with message '(null)'
dbug: Microsoft.Extensions.Diagnostics.HealthChecks.DefaultHealthCheckService[102]
      Running health check Nomad
dbug: Microsoft.Extensions.Diagnostics.HealthChecks.DefaultHealthCheckService[103]
      Health check Bindle with status Healthy completed after 438.6825ms with message 'A healthy result.'
dbug: Microsoft.Extensions.Diagnostics.HealthChecks.DefaultHealthCheckService[103]
      Health check Nomad with status Healthy completed after 1464.8431ms with message 'A healthy result.'
dbug: Microsoft.Extensions.Diagnostics.HealthChecks.DefaultHealthCheckService[101]
      Health check processing with combined status Healthy completed after 1673.9477ms
info: Hippo.Application.Accounts.Commands.CreateAccountCommand[0]
      Hippo Request: CreateAccountCommand   Hippo.Application.Accounts.Commands.CreateAccountCommand

It appears to only be occurring with shorter passwords. Longer more advanced passwords seem to succeed. For example, while the failing user/pass pair was user and qwe12# , the pair someone and LongerPassword succeeded and logged the following:

info: Hippo.Application.Accounts.Commands.CreateAccountCommand[0]
      Hippo Request: CreateAccountCommand   Hippo.Application.Accounts.Commands.CreateAccountCommand
info: Hippo.Application.Accounts.Commands.CreateTokenCommand[0]
      Hippo Request: CreateTokenCommand   Hippo.Application.Accounts.Commands.CreateTokenCommand
warn: Hippo.Application.Accounts.Commands.CreateTokenCommand[0]
      Hippo Long Running Request: CreateTokenCommand (725 milliseconds)   Hippo.Application.Accounts.Commands.CreateTokenCommand
info: Hippo.Application.Channels.Queries.GetJobStatusesQuery[0]
      Hippo Request: GetJobStatusesQuery 872aea90-d6f1-43b0-9002-f1b173c9eed0 someone Hippo.Application.Channels.Queries.GetJobStatusesQuery
info: Hippo.Application.Apps.Queries.GetAppsQuery[0]
      Hippo Request: GetAppsQuery 872aea90-d6f1-43b0-9002-f1b173c9eed0 someone Hippo.Application.Apps.Queries.GetAppsQuery

It seems like the password may be being rejected and not stored in the DB. As the same UI experience and lack of logging occurs when using an unregistered user/pass.
From playing around, it looks like at least 8 characters are required for the password to succeed. I wonder if the dotnet login package being used increased the required password length from 6 characters to 8.

@kate-goldenring
Copy link
Contributor Author

Potentially related to this bump in aspnetcore Identity package: a1ede0e

@bacongobbler
Copy link
Contributor

bacongobbler commented Aug 11, 2022

I think this has been addressed in later versions of hippo. The platform installs 0.17 at the moment. Can you try with a newer version of hippo and see if you can reproduce the same result?

@kate-goldenring
Copy link
Contributor Author

@bacongobbler thank you! Sounds like I just need to update the version of hippo that the installer is using.

@kate-goldenring
Copy link
Contributor Author

Looks like the hippo server login component currently requires a minimum password length of 8, despite the CreateAccoundCommandValidator and register components checking for 6.

I put in a PR to make them all consistent here: #1091

@bacongobbler
Copy link
Contributor

thank you @kate-goldenring for the fix!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants