Class AcmeControlStore

java.lang.Object
zeroecho.pki.server.acme.AcmeControlStore

public final class AcmeControlStore extends Object
Typed ACME record facade over the realm's sole transactional control authority.
  • Constructor Details

    • AcmeControlStore

      public AcmeControlStore(ServerControlStore control)
      Binds ACME state to the lifecycle-owned realm control store.
      Parameters:
      control - lifecycle-owned realm control store
  • Method Details

    • create

      public <T> T create(T unsealed)
      Creates one record after canonical sealing.
      Type Parameters:
      T - ACME record type
      Parameters:
      unsealed - validated unsealed domain record
      Returns:
      canonically sealed and durably created record
    • createOrderGraph

      public AcmeControlStore.Graph createOrderGraph(AcmeState.Order order, List<AcmeState.Authorization> authorizations, List<AcmeState.Challenge> challenges)
      Atomically creates an order and its complete authorization/challenge graph.
      Parameters:
      order - unsealed order record
      authorizations - complete unsealed authorization set
      challenges - complete unsealed challenge set
      Returns:
      atomically committed sealed order graph
    • replace

      public List<Object> replace(List<AcmeControlStore.Replacement> replacements)
      Atomically compare-and-replaces a finite related record set.
      Parameters:
      replacements - finite compare-and-set replacements
      Returns:
      durably replaced records in request order
    • transition

      public AcmeControlStore.Transition transition(List<AcmeControlStore.Replacement> replacements, List<?> creations)
      Atomically creates immutable records and replaces their related owners.
      Parameters:
      replacements - finite compare-and-set replacements
      creations - finite related records to create
      Returns:
      atomically committed transition result
    • requireCompatibleEnrollmentProfile

      public void requireCompatibleEnrollmentProfile(EnrollmentProfile replacement)
      Rejects a policy replacement that would strand an active directory. Callers retain the control monitor through the subsequent policy mutation. Suspended policies remain compatible and can be administratively reactivated.
      Parameters:
      replacement - candidate enrollment policy
    • get

      public <T> Optional<T> get(Class<T> type, String recordId)
      Reads one exact typed record and cross-checks its identity.
      Type Parameters:
      T - ACME record type
      Parameters:
      type - exact ACME record class
      recordId - stable record identifier
      Returns:
      validated record or empty when absent
    • decodeAccount

      Validates an account from a stable startup snapshot without a second lookup.
      Parameters:
      record - exact account namespace record
      Returns:
      strictly decoded account
    • accountHistoryCharge

      public long accountHistoryCharge(AcmeState.Account account)
      Measures exclusion-history retention, including its bounded account identity and framing, and verifies that the complete account fits the control-record cap.
      Parameters:
      account - validated account awaiting persistence
      Returns:
      bytes charged to the shared enrollment retention budget
    • page

      public <T> ServerControlStore.Page<T> page(Class<T> type, int offset, int limit)
      Returns one bounded typed page without aggregating the namespace.
      Type Parameters:
      T - ACME record type
      Parameters:
      type - exact ACME record class
      offset - zero-based page offset
      limit - positive page-size limit
      Returns:
      bounded validated record page
    • validateAndRecover

      public void validateAndRecover(Clock clock)
      Strictly decodes, cross-checks, expires, and safely recovers every ACME control record without re-running validation or issuance.
      Parameters:
      clock - authoritative recovery clock