Skip to content

fix(volumes): Fix volume credential handling for mounted volumes - #1145

Open
xd003 wants to merge 1 commit into
nicotsx:mainfrom
xd003:fix/volume-secret-update
Open

xd003 wants to merge 1 commit into
nicotsx:mainfrom
xd003:fix/volume-secret-update

Conversation

@xd003

@xd003 xd003 commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

Existing volume operations were unnecessarily decrypting stored credentials even when credentials were not required. As a result, health checks, file browsing, and unmount operations could fail when stored SMB, WebDAV, or SFTP credentials were unavailable or could not be decrypted, even though the volume was already mounted and could still be inspected or unmounted.

Credential handling during volume updates also had two issues:

  • Updating a volume could discard unchanged stored configuration fields.
  • Replacement credentials were not always prepared before the existing mount was unmounted.
  • Connection tests could run against encrypted stored values instead of resolved credentials.

This change:

  • Avoids resolving volume credentials for operations that only inspect or unmount an existing mount.
  • Preserves unchanged stored configuration during updates.
  • Resolves and prepares replacement credentials before unmounting the current volume.
  • Resolves stored secrets before testing connections.
  • Applies consistently to both controller-local and local-agent execution paths.
  • Restores reliable handling of existing SMB, WebDAV, and SFTP credentials without exposing or unnecessarily decrypting secrets.

This keeps inspection and cleanup operations available even when credential decryption is not required, while ensuring connection and replacement operations receive usable plaintext credentials.

Fixes #1064

@coderabbitai

coderabbitai Bot commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 99579dce-6713-4de4-af54-c369e477fb72

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@xd003
xd003 force-pushed the fix/volume-secret-update branch 3 times, most recently from a5af65f to d60eda0 Compare September 10, 2026 01:24
@xd003

xd003 commented Sep 10, 2026

Copy link
Copy Markdown
Contributor Author

@nicotsx Hello, can you review this one, it fixes the linked issue.

@xd003
xd003 force-pushed the fix/volume-secret-update branch 4 times, most recently from 4b4a4c8 to c6a0529 Compare September 14, 2026 03:42
@xd003
xd003 force-pushed the fix/volume-secret-update branch 2 times, most recently from e29b63f to 781b2d8 Compare October 4, 2026 19:37
Avoid decrypting volume credentials for operations that only inspect an
existing mount, so health checks, file browsing, and unmounting remain
available without exposing or unnecessarily resolving secrets.

Preserve unchanged stored configurations during updates, prepare replacement
credentials before unmounting, and resolve stored secrets before testing a
connection. This lets existing SMB, WebDAV, and SFTP credentials work through
both controller-local and local-agent execution paths.
@xd003
xd003 force-pushed the fix/volume-secret-update branch from 781b2d8 to 2eda4b6 Compare October 6, 2026 10:49

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] SFTP Volumes "Test Connection" fails after configuring it once successfully

1 participant