pub struct RootCertV1 {Show 13 fields
pub schema: String,
pub serial: String,
pub issuer_key_id: String,
pub subject: String,
pub hive_origin: String,
pub root_ed25519_pub: String,
pub org_ids: Vec<String>,
pub plans: Vec<RootCertPlanV1>,
pub max_seats: u32,
pub issued_at: UtcTimestamp,
pub not_before: UtcTimestamp,
pub not_after: UtcTimestamp,
pub signature: String,
}Expand description
GET /v1/root-cert.
Fields§
§schema: String§serial: String§issuer_key_id: Stringkey:ed25519- + first 32 hex of sha256(vendor key); diagnostics
only, verifiers try every compiled vendor root.
subject: StringDisplay name, 1–200 characters on one line.
hive_origin: Stringhttps://host[:port] the certificate is for.
root_ed25519_pub: StringThe self-host root that signs the key set, 32 bytes base64.
org_ids: Vec<String>Lease org_ids this root may sign for (1–16).
plans: Vec<RootCertPlanV1>Sorted, non-empty; caps lease.plan in the runtime.
max_seats: u32Caps lease.seats_limit in the runtime.
issued_at: UtcTimestamp§not_before: UtcTimestamp§not_after: UtcTimestamp§signature: StringEd25519 by a vendor root, base64.
Implementations§
Source§impl RootCertV1
impl RootCertV1
pub fn validate(&self) -> Result<(), ValidationError>
Sourcepub fn signing_input_raw(raw: &Value) -> Result<Vec<u8>, ValidationError>
pub fn signing_input_raw(raw: &Value) -> Result<Vec<u8>, ValidationError>
Signing input of a certificate as received.
Sourcepub fn valid_at(
&self,
now: DateTime<FixedOffset>,
) -> Result<bool, ValidationError>
pub fn valid_at( &self, now: DateTime<FixedOffset>, ) -> Result<bool, ValidationError>
Whether now is inside the validity window (15 min skew, no grace).
Sourcepub fn covers_org(&self, org_id: &str) -> bool
pub fn covers_org(&self, org_id: &str) -> bool
Whether a lease of org_id may be signed by the certified root.
Trait Implementations§
Source§impl Clone for RootCertV1
impl Clone for RootCertV1
Source§impl Debug for RootCertV1
impl Debug for RootCertV1
Source§impl<'de> Deserialize<'de> for RootCertV1
impl<'de> Deserialize<'de> for RootCertV1
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>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for RootCertV1
Source§impl PartialEq for RootCertV1
impl PartialEq for RootCertV1
Source§impl Serialize for RootCertV1
impl Serialize for RootCertV1
impl StructuralPartialEq for RootCertV1
Auto Trait Implementations§
impl Forget for RootCertV1
impl Freeze for RootCertV1
impl Move for RootCertV1
impl RefUnwindSafe for RootCertV1
impl Send for RootCertV1
impl Sync for RootCertV1
impl Unpin for RootCertV1
impl UnsafeUnpin for RootCertV1
impl UnwindSafe for RootCertV1
Blanket Implementations§
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
Mutably borrows from an owned value. Read more