pub(crate) struct EntraIntegration {
http: Client,
verify_probe: bool,
login_base: String,
graph_base: String,
verify_max_wait: Duration,
verify_poll_interval: Duration,
}Expand description
Microsoft Entra ID integration driver. Each operation fetches a fresh token; secrets never live
in self.
Fields§
§http: Client§verify_probe: boolWhether verify tries an ROPC sign-in first. Off by default: MFA or Conditional Access
blocks ROPC in most tenants.
login_base: String§graph_base: String§verify_max_wait: Duration§verify_poll_interval: DurationImplementations§
Source§impl EntraIntegration
impl EntraIntegration
Sourcepub(crate) fn new(verify_probe: bool) -> Self
pub(crate) fn new(verify_probe: bool) -> Self
Build a new EntraIntegration using the production Microsoft endpoints.
Sourcefn token_url(&self, tenant_id: &str) -> Result<Url, IntegrationError>
fn token_url(&self, tenant_id: &str) -> Result<Url, IntegrationError>
Token endpoint URL for tenant_id, built from login_base.
Sourceasync fn graph_token(
&self,
creds: &EntraCredentials<'_>,
) -> Result<String, IntegrationError>
async fn graph_token( &self, creds: &EntraCredentials<'_>, ) -> Result<String, IntegrationError>
Fetch a Graph bearer token by client-credentials grant. The client secret goes only into the form body.
Sourcefn graph_user_url(
&self,
identity: &str,
extra_segments: &[&str],
) -> Result<Url, IntegrationError>
fn graph_user_url( &self, identity: &str, extra_segments: &[&str], ) -> Result<Url, IntegrationError>
Build a Graph user URL with identity as one opaque path segment. push encodes slashes
and percent sequences, so attacker-influenced input cannot inject a path.
Sourceasync fn ropc_probe(
&self,
creds: &EntraCredentials<'_>,
account_identity: &str,
new_password: &str,
) -> ProbeResult
async fn ropc_probe( &self, creds: &EntraCredentials<'_>, account_identity: &str, new_password: &str, ) -> ProbeResult
Attempt an ROPC grant with the new password, which goes only into the form body and is never stored, logged or returned.
Trait Implementations§
Source§impl Debug for EntraIntegration
impl Debug for EntraIntegration
Source§impl Integration for EntraIntegration
impl Integration for EntraIntegration
Source§fn rotate<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 RotateContext,
) -> Pin<Box<dyn Future<Output = Result<(), IntegrationError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn rotate<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 RotateContext,
) -> Pin<Box<dyn Future<Output = Result<(), IntegrationError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Reset the password with PATCH /v1.0/users/{identity} and a passwordProfile body.
429 is NotApplied, 5xx is Unknown, other rejections are permanent.
Source§fn verify<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 RotateContext,
) -> Pin<Box<dyn Future<Output = Result<(), IntegrationError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn verify<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 RotateContext,
) -> Pin<Box<dyn Future<Output = Result<(), IntegrationError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Verify with the optional ROPC probe first (authoritative, immune to replication lag), then
poll up to verify_max_wait for a fresh lastPasswordChangeDateTime. Errors carry
Applied.
Source§fn terminate_sessions<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 RotateContext,
) -> Pin<Box<dyn Future<Output = Result<(), IntegrationError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn terminate_sessions<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 RotateContext,
) -> Pin<Box<dyn Future<Output = Result<(), IntegrationError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Revoke sign-in sessions with POST /v1.0/users/{identity}/revokeSignInSessions. Errors
carry NotApplied, since termination never changes the credential.
Auto Trait Implementations§
impl !RefUnwindSafe for EntraIntegration
impl !UnwindSafe for EntraIntegration
impl Freeze for EntraIntegration
impl Send for EntraIntegration
impl Sync for EntraIntegration
impl Unpin for EntraIntegration
impl UnsafeUnpin for EntraIntegration
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