struct Attempt<'a> {
job: &'a VerifiedJob,
ctx: &'a ExecutionContext,
api: &'a AccessConnectorClient,
attempt_id: Uuid,
execute_by: Instant,
}Expand description
One attempt’s inputs, shared by its steps.
Fields§
§job: &'a VerifiedJob§ctx: &'a ExecutionContext§api: &'a AccessConnectorClient§attempt_id: Uuid§execute_by: InstantImplementations§
Source§impl Attempt<'_>
impl Attempt<'_>
Sourcepub(super) async fn pre_flight(&self) -> Result<(), Halt>
pub(super) async fn pre_flight(&self) -> Result<(), Halt>
Pre-flight cipher check, before the target is touched, so an unrotatable cipher (wrong organization or type, restricted, undecryptable) fails as target_unchanged.
Sourcepub(super) async fn write_cipher(
&self,
new_password: &str,
) -> Result<CipherWritten, Halt>
pub(super) async fn write_cipher( &self, new_password: &str, ) -> Result<CipherWritten, Halt>
Fetches the cipher and writes the new password. Not bounded by execute_by; the session’s bearer refresh handles token expiry.
Source§impl Attempt<'_>
impl Attempt<'_>
Sourceasync fn run(&self) -> Result<(), Halt>
async fn run(&self) -> Result<(), Halt>
The attempt pipeline; each step returns a Halt to stop it.
Sourceasync fn check_session_live(&self) -> Result<(), Halt>
async fn check_session_live(&self) -> Result<(), Halt>
Fails the attempt up front when the session is terminal.
Sourcefn generate_password(&self) -> Result<String, Halt>
fn generate_password(&self) -> Result<String, Halt>
Generates the new password from the claim’s policy.
Sourceasync fn run_target_step(
&self,
integration: &dyn Integration,
rotate_ctx: &RotateContext,
step: TargetStep,
) -> GatedOutcome<(), IntegrationError, AbortReason>
async fn run_target_step( &self, integration: &dyn Integration, rotate_ctx: &RotateContext, step: TargetStep, ) -> GatedOutcome<(), IntegrationError, AbortReason>
Runs one gated target-side step with retries.
Sourceasync fn run_required_step(
&self,
integration: &dyn Integration,
rotate_ctx: &RotateContext,
step: TargetStep,
) -> Result<(), Halt>
async fn run_required_step( &self, integration: &dyn Integration, rotate_ctx: &RotateContext, step: TargetStep, ) -> Result<(), Halt>
Runs a step whose failure fails the attempt, reporting the step’s sync state.
Sourceasync fn terminate_sessions(
&self,
integration: &dyn Integration,
rotate_ctx: &RotateContext,
) -> Result<SessionTerminationOutcome, Halt>
async fn terminate_sessions( &self, integration: &dyn Integration, rotate_ctx: &RotateContext, ) -> Result<SessionTerminationOutcome, Halt>
Ends the account’s sessions when the claim asks for it. Termination never fails the rotation, but a lost session blocks the report.
Sourceasync fn report_success(
&self,
termination: SessionTerminationOutcome,
_verified: Verified,
_cipher_written: CipherWritten,
) -> Result<(), AbortReason>
async fn report_success( &self, termination: SessionTerminationOutcome, _verified: Verified, _cipher_written: CipherWritten, ) -> Result<(), AbortReason>
Reports a successful rotation. The proof tokens make skipping verify or the cipher write a compile error.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for Attempt<'a>
impl<'a> !UnwindSafe for Attempt<'a>
impl<'a> Freeze for Attempt<'a>
impl<'a> Send for Attempt<'a>
impl<'a> Sync for Attempt<'a>
impl<'a> Unpin for Attempt<'a>
impl<'a> UnsafeUnpin for Attempt<'a>
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
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
§impl<T> CompatExt for T
impl<T> CompatExt for T
§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
§fn new_handle(value: Arc<T>) -> Handle
fn new_handle(value: Arc<T>) -> Handle
§unsafe fn clone_handle(handle: Handle) -> Handle
unsafe fn clone_handle(handle: Handle) -> Handle
§unsafe fn consume_handle(handle: Handle) -> Arc<T> ⓘ
unsafe fn consume_handle(handle: Handle) -> Arc<T> ⓘ
Arc<> Read more§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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