Public Access
Merge branch 'claude/vault-key-sync-sharing-d098aa'
This commit is contained in:
@@ -48,6 +48,16 @@ public sealed class CredentialRepository(
|
||||
CancellationToken cancellationToken) =>
|
||||
credentials.UpdateAsync(vaultId, entityId, credential, cancellationToken);
|
||||
|
||||
/// <inheritdoc cref="VaultItemRepository{TSecret}.MoveAsync" />
|
||||
/// <inheritdoc cref="SshKeyRepository.MoveAsync" path="/remarks" />
|
||||
public Task<Guid> MoveAsync(
|
||||
Guid fromVaultId,
|
||||
Guid toVaultId,
|
||||
Guid entityId,
|
||||
CredentialSecret credential,
|
||||
CancellationToken cancellationToken) =>
|
||||
credentials.MoveAsync(fromVaultId, toVaultId, entityId, credential, cancellationToken);
|
||||
|
||||
/// <inheritdoc cref="VaultItemRepository{TSecret}.DeleteAsync" />
|
||||
public Task DeleteAsync(Guid vaultId, Guid entityId, CancellationToken cancellationToken) =>
|
||||
credentials.DeleteAsync(vaultId, entityId, cancellationToken);
|
||||
|
||||
@@ -47,6 +47,29 @@ public sealed class SshKeyRepository(
|
||||
CancellationToken cancellationToken) =>
|
||||
keys.UpdateAsync(vaultId, entityId, key, cancellationToken);
|
||||
|
||||
/// <inheritdoc cref="VaultItemRepository{TSecret}.MoveAsync" />
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// The same two writes a host's move is, and the reason a key needs one at all is what a vault is for:
|
||||
/// a key created in a personal vault before a team existed is the key the team's hosts authenticate
|
||||
/// with, and until this existed the only way to get it across was to paste the private half into a
|
||||
/// second item and delete the first — which is a private key on a clipboard, and two items nobody can
|
||||
/// tell apart afterwards.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <b>It lands with a new id</b>, as everything moved does, so every host and group default naming the
|
||||
/// old one is left pointing at a tombstone. Re-aiming them is the caller's, because only the caller
|
||||
/// knows which of them it is allowed to rewrite — see <c>VaultViewModel.ReAimAtAsync</c>.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
public Task<Guid> MoveAsync(
|
||||
Guid fromVaultId,
|
||||
Guid toVaultId,
|
||||
Guid entityId,
|
||||
SshKeySecret key,
|
||||
CancellationToken cancellationToken) =>
|
||||
keys.MoveAsync(fromVaultId, toVaultId, entityId, key, cancellationToken);
|
||||
|
||||
/// <inheritdoc cref="VaultItemRepository{TSecret}.DeleteAsync" />
|
||||
public Task DeleteAsync(Guid vaultId, Guid entityId, CancellationToken cancellationToken) =>
|
||||
keys.DeleteAsync(vaultId, entityId, cancellationToken);
|
||||
|
||||
Reference in New Issue
Block a user