Class DefaultCredentialConfirmationService
- All Implemented Interfaces:
CredentialConfirmationService
Proof issuance takes O(D + K) CPU time. Pending proof verification takes O(D + T + R + V(K)) CPU time, where D is certificate DER length bounded to 1 MiB, T is canonical proof-transcript length bounded to 2 KiB, R is response length bounded by the exact suite descriptor, and V(K) is the provider's algorithm-dependent verification cost for key K. Verification additionally performs a constant count of O(log M) metadata point operations and one best-effort audit I/O operation. Peak auxiliary memory is bounded but has parser-dependent constants and object graphs; it includes the DER, canonical re-encoding, parsed certificate, extracted key, temporary public-key encodings, and bounded proof objects. Exact terminal replay performs only bounded point-store work and does not invoke a proof provider.
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultCredentialConfirmationService(PkiStore store, Runnable lifecycleGuard, Map<String, KeyPossessionProofProvider> proofProviders, Optional<CredentialConfirmationProofRuntimePolicy> proofPolicy, SecureRandom secureRandom, Optional<AuditSink> auditSink, Clock clock) Creates a facade over one session-owned store. -
Method Summary
Modifier and TypeMethodDescriptionReturns one authoritative lifecycle when initialized.initialize(CredentialConfirmationInitialization initialization) Initializes or exactly replays one frozen confirmation lifecycle.Issues or exactly replays one authoritative key-possession proof challenge.pagePendingReviews(PkiId authorityId, Optional<String> profileId, Instant cutoffInclusive, Optional<CredentialConfirmationReviewCursor> afterExclusive, int limit) Returns one bounded snapshot-consistent page of reduced pending reviews.Resolves one bounded key-possession response against its exact confirmation lifecycle.
-
Constructor Details
-
DefaultCredentialConfirmationService
public DefaultCredentialConfirmationService(PkiStore store, Runnable lifecycleGuard, Map<String, KeyPossessionProofProvider> proofProviders, Optional<CredentialConfirmationProofRuntimePolicy> proofPolicy, SecureRandom secureRandom, Optional<AuditSink> auditSink, Clock clock) Creates a facade over one session-owned store.- Parameters:
store- authoritative store owned by the sessionlifecycleGuard- guard rejecting access outside the session lifecycleproofProviders- immutable suite-ID lookup composed before store useproofPolicy- optional immutable server-controlled challenge policysecureRandom- session-local cryptographically secure nonce sourceauditSink- optional session-owned best-effort audit sinkclock- authoritative session clock used for proof liveness and audit timestamps
-
-
Method Details
-
initialize
public CredentialConfirmationLifecycle initialize(CredentialConfirmationInitialization initialization) Description copied from interface:CredentialConfirmationServiceInitializes or exactly replays one frozen confirmation lifecycle.- Specified by:
initializein interfaceCredentialConfirmationService- Parameters:
initialization- exact immutable initialization inputs- Returns:
- committed initial or identical existing lifecycle
-
get
Description copied from interface:CredentialConfirmationServiceReturns one authoritative lifecycle when initialized.- Specified by:
getin interfaceCredentialConfirmationService- Parameters:
credentialId- exact credential identity- Returns:
- current lifecycle, or empty when not initialized
-
issueProofChallenge
public CredentialConfirmationProofChallenge issueProofChallenge(CredentialConfirmationProofChallengeRequest request) Description copied from interface:CredentialConfirmationServiceIssues or exactly replays one authoritative key-possession proof challenge.The session derives realm, audience, lifetime, proof provider, nonce, and certificate material from trusted runtime and persisted state. Callers supply only the exact pending lifecycle expectation.
- Specified by:
issueProofChallengein interfaceCredentialConfirmationService- Parameters:
request- exact pending lifecycle expectation- Returns:
- bounded public proof challenge correlated to the persisted challenge
-
verifyAndComplete
public CredentialConfirmationProofResult verifyAndComplete(CredentialConfirmationProofSubmission submission) Description copied from interface:CredentialConfirmationServiceResolves one bounded key-possession response against its exact confirmation lifecycle.CredentialConfirmationProofResult.CONFIRMEDmeans the authoritative lifecycle is confirmed. This includes an exact terminal replay, for which the supplied response is not cryptographically reverified.CredentialConfirmationProofResult.REJECTEDmeans only that a bounded proof cryptographically failed verification while the lifecycle was pending; rejection does not mutate the lifecycle. Persistence conflicts, expired or rotated challenges, unavailable providers, and verification failures propagate as exceptions.- Specified by:
verifyAndCompletein interfaceCredentialConfirmationService- Parameters:
submission- exact proof coordinates and bounded suite response- Returns:
- data-free confirmed-lifecycle or pending-proof-rejection classification
-
pagePendingReviews
public CredentialConfirmationReviewPage pagePendingReviews(PkiId authorityId, Optional<String> profileId, Instant cutoffInclusive, Optional<CredentialConfirmationReviewCursor> afterExclusive, int limit) Description copied from interface:CredentialConfirmationServiceReturns one bounded snapshot-consistent page of reduced pending reviews. The query is confined to the exact authority and optional profile before traversal, and the cursor cannot be reused for another scope or cutoff.- Specified by:
pagePendingReviewsin interfaceCredentialConfirmationService- Parameters:
authorityId- mandatory exact issuing-authority scopeprofileId- optional exact profile scopecutoffInclusive- latest review time includedafterExclusive- optional exclusive store-issued cursorlimit- page size from 1 through 4096- Returns:
- immutable review page in canonical order
-