Skip to content

Feature: Get/set vault id - #358

Open
infeo wants to merge 5 commits into
developfrom
feature/set-vaultid
Open

infeo wants to merge 5 commits into
developfrom
feature/set-vaultid

Conversation

@infeo

@infeo infeo commented Sep 25, 2026

Copy link
Copy Markdown
Member

This PR adds the option to create a vault with a given ID and reading the id from the unverified vault config.

@infeo infeo added this to the next milestone Sep 25, 2026
@infeo infeo self-assigned this Sep 25, 2026
@coderabbitai

coderabbitai Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 7e07a631-5314-4e3d-aa4d-8c5ac008498e

📥 Commits

Reviewing files that changed from the base of the PR and between fa136fb and 8256873.

📒 Files selected for processing (5)
  • CHANGELOG.md
  • src/main/java/org/cryptomator/cryptofs/CryptoFileSystemProperties.java
  • src/main/java/org/cryptomator/cryptofs/CryptoFileSystemProvider.java
  • src/test/java/org/cryptomator/cryptofs/CryptoFileSystemPropertiesTest.java
  • src/test/java/org/cryptomator/cryptofs/CryptoFileSystemProviderTest.java
🚧 Files skipped from review as they are similar to previous changes (1)
  • CHANGELOG.md

Included review availability: Your plan provides up to 2 included reviews per hour; 0 remain after this review.


Walkthrough

Vault initialization now reads an optional vault ID from CryptoFileSystemProperties and applies it when present. VaultConfigBuilder accepts a vault ID and otherwise retains its random UUID default. UnverifiedVaultConfig exposes the token’s alleged ID before signature verification. Tests cover the property, builder, token accessor, and initialization.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Feature

Merge Risk: ⚪ Minimal · up to 82568

Vaults without a configured ID still receive a generated ID, and configured IDs are written to the vault token. No actionable merge-blocking risk is evident.

Security Architecture Review

Security architecture risk: 🟡 Moderate · up to 82568

The new vault identity is signed when created and verified before the vault is opened. No repository-local authentication bypass was found. However, removing an existing public initialization method can break applications during an upgrade, and use of the newly exposed unverified identity by external applications is not established.

Retained concerns

  • Medium · architecture · inferred: The public four-argument initialize overload was removed. Applications compiled to call it can fail when upgraded to this version, rather than continuing to create vaults with their chosen ID.
Security review details

Security Blast Radius

  • inferred — A caller able to initialize a vault can choose its persisted ID instead of relying on a generated value. No repository evidence establishes a global ID registry or an external tenant or authorization use of that ID.

Trust Boundaries and Controls

  • observed — The decoded token can supply an unverified ID, but vault opening uses the token's key ID to load a key and requires signature and version verification before using the configuration. The new properties ID does not replace that open-path verification.

Hardening Proposals

  • proposed — Keep the unverified ID limited to hints or display; consumers making ownership, tenancy, or authorization decisions should use an ID obtained from a verified configuration.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 19.35% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 31 functions across 6 files. (1 skipped: … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: adding support to get and set the vault ID.
Description check ✅ Passed The description accurately states that the PR adds creation of a vault with a specified ID and reading the ID from an unverified vault configuration.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 19.35% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 31 functions across 6 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

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.

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