4.23.0.0 UI: SAML "Single sign-on" tab disabled after logout because listIdps is cancelled

Open Beginner friendly
#14,465 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
javascript

Research direction

Start in ui/src/api/index.js at the logout implementation, then inspect fetchData() in the Login.vue component referenced by the issue. Reproduce the logout with one SAML IdP configured and trace whether the pending listIdps request is cancelled by the shared token. The change is done when logout cancellation no longer clears idps before the login page fetches them, and the "Single sign-on" tab remains enabled without a page reload.

Written by the indexing model from the issue text.

Description

bug status:has-work-around
problem

With SAML2 enabled (one IdP), logging out sometimes shows the login page without the
"Single sign-on" tab (the tab is disabled because idps is empty) until the page is reloaded.

Cause in ui/src: the Logout action clears the token first, the router shows the login page and
Login.vue fetchData() calls listIdps; then api/index.js logout() finishes and calls
sourceToken.cancel(), which cancels all pending requests including listIdps. idps stays [] and the
SAML tab is :disabled="idps.length === 0".

versions

CloudStack 4.23.0.0 UI, SAML2 with Microsoft Entra ID, Chrome / Safari on macOS.

The steps to reproduce the bug
  1. Enable saml2 with one IdP.
  2. Log in (any method), then Logout from the user menu.
  3. The login page shows only "Portal login"; F5 brings the "Single sign-on" tab back.
What to do about it?

Cancel pending requests before navigating to the login page (or create a fresh cancel token
before Login.vue fetches), or retry listIdps when it was cancelled.
Our workaround: a small script that reloads the page once when the app navigates from an in-app
route to #/user/login.

Dominant language
Java
Stars
3.1k
Forks
1.4k
Avg merge
7d 4h
Merged PRs (30d)
13

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from apache/cloudstack

All issues in apache/cloudstack

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.