Skip to main content

issue_or_load_service_jwt

Function issue_or_load_service_jwt 

Source
pub fn issue_or_load_service_jwt(
    credentials_dir: &Path,
    service_name: &str,
    ca_jwt_key: &SigningKey,
    bootstrap: &BootstrapPubkey,
    local_issuer_url: &str,
    now: i64,
    target_clearance: Option<&SecurityLabel>,
) -> Result<String>
Expand description

Load an existing service JWT from disk, or sign a new one if absent, within RENEW_THRESHOLD seconds of expiry, not binding the local issuer URL in BOTH iss and aud, or carrying a classical (non-PQ-covering) header alg — the last two are backfills that re-mint tokens older bootstraps (or older renewal paths, which stamped iss but not aud) produced in shapes the composite dispatch verification now rejects.

Does NOT write to disk — callers are responsible for persisting the returned JWT via identity_store::write_service_jwt.