Skip to content

return stored value for secure configs so listConfigurations stays the same - #14309

Open
Damans227 wants to merge 1 commit into
apache:4.20from
Damans227:nl/issue-14306
Open

Damans227 wants to merge 1 commit into
apache:4.20from
Damans227:nl/issue-14306

Conversation

@Damans227

@Damans227 Damans227 commented Oct 5, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes #14306

Listing configurations in the Secure category gives a different value every time, even when nothing changed. The value is stored encrypted, but the list call decrypted it and encrypted it again, and each new encryption comes out different. This returns the encrypted value as it is stored, so the output stays the same until the setting actually changes.

Test:

Run list configurations category=Secure twice in a row with cmk and compare the values. Values below are cut to the first 24 characters.

Before: every set value changes between the two calls.

# first call
backup.plugin.networker.password ZddciElO1udo3Pl+agXrHARG
network.loadbalancer.haproxy.stats.auth f51/g2uRBsvefBJsaoHUQ4lP
security.singlesignon.key lQ03Tqq8CIau7LIDDf5XCWr7
# second call
backup.plugin.networker.password XnKELrtDmHe6f9BRaBoXyHFp
network.loadbalancer.haproxy.stats.auth jplo4cvuOJZVipmyz/8/IcIH
security.singlesignon.key ut3RFlVXAKkqC88lnOiO/IIC

After: both calls return the same values, and they match the configuration table.

# first and second call
backup.plugin.networker.password KZdkoJLySbJ1j5C/YE5olDKM
network.loadbalancer.haproxy.stats.auth YU9iU0+6TfvwjkCH2225y8n7
security.singlesignon.key JibDMnWzxEEnvyBIvIMrtvRx
# select name, left(value,24) from configuration where category='Secure'
backup.plugin.networker.password	KZdkoJLySbJ1j5C/YE5olDKM
network.loadbalancer.haproxy.stats.auth	YU9iU0+6TfvwjkCH2225y8n7
security.singlesignon.key	JibDMnWzxEEnvyBIvIMrtvRx

@Damans227

Copy link
Copy Markdown
Collaborator Author

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@Damans227 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 Oct 5, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 33.33333% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 16.42%. Comparing base (376c1b4) to head (557f117).

Files with missing lines Patch % Lines
...udstack/framework/config/impl/ConfigurationVO.java 33.33% 2 Missing ⚠️
...src/main/java/com/cloud/api/ApiResponseHelper.java 33.33% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##               4.20   #14309   +/-   ##
=========================================
  Coverage     16.41%   16.42%           
  Complexity    13657    13657           
=========================================
  Files          5669     5669           
  Lines        501628   501633    +5     
  Branches      60942    60943    +1     
=========================================
+ Hits          82336    82384   +48     
+ Misses       410064   410021   -43     
  Partials       9228     9228           
Flag Coverage Δ
uitests 4.16% <ø> (ø)
unittests 17.28% <33.33%> (+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.

@blueorangutan

Copy link
Copy Markdown

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

@Damans227
Damans227 marked this pull request as ready for review October 5, 2026 15:20

@weizhouapache weizhouapache left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

code lgtm

thanks @Damans227 !

@Damans227
Damans227 requested a review from nvazquez October 8, 2026 15:31
@Damans227

Copy link
Copy Markdown
Collaborator Author

@nvazquez can you take a look when you get a chance?

@DaanHoogland

Copy link
Copy Markdown
Contributor

@Damans227 , see #14306 (comment) , can you rebase?

@Damans227

Copy link
Copy Markdown
Collaborator Author

can you rebase?

@DaanHoogland done, rebased on 4.20 and moved the PR base there

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

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.

listConfigurations API returns different value of "Secure" configurations even value is not changed

4 participants