pub struct At9pRenewalConfig {
pub check_interval_secs: Option<u64>,
pub valid_for_secs: Option<i64>,
pub roster_export: Option<PathBuf>,
}Expand description
In-daemon at9p service-identity renewal ([registry.at9p_renewal]).
The renewal timer reuses the boot provisioner’s mint core against the
daemon’s LIVE store/ingest handles: same DIDs forever, epoch+1
successors, same on-volume key, no-op inside the half-TTL window. The
deployment credential/UCAN is checked exactly once per process start —
never per tick — so a running daemon renews for its process lifetime;
restarts still gate on the deployment credential (unchanged).
Fields§
§check_interval_secs: Option<u64>Check interval in seconds (default 6 h, the JWT key-rotation check
cadence). Every tick renews due identities AND re-exports the roster
projection, so roster_stale in host-side monitoring means the loop
died, not merely that nothing was due.
valid_for_secs: Option<i64>TTL stamped onto minted successors, seconds. Defaults to 24 h —
defensively inside the 86,400-second roster-lifetime bound that
host-side native-config/monitor tooling still enforces, so an
unset key can never mint a successor the deployed guard classifies
as invalid_roster. A longer TTL (up to
MAX_SERVICE_IDENTITY_TTL_SECS, validated against the same range
as the CLI clamp) is an explicit opt-in that must be paired with the
host-side guard widening in the same rollout.
Deployments provisioning identities with a longer boot-time
--valid-for-seconds MUST set this key to match: the timer mints
successors with the CONFIG TTL, so an unset key against 90-day
boot-minted identities would contract the next renewal window to
24 h (still renewed, never expired — but the long margin is lost).
roster_export: Option<PathBuf>Roster.json re-export path. None derives
<data_dir>/config/native-network/roster.json — the projection the
host-side renewal monitor reads. The boot-time
--roster-export roster.candidate.json flow is unaffected: this path
is the promoted projection, refreshed every tick.
Implementations§
Source§impl At9pRenewalConfig
impl At9pRenewalConfig
Sourcepub fn check_interval(&self) -> Duration
pub fn check_interval(&self) -> Duration
Resolved check interval (default 6 h), floor-clamped to 60 s so a misconfigured near-zero interval cannot spin the loop.
Sourcepub fn valid_for_seconds(&self) -> Result<i64>
pub fn valid_for_seconds(&self) -> Result<i64>
Resolved renewal TTL, validated against the provisioner’s clamp range. Defaults to 24 h (see the field docs for the defensive rationale).
Sourcepub fn validated(&self) -> Result<(Duration, i64)>
pub fn validated(&self) -> Result<(Duration, i64)>
Cross-validated (check interval, renewal TTL) pair: the check interval
must stay strictly below half the TTL AND below the host-side roster
freshness window (24 h). Liveness argument: an identity minted at T
with TTL V becomes due at T + V/2; ticks fire every i, so the first
due tick lands by T + V/2 + i with remaining life V/2 - i — positive
only while i < V/2. At i ≥ V/2 a schedule exists where the head
expires before any due tick, and an expired accepted head can never be
renewed (admission requires a fresh predecessor). The roster freshness
bound: the projection’s generated_at refreshes only on a tick, and
host-side monitoring flags roster_stale once it ages past 24 h, so
an interval of a day or more would report a healthy loop as stale —
breaking the documented “stale roster means the timer died” signal.
Refuses at registry startup rather than renewing too slowly to matter.
Trait Implementations§
Source§impl Clone for At9pRenewalConfig
impl Clone for At9pRenewalConfig
Source§fn clone(&self) -> At9pRenewalConfig
fn clone(&self) -> At9pRenewalConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for At9pRenewalConfig
impl Debug for At9pRenewalConfig
Source§impl Default for At9pRenewalConfig
impl Default for At9pRenewalConfig
Source§fn default() -> At9pRenewalConfig
fn default() -> At9pRenewalConfig
Source§impl<'de> Deserialize<'de> for At9pRenewalConfig
impl<'de> Deserialize<'de> for At9pRenewalConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for At9pRenewalConfig
impl RefUnwindSafe for At9pRenewalConfig
impl Send for At9pRenewalConfig
impl Sync for At9pRenewalConfig
impl Unpin for At9pRenewalConfig
impl UnsafeUnpin for At9pRenewalConfig
impl UnwindSafe for At9pRenewalConfig
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request