KMP PHP API Reference

FileWormAuditSink
in package
implements WormAuditSinkInterface

Table of Contents

Interfaces

WormAuditSinkInterface

Constants

REDACTED  : mixed = '[redacted]'
SENSITIVE_KEY_PATTERN  : mixed = '/(password|secret|recovery[_-]?code|token|veri...

Properties

$path  : string

Methods

__construct()  : mixed
Constructor.
append()  : void
Append one immutable mirror record for a platform audit event.
canonicalJson()  : string
Encode deterministic JSON for digest calculation.
redact()  : mixed
Redact sensitive fields before mirroring outside the platform database.
isSensitiveKey()  : bool
Detect keys that should never be mirrored in plaintext.
lastMirrorHash()  : string|null
Return the last mirror hash while the file lock is held.
sortKeys()  : mixed
Recursively sort associative-array keys.

Constants

SENSITIVE_KEY_PATTERN

private mixed SENSITIVE_KEY_PATTERN = '/(password|secret|recovery[_-]?code|token|verifier|selector|access[_-]?key' . '|api[_-]?key|connection[_-]?string)/i'

Properties

Methods

__construct()

Constructor.

public __construct(string $path) : mixed
Parameters
$path : string

append()

Append one immutable mirror record for a platform audit event.

public append(array<string|int, mixed> $event) : void
Parameters
$event : array<string|int, mixed>

Persisted platform audit event

Tags
inheritDoc

canonicalJson()

Encode deterministic JSON for digest calculation.

public static canonicalJson(mixed $value) : string
Parameters
$value : mixed

Value to encode

Return values
string

redact()

Redact sensitive fields before mirroring outside the platform database.

public static redact(mixed $value) : mixed
Parameters
$value : mixed

Value to redact

isSensitiveKey()

Detect keys that should never be mirrored in plaintext.

private static isSensitiveKey(string $key) : bool
Parameters
$key : string
Return values
bool

lastMirrorHash()

Return the last mirror hash while the file lock is held.

private lastMirrorHash(resource $handle) : string|null
Parameters
$handle : resource
Return values
string|null

sortKeys()

Recursively sort associative-array keys.

private static sortKeys(mixed $value) : mixed
Parameters
$value : mixed

Value to normalize

On this page

Search results