Skip to content

UVF support#274

Draft
overheadhunter wants to merge 150 commits into
developfrom
feature/uvf
Draft

UVF support#274
overheadhunter wants to merge 150 commits into
developfrom
feature/uvf

Conversation

@overheadhunter

@overheadhunter overheadhunter commented May 10, 2024

Copy link
Copy Markdown
Member

This PR adds fundamental support for UVF-based vaults. During vault creation either format is selected. There is no migration of format 8 based vaults planned. Vault access tokens either contain a format 8 Masterkey OR a UVF member key (which is an A256KW key for the vault.uvf file).

Notable changes:

  1. split up crypto implementation into uvf.ts and vaultv8.ts, leaving common crypto in crypto.ts
  2. make jwe.ts capable of handling compact as well as json serialization with support for ECDH-ES (legacy, decrypt only), ECDH-ES+A256KW, PBES2+A256KW and A256KW, allowing encryption for multiple recipients
  3. add new vault fields to database and DTOs to allow storing a vault.uvf file as well as the public part of a recovery key pair
  4. instead of serializing the masterkey, the recovery key consists of a serialized private key

TODO

  • bump API level

overheadhunter and others added 30 commits March 2, 2024 12:10
# Conflicts:
#	backend/src/test/java/org/cryptomator/hub/api/VaultResourceTest.java
# Conflicts:
#	backend/src/main/java/org/cryptomator/hub/api/VaultResource.java
#	backend/src/main/java/org/cryptomator/hub/entities/Vault.java
#	backend/src/test/java/org/cryptomator/hub/api/VaultResourceIT.java
#	frontend/src/components/VaultDetails.vue
[ci skip]
# Conflicts:
#	frontend/src/common/backend.ts
#	frontend/src/components/ArchiveVaultDialog.vue
#	frontend/src/components/CreateVault.vue
#	frontend/src/components/ReactivateVaultDialog.vue
#	frontend/src/components/VaultDetails.vue
#	frontend/src/components/emergencyaccess/EmergencyAccessDialog.vue
#	frontend/src/components/emergencyaccess/GrantEmergencyAccessDialog.vue
# Conflicts:
#	backend/src/main/java/org/cryptomator/hub/api/VaultResource.java
#	frontend/src/common/crypto.ts
#	frontend/src/common/jwe.ts
#	frontend/src/common/jwt.ts
#	frontend/src/common/vaultconfig.ts
#	frontend/src/components/CreateVault.vue
#	frontend/src/components/ReactivateVaultDialog.vue
#	frontend/test/common/crypto.spec.ts
Comment thread frontend/src/components/CreateVault.vue Outdated
overheadhunter and others added 23 commits May 13, 2026 09:23
Agent-Logs-Url: https://github.com/cryptomator/hub/sessions/e61f4956-74f9-449d-a567-045b7c255441

Co-authored-by: overheadhunter <1204330+overheadhunter@users.noreply.github.com>
Agent-Logs-Url: https://github.com/cryptomator/hub/sessions/d03d087f-2c4b-4200-8b8d-b037dd9db45e

Co-authored-by: overheadhunter <1204330+overheadhunter@users.noreply.github.com>
- Add `GET /vaults/users-requiring-access-grant` returning pending grants grouped by vault, blocking up to `wait` seconds for changes
- Introduce `VaultAccessChanged` CDI event and `VaultAccessChangeBroadcaster` (in-process pub/sub, `AFTER_SUCCESS` observer) to wake long-pollers
- Fire `VaultAccessChanged` from vault-access write paths in `VaultResource` and at the end of `KeycloakAuthorityPuller` syncs
- Add `User.findUsersRequiringAccessToken` named query grouping pending users by vault, and rename the per-vault variant to `findUsersRequiringAccessTokenForVault`
- Expose `listPendingAccessGrants` in the frontend `VaultService` with a request timeout matching the poll window
# Conflicts:
#	backend/src/main/java/org/cryptomator/hub/api/VaultResource.java
#	frontend/src/components/CreateVault.vue
- Add `AutomaticAccessGrantAgent.vue` reference client that long-polls for pending grants, verifies trust client-side via WoT, and re-wraps vault keys for trusted candidates
- Extract `unwrapVaultKeys` helper (`vaultKeys.ts`) handling both UVF and legacy Vault Format 8, and reuse it in `VaultDetails.vue`
- Add `isUvfVault` type guard to `backend.ts`
- Apply the automatic access grant policy from settings on vault creation, preserving existing policy on recovery
- Scope `getUsersRequiringAccessGrant` to vaults the caller holds an *access token* for (can decrypt and re-share); leave the Web-of-Trust decision and the encrypted trust threshold / enabled flag to the client
- Make `VaultMetadata.automaticAccessGrant` mutable so the override step can set it
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
# Conflicts:
#	frontend/src/components/AdminSettingsEmergencyAccess.vue
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.

5 participants