Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cf login command waits for user input after failed login with PASSWORD_LOCKED response #3352

Open
4 tasks done
n-losse opened this issue Jan 8, 2025 · 0 comments
Open
4 tasks done

Comments

@n-losse
Copy link

n-losse commented Jan 8, 2025

Please fill out the issue checklist below and provide ALL the requested information.

  • I reviewed open and closed github issues that may be related to my problem.
  • I tried updating to the latest version of the CF CLI to see if it fixed my problem.
  • I attempted to run the command with CF_TRACE=1 to help debug the issue.
  • I am reporting a bug that others will be able to reproduce.

Describe the bug and the command you saw an issue with

When running cf login with supplied user and pw, and the pw is currently locked the login fails, but the CLI call does not exit. Instead, it presents a "Password: " prompt to the user.

When using this in a pipeline environment, this causes the task to hang until timed out, which is not useful.

Even when using this interactively, it makes no sense to prompt for a PW if the user is locked.

What happened

User got locked and pipelines got hung up until timeout.

Expected behavior

On failed login, cf login should immediately exit with a non-zero exit code.

Exact Steps To Reproduce

Lock your user e.g. by entering wrong PW sufficiently (5 times on SAP ID Service) , then run cf login
[note: verbose does not add anything here, so using regular output]

>cf login -a https://api.cf.eu12.hana.ondemand.com -u [email protected] -p "secret" -o myorg -s myspace
API endpoint: https://api.cf.eu12.hana.ondemand.com


Authenticating...
{"error":"invalid_grant","error_description":"User authentication failed: PASSWORD_LOCKED"}

Password: %

Provide more context

  • MacOS 15.1.1 and Ubuntu on pipeline
  • version of the CLI you are running: 8.9.0+c23186c.2024-12-02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant