pub struct PasswordOwnerSetupAuthorization {
pub format_version: u32,
pub action: u32,
pub account_uuid: Vec<u8>,
pub owner_state_hash: Vec<u8>,
pub expected_revision: u64,
pub setup_sha256: Vec<u8>,
pub client_operation_id: String,
pub expires_at: Option<Timestamp>,
}Expand description
Owner authorization for changing the password envelope. The owner signs SHA-256(“heddle-password-owner-setup-change-v1” || u32be(format_version) || u32be(action) || account_uuid[16] || owner_state_hash[32] || u64be(expected_revision) || setup_sha256[32] || u32be(client_operation_id UTF-8 byte length) || client_operation_id || i64be(expires_at Unix seconds)). expires_at has zero nanos and is future, with a bounded lifetime of at most 10 minutes from issuance. setup_sha256 is SHA-256 of the fixed-order v1 setup fields (the envelope’s fields in tag order, followed by auth_salt, verifier key, auth costs, auth_kdf_id and format_version; the possession signature is excluded), with byte fields raw and integers big-endian. DELETE uses 32 zero bytes. The current active account UUID, owner public key and owner ID MUST equal the setup envelope fields. Both actions CAS the account-lifetime revision. A successful PUT or DELETE atomically increments it and invalidates every outstanding password challenge and continuation. DELETE retains a tombstone revision; re-setup CASes against that value. Revision 0 is allowed only when no password setup has ever existed for this account; no revision is reused.
Fields§
§format_version: u32Exactly 1; reject unknown versions.
action: u32Exactly 1=PUT or 2=DELETE.
account_uuid: Vec<u8>Exactly 16 bytes, non-nil.
owner_state_hash: Vec<u8>Exactly 32 bytes, current accepted state.
expected_revision: u640 only if no setup ever existed; CAS thereafter.
setup_sha256: Vec<u8>Exactly 32 bytes; zero for DELETE.
client_operation_id: String1..128 UTF-8 bytes.
expires_at: Option<Timestamp>Required; covered by signature.
Trait Implementations§
Source§impl Clone for PasswordOwnerSetupAuthorization
impl Clone for PasswordOwnerSetupAuthorization
Source§fn clone(&self) -> PasswordOwnerSetupAuthorization
fn clone(&self) -> PasswordOwnerSetupAuthorization
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Default for PasswordOwnerSetupAuthorization
impl Default for PasswordOwnerSetupAuthorization
Source§fn default() -> PasswordOwnerSetupAuthorization
fn default() -> PasswordOwnerSetupAuthorization
impl Eq for PasswordOwnerSetupAuthorization
Source§impl Message for PasswordOwnerSetupAuthorization
impl Message for PasswordOwnerSetupAuthorization
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.impl StructuralPartialEq for PasswordOwnerSetupAuthorization
Auto Trait Implementations§
impl Freeze for PasswordOwnerSetupAuthorization
impl RefUnwindSafe for PasswordOwnerSetupAuthorization
impl Send for PasswordOwnerSetupAuthorization
impl Sync for PasswordOwnerSetupAuthorization
impl Unpin for PasswordOwnerSetupAuthorization
impl UnsafeUnpin for PasswordOwnerSetupAuthorization
impl UnwindSafe for PasswordOwnerSetupAuthorization
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more