Skip to content

Privacy-first password manager with built-in email aliasing. Fully encrypted and self-hostable.

Refactor sharedfolder to sharedmanifest (#2159)

Leendert de Borstfc01438c336f
diff --git a/apps/server/AliasVault.Api/Helpers/EmailAccessHelper.cs b/apps/server/AliasVault.Api/Helpers/EmailAccessHelper.cs
index 0a4506b17..4a0a3cbf6 100644
--- a/apps/server/AliasVault.Api/Helpers/EmailAccessHelper.cs
+++ b/apps/server/AliasVault.Api/Helpers/EmailAccessHelper.cs
@@ -30,7 +30,7 @@ public static class EmailAccessHelper
return false;
}
- // Holding any access key on the manifest is proof of access: AccountKey on a root manifest, GrantKey on a shared folder (owner self-grant and recipient alike).
+ // Holding any access key on the manifest is proof of access: AccountKey on a root manifest, GrantKey on a shared manifest (owner self-grant and recipient alike).
var hasAccessKey = await context.VaultManifestAccessKeys.AnyAsync(k => k.UserId == userId && k.VaultManifestId == claim.VaultManifestId);
if (hasAccessKey)
{
@@ -65,7 +65,7 @@ public static class EmailAccessHelper
return [];
}
- // Holding any access key on the manifest is proof of access: AccountKey on a root manifest, GrantKey on a shared folder
+ // Holding any access key on the manifest is proof of access: AccountKey on a root manifest, GrantKey on a shared manifest
// (owner self-grant and recipient alike).
var manifestIds = claims.Select(c => c.ManifestId).Distinct().ToList();
var keyedManifestIds = (await context.VaultManifestAccessKeys
@@ -82,7 +82,7 @@ public static class EmailAccessHelper
/// <summary>
/// Get the ids of the encryption keys the user holds the private half of: their own personal
- /// keys, plus the keypair of every shared folder they can open.
+ /// keys, plus the keypair of every shared manifest they can open.
/// </summary>
/// <param name="context">Database context.</param>
/// <param name="userId">The user requesting access.</param>
diff --git a/apps/server/AliasVault.Api/Helpers/GroupHelper.cs b/apps/server/AliasVault.Api/Helpers/GroupHelper.cs
index ca29a9630..090ad4875 100644
--- a/apps/server/AliasVault.Api/Helpers/GroupHelper.cs
+++ b/apps/server/AliasVault.Api/Helpers/GroupHelper.cs
@@ -92,10 +92,10 @@ public static class GroupHelper
}
/// <summary>
- /// Check if the user may administer the shared folder.
+ /// Check if the user may administer the shared manifest.
/// </summary>
/// <param name="context">Database context.</param>
- /// <param name="manifestId">The shared folder manifest.</param>
+ /// <param name="manifestId">The shared manifest.</param>
/// <param name="userId">The user.</param>
/// <returns>True when the user can administer the folder.</returns>
public static async Task<bool> CanAdministerManifestAsync(AliasServerDbContext context, Guid manifestId, string userId)
@@ -109,10 +109,10 @@ public static class GroupHelper
}
/// <summary>
- /// Get the ownership of a shared folder.
+ /// Get the ownership of a shared manifest.
/// </summary>
/// <param name="context">Database context.</param>
- /// <param name="manifestIds">The shared folder manifests to get the ownership of.</param>
+ /// <param name="manifestIds">The shared manifests to get the ownership of.</param>
/// <returns>Manifest id to (owning group id, owning user id).</returns>
public static async Task<Dictionary<Guid, (Guid GroupId, string OwnerUserId)>> ResolveQuotaOwnersAsync(AliasServerDbContext context, IEnumerable<Guid> manifestIds)
{
diff --git a/apps/server/AliasVault.Client/wwwroot/js/rustCoreInterop.js b/apps/server/AliasVault.Client/wwwroot/js/rustCoreInterop.js
index 82414b822..cd2b4243f 100644
--- a/apps/server/AliasVault.Client/wwwroot/js/rustCoreInterop.js
+++ b/apps/server/AliasVault.Client/wwwroot/js/rustCoreInterop.js
@@ -209,20 +209,20 @@ window.rustCoreExtractDomain = async function(url) {
* The Logos.Id to use for a source domain inside a given manifest scope.
*
* Logo identity is derived, not minted: two clients that fetch the same favicon independently produce
- * the same row and merge by LWW, instead of two rows that collide on UNIQUE(SharedFolderId, Source).
+ * the same row and merge by LWW, instead of two rows that collide on UNIQUE(ManifestId, Source).
* The same domain in two different manifests deliberately yields two different ids, so a shared
- * folder's icon and the user's own icon for that domain never overwrite each other.
- * @param {string|null} sharedFolderId - Owning shared folder, or null for the user's own vault.
+ * manifest's icon and the user's own icon for that domain never overwrite each other.
+ * @param {string|null} manifestId - Owning manifest, or null for the user's own vault.
* @param {string} source - The normalized source domain (e.g. 'github.com').
* @returns {Promise<string>} The logo id, or '' when the WASM module is unavailable.
*/
-window.rustCoreVaultCodecLogoIdForSource = async function(sharedFolderId, source) {
+window.rustCoreVaultCodecLogoIdForSource = async function(manifestId, source) {
if (!await initRustCore()) {
return '';
}
try {
- return wasmModule.vaultCodecLogoIdForSource(sharedFolderId ?? undefined, source);
+ return wasmModule.vaultCodecLogoIdForSource(manifestId ?? undefined, source);
} catch (error) {
console.error('[RustCore] Logo id derivation failed:', error);
return '';
diff --git a/apps/server/Databases/AliasClientDb/Logo.cs b/apps/server/Databases/AliasClientDb/Logo.cs
index 5e65f1763..a1e835a9b 100644
--- a/apps/server/Databases/AliasClientDb/Logo.cs
+++ b/apps/server/Databases/AliasClientDb/Logo.cs
@@ -64,7 +64,7 @@ public class Logo : SyncableEntity
/// <summary>
/// Gets or sets the id of the manifest this logo belongs to — the root manifest's own id for
/// personal logos (see the Manifests bookkeeping table; there is no NULL-scope convention). An
- /// icon lives in exactly one manifest: two members of a shared folder each keep their own personal
+ /// icon lives in exactly one manifest: two members of a shared manifest each keep their own personal
/// icon for a domain while the folder keeps the one its items use. Nullable only as write
/// tolerance: the Rust codec adopts and restamps unstamped rows at the next sync boundary.
/// </summary>
diff --git a/apps/server/Databases/AliasClientDb/Manifest.cs b/apps/server/Databases/AliasClientDb/Manifest.cs
index 654213930..7ed1140ce 100644
--- a/apps/server/Databases/AliasClientDb/Manifest.cs
+++ b/apps/server/Databases/AliasClientDb/Manifest.cs
@@ -30,7 +30,7 @@ public class Manifest
public bool IsRoot { get; set; }
/// <summary>
- /// Gets or sets the folder this manifest is anchored at (a shared folder's root folder), or null
+ /// Gets or sets the folder this manifest is anchored at (a shared manifest's anchor folder), or null
/// for the root manifest. Presentation and routing hint only — the manifest's identity is
/// <see cref="Id"/>.
/// </summary>
diff --git a/apps/server/Databases/AliasServerDb/AliasServerDbContext.cs b/apps/server/Databases/AliasServerDb/AliasServerDbContext.cs
index 17506e542..2d4dde9ca 100644
--- a/apps/server/Databases/AliasServerDb/AliasServerDbContext.cs
+++ b/apps/server/Databases/AliasServerDb/AliasServerDbContext.cs
@@ -320,7 +320,7 @@ public class AliasServerDbContext : WorkerStatusDbContext, IDataProtectionKeyCon
builder.HasIndex(e => e.PersonalGroupId).IsUnique().HasDatabaseName("UX_AliasVaultUsers_PersonalGroupId");
});
- // Configure GroupMember, who may be granted access to the group's shared folders.
+ // Configure GroupMember, who may be granted access to the group's shared manifests.
modelBuilder.Entity<GroupMember>(builder =>
{
builder.HasOne(e => e.Group)
diff --git a/apps/server/Databases/AliasServerDb/GroupRole.cs b/apps/server/Databases/AliasServerDb/GroupRole.cs
index cf5da66a6..9bde08078 100644
--- a/apps/server/Databases/AliasServerDb/GroupRole.cs
+++ b/apps/server/Databases/AliasServerDb/GroupRole.cs
@@ -18,12 +18,12 @@ public enum GroupRole
Owner = 0,
/// <summary>
- /// Can invite and remove members and administer the group's shared folders.
+ /// Can invite and remove members and administer the group's shared manifests.
/// </summary>
Admin = 1,
/// <summary>
- /// Can use shared folders they hold a grant on.
+ /// Can use shared manifests they hold a grant on.
/// </summary>
Member = 2,
}
diff --git a/apps/server/Shared/AliasVault.Shared/Models/Enums/ApiErrorCode.cs b/apps/server/Shared/AliasVault.Shared/Models/Enums/ApiErrorCode.cs
index 5e3990210..a7960e8c5 100644
--- a/apps/server/Shared/AliasVault.Shared/Models/Enums/ApiErrorCode.cs
+++ b/apps/server/Shared/AliasVault.Shared/Models/Enums/ApiErrorCode.cs
@@ -165,7 +165,7 @@ public enum ApiErrorCode
VAULT_KEY_NOT_FOUND,
/// <summary>
- /// The referenced shared folder manifest does not exist or is not owned by the caller.
+ /// The referenced shared manifest does not exist or is not owned by the caller.
/// </summary>
SHARED_MANIFEST_NOT_FOUND,
diff --git a/apps/server/Shared/AliasVault.Shared/Models/WebApi/V2/Sharing/CreateSharedFolderRequest.cs b/apps/server/Shared/AliasVault.Shared/Models/WebApi/V2/Sharing/CreateSharedFolderRequest.cs
deleted file mode 100644
index debb584a6..000000000
--- a/apps/server/Shared/AliasVault.Shared/Models/WebApi/V2/Sharing/CreateSharedFolderRequest.cs
+++ /dev/null
@@ -1,34 +0,0 @@
-//-----------------------------------------------------------------------
-// <copyright file="CreateSharedFolderRequest.cs" company="aliasvault">
-// Copyright (c) aliasvault. All rights reserved.
-// Licensed under the AGPLv3 license. See LICENSE.md file in the project root for full license information.
-// </copyright>
-//-----------------------------------------------------------------------
-
-namespace AliasVault.Shared.Models.WebApi.V2.Sharing;
-
-/// <summary>
-/// Request for POST /v2/Sharing/folders. Creates a new non-root (shareable) manifest owned by the caller. The
-/// folder's VEK is generated client-side and encrypted for the caller's *own* public key, persisted as a
-/// <c>shared</c> grant in the same call.
-/// </summary>
-public class CreateSharedFolderRequest
-{
- /// <summary>Gets or sets the plaintext display name of the folder (server-visible for the sharing UI).</summary>
- public required string Name { get; set; }
-
- /// <summary>Gets or sets the encrypted folder manifest blob (AES-GCM ciphertext under the folder VEK, base64).</summary>
- public required string ManifestBlob { get; set; }
-
- /// <summary>Gets or sets the SHA-256 (hex) of the manifest ciphertext, for storage-layer integrity verification.</summary>
- public string? ManifestCiphertextHash { get; set; }
-
- /// <summary>Gets or sets the folder VEK encrypted with the caller's own public key (base64), decryptable only by the caller.</summary>
- public required string SelfEncryptedVek { get; set; }
-
- /// <summary>Gets or sets the id of the caller's own public key used to encrypt (from GET /v2/Sharing/recipient for their own username).</summary>
- public required Guid SelfPublicKeyId { get; set; }
-
- /// <summary>Gets or sets the asymmetric algorithm used.</summary>
- public required string Algorithm { get; set; }
-}
diff --git a/apps/server/Shared/AliasVault.Shared/Models/WebApi/V2/Sharing/CreateSharedManifestRequest.cs b/apps/server/Shared/AliasVault.Shared/Models/WebApi/V2/Sharing/CreateSharedManifestRequest.cs
new file mode 100644
index 000000000..74b53c3a7
--- /dev/null
+++ b/apps/server/Shared/AliasVault.Shared/Models/WebApi/V2/Sharing/CreateSharedManifestRequest.cs
@@ -0,0 +1,38 @@
+//-----------------------------------------------------------------------
+// <copyright file="CreateSharedManifestRequest.cs" company="aliasvault">
+// Copyright (c) aliasvault. All rights reserved.
+// Licensed under the AGPLv3 license. See LICENSE.md file in the project root for full license information.
+// </copyright>
+//-----------------------------------------------------------------------
+
+namespace AliasVault.Shared.Models.WebApi.V2.Sharing;
+
+/// <summary>
+/// Request for POST /v2/Sharing/manifests. Creates a new non-root (shareable) manifest owned by the caller. The
+/// manifest's VEK is generated client-side and encrypted for the caller's *own* public key, persisted as a
+/// <c>shared</c> grant in the same call.
+/// </summary>
+public class CreateSharedManifestRequest
+{
+ /// <summary>Gets or sets the client-minted id of the new manifest. The encrypted placeholder manifest
+ /// already carries this id as its identity, so the server persists it verbatim (validating uniqueness).</summary>
+ public required Guid ManifestId { get; set; }
+
+ /// <summary>Gets or sets the plaintext display name of the manifest (server-visible for the sharing UI).</summary>
+ public required string Name { get; set; }
+
+ /// <summary>Gets or sets the encrypted manifest blob (AES-GCM ciphertext under the manifest VEK, base64).</summary>
+ public required string ManifestBlob { get; set; }
+
+ /// <summary>Gets or sets the SHA-256 (hex) of the manifest ciphertext, for storage-layer integrity verification.</summary>
+ public string? ManifestCiphertextHash { get; set; }
+
+ /// <summary>Gets or sets the manifest VEK encrypted with the caller's own public key (base64), decryptable only by the caller.</summary>
+ public required string SelfEncryptedVek { get; set; }
+
+ /// <summary>Gets or sets the id of the caller's own account public key used to encrypt (from GET /v2/Sharing/recipient for their own username).</summary>
+ public required Guid SelfPublicKeyId { get; set; }
+
+ /// <summary>Gets or sets the asymmetric algorithm used.</summary>
+ public required string Algorithm { get; set; }
+}
diff --git a/apps/server/Shared/AliasVault.Shared/Models/WebApi/V2/Sharing/CreateSharedFolderResponse.cs b/apps/server/Shared/AliasVault.Shared/Models/WebApi/V2/Sharing/CreateSharedManifestResponse.cs
similarity index 70%
rename from apps/server/Shared/AliasVault.Shared/Models/WebApi/V2/Sharing/CreateSharedFolderResponse.cs
rename to apps/server/Shared/AliasVault.Shared/Models/WebApi/V2/Sharing/CreateSharedManifestResponse.cs
index 65027cd73..8da9540bd 100644
--- a/apps/server/Shared/AliasVault.Shared/Models/WebApi/V2/Sharing/CreateSharedFolderResponse.cs
+++ b/apps/server/Shared/AliasVault.Shared/Models/WebApi/V2/Sharing/CreateSharedManifestResponse.cs
@@ -1,5 +1,5 @@
//-----------------------------------------------------------------------
-// <copyright file="CreateSharedFolderResponse.cs" company="aliasvault">
+// <copyright file="CreateSharedManifestResponse.cs" company="aliasvault">
// Copyright (c) aliasvault. All rights reserved.
// Licensed under the AGPLv3 license. See LICENSE.md file in the project root for full license information.
// </copyright>
@@ -8,11 +8,11 @@
namespace AliasVault.Shared.Models.WebApi.V2.Sharing;
/// <summary>
-/// Response for POST /v2/Sharing/folders. Identifies the newly created shared folder manifest.
+/// Response for POST /v2/Sharing/manifests. Identifies the newly created shared manifest.
/// </summary>
-public class CreateSharedFolderResponse
+public class CreateSharedManifestResponse
{
- /// <summary>Gets or sets the id of the created manifest (used to grant/revoke access and to sync the folder).</summary>
+ /// <summary>Gets or sets the id of the created manifest (used to grant/revoke access and to sync it).</summary>
public required Guid ManifestId { get; set; }
/// <summary>Gets or sets the manifest's initial revision number.</summary>
diff --git a/apps/server/Shared/AliasVault.Shared/Models/WebApi/V2/Sharing/GrantAccessRequest.cs b/apps/server/Shared/AliasVault.Shared/Models/WebApi/V2/Sharing/GrantAccessRequest.cs
index cce081ca0..0406f6f81 100644
--- a/apps/server/Shared/AliasVault.Shared/Models/WebApi/V2/Sharing/GrantAccessRequest.cs
+++ b/apps/server/Shared/AliasVault.Shared/Models/WebApi/V2/Sharing/GrantAccessRequest.cs
@@ -8,12 +8,12 @@
namespace AliasVault.Shared.Models.WebApi.V2.Sharing;
/// <summary>
-/// Request for POST /v2/Sharing/grant. Grants a recipient access to a shared folder manifest the caller owns, by
+/// Request for POST /v2/Sharing/grant. Grants a recipient access to a shared manifest the caller owns, by
/// persisting the folder's VEK encrypted with the recipient's public key. The server never sees the plaintext VEK.
/// </summary>
public class GrantAccessRequest
{
- /// <summary>Gets or sets the shared folder manifest to grant access to (must be owned by the caller).</summary>
+ /// <summary>Gets or sets the shared manifest to grant access to (must be owned by the caller).</summary>
public required Guid ManifestId { get; set; }
/// <summary>Gets or sets the recipient user id (from GET /v2/Sharing/recipient).</summary>
diff --git a/apps/server/Shared/AliasVault.Shared/Models/WebApi/V2/Sharing/RecipientLookupResponse.cs b/apps/server/Shared/AliasVault.Shared/Models/WebApi/V2/Sharing/RecipientLookupResponse.cs
index 217ae32b2..ea6d6b62a 100644
--- a/apps/server/Shared/AliasVault.Shared/Models/WebApi/V2/Sharing/RecipientLookupResponse.cs
+++ b/apps/server/Shared/AliasVault.Shared/Models/WebApi/V2/Sharing/RecipientLookupResponse.cs
@@ -8,7 +8,7 @@
namespace AliasVault.Shared.Models.WebApi.V2.Sharing;
/// <summary>
-/// Response for GET /v2/Sharing/recipient. Returns the primary public key a granter uses to encrypt a shared folder's
+/// Response for GET /v2/Sharing/recipient. Returns the primary public key a granter uses to encrypt a shared manifest's
/// VEK for the recipient.
/// </summary>
public class RecipientLookupResponse
diff --git a/apps/server/Shared/AliasVault.Shared/Models/WebApi/V2/Sharing/RevokeAccessRequest.cs b/apps/server/Shared/AliasVault.Shared/Models/WebApi/V2/Sharing/RevokeAccessRequest.cs
index 3c1da343b..c70c4408b 100644
--- a/apps/server/Shared/AliasVault.Shared/Models/WebApi/V2/Sharing/RevokeAccessRequest.cs
+++ b/apps/server/Shared/AliasVault.Shared/Models/WebApi/V2/Sharing/RevokeAccessRequest.cs
@@ -8,11 +8,11 @@
namespace AliasVault.Shared.Models.WebApi.V2.Sharing;
/// <summary>
-/// Request for POST /v2/Sharing/revoke. Removes a recipient's access to a shared folder manifest the caller owns.
+/// Request for POST /v2/Sharing/revoke. Removes a recipient's access to a shared manifest the caller owns.
/// </summary>
public class RevokeAccessRequest
{
- /// <summary>Gets or sets the shared folder manifest to revoke access from (must be owned by the caller).</summary>
+ /// <summary>Gets or sets the shared manifest to revoke access from (must be owned by the caller).</summary>
public required Guid ManifestId { get; set; }
/// <summary>Gets or sets the recipient user id whose grant is removed.</summary>
diff --git a/apps/server/Shared/AliasVault.Shared/Models/WebApi/V2/Sharing/ShareMember.cs b/apps/server/Shared/AliasVault.Shared/Models/WebApi/V2/Sharing/ShareMember.cs
index 5684aa758..044890c19 100644
--- a/apps/server/Shared/AliasVault.Shared/Models/WebApi/V2/Sharing/ShareMember.cs
+++ b/apps/server/Shared/AliasVault.Shared/Models/WebApi/V2/Sharing/ShareMember.cs
@@ -8,7 +8,7 @@
namespace AliasVault.Shared.Models.WebApi.V2.Sharing;
/// <summary>
-/// One member of a shared folder: the owner plus every recipient holding a grant.
+/// One member of a shared manifest: the owner plus every recipient holding a grant.
/// </summary>
public class ShareMember
{
diff --git a/apps/server/Shared/AliasVault.Shared/Models/WebApi/V2/Sharing/ShareMembersResponse.cs b/apps/server/Shared/AliasVault.Shared/Models/WebApi/V2/Sharing/ShareMembersResponse.cs
index e47112eb0..efbc9215c 100644
--- a/apps/server/Shared/AliasVault.Shared/Models/WebApi/V2/Sharing/ShareMembersResponse.cs
+++ b/apps/server/Shared/AliasVault.Shared/Models/WebApi/V2/Sharing/ShareMembersResponse.cs
@@ -8,10 +8,10 @@
namespace AliasVault.Shared.Models.WebApi.V2.Sharing;
/// <summary>
-/// Response for GET /v2/Sharing/folders/{manifestId}/members. Lists the owner and every recipient of a shared folder.
+/// Response for GET /v2/Sharing/manifests/{manifestId}/members. Lists the owner and every recipient of a shared manifest.
/// </summary>
public class ShareMembersResponse
{
- /// <summary>Gets or sets the members of the shared folder (owner first, then recipients).</summary>
+ /// <summary>Gets or sets the members of the shared manifest (owner first, then recipients).</summary>
public List<ShareMember> Members { get; set; } = [];
}
diff --git a/apps/server/Shared/AliasVault.Shared/Models/WebApi/V2/Vault/EmailRouting.cs b/apps/server/Shared/AliasVault.Shared/Models/WebApi/V2/Vault/EmailRouting.cs
index 9d353f4fa..ec4f44b61 100644
--- a/apps/server/Shared/AliasVault.Shared/Models/WebApi/V2/Vault/EmailRouting.cs
+++ b/apps/server/Shared/AliasVault.Shared/Models/WebApi/V2/Vault/EmailRouting.cs
@@ -16,7 +16,7 @@ public class EmailRouting
public List<string> EmailAddressList { get; set; } = [];
/// <summary>
- /// Gets or sets the claimed addresses whose items live in a shared folder, each carrying the manifest
+ /// Gets or sets the claimed addresses whose items live in a shared manifest, each carrying the manifest
/// whose published keypair encrypts its mail.
/// </summary>
public List<SharedEmailAddress> SharedEmailAddressList { get; set; } = [];
diff --git a/apps/server/Shared/AliasVault.Shared/Models/WebApi/V2/Vault/Manifest.cs b/apps/server/Shared/AliasVault.Shared/Models/WebApi/V2/Vault/Manifest.cs
index a8b7b8a83..a049a3cef 100644
--- a/apps/server/Shared/AliasVault.Shared/Models/WebApi/V2/Vault/Manifest.cs
+++ b/apps/server/Shared/AliasVault.Shared/Models/WebApi/V2/Vault/Manifest.cs
@@ -36,7 +36,7 @@ public class Manifest
/// <summary>Gets or sets the blob references this manifest revision needs (so the client can detect cache misses).</summary>
public List<BlobReference> BlobReferences { get; set; } = [];
- /// <summary>Gets or sets the plaintext display name of a shared-folder manifest. Null for the root manifest.</summary>
+ /// <summary>Gets or sets the plaintext display name of a shared manifest. Null for the root manifest.</summary>
public string? Name { get; set; }
/// <summary>Gets or sets the username of the manifest owner. Set only on manifests granted to the caller by another user.</summary>
diff --git a/apps/server/Shared/AliasVault.Shared/Models/WebApi/V2/Vault/ManifestWrite.cs b/apps/server/Shared/AliasVault.Shared/Models/WebApi/V2/Vault/ManifestWrite.cs
index 3ea0c59ec..0f2255953 100644
--- a/apps/server/Shared/AliasVault.Shared/Models/WebApi/V2/Vault/ManifestWrite.cs
+++ b/apps/server/Shared/AliasVault.Shared/Models/WebApi/V2/Vault/ManifestWrite.cs
@@ -15,7 +15,7 @@ public class ManifestWrite
/// <summary>Gets or sets a value indicating whether this write targets the caller's root manifest.</summary>
public bool IsRoot { get; set; }
- /// <summary>Gets or sets the target shared-folder manifest id.</summary>
+ /// <summary>Gets or sets the target shared manifest id.</summary>
public Guid? ManifestId { get; set; }
/// <summary>Gets or sets the encrypted manifest blob.</summary>
diff --git a/apps/server/Shared/AliasVault.Shared/Models/WebApi/V2/Vault/SharedEmailAddress.cs b/apps/server/Shared/AliasVault.Shared/Models/WebApi/V2/Vault/SharedEmailAddress.cs
index 2cbad4ded..f71e4c74d 100644
--- a/apps/server/Shared/AliasVault.Shared/Models/WebApi/V2/Vault/SharedEmailAddress.cs
+++ b/apps/server/Shared/AliasVault.Shared/Models/WebApi/V2/Vault/SharedEmailAddress.cs
@@ -8,7 +8,7 @@
namespace AliasVault.Shared.Models.WebApi.V2.Vault;
/// <summary>
-/// An email alias whose item lives in a shared folder: mail for it is encrypted with the folder's
+/// An email alias whose item lives in a shared manifest: mail for it is encrypted with the manifest's
/// published keypair rather than the routing owner's personal key, so every member of the folder can
/// read it.
/// </summary>
@@ -17,6 +17,6 @@ public class SharedEmailAddress
/// <summary>Gets or sets the full email address.</summary>
public required string Address { get; set; }
- /// <summary>Gets or sets the shared-folder manifest whose key encrypts mail for this address.</summary>
+ /// <summary>Gets or sets the shared manifest whose key encrypts mail for this address.</summary>
public required Guid ManifestId { get; set; }
}
diff --git a/apps/server/Shared/AliasVault.Shared/Models/WebApi/V2/Vault/SharedFolderEncryptionPublicKey.cs b/apps/server/Shared/AliasVault.Shared/Models/WebApi/V2/Vault/SharedManifestEncryptionPublicKey.cs
similarity index 50%
rename from apps/server/Shared/AliasVault.Shared/Models/WebApi/V2/Vault/SharedFolderEncryptionPublicKey.cs
rename to apps/server/Shared/AliasVault.Shared/Models/WebApi/V2/Vault/SharedManifestEncryptionPublicKey.cs
index 18bacff1b..a662c65f2 100644
--- a/apps/server/Shared/AliasVault.Shared/Models/WebApi/V2/Vault/SharedFolderEncryptionPublicKey.cs
+++ b/apps/server/Shared/AliasVault.Shared/Models/WebApi/V2/Vault/SharedManifestEncryptionPublicKey.cs
@@ -1,5 +1,5 @@
//-----------------------------------------------------------------------
-// <copyright file="SharedFolderEncryptionPublicKey.cs" company="aliasvault">
+// <copyright file="SharedManifestEncryptionPublicKey.cs" company="aliasvault">
// Copyright (c) aliasvault. All rights reserved.
// Licensed under the AGPLv3 license. See LICENSE.md file in the project root for full license information.
// </copyright>
@@ -8,14 +8,14 @@
namespace AliasVault.Shared.Models.WebApi.V2.Vault;
/// <summary>
-/// The public half of a shared folder's email keypair, published so the SMTP service can encrypt mail
-/// for the folder's aliases. The private half never leaves the folder's manifest.
+/// The public half of a shared manifest's email keypair, published so the SMTP service can encrypt mail
+/// for the manifest's aliases. The private half never leaves the manifest.
/// </summary>
-public class SharedFolderEncryptionPublicKey
+public class SharedManifestEncryptionPublicKey
{
- /// <summary>Gets or sets the shared-folder manifest this key belongs to.</summary>
+ /// <summary>Gets or sets the shared manifest this key belongs to.</summary>
public required Guid ManifestId { get; set; }
- /// <summary>Gets or sets the public key to publish as the folder's active delivery key.</summary>
+ /// <summary>Gets or sets the public key to publish as the manifest's active delivery key.</summary>
public required string PublicKey { get; set; }
}
diff --git a/apps/server/Shared/AliasVault.Shared/Models/WebApi/V2/Vault/VaultWriteRequest.cs b/apps/server/Shared/AliasVault.Shared/Models/WebApi/V2/Vault/VaultWriteRequest.cs
index b42ff7112..bd2cf5c81 100644
--- a/apps/server/Shared/AliasVault.Shared/Models/WebApi/V2/Vault/VaultWriteRequest.cs
+++ b/apps/server/Shared/AliasVault.Shared/Models/WebApi/V2/Vault/VaultWriteRequest.cs
@@ -33,9 +33,9 @@ public class VaultWriteRequest
public string? UserEncryptionPublicKey { get; set; }
/// <summary>
- /// Gets or sets the shared folders' public encryption keys.
+ /// Gets or sets the shared manifests' public encryption keys.
/// </summary>
- public List<SharedFolderEncryptionPublicKey> SharedFolderEncryptionPublicKeys { get; set; } = [];
+ public List<SharedManifestEncryptionPublicKey> SharedManifestEncryptionPublicKeys { get; set; } = [];
/// <summary>
/// Gets or sets the encrypted Account Key and KEK derivation parameters for the given unlock method.
diff --git a/core/rust/src/lib.rs b/core/rust/src/lib.rs
index c7a0c2d9b..0d3f76e93 100644
--- a/core/rust/src/lib.rs
+++ b/core/rust/src/lib.rs
@@ -35,7 +35,7 @@ pub use vault_codec::{
extract_bucket, generate_user_salt, unpack_payload, materialize_as_sqlite, pack_payload,
validate_manifest, validate_data_bucket, BlobEntry,
CanonicalizeInput, CanonicalizedVault, CodecRecord, CodecTableData, DataBucket, Manifest,
- MaterializeInput, MaterializedTables, SharedFolderSpec, SharedVault, ValidationResult,
+ MaterializeInput, MaterializedTables, SharedManifestSpec, SharedVault, ValidationResult,
};
pub use vault_pruner::{
prune_vault, PruneInput, PruneOutput, PruneStats,
diff --git a/core/rust/src/vault_codec/canonicalize.rs b/core/rust/src/vault_codec/canonicalize.rs
index 6dae50fe2..bf0a533d8 100644
--- a/core/rust/src/vault_codec/canonicalize.rs
+++ b/core/rust/src/vault_codec/canonicalize.rs
@@ -63,8 +63,8 @@ pub fn canonicalize_from_sqlite(input: CanonicalizeInput) -> VaultResult<Canonic
*/
let all_logos: Vec<CodecRecord> = all_tables.get("Logos").cloned().unwrap_or_default();
- // Split each shared folder's subtree into its own partition; `all_tables` keeps the root's rows.
- let shared_partitions = partition_for_sharing(&mut all_tables, &input.shared_folders, &all_logos, &input.root_manifest_id)?;
+ // Split each shared manifest's subtree into its own partition; `all_tables` keeps the root's rows.
+ let shared_partitions = partition_for_sharing(&mut all_tables, &input.shared_manifests, &all_logos, &input.root_manifest_id)?;
reconcile_logo_references(&mut all_tables, &input.root_manifest_id, &all_logos);
normalize_logo_scope(&mut all_tables, &input.root_manifest_id);
@@ -119,14 +119,14 @@ pub fn canonicalize_from_sqlite(input: CanonicalizeInput) -> VaultResult<Canonic
})
.collect();
shared_vaults.push(SharedVault {
- folder_id: partition.folder_id.clone(),
+ anchor_folder_id: partition.anchor_folder_id.clone(),
manifest: Manifest {
schema_version: SCHEMA_VERSION,
migration_id: input.migration_id.clone(),
user_salt: partition.user_salt,
canonicalized_at: input.canonicalized_at.clone(),
manifest_id: partition.manifest_id,
- shared_folder_id: Some(partition.folder_id),
+ anchor_folder_id: Some(partition.anchor_folder_id),
tables: shared_tables,
extra: HashMap::new(),
},
@@ -140,7 +140,7 @@ pub fn canonicalize_from_sqlite(input: CanonicalizeInput) -> VaultResult<Canonic
user_salt: input.user_salt,
canonicalized_at: input.canonicalized_at,
manifest_id: input.root_manifest_id,
- shared_folder_id: None,
+ anchor_folder_id: None,
tables: manifest_tables,
extra: HashMap::new(),
};
diff --git a/core/rust/src/vault_codec/manifest.rs b/core/rust/src/vault_codec/manifest.rs
index a54a67ce7..615f9e293 100644
--- a/core/rust/src/vault_codec/manifest.rs
+++ b/core/rust/src/vault_codec/manifest.rs
@@ -16,7 +16,7 @@ pub struct Manifest {
pub schema_version: u32,
/// Latest EF migration ID.
pub migration_id: String,
- /// Per-manifest salt for blob hashing (hex). For a shared-folder manifest this salt is shared by
+ /// Per-manifest salt for blob hashing (hex). For a shared manifest this salt is shared by
/// every participant (it lives inside the encrypted manifest itself) so all of them compute the
/// same content-addressed blob hashes.
pub user_salt: String,
@@ -24,8 +24,10 @@ pub struct Manifest {
pub canonicalized_at: String,
/// The server-side id of the manifest this snapshot belongs to.
pub manifest_id: String,
+ /// The folder this shared manifest is anchored at (the root of the subtree it carries), or `None`
+ /// for the root manifest.
#[serde(default, skip_serializing_if = "Option::is_none")]
- pub shared_folder_id: Option<String>,
+ pub anchor_folder_id: Option<String>,
/// Tables mapped to arrays of row objects. Blob columns replaced with `{ "__blobRef", "__blobKind" }`.
pub tables: HashMap<String, Vec<CodecRecord>>,
/// Forward-compat: unknown top-level keys preserved on round-trip.
@@ -75,29 +77,29 @@ pub struct BlobEntry {
pub bytes_base64: String,
}
-/// Identifies one shared folder for the canonicalize split: the manifest it becomes, the folder
+/// Identifies one shared manifest for the canonicalize split: the manifest id, the anchor folder
/// whose subtree is written into it, and the per-manifest salt used for that manifest's blob hashing.
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
-pub struct SharedFolderSpec {
+pub struct SharedManifestSpec {
pub manifest_id: String,
- pub folder_id: String,
+ pub anchor_folder_id: String,
pub user_salt: String,
}
-/// One shared-folder manifest produced by the canonicalize split: the folder it represents, the
+/// One shared manifest produced by the canonicalize split: the anchor folder it represents, the
/// manifest carrying its subtree, and the blob map hashed with that manifest's own salt.
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct SharedVault {
- pub folder_id: String,
+ pub anchor_folder_id: String,
pub manifest: Manifest,
/// hash > blob plaintext (base64), hashed with this manifest's salt.
pub blobs: HashMap<String, BlobEntry>,
}
/// Result of canonicalizing a vault: the root manifest, its data buckets (one per category, e.g.
-/// Settings), the root content-addressed blob map, and one [`SharedVault`] per requested shared folder.
+/// Settings), the root content-addressed blob map, and one [`SharedVault`] per requested shared manifest.
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct CanonicalizedVault {
@@ -105,7 +107,7 @@ pub struct CanonicalizedVault {
pub data_buckets: Vec<DataBucket>,
/// hash > blob plaintext (base64).
pub blobs: HashMap<String, BlobEntry>,
- /// One entry per [`CanonicalizeInput::shared_folders`] spec, in spec order.
+ /// One entry per [`CanonicalizeInput::shared_manifests`] spec, in spec order.
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub shared_vaults: Vec<SharedVault>,
}
@@ -193,7 +195,7 @@ pub struct CanonicalizeInput {
#[serde(default)]
pub root_manifest_id: String,
#[serde(default)]
- pub shared_folders: Vec<SharedFolderSpec>,
+ pub shared_manifests: Vec<SharedManifestSpec>,
}
/// Input for [`crate::vault_codec::materialize_as_sqlite`].
diff --git a/core/rust/src/vault_codec/materialize.rs b/core/rust/src/vault_codec/materialize.rs
index 700336afa..3f6511623 100644
--- a/core/rust/src/vault_codec/materialize.rs
+++ b/core/rust/src/vault_codec/materialize.rs
@@ -93,7 +93,7 @@ fn manifest_bookkeeping_records(root: &Manifest, shared: &[Manifest]) -> Vec<Cod
let mut row: CodecRecord = HashMap::new();
row.insert("Id".to_string(), json!(id));
row.insert("IsRoot".to_string(), json!(if is_root { 1 } else { 0 }));
- row.insert("AnchorFolderId".to_string(), manifest.shared_folder_id.as_deref().map(|f| json!(f)).unwrap_or(serde_json::Value::Null));
+ row.insert("AnchorFolderId".to_string(), manifest.anchor_folder_id.as_deref().map(|f| json!(f)).unwrap_or(serde_json::Value::Null));
records.push(row);
};
push(root, true);
diff --git a/core/rust/src/vault_codec/mod.rs b/core/rust/src/vault_codec/mod.rs
index d93b76041..6de85a742 100644
--- a/core/rust/src/vault_codec/mod.rs
+++ b/core/rust/src/vault_codec/mod.rs
@@ -26,7 +26,7 @@ use crate::error::{VaultError, VaultResult};
pub use hash::{canonical_json, content_hash};
pub use manifest::{
BlobEntry, BucketLayoutEntry, CanonicalizeInput, CanonicalizedVault, CodecOverflow, DataBucket,
- Manifest, MaterializeInput, MaterializedTables, CodecRecord, CodecTableData, SharedFolderSpec, SharedVault,
+ Manifest, MaterializeInput, MaterializedTables, CodecRecord, CodecTableData, SharedManifestSpec, SharedVault,
};
pub use scoped_assets::{KIND_BUILTIN as LOGO_KIND_BUILTIN, KIND_CUSTOM as LOGO_KIND_CUSTOM, KIND_FAVICON as LOGO_KIND_FAVICON};
pub use sharing::{active_encryption_key, extract_encryption_key_for_public_key};
diff --git a/core/rust/src/vault_codec/scoped_assets.rs b/core/rust/src/vault_codec/scoped_assets.rs
index 8fa4f43a2..881e708aa 100644
--- a/core/rust/src/vault_codec/scoped_assets.rs
+++ b/core/rust/src/vault_codec/scoped_assets.rs
@@ -8,7 +8,7 @@
//!
//! A logo is scoped to the manifest that owns it:
//! - `ManifestId` is the owning manifest's id: the root manifest's id for personal logos, the
-//! shared manifest's id inside a shared folder (no NULL convention);
+//! owning shared manifest's id for logos living in a shared manifest (no NULL convention);
//! - `Id` is derived from `(manifest id, Kind, Source)` (see [`logo_id_for`]), so every writer
//! independently mints the same id for the same logo in the same manifest, the uniqueness
//! invariant is self-enforcing rather than repaired after the fact.
@@ -53,7 +53,7 @@ const FAVICON_ID_NAMESPACE: &str = "aliasvault:logo:v1";
/// spaces (a domain, a catalog key, a content hash) can never collide.
///
/// Deriving the id from the row's natural key is what removes cross-writer identity conflicts: two
-/// devices (or two members of one shared folder) that fetch the same domain, or upload the very same
+/// devices (or two members of one shared manifest) that fetch the same domain, or upload the very same
/// image, produce the same row, which then merges by ordinary LWW.
///
/// `manifest_id` is the owning manifest's id — the root manifest's own id for personal logos (every
diff --git a/core/rust/src/vault_codec/tests.rs b/core/rust/src/vault_codec/tests.rs
index dde7c02aa..275c5791a 100644
--- a/core/rust/src/vault_codec/tests.rs
+++ b/core/rust/src/vault_codec/tests.rs
@@ -32,7 +32,7 @@ fn basic_input(tables: Vec<CodecTableData>) -> CanonicalizeInput {
migration_id: "20250101000000_Init".to_string(),
canonicalized_at: "2026-01-01T00:00:00.000Z".to_string(),
root_manifest_id: ROOT_MANIFEST.to_string(),
- shared_folders: Vec::new(),
+ shared_manifests: Vec::new(),
}
}
@@ -615,7 +615,7 @@ fn content_fingerprint_matches_serialized_manifest_roundtrip() {
user_salt: "00ff".into(),
canonicalized_at: "2026-01-01T00:00:00.000Z".into(),
manifest_id: "m-fp".into(),
- shared_folder_id: None,
+ anchor_folder_id: None,
tables: std::collections::HashMap::from([(String::from("Items"), vec![])]),
extra: std::collections::HashMap::new(),
};
diff --git a/core/rust/src/vault_codec/types.rs b/core/rust/src/vault_codec/types.rs
index 027877b41..7aa1bbd93 100644
--- a/core/rust/src/vault_codec/types.rs
+++ b/core/rust/src/vault_codec/types.rs
@@ -30,7 +30,7 @@ pub static BUCKET_TABLES: &[(&str, &str)] = &[
("Settings", "Settings"),
];
-/// Tables that belong exclusively to the user's own (root) vault, never to a shared-folder manifest.
+/// Tables that belong exclusively to the user's own (root) vault, never to a shared manifest.
/// Canonicalize never routes these into a shared partition and will refuse to materialize if they
/// are found in a shared manifest anyway. Empty today (bucketed tables are implicitly personal, see
/// [`is_personal_table`]); kept as the declaration point for future personal-only tables.
@@ -98,7 +98,7 @@ pub fn tables_for_category(category: &str) -> Vec<&'static str> {
BUCKET_TABLES.iter().filter(|(_, c)| *c == category).map(|(t, _)| *t).collect()
}
-/// True when a table is personal-only (see [`PERSONAL_TABLES`]): never part of a shared-folder manifest.
+/// True when a table is personal-only (see [`PERSONAL_TABLES`]): never part of a shared manifest.
pub fn is_personal_table(table_name: &str) -> bool {
PERSONAL_TABLES.contains(&table_name) || bucket_category_for(table_name).is_some()
}
diff --git a/core/rust/src/vault_codec/validate.rs b/core/rust/src/vault_codec/validate.rs
index 051b3dc97..a462b22b1 100644
--- a/core/rust/src/vault_codec/validate.rs
+++ b/core/rust/src/vault_codec/validate.rs
@@ -56,9 +56,9 @@ pub fn validate_manifest(manifest: &Manifest) -> ValidationResult {
};
}
- // A shared-folder manifest is readable by other users: it must never carry personal tables
+ // A shared manifest is readable by other users: it must never carry personal tables
// (key material, bucketed settings). See `types::is_personal_table`.
- if manifest.shared_folder_id.is_some() {
+ if manifest.anchor_folder_id.is_some() {
for name in manifest.tables.keys() {
if super::types::is_personal_table(name) && !manifest.tables[name].is_empty() {
failed.push("shared-manifest-carries-personal-table".to_string());
diff --git a/core/rust/src/vault_merge/mod.rs b/core/rust/src/vault_merge/mod.rs
index 562e0f854..bfec2b5e4 100644
--- a/core/rust/src/vault_merge/mod.rs
+++ b/core/rust/src/vault_merge/mod.rs
@@ -524,7 +524,7 @@ mod tests {
#[test]
fn logos_merge_by_id_so_same_domain_in_two_scopes_survives() {
- // A personal logo and a shared-folder logo for the same domain are different rows by design
+ // A personal logo and a shared manifest's logo for the same domain are different rows by design
// (see vault_codec::logos). Merging Logos by Id keeps both.
let mut personal = logo(&crate::vault_codec::logo_id_for_source("m-root", "github.com"), "github.com", "2024-01-01T00:00:00Z");
personal.insert("ManifestId".to_string(), serde_json::json!("m-root"));