Repository navigation
ui: login session checked before proceding. - #14586
DaanHoogland wants to merge 3 commits into
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #14586 +/- ##
============================================
- Coverage 20.77% 20.77% -0.01%
+ Complexity 20847 20846 -1
============================================
Files 6053 6053
Lines 548222 548239 +17
Branches 73236 73238 +2
============================================
Hits 113896 113896
- Misses 420984 420998 +14
- Partials 13342 13345 +3
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:
|
|
@blueorangutan package |
|
@DaanHoogland a [SL] Jenkins job has been kicked to build packages. It will be bundled with no SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 19909 |
🔴 Test Coverage Grade:
|
| Metric | Value |
|---|---|
| Line coverage | 25.69% |
| Branch coverage | 20.84% |
Grade Scale
| Grade | Line Coverage | Meaning |
|---|---|---|
| 🟢 A | ≥ 80% | Excellent - this code sleeps well at night 😴 |
| 🟡 B | 60-79% | Good - almost there, don't stop now 😉 |
| 🟠 C | 40-59% | Acceptable - your code is wearing a seatbelt, but no airbags 😬 |
| 🔴 D | 20-39% | Marginal - boldly shipping where no test has gone before 🖖 |
| ⛔ F | < 20% | Failing - tests? what tests? 🔥 |
Branch coverage is shown as a secondary signal. Grade is determined by line coverage.
View full Actions run
|
@blueorangutan test keepEnv |
|
@DaanHoogland a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
|
[SF] Trillian test result (tid-17492)
|
|
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch. |
4e1f024 to
222494d
Compare
222494d to
81447ff
Compare
|
|
@blueorangutan package |
|
@RosiKyu a [SL] Jenkins job has been kicked to build packages. It will be bundled with no SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 20082 |
|
@blueorangutan test |
|
@RosiKyu a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
|
[SF] Trillian test result (tid-17587)
|
RosiKyu
left a comment
There was a problem hiding this comment.
LGTM
I tested this on a KVM lab with the PR packages, compared with a main nightly.
- I set the browser storage entry from #14528 (
primate__Access-Token) toundefinedand reloaded the UI. On main the UI shows "We're experiencing a problem" and the technical details blame config.json. With the PR the entry is removed and the login page is shown. - A login with the correct admin password opens the UI normally.
- A login with a wrong password shows "Error 531: Failed to authenticate user admin in domain 1; please provide valid credentials".
The server change for an unexpected exception during login can't be triggered from the UI, so I left that to the unit tests.



Description
This PR checks the session key before assuming the login was successful.
It also checks whether config.json load failed or some other error occurred after loading.
... and ...
When an authenticator throws an unexpected exception during login, ApiServlet
swallowed it and answered 200 with an empty body, which the UI took for a login
without a session key. Such an exception is now answered with a 500 error
instead of an empty response, and the session is invalidated when it happens
during login, so no authenticated session is left behind.
The NPE that triggered this for first LDAP logins (#14528) has meanwhile been
fixed in
DefaultLoginAPIAuthenticatorCmdby #14098; this PR was rebased ontop of that and no longer touches that class.
Fixes: #14528
Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
How did you try to break this feature and the system with this change?