Class AcmeControlStore
java.lang.Object
zeroecho.pki.server.acme.AcmeControlStore
Typed ACME record facade over the realm's sole transactional control authority.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordImmutable atomically committed order graph.static final recordOne exact prior-to-next ACME compare-and-set transition.static final recordResults of one atomic ACME graph transition. -
Constructor Summary
ConstructorsConstructorDescriptionAcmeControlStore(ServerControlStore control) Binds ACME state to the lifecycle-owned realm control store. -
Method Summary
Modifier and TypeMethodDescriptionlongaccountHistoryCharge(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.<T> Tcreate(T unsealed) Creates one record after canonical sealing.createOrderGraph(AcmeState.Order order, List<AcmeState.Authorization> authorizations, List<AcmeState.Challenge> challenges) Atomically creates an order and its complete authorization/challenge graph.Validates an account from a stable startup snapshot without a second lookup.<T> Optional<T> Reads one exact typed record and cross-checks its identity.<T> ServerControlStore.Page<T> Returns one bounded typed page without aggregating the namespace.replace(List<AcmeControlStore.Replacement> replacements) Atomically compare-and-replaces a finite related record set.voidrequireCompatibleEnrollmentProfile(EnrollmentProfile replacement) Rejects a policy replacement that would strand an active directory.transition(List<AcmeControlStore.Replacement> replacements, List<?> creations) Atomically creates immutable records and replaces their related owners.voidvalidateAndRecover(Clock clock) Strictly decodes, cross-checks, expires, and safely recovers every ACME control record without re-running validation or issuance.
-
Constructor Details
-
AcmeControlStore
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 recordauthorizations- complete unsealed authorization setchallenges- complete unsealed challenge set- Returns:
- atomically committed sealed order graph
-
replace
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 replacementscreations- finite related records to create- Returns:
- atomically committed transition result
-
requireCompatibleEnrollmentProfile
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
-
decodeAccount
Validates an account from a stable startup snapshot without a second lookup.- Parameters:
record- exact account namespace record- Returns:
- strictly decoded account
-
accountHistoryCharge
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
Returns one bounded typed page without aggregating the namespace.- Type Parameters:
T- ACME record type- Parameters:
type- exact ACME record classoffset- zero-based page offsetlimit- positive page-size limit- Returns:
- bounded validated record page
-
validateAndRecover
Strictly decodes, cross-checks, expires, and safely recovers every ACME control record without re-running validation or issuance.- Parameters:
clock- authoritative recovery clock
-