Skip to content

flasharray: say the login failed when the array rejects the password - #14866

Open
Damans227 wants to merge 1 commit into
apache:4.22from
Damans227:flasharray-login-error
Open

Damans227 wants to merge 1 commit into
apache:4.22from
Damans227:flasharray-login-error

Conversation

@Damans227

Copy link
Copy Markdown
Collaborator

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:

login failed: Unexpected HTTP response code from FlashArray [https://10.23.26.50:443/api] - [400] - Bad Request

After:

login failed: Authentication to FlashArray [https://10.23.26.50:443/api] with user [pureuser] failed, check the username and password configured for this storage pool (HTTP 400: {"msg": "invalid credentials"})
login ok    (right password)

What the array returns for each case:

wrong password  {"msg": "invalid credentials"} -> HTTP 400
wrong user      {"msg": "invalid credentials"} -> HTTP 400
right password  HTTP 200

array-400
login-before-after

Also added unit tests for the message.

@codecov

codecov Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 33.33333% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 18.32%. Comparing base (6489766) to head (e076115).

Files with missing lines Patch % Lines
...atastore/adapter/flasharray/FlashArrayAdapter.java 33.33% 9 Missing and 1 partial ⚠️
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              
Flag Coverage Δ
uitests 4.08% <ø> (ø)
unittests 19.41% <33.33%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant