namespace DodoSSH.Domain;
/// Lifecycle state of a user account.
public enum UserStatus
{
/// Not a legal value.
Unspecified = 0,
/// Normal, active account.
Active = 1,
/// Sign-in blocked, data retained.
Suspended = 2,
/// Offboarded. Grants revoked; audit history retained.
Deprovisioned = 3,
}
///
/// Which key the user's secret bundle is wrapped under.
///
///
/// Every kind wraps the same bundle, which is what makes a passphrase change a
/// single-row update instead of a re-encryption of the whole vault. See docs/crypto.md ยง3.
///
public enum UserKeyWrapKind
{
/// Not a legal value.
Unspecified = 0,
/// Wrapped under a key derived from the vault passphrase.
Passphrase = 1,
/// Sealed to one enrolled device's public key.
Device = 2,
/// Wrapped under a key derived from the printable recovery code.
Recovery = 3,
/// Sealed to a team break-glass key. Opt-in; M5.
Escrow = 4,
}
/// Operating system family of an enrolled device, for display only.
public enum DevicePlatform
{
/// Unknown or unreported.
Unspecified = 0,
/// Windows.
Windows = 1,
/// macOS.
MacOs = 2,
/// Linux.
Linux = 3,
}
/// A member's role within a team.
public enum TeamRole
{
/// Not a legal value.
Unspecified = 0,
/// Read-only.
Viewer = 10,
/// Ordinary member.
Member = 20,
/// May manage members and create vaults.
Admin = 30,
/// Sole owner. Transferable.
Owner = 40,
}
/// State of a team membership.
public enum MembershipStatus
{
/// Not a legal value.
Unspecified = 0,
/// Invited but not yet accepted.
Invited = 1,
/// Active member.
Active = 2,
/// Revoked. Retained so audit history stays resolvable.
Revoked = 3,
}
/// Whether a vault belongs to one user or to a team.
public enum VaultOwnerKind
{
/// Not a legal value.
Unspecified = 0,
/// Owned by a single user.
Personal = 1,
/// Owned by a team.
Team = 2,
}
/// Why a vault key grant exists.
///
/// Present from the first migration on purpose. Recovery is not a feature that can be bolted on
/// later: the schema has to allow a vault key to be wrapped to something other than a member
/// from the outset, or every existing vault becomes unrecoverable by design.
///
public enum GrantKind
{
/// Not a legal value.
Unspecified = 0,
/// Wrapped to a member's identity key.
Member = 1,
/// Wrapped to a recovery key held by the vault owner.
Recovery = 2,
/// Wrapped to a team break-glass key. Opt-in; M5.
Escrow = 3,
}
/// State of a vault key grant.
public enum GrantState
{
/// Not a legal value.
Unspecified = 0,
/// Usable.
Active = 1,
///
/// The recipient's identity key changed or the vault was rekeyed, so this grant must be
/// re-wrapped by a member holding Share before the recipient can read the vault again.
///
AwaitingRewrap = 2,
///
/// Revoked. Blocks future reads only; anything already downloaded is already gone. See
/// ADR 0001.
///
Revoked = 3,
}
/// Why a vault needs rekeying.
public enum RekeyReason
{
/// No rekey pending.
None = 0,
/// A member was removed.
MemberRemoved = 1,
/// A member's identity key was rotated.
KeyRotated = 2,
/// An operator or member requested it.
Requested = 3,
}