Class AuditorViews

java.lang.Object
zeroecho.pki.server.AuditorViews

public final class AuditorViews extends Object
Explicit certificate/request/status projection boundary for auditor data views.
  • Constructor Details

    • AuditorViews

      public AuditorViews(Clock clock, AuditSink auditSink)
      Creates an auditor-view boundary using an injected clock and audit sink.
      Parameters:
      clock - authoritative audit clock
      auditSink - required safe audit sink
  • Method Details

    • redacted

      public AuditorViews.Redacted redacted(AuditorViews.Source source)
      Returns a standard redacted view with no full subject, SAN, or DER.
      Parameters:
      source - validated source projection
      Returns:
      redacted non-PII projection
    • fullMetadata

      public AuditorViews.FullMetadata fullMetadata(AuditorViews.Source source, boolean authorized)
      Returns full non-PII metadata after explicit authorization by the caller.
      Parameters:
      source - validated source projection
      authorized - whether full metadata access is authorized
      Returns:
      authorized full metadata
    • fullContent

      public AuditorViews.FullContent fullContent(AuditorViews.Source source, boolean metadataFullAuthorized, boolean contentAuthorized)
      Returns full binary content only with separate content permission.
      Parameters:
      source - validated source projection
      metadataFullAuthorized - whether full metadata access is authorized
      contentAuthorized - whether binary-content access is authorized
      Returns:
      authorized full binary-content projection
    • pii

      public AuditorViews.Pii pii(AuditorViews.Source source, SecurityPrincipal principal, String reasonReference, boolean metadataFullAuthorized, boolean piiAuthorized)
      Returns PII only with explicit reason-bound authorization and records access safely.
      Parameters:
      source - validated source projection
      principal - authenticated audit principal
      reasonReference - bounded audit reason reference
      metadataFullAuthorized - whether full metadata access is authorized
      piiAuthorized - whether PII access is separately authorized
      Returns:
      authorized PII projection