Class ServerOperationGateway
java.lang.Object
zeroecho.pki.server.ServerOperationGateway
In-process transport-neutral security gateway for existing typed PKI
operations.
The gateway owns no executor, thread, queue, retry, or PKI business rule. It serially validates realm/scope, authorizes, applies approval policy, delegates exactly once to the session executor, and preserves the returned outcome.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceClosed gateway outcome preserving typed backend results.static final recordComplete transport-neutral request admission input.static interfaceExecutes one already-authorized signing operation through semantic admission. -
Constructor Summary
ConstructorsConstructorDescriptionServerOperationGateway(RealmId realmId, AuthorityExposurePolicy exposure, ServerControlStore control, RoleTemplateCatalog roles, AuthorizationEngine authorization, ApprovalService approvals, BreakGlassService breakGlass, DisclosureService disclosure, CredentialPublicationGate credentialPublication, AuditorViews auditorViews, Optional<RepositoryAliasService> repositoryAliases, OperationSecurityDescriptors descriptors, PkiOperationExecutor executor, ServerOperationGateway.SigningExecutor signingExecutor, PkiResourceScopeResolver resourceScopes, Map<OperationSecurityDescriptors.ApprovalCategory, ApprovalService.Policy> approvalPolicies, Function<String, IssuanceApprovalRequirement> issuanceApprovalRequirements, Clock clock, AuditSink auditSink, Runnable openCheck) Creates one gateway whose reconciliation is driven only by periodic polling.ServerOperationGateway(RealmId realmId, AuthorityExposurePolicy exposure, ServerControlStore control, RoleTemplateCatalog roles, AuthorizationEngine authorization, ApprovalService approvals, BreakGlassService breakGlass, DisclosureService disclosure, CredentialPublicationGate credentialPublication, AuditorViews auditorViews, Optional<RepositoryAliasService> repositoryAliases, OperationSecurityDescriptors descriptors, PkiOperationExecutor executor, ServerOperationGateway.SigningExecutor signingExecutor, PkiResourceScopeResolver resourceScopes, Map<OperationSecurityDescriptors.ApprovalCategory, ApprovalService.Policy> approvalPolicies, Function<String, IssuanceApprovalRequirement> issuanceApprovalRequirements, Clock clock, AuditSink auditSink, Runnable reconciliationWake, Runnable openCheck) Creates one gateway bound to one realm and one session executor. -
Method Summary
Modifier and TypeMethodDescriptionauthorizeControl(String principalId, Permission.Action action, Permission.Resource resource, Permission.Context context, String correlationId) Authorizes one non-PKI administrative control resource through the same default-deny engine used for typed operations.authorizeForwardedIdentity(String principalId, String correlationId) Authorizes a dedicated service principal to attest one forwarded client identity.descriptor(String operationId) Resolves one descriptor by stable ID before closed typed decoding.descriptor(PkiOperation operation) Resolves the existing security descriptor for a decoded typed operation.descriptor(AdministrativeOperation operation) Resolves one descriptor by its immutable administrative operation family.discoverableOperations(String principalId) Returns operation descriptors discoverable by one principal without returning grant scopes or protected resource identities.execute(ServerOperationGateway.Request request, CancellationSignal cancellation) Admits and synchronously executes one operation.executeBackupTransfer(ServerOperationGateway.Request request, CancellationSignal cancellation, BackupTransferChannel channel) Executes binary backup I/O through the same authentication, authorization and approval gate as ordinary operations.voidinstallAcme(AcmeService service) Installs the optional configured ACME control capability once before listener readiness.voidinstallAudit(AuditService search, AuditIntegrityService integrity) Installs the queryable/verifiable audit capability when the configured sink supports it.voidinstallBackup(BackupService backupService) Installs the backup capability when the configured store supports it.voidinstallCmp(CmpService service) Installs the CMP service so that CMP admin operations can reach it.voidInstalls the validated coordinator before publishing realm readiness.voidInstalls the enrollment profile service so that enrollment profile admin operations can reach it.voidinstallEst(EstService service) Installs the EST service so that EST admin operations can reach it.voidinstallOcsp(OcspResponderService service) Installs the realm-owned OCSP administration capability before readiness.voidinstallScep(ScepService service) Installs the SCEP service so that SCEP admin operations can reach it.booleanoperationAvailable(String operationId) Reports deployment capability availability independently of caller permission.voidvalidateForwardingPrincipal(String principalId) Fails startup when a configured proxy service principal has any enabled allowing authority beyond forwarded-identity attestation.
-
Constructor Details
-
ServerOperationGateway
public ServerOperationGateway(RealmId realmId, AuthorityExposurePolicy exposure, ServerControlStore control, RoleTemplateCatalog roles, AuthorizationEngine authorization, ApprovalService approvals, BreakGlassService breakGlass, DisclosureService disclosure, CredentialPublicationGate credentialPublication, AuditorViews auditorViews, Optional<RepositoryAliasService> repositoryAliases, OperationSecurityDescriptors descriptors, PkiOperationExecutor executor, ServerOperationGateway.SigningExecutor signingExecutor, PkiResourceScopeResolver resourceScopes, Map<OperationSecurityDescriptors.ApprovalCategory, ApprovalService.Policy> approvalPolicies, Function<String, IssuanceApprovalRequirement> issuanceApprovalRequirements, Clock clock, AuditSink auditSink, Runnable reconciliationWake, Runnable openCheck) Creates one gateway bound to one realm and one session executor.The credential-publication gate must be realm-owned and use the same disclosure service supplied to this constructor.
- Parameters:
realmId- exact realm identityexposure- authority exposure policy for the realmcontrol- durable server-control storeroles- role-template catalogauthorization- authorization engineapprovals- durable approval servicebreakGlass- emergency-access servicedisclosure- durable disclosure servicecredentialPublication- authoritative credential-publication gateauditorViews- audit-view servicerepositoryAliases- optional repository-alias capabilitydescriptors- closed operation-security descriptor catalogexecutor- session-owned PKI operation executorsigningExecutor- semantic signing admission adapterresourceScopes- authoritative PKI resource-scope resolverapprovalPolicies- approval policy by operation categoryissuanceApprovalRequirements- resolves the active certificate profile's issuance approval requirement by profile identifierclock- authoritative realm clockauditSink- safe audit sinkreconciliationWake- signal for newly actionable reconciliation workopenCheck- realm lifecycle guard
-
ServerOperationGateway
public ServerOperationGateway(RealmId realmId, AuthorityExposurePolicy exposure, ServerControlStore control, RoleTemplateCatalog roles, AuthorizationEngine authorization, ApprovalService approvals, BreakGlassService breakGlass, DisclosureService disclosure, CredentialPublicationGate credentialPublication, AuditorViews auditorViews, Optional<RepositoryAliasService> repositoryAliases, OperationSecurityDescriptors descriptors, PkiOperationExecutor executor, ServerOperationGateway.SigningExecutor signingExecutor, PkiResourceScopeResolver resourceScopes, Map<OperationSecurityDescriptors.ApprovalCategory, ApprovalService.Policy> approvalPolicies, Function<String, IssuanceApprovalRequirement> issuanceApprovalRequirements, Clock clock, AuditSink auditSink, Runnable openCheck) Creates one gateway whose reconciliation is driven only by periodic polling.The credential-publication gate must be realm-owned and use the same disclosure service supplied to this constructor.
- Parameters:
realmId- exact realm identityexposure- authority exposure policy for the realmcontrol- durable server-control storeroles- role-template catalogauthorization- authorization engineapprovals- durable approval servicebreakGlass- emergency-access servicedisclosure- durable disclosure servicecredentialPublication- authoritative credential-publication gateauditorViews- audit-view servicerepositoryAliases- optional repository-alias capabilitydescriptors- closed operation-security descriptor catalogexecutor- session-owned PKI operation executorsigningExecutor- semantic signing admission adapterresourceScopes- authoritative PKI resource-scope resolverapprovalPolicies- approval policy by operation categoryissuanceApprovalRequirements- resolves the active certificate profile's issuance approval requirement by profile identifierclock- authoritative realm clockauditSink- safe audit sinkopenCheck- realm lifecycle guard
-
-
Method Details
-
installAcme
Installs the optional configured ACME control capability once before listener readiness.- Parameters:
service- realm-owned ACME service
-
installOcsp
Installs the realm-owned OCSP administration capability before readiness.- Parameters:
service- realm-owned OCSP responder service
-
installAudit
Installs the queryable/verifiable audit capability when the configured sink supports it.- Parameters:
search- queryable audit serviceintegrity- audit-integrity verification service
-
installBackup
Installs the backup capability when the configured store supports it.- Parameters:
backupService- backup service backed by the store
-
operationAvailable
Reports deployment capability availability independently of caller permission.- Parameters:
operationId- catalog operation identity- Returns:
- false when backup transfer storage or the operation's EST, SCEP, or CMP service is not installed
-
execute
public ServerOperationGateway.Outcome execute(ServerOperationGateway.Request request, CancellationSignal cancellation) Admits and synchronously executes one operation.- Parameters:
request- complete security requestcancellation- cooperative cancellation signal passed unchanged to PKI- Returns:
- safe gateway outcome
-
executeBackupTransfer
public ServerOperationGateway.Outcome executeBackupTransfer(ServerOperationGateway.Request request, CancellationSignal cancellation, BackupTransferChannel channel) Executes binary backup I/O through the same authentication, authorization and approval gate as ordinary operations. Streams open only after admission.- Parameters:
request- authenticated operation requestcancellation- request cancellation signalchannel- deadline-bound transport streams- Returns:
- classified authorized result or denial
-
authorizeControl
public AuthorizationEngine.Decision authorizeControl(String principalId, Permission.Action action, Permission.Resource resource, Permission.Context context, String correlationId) Authorizes one non-PKI administrative control resource through the same default-deny engine used for typed operations.- Parameters:
principalId- authenticated persisted principalaction- exact control actionresource- exact realm control resourcecontext- safe closed-condition contextcorrelationId- bounded request correlation identity- Returns:
- safe authorization decision
-
authorizeForwardedIdentity
public AuthorizationEngine.Decision authorizeForwardedIdentity(String principalId, String correlationId) Authorizes a dedicated service principal to attest one forwarded client identity. Break-glass grants are deliberately excluded from this transport trust decision.- Parameters:
principalId- authenticated backend TLS peer identitycorrelationId- bounded request correlation identity- Returns:
- default-deny decision with explicit-deny precedence
-
validateForwardingPrincipal
Fails startup when a configured proxy service principal has any enabled allowing authority beyond forwarded-identity attestation.- Parameters:
principalId- configured trusted proxy principal
-
discoverableOperations
Returns operation descriptors discoverable by one principal without returning grant scopes or protected resource identities.- Parameters:
principalId- authenticated persisted principal- Returns:
- descriptors ordered by stable operation identity
-
descriptor
Resolves the existing security descriptor for a decoded typed operation.- Parameters:
operation- decoded transport-neutral operation- Returns:
- immutable descriptor from the sole gateway descriptor authority
- Throws:
SecurityException- when the operation is not remotely exposed
-
descriptor
Resolves one descriptor by its immutable administrative operation family.- Parameters:
operation- decoded transport-neutral administrative operation- Returns:
- immutable descriptor from the sole gateway authority
-
descriptor
Resolves one descriptor by stable ID before closed typed decoding.- Parameters:
operationId- stable operation identifier- Returns:
- immutable descriptor from the sole gateway authority
-
installEst
Installs the EST service so that EST admin operations can reach it.- Parameters:
service- service instance installed for subsequent control operations
-
installScep
Installs the SCEP service so that SCEP admin operations can reach it.- Parameters:
service- service instance installed for subsequent control operations
-
installCmp
Installs the CMP service so that CMP admin operations can reach it.- Parameters:
service- service instance installed for subsequent control operations
-
installEnrollmentProfiles
Installs the enrollment profile service so that enrollment profile admin operations can reach it.- Parameters:
service- service instance installed for subsequent control operations
-
installEnrollmentCoordinator
Installs the validated coordinator before publishing realm readiness.- Parameters:
service- validated realm-owned protocol enrollment coordinator
-