Class AuditorViews
java.lang.Object
zeroecho.pki.server.AuditorViews
Explicit certificate/request/status projection boundary for auditor data views.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordFull binary content projection; byte content is never redacted in place.static final recordFull non-PII metadata projection.static final recordExplicit PII-enabled projection, separately authorized from content.static final recordRedacted metadata projection containing indicators rather than PII.static final recordSafe source metadata from which authorized projections are produced. -
Constructor Summary
ConstructorsConstructorDescriptionAuditorViews(Clock clock, AuditSink auditSink) Creates an auditor-view boundary using an injected clock and audit sink. -
Method Summary
Modifier and TypeMethodDescriptionfullContent(AuditorViews.Source source, boolean metadataFullAuthorized, boolean contentAuthorized) Returns full binary content only with separate content permission.fullMetadata(AuditorViews.Source source, boolean authorized) Returns full non-PII metadata after explicit authorization by the caller.pii(AuditorViews.Source source, SecurityPrincipal principal, String reasonReference, boolean metadataFullAuthorized, boolean piiAuthorized) Returns PII only with explicit reason-bound authorization and records access safely.redacted(AuditorViews.Source source) Returns a standard redacted view with no full subject, SAN, or DER.
-
Constructor Details
-
AuditorViews
-
-
Method Details
-
redacted
Returns a standard redacted view with no full subject, SAN, or DER.- Parameters:
source- validated source projection- Returns:
- redacted non-PII projection
-
fullMetadata
Returns full non-PII metadata after explicit authorization by the caller.- Parameters:
source- validated source projectionauthorized- 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 projectionmetadataFullAuthorized- whether full metadata access is authorizedcontentAuthorized- 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 projectionprincipal- authenticated audit principalreasonReference- bounded audit reason referencemetadataFullAuthorized- whether full metadata access is authorizedpiiAuthorized- whether PII access is separately authorized- Returns:
- authorized PII projection
-