You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
cf login command waits for user input after failed login with PASSWORD_LOCKED response #3352
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]
I tried to reproduce this issue and unable to. I'm CLI 8.9.0 as well on MAC. The prompt returns as shown below.
cli % cf login -u admin -p "test"
API endpoint: https://api.vast-3790616.z73c683e6.test.com
Authenticating...
Your account has been locked because of too many failed attempts to login.
API endpoint: https://api.vast-3790616.z73c683e6.test.com
API version: 3.181.0
Not logged in. Use 'cf login' or 'cf login --sso' to log in.
Unable to authenticate.
FAILED
cli %
Activity
gururajsh commentedon Feb 3, 2025
Hi,
I tried to reproduce this issue and unable to. I'm CLI 8.9.0 as well on MAC. The prompt returns as shown below.
Can you provide more info?
n-losse commentedon Feb 3, 2025
That is strange. It still happens exactly the same for me
with
API endpoint: https://api.cf.eu12.hana.ondemand.com
API version: 3.185.0
The IDP in question is the BTP Default IDP, SAP ID.
n-losse commentedon Feb 3, 2025
Here's the last request output with CF_TRACE=1