pub struct ConnectionRecord {
pub connection_id: String,
pub provider: ConnectionProvider,
pub subject: Option<String>,
pub scopes: BTreeSet<String>,
pub status: ConnectionStatus,
pub health: ConnectionHealth,
pub created_at: DateTime<Utc>,
pub updated_at: DateTime<Utc>,
}Expand description
The connection: a named, tenant-scoped record binding a provider
account (and optionally a user subject) to its consent scope set and
lifecycle state. The credential bytes are not here — they live in
the SealedCredential half of StoredConnection, so the record
is safe to journal, list, and serve whole.
Fields§
§connection_id: StringThe stable id, minted at registration (conn-{32 hex}). Stable
across rotation beneath it: credential rotation changes nothing a
run pinned, because the pin names this governed relationship, not
the secret of the moment.
provider: ConnectionProviderThe provider kind.
subject: Option<String>The per-user binding — a user id within the tenant. Absent for service-level (shared) connections.
scopes: BTreeSet<String>The consent scope set, in provider semantics (repo,
https://…/auth/drive.readonly): recorded when the human (or the
service enrollment) consents. This is the ceiling — handle
issuance may only narrow against it, and there is no code path
that widens a handle past it.
status: ConnectionStatusThe lifecycle status.
health: ConnectionHealthRefresh and failure bookkeeping.
created_at: DateTime<Utc>When the connection was registered.
updated_at: DateTime<Utc>When the record last changed (consent, refresh, revocation).
Implementations§
Trait Implementations§
Source§impl Clone for ConnectionRecord
impl Clone for ConnectionRecord
Source§fn clone(&self) -> ConnectionRecord
fn clone(&self) -> ConnectionRecord
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more