Skip to content

ui: login session checked before proceding. - #14586

Open
DaanHoogland wants to merge 3 commits into
mainfrom
ghi14528-login-undefined-sessionkey
Open

DaanHoogland wants to merge 3 commits into
mainfrom
ghi14528-login-undefined-sessionkey

Conversation

@DaanHoogland

@DaanHoogland DaanHoogland commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

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 DefaultLoginAPIAuthenticatorCmd by #14098; this PR was rebased on
top of that and no longer touches that class.

Fixes: #14528

Co-Authored-By: Claude Opus 5.5 [email protected]

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)
  • Build/CI
  • Test (unit or integration test code)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

How did you try to break this feature and the system with this change?

@codecov

codecov Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 3.86%. Comparing base (6caa33e) to head (222494d).

Additional details and impacted files
@@            Coverage Diff            @@
##            main   #14586      +/-   ##
=========================================
- Coverage   3.86%    3.86%   -0.01%     
=========================================
  Files        494      494              
  Lines      42875    42885      +10     
  Branches    8136     8136              
=========================================
  Hits        1657     1657              
- Misses     40986    40996      +10     
  Partials     232      232              
Flag Coverage Δ
uitests 3.86% <ø> (-0.01%) ⬇️

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.

@DaanHoogland

Copy link
Copy Markdown
Contributor Author

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@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.

@blueorangutan

Copy link
Copy Markdown

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 19909

@sonarqubecloud

sonarqubecloud Bot commented Nov 5, 2026

Copy link
Copy Markdown

@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown

🔴 Test Coverage Grade: D — Marginal

Metric Value
Line coverage 25.89%
Branch coverage 20.23%

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

@DaanHoogland

Copy link
Copy Markdown
Contributor Author

@blueorangutan test keepEnv

@blueorangutan

Copy link
Copy Markdown

@DaanHoogland a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests

@blueorangutan

Copy link
Copy Markdown

[SF] Trillian test result (tid-17492)
Environment: kvm-ol8 (x2), zone: Advanced Networking with Mgmt server ol8
Total time taken: 57821 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr14586-t17492-kvm-ol8.zip
Smoke tests completed. 157 look OK, 0 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File

@DaanHoogland
DaanHoogland marked this pull request as ready for review November 8, 2026 10:41
Copilot AI balanced review requested due to automatic review settings November 8, 2026 10:41

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@github-actions

Copy link
Copy Markdown

This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.

@DaanHoogland
DaanHoogland force-pushed the ghi14528-login-undefined-sessionkey branch from 4e1f024 to 222494d Compare November 12, 2026 16:10
Copilot AI balanced review requested due to automatic review settings November 12, 2026 16:10

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

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.

First user-login when ldap enabled throws an exeption

3 participants