Class RepositoryAliasService
java.lang.Object
zeroecho.pki.server.RepositoryAliasService
Durable non-authoritative repository alias administration.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordImmutable finite alias metadata; no content bytes or filesystem paths.static enumDurable alias state; removal never deletes its immutable target.static enumClosed stable repository alias types. -
Constructor Summary
ConstructorsConstructorDescriptionRepositoryAliasService(RealmId realmId, ServerControlStore store, PkiRepository repository, DisclosureService disclosure, Clock clock, AuditSink auditSink) Creates a repository alias authority over one realm control store. -
Method Summary
Modifier and TypeMethodDescriptionstatic StringidFor(RealmId realmId, PkiId authorityId, RepositoryAliasService.Type type) Returns the deterministic alias ID for one realm, authority, and type.list(int offset, int limit) Returns a bounded alias page.remove(PkiId authorityId, RepositoryAliasService.Type type, String expectedCommitment, String actorPrincipalId) Atomically removes an alias without deleting its target.require(PkiId authorityId, RepositoryAliasService.Type type) Returns an exact alias, including a durable removed record.setCurrentChain(PkiId authorityId, PkiId issuerId, PkiId pathId, Optional<String> expected, String actorPrincipalId) Atomically publishes one exact current public chain path.setCurrentCrl(PkiId authorityId, PkiId statusObjectId, Optional<String> expected, String actorPrincipalId) Atomically publishes a validated current-CRL alias.setCurrentDeltaCrl(PkiId authorityId, PkiId statusObjectId, Optional<String> expected, String actorPrincipalId) Atomically publishes a validated current-delta-CRL alias.
-
Constructor Details
-
RepositoryAliasService
public RepositoryAliasService(RealmId realmId, ServerControlStore store, PkiRepository repository, DisclosureService disclosure, Clock clock, AuditSink auditSink) Creates a repository alias authority over one realm control store.- Parameters:
realmId- owning security realmstore- durable server-control storerepository- authoritative PKI repositorydisclosure- effective disclosure-policy serviceclock- authoritative server clockauditSink- required safe audit sink
-
-
Method Details
-
require
Returns an exact alias, including a durable removed record.- Parameters:
authorityId- exact logical authority identifiertype- repository alias type- Returns:
- exact durable alias including removed state
-
list
Returns a bounded alias page.- Parameters:
offset- zero-based page offsetlimit- positive page-size limit- Returns:
- bounded alias page
-
setCurrentCrl
public RepositoryAliasService.Record setCurrentCrl(PkiId authorityId, PkiId statusObjectId, Optional<String> expected, String actorPrincipalId) Atomically publishes a validated current-CRL alias.- Parameters:
authorityId- exact logical authority identifierstatusObjectId- exact immutable status-object identifierexpected- optional expected current alias commitmentactorPrincipalId- authenticated audit actor- Returns:
- durably active current-CRL alias
-
setCurrentDeltaCrl
public RepositoryAliasService.Record setCurrentDeltaCrl(PkiId authorityId, PkiId statusObjectId, Optional<String> expected, String actorPrincipalId) Atomically publishes a validated current-delta-CRL alias.- Parameters:
authorityId- exact logical authority identifierstatusObjectId- exact immutable status-object identifierexpected- optional expected current alias commitmentactorPrincipalId- authenticated audit actor- Returns:
- durably active current-delta-CRL alias
-
setCurrentChain
public RepositoryAliasService.Record setCurrentChain(PkiId authorityId, PkiId issuerId, PkiId pathId, Optional<String> expected, String actorPrincipalId) Atomically publishes one exact current public chain path.- Parameters:
authorityId- exact logical authority identifierissuerId- exact issuer generationpathId- exact issuer chain pathexpected- optional expected current alias commitmentactorPrincipalId- authenticated audit actor- Returns:
- durably active current-chain alias
-
remove
public RepositoryAliasService.Record remove(PkiId authorityId, RepositoryAliasService.Type type, String expectedCommitment, String actorPrincipalId) Atomically removes an alias without deleting its target.- Parameters:
authorityId- exact logical authority identifiertype- repository alias typeexpectedCommitment- required current alias commitmentactorPrincipalId- authenticated audit actor- Returns:
- durably removed alias record
-
idFor
Returns the deterministic alias ID for one realm, authority, and type.- Parameters:
realmId- owning security realmauthorityId- exact logical authority identifiertype- repository alias type- Returns:
- deterministic alias identifier
-