Skip to main content

bitwarden_pam/leases/
mod.rs

1//! PAM access lease operations.
2//!
3//! An *access lease* is the short-lived, single-use grant that a member holds after an approved
4//! [`AccessRequest`](crate::AccessRequestView) is activated. While the lease is
5//! [`Active`](AccessLeaseStatus::Active) the member may open the cipher the request was for; when
6//! it [`Expired`](AccessLeaseStatus::Expired) or is [`Revoked`](AccessLeaseStatus::Revoked) the
7//! cipher re-locks.
8//!
9//! [`LeasesClient`] is obtained from the [`PamClient`](crate::PamClient) and covers reading the
10//! caller's leases ([`list_active`](LeasesClient::list_active) /
11//! [`list_mine`](LeasesClient::list_mine)), [`extend`](LeasesClient::extend)ing an active lease,
12//! and [`end`](LeasesClient::end)ing one early. Leases are *minted* on the access-request side, by
13//! [`AccessRequestsClient::activate`](crate::AccessRequestsClient::activate).
14
15mod client;
16mod models;
17
18pub use client::LeasesClient;
19pub use models::{
20    AccessLeaseExtensionRequest, AccessLeaseRevokeRequest, AccessLeaseStatus, AccessLeaseView,
21};