Damans227 opened a new issue, #14865: URL: https://github.com/apache/cloudstack/issues/14865
### problem Registering a FlashArray pool with a wrong username or password fails with a generic error that does not say the login failed: ``` Unexpected HTTP response code from FlashArray [https://10.23.26.50:443/api] - [400] - BAD REQUEST ``` The legacy username/password login (`/api/1.19/auth/apitoken`) answers 400 with `{"msg": "invalid credentials"}` for a wrong username or password. #13060 added a clear message, but only for 401 and 403, so 400 still falls through to the generic one. An admin reading it looks at the network or the URL, not the password. ### versions 4.22 branch after #13060, Pure FlashArray, Purity//FA 6.10.6, legacy username/password login. ### The steps to reproduce the bug What the array returns: ``` > curl -sk -X POST https://<array>/api/1.19/auth/apitoken -d username=pureuser -d password=wrongpass {"msg": "invalid credentials"} -> HTTP 400 > curl -sk -X POST https://<array>/api/1.19/auth/apitoken -d username=nouser -d password=wrongpass {"msg": "invalid credentials"} -> HTTP 400 > curl -sk -X POST https://<array>/api/1.19/auth/apitoken -d username=pureuser -d password=<right> HTTP 200 ``` Running the 4.22 FlashArrayAdapter login against that array with a wrong password: ``` login failed: Unexpected HTTP response code from FlashArray [https://10.23.26.50:443/api] - [400] - Bad Request ``` ### What to do about it? Treat 400 from the legacy login call like 401 and 403, and say the login failed, with the array's own message. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
