Class ServerOperationGateway

java.lang.Object
zeroecho.pki.server.ServerOperationGateway

public final class ServerOperationGateway extends Object
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.

  • Constructor Details

  • Method Details

    • installAcme

      public void installAcme(AcmeService service)
      Installs the optional configured ACME control capability once before listener readiness.
      Parameters:
      service - realm-owned ACME service
    • installOcsp

      public void installOcsp(OcspResponderService service)
      Installs the realm-owned OCSP administration capability before readiness.
      Parameters:
      service - realm-owned OCSP responder service
    • installAudit

      public void installAudit(AuditService search, AuditIntegrityService integrity)
      Installs the queryable/verifiable audit capability when the configured sink supports it.
      Parameters:
      search - queryable audit service
      integrity - audit-integrity verification service
    • installBackup

      public void installBackup(BackupService backupService)
      Installs the backup capability when the configured store supports it.
      Parameters:
      backupService - backup service backed by the store
    • operationAvailable

      public boolean operationAvailable(String operationId)
      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

      Admits and synchronously executes one operation.
      Parameters:
      request - complete security request
      cancellation - 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 request
      cancellation - request cancellation signal
      channel - 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 principal
      action - exact control action
      resource - exact realm control resource
      context - safe closed-condition context
      correlationId - 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 identity
      correlationId - bounded request correlation identity
      Returns:
      default-deny decision with explicit-deny precedence
    • validateForwardingPrincipal

      public void validateForwardingPrincipal(String principalId)
      Fails startup when a configured proxy service principal has any enabled allowing authority beyond forwarded-identity attestation.
      Parameters:
      principalId - configured trusted proxy principal
    • discoverableOperations

      public List<OperationSecurityDescriptors.Descriptor> discoverableOperations(String principalId)
      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

      public OperationSecurityDescriptors.Descriptor descriptor(String operationId)
      Resolves one descriptor by stable ID before closed typed decoding.
      Parameters:
      operationId - stable operation identifier
      Returns:
      immutable descriptor from the sole gateway authority
    • installEst

      public void installEst(EstService service)
      Installs the EST service so that EST admin operations can reach it.
      Parameters:
      service - service instance installed for subsequent control operations
    • installScep

      public void installScep(ScepService service)
      Installs the SCEP service so that SCEP admin operations can reach it.
      Parameters:
      service - service instance installed for subsequent control operations
    • installCmp

      public void installCmp(CmpService service)
      Installs the CMP service so that CMP admin operations can reach it.
      Parameters:
      service - service instance installed for subsequent control operations
    • installEnrollmentProfiles

      public void installEnrollmentProfiles(EnrollmentProfileService service)
      Installs the enrollment profile service so that enrollment profile admin operations can reach it.
      Parameters:
      service - service instance installed for subsequent control operations
    • installEnrollmentCoordinator

      public void installEnrollmentCoordinator(EnrollmentCoordinator service)
      Installs the validated coordinator before publishing realm readiness.
      Parameters:
      service - validated realm-owned protocol enrollment coordinator