Repository navigation
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 4.22 #14866 +/- ##
============================================
- Coverage 18.34% 18.32% -0.02%
+ Complexity 16669 16668 -1
============================================
Files 5939 5939
Lines 537819 538163 +344
Branches 65941 65942 +1
============================================
- Hits 98638 98626 -12
- Misses 427960 428316 +356
Partials 11221 11221
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Verified working. Verified on CloudStack 4.22.1.1, packages rebuilt from patched source (version string unchanged at 4.22.1.1~noble). Management server and both KVM hosts on Ubuntu 24.04.4 LTS, kernel 6.8.0-147-generic, OpenJDK 21, MySQL 8.0.46. Pure FA-X20R4 sv16-x20r4-b06-15, Purity//FA 6.10.6, REST API 2.23, FibreChannel 32/16 Gbit, provider Flash Array. Registered a Flash Array pool with a valid URL and pod but a wrong password: On 4.22.1.1 the same command gives Unexpected HTTP response code from FlashArray [...] - [400] - BAD REQUEST, because only 401 and 403 were mapped to an authentication failure while the legacy login endpoint answers 400 for a bad credential. Administrators seeing that naturally go looking at networking or the URL rather than at the password. Including the array's own {"msg": "invalid credentials"} body is a nice touch , it distinguishes a rejected credential from other 400s on the same endpoint. Confirmed the message contains no credentials: this.url is rebuilt in login() without the userinfo component, so it renders as https://10.23.26.50:443/api. Worth stating explicitly, since the provider URL does carry the password elsewhere. |
Fixes #14865
A wrong username or password on the legacy FlashArray login shows "Unexpected HTTP response code ... [400]", because the array answers 400 with {"msg": "invalid credentials"} and only 401 and 403 were treated as a login failure. This treats 400 the same way and includes the array's own message.
Test:
Run the 4.22 FlashArrayAdapter login against a FlashArray (Purity//FA 6.10.6) with a wrong password, then the right one.
Before:
After:
What the array returns for each case:
Also added unit tests for the message.