Record Class FsPkiStoreOptions

java.lang.Object
java.lang.Record
zeroecho.pki.impl.fs.FsPkiStoreOptions
Record Components:
caHistoryPolicy - history policy for CA records
profileHistoryPolicy - history policy for certificate profiles
revocationHistoryPolicy - history policy for revocation records
workflowHistoryPolicy - history policy for workflow continuation state
strictSnapshotExport - whether snapshot export is strict (fail-closed)
signingOperationHorizon - maximum stable signing identifier and record retention horizon
signingIdPermittedSkew - permitted future signing identifier clock skew
signingMaximumGroupSize - maximum number of newly committed signing WAL requests per durability group, from 1 through 32
signingResidentIndexBudgetBytes - maximum conservatively accounted resident bytes shared by the signing indexes; must be positive
signingCompactionTransientBudgetBytes - maximum conservatively accounted resident bytes available only to detached compaction work; must be positive
initialCrlNumber - initial number for a newly created CRL scope counter, from zero through 2^159 - 1; defaults to one
signingEvidenceAudit - whether optional best-effort signing/proof evidence is appended; defaults to false
credentialSearch - optional explicitly budgeted embedded credential search

public record FsPkiStoreOptions(FsHistoryPolicy caHistoryPolicy, FsHistoryPolicy profileHistoryPolicy, FsHistoryPolicy revocationHistoryPolicy, FsHistoryPolicy workflowHistoryPolicy, boolean strictSnapshotExport, Duration signingOperationHorizon, Duration signingIdPermittedSkew, int signingMaximumGroupSize, long signingResidentIndexBudgetBytes, long signingCompactionTransientBudgetBytes, BigInteger initialCrlNumber, boolean signingEvidenceAudit, Optional<FsPkiStoreOptions.CredentialSearch> credentialSearch) extends Record
Options for FilesystemPkiStore.

This options container configures the filesystem store behavior while keeping the PkiStore SPI stable. All options have deterministic semantics and should be suitable for tests and for reference deployments.

History tracking

Some records are mutable and are therefore stored as current.bin with optional historical snapshots under history/. The individual history policies allow tuning the retention behavior without changing the store contract.

  • Constructor Details

    • FsPkiStoreOptions

      public FsPkiStoreOptions(FsHistoryPolicy caHistoryPolicy, FsHistoryPolicy profileHistoryPolicy, FsHistoryPolicy revocationHistoryPolicy, FsHistoryPolicy workflowHistoryPolicy, boolean strictSnapshotExport, Duration signingOperationHorizon, Duration signingIdPermittedSkew, int signingMaximumGroupSize, long signingResidentIndexBudgetBytes, long signingCompactionTransientBudgetBytes, BigInteger initialCrlNumber, boolean signingEvidenceAudit)
      Creates existing filesystem options with credential search disabled.
      Parameters:
      caHistoryPolicy - CA history policy
      profileHistoryPolicy - profile history policy
      revocationHistoryPolicy - revocation history policy
      workflowHistoryPolicy - workflow history policy
      strictSnapshotExport - strict snapshot validation
      signingOperationHorizon - signing retention horizon
      signingIdPermittedSkew - allowed signing identifier clock skew
      signingMaximumGroupSize - signing durability-group bound
      signingResidentIndexBudgetBytes - signing resident-memory budget
      signingCompactionTransientBudgetBytes - signing transient-memory budget
      initialCrlNumber - initial CRL number
      signingEvidenceAudit - whether signing evidence is enabled
    • FsPkiStoreOptions

      public FsPkiStoreOptions(FsHistoryPolicy caHistoryPolicy, FsHistoryPolicy profileHistoryPolicy, FsHistoryPolicy revocationHistoryPolicy, FsHistoryPolicy workflowHistoryPolicy, boolean strictSnapshotExport, Duration signingOperationHorizon, Duration signingIdPermittedSkew, int signingMaximumGroupSize, long signingResidentIndexBudgetBytes, long signingCompactionTransientBudgetBytes, BigInteger initialCrlNumber, boolean signingEvidenceAudit, Optional<FsPkiStoreOptions.CredentialSearch> credentialSearch)
      Canonical constructor with validation.
      Throws:
      NullPointerException - if a required object value is null
      IllegalArgumentException - if a duration, signing group size, or resident-index budget or initial CRL number is outside its supported range
  • Method Details

    • defaults

      public static FsPkiStoreOptions defaults()
      Returns default options (history enabled with 90 days retention).

      The default is suitable for a reference deployment and for integration tests, but production systems may tune retention windows and cleanup strategies based on operational requirements.

      Returns:
      default options
    • withSigningMaximumGroupSize

      public FsPkiStoreOptions withSigningMaximumGroupSize(int maximumGroupSize)
      Returns a copy using the supplied maximum signing durability-group size.

      The setting constrains only groups written after the store is opened. Existing valid groups remain readable up to the persistent format limit of 32 requests.

      Parameters:
      maximumGroupSize - maximum requests per newly committed group, from 1 through 32
      Returns:
      an immutable copy with the supplied group size
      Throws:
      IllegalArgumentException - if maximumGroupSize is outside the supported range
    • withSigningResidentIndexBudgetBytes

      public FsPkiStoreOptions withSigningResidentIndexBudgetBytes(long maximumBytes)
      Returns a copy using the supplied shared resident signing-index budget.

      The budget is conservative accounting used to reject an index update before it can exceed the configured resident-memory envelope. It applies equally when creating a store and rebuilding its indexes during open.

      Parameters:
      maximumBytes - maximum conservatively accounted resident bytes; must be positive
      Returns:
      an immutable copy with the supplied resident-index budget
      Throws:
      IllegalArgumentException - if maximumBytes is not positive
    • withSigningCompactionTransientBudgetBytes

      public FsPkiStoreOptions withSigningCompactionTransientBudgetBytes(long maximumBytes)
      Returns a copy using the supplied detached-compaction resident budget.
      Parameters:
      maximumBytes - maximum conservatively accounted transient bytes; must be positive and must form a representable combined envelope with the steady resident-index budget
      Returns:
      an immutable copy with the supplied transient budget
      Throws:
      IllegalArgumentException - if the budget is invalid
    • withInitialCrlNumber

      public FsPkiStoreOptions withInitialCrlNumber(BigInteger number)
      Returns an immutable copy with the initial number for new CRL scope counters. This setting does not reset an existing counter.
      Parameters:
      number - initial issued number, from zero through 2^159 - 1
      Returns:
      an immutable copy preserving all other options
      Throws:
      NullPointerException - if number is null
      IllegalArgumentException - if number is outside the issued range
    • withSigningEvidenceAudit

      public FsPkiStoreOptions withSigningEvidenceAudit(boolean enabled)
      Returns a copy enabling or disabling best-effort terminal signing and internal-proof evidence. Enabled evidence costs a separate metadata commit per new entry. Missing entries are recoverable only while their authoritative workflow remains retained; this option does not delay retirement or purge and creates no delivery worker.
      Parameters:
      enabled - whether the optional signing evidence feed is maintained
      Returns:
      an immutable copy preserving every other option
    • withCredentialSearch

      public FsPkiStoreOptions withCredentialSearch(Optional<FsPkiStoreOptions.CredentialSearch> configuration)
      Returns a copy with explicitly selected credential-search resources.
      Parameters:
      configuration - explicit search settings; empty disables the index
      Returns:
      immutable options preserving all other settings
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • caHistoryPolicy

      public FsHistoryPolicy caHistoryPolicy()
      Returns the value of the caHistoryPolicy record component.
      Returns:
      the value of the caHistoryPolicy record component
    • profileHistoryPolicy

      public FsHistoryPolicy profileHistoryPolicy()
      Returns the value of the profileHistoryPolicy record component.
      Returns:
      the value of the profileHistoryPolicy record component
    • revocationHistoryPolicy

      public FsHistoryPolicy revocationHistoryPolicy()
      Returns the value of the revocationHistoryPolicy record component.
      Returns:
      the value of the revocationHistoryPolicy record component
    • workflowHistoryPolicy

      public FsHistoryPolicy workflowHistoryPolicy()
      Returns the value of the workflowHistoryPolicy record component.
      Returns:
      the value of the workflowHistoryPolicy record component
    • strictSnapshotExport

      public boolean strictSnapshotExport()
      Returns the value of the strictSnapshotExport record component.
      Returns:
      the value of the strictSnapshotExport record component
    • signingOperationHorizon

      public Duration signingOperationHorizon()
      Returns the value of the signingOperationHorizon record component.
      Returns:
      the value of the signingOperationHorizon record component
    • signingIdPermittedSkew

      public Duration signingIdPermittedSkew()
      Returns the value of the signingIdPermittedSkew record component.
      Returns:
      the value of the signingIdPermittedSkew record component
    • signingMaximumGroupSize

      public int signingMaximumGroupSize()
      Returns the value of the signingMaximumGroupSize record component.
      Returns:
      the value of the signingMaximumGroupSize record component
    • signingResidentIndexBudgetBytes

      public long signingResidentIndexBudgetBytes()
      Returns the value of the signingResidentIndexBudgetBytes record component.
      Returns:
      the value of the signingResidentIndexBudgetBytes record component
    • signingCompactionTransientBudgetBytes

      public long signingCompactionTransientBudgetBytes()
      Returns the value of the signingCompactionTransientBudgetBytes record component.
      Returns:
      the value of the signingCompactionTransientBudgetBytes record component
    • initialCrlNumber

      public BigInteger initialCrlNumber()
      Returns the value of the initialCrlNumber record component.
      Returns:
      the value of the initialCrlNumber record component
    • signingEvidenceAudit

      public boolean signingEvidenceAudit()
      Returns the value of the signingEvidenceAudit record component.
      Returns:
      the value of the signingEvidenceAudit record component
    • credentialSearch

      public Optional<FsPkiStoreOptions.CredentialSearch> credentialSearch()
      Returns the value of the credentialSearch record component.
      Returns:
      the value of the credentialSearch record component