feat(apps): resolve F_S_ storage links on demand for app owners - #1767
Open
Cabecinha84 wants to merge 3 commits into
Open
feat(apps): resolve F_S_ storage links on demand for app owners#1767Cabecinha84 wants to merge 3 commits into
Cabecinha84 wants to merge 3 commits into
Conversation
8.16.1 — fix syncthing phantom_index_empty_disk false positive (apps exit 137, never restart)
Adds an opt-in ?resolvestorage=true flag to GET /apps/appspecifications that expands F_S_ENV / F_S_CMD / F_S_CONTACTS links into their real values for the app owner (or Flux support). Enterprise apps: resolved into a clone before encryptEnterpriseFromSession, so values ride the client session key and never travel in clear. Non-enterprise: cleartext, gated by verifyPrivilege appowner / appownerabove. Default reads are unchanged. - New shared utils/fluxStorageResolver.js (obtainPayloadFromStorage moved here from dockerService; attachResolvedStorage deep-clones, resolves in parallel, per-field status ok/error/too-large, caches successes). - cacheManager: storagePayloadCache (immutable content, 6h). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Cabecinha84
requested review from
MorningLightMountain713,
TheTrunk,
XK4MiLX and
alihm
July 15, 2026 09:59
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds an opt-in
?resolvestorage=trueflag toGET /apps/appspecifications/:appname/:decrypt?that expandsF_S_ENV/F_S_CMD/F_S_CONTACTSstorage links into their real values — for the app owner (or Flux support) only. Default spec reads are unchanged, so this is fully backwards compatible.Security model
encryptEnterpriseFromSession, so they ride the caller's session key and never travel in clear. Support-team blanking of env stays in effect (resolution runs after it).verifyPrivilege('appowner')or'appownerabove'(support). The previously auth-less public path stays auth-less when the flag is off.Changes
ZelBack/src/services/utils/fluxStorageResolver.js:obtainPayloadFromStoragemoved here fromdockerService(imported back — container-start path unchanged);attachResolvedStoragedeep-clones the spec, resolves env/cmd/contacts in parallel, attaches<field>Resolved={ source, url, status, values }(statusok/error/too-large), and never throws on a dead link.registryManager.getApplicationSpecificationAPI: wires the flag into both the non-enterprise (cleartext, owner-gated) and enterprise (encrypted) branches.cacheManager:storagePayloadCache(storage content is immutable, so successful payloads cache for 6h).dockerService: importsobtainPayloadFromStoragefrom the shared module.Depends on
F_S_CONTACTSresolution.Testing
node --checkon all touched files; resolver logic exercised (clone isolation, per-field partial-failure status, no-marker → no resolved key).🤖 Generated with Claude Code