Skip to content

Custom login base domain using GUI whitelabel themes#13412

Open
hsato03 wants to merge 1 commit into
apache:mainfrom
scclouds:base-domain-name-in-authentication
Open

Custom login base domain using GUI whitelabel themes#13412
hsato03 wants to merge 1 commit into
apache:mainfrom
scclouds:base-domain-name-in-authentication

Conversation

@hsato03

@hsato03 hsato03 commented Jun 12, 2026

Copy link
Copy Markdown
Member

Description

When logging in via the ACS GUI, if the user does not belong to the ROOT domain, its full domain path must be specified.

With that, the GUI whitelabel runtime system has been extended with the loginBaseDomain parameter, which allows administrators to specify a base domain for a theme, enabling users to log in without specifying the domain or by providing the domain relative path.

For example, when creating a theme specifying the /domain1/ domain as the base, instead of the user typing /domain1/domain2 when logging in, they will only need to provide domain2.

Furthermore, the new parameter only works with the commonNames parameter.

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?

  1. I created the domain d1;
  2. I created a theme with loginBaseDomain being d1;
(local) 👻 > create guitheme name=theme css="@import url('https://arquivos.scclouds.com.br/css-themes/scclouds-theme.css')" loginbasedomain="d1" commonnames="d1.local" ispublic=true
{
  "guiThemes": {
    "commonnames": "d1.local",
    "created": "2026-06-12T18:12:32+0000",
    "css": "@import url('https://arquivos.scclouds.com.br/css-themes/scclouds-theme.css')",
    "id": "fad8fdcb-0dc2-4c02-9f68-e7ec6c2032bd",
    "ispublic": true,
    "loginbasedomain": "d1",
    "name": "theme",
    "recursivedomains": false
  }
}
  1. When accessing the ACS GUI via the d1.local URL, I verified that it was not necessary to specify the domain to access a d1 account;
  2. When accessing the ACS GUI using any other URL (via IP address, for example), I verified that it was necessary to enter the domain to access a d1 account.

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

@hsato03

hsato03 commented Jun 12, 2026

Copy link
Copy Markdown
Member Author

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

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

@codecov

codecov Bot commented Jun 12, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 10.52632% with 34 lines in your changes missing coverage. Please review.
✅ Project coverage is 18.77%. Comparing base (2fd83e1) to head (32d110f).

Files with missing lines Patch % Lines
...ache/cloudstack/gui/theme/GuiThemeServiceImpl.java 23.52% 13 Missing ⚠️
...ache/cloudstack/api/response/GuiThemeResponse.java 0.00% 6 Missing ⚠️
...va/org/apache/cloudstack/gui/theme/GuiThemeVO.java 0.00% 5 Missing ⚠️
.../api/command/user/gui/theme/CreateGuiThemeCmd.java 0.00% 3 Missing ⚠️
.../api/command/user/gui/theme/UpdateGuiThemeCmd.java 0.00% 3 Missing ⚠️
...rg/apache/cloudstack/gui/theme/GuiThemeJoinVO.java 0.00% 3 Missing ⚠️
...src/main/java/com/cloud/api/ApiResponseHelper.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #13412      +/-   ##
============================================
- Coverage     18.77%   18.77%   -0.01%     
- Complexity    17989    17990       +1     
============================================
  Files          6163     6163              
  Lines        552779   552813      +34     
  Branches      67365    67366       +1     
============================================
- Hits         103780   103773       -7     
- Misses       437587   437630      +43     
+ Partials      11412    11410       -2     
Flag Coverage Δ
uitests 3.53% <ø> (-0.01%) ⬇️
unittests 19.96% <10.52%> (-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.

@hsato03 hsato03 added this to the 4.23.0 milestone Jun 12, 2026
@blueorangutan

Copy link
Copy Markdown

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

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.

2 participants