Skip to content

feat(apps): resolve F_S_ storage links on demand for app owners - #1767

Open
Cabecinha84 wants to merge 3 commits into
developmentfrom
feature/reveal-storage-values
Open

feat(apps): resolve F_S_ storage links on demand for app owners#1767
Cabecinha84 wants to merge 3 commits into
developmentfrom
feature/reveal-storage-values

Conversation

@Cabecinha84

Copy link
Copy Markdown
Member

Summary

Adds an opt-in ?resolvestorage=true flag to GET /apps/appspecifications/:appname/:decrypt? that expands F_S_ENV / F_S_CMD / F_S_CONTACTS storage 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

  • Enterprise apps: values are resolved into a clone before 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).
  • Non-enterprise apps: cleartext response, but only after verifyPrivilege('appowner') or 'appownerabove' (support). The previously auth-less public path stays auth-less when the flag is off.

Changes

  • New ZelBack/src/services/utils/fluxStorageResolver.js: obtainPayloadFromStorage moved here from dockerService (imported back — container-start path unchanged); attachResolvedStorage deep-clones the spec, resolves env/cmd/contacts in parallel, attaches <field>Resolved = { source, url, status, values } (status ok/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: imports obtainPayloadFromStorage from the shared module.

Depends on

Testing

  • node --check on all touched files; resolver logic exercised (clone isolation, per-field partial-failure status, no-marker → no resolved key).
  • Full mocha not run here (needs config/mongo) — please run in CI.

🤖 Generated with Claude Code

Cabecinha84 and others added 3 commits July 4, 2026 20:05
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
Cabecinha84 changed the base branch from master to development July 13, 2026 19:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant