Struct SolidSyslogSecurityPolicy¶
ClassList > SolidSyslogSecurityPolicy
#include <SolidSyslogSecurityPolicyDefinition.h>
struct SolidSyslogSecurityPolicy
{
uint16_t TrailerSize;
bool (*SealRecord)(struct SolidSyslogSecurityPolicy* base, const struct SolidSyslogSecurityRecord* record);
enum SolidSyslogSecurityPolicyOpenResult (*OpenRecord)(
struct SolidSyslogSecurityPolicy* base,
const struct SolidSyslogSecurityRecord* record
);
};
Detailed Description¶
The at-rest integrity/confidentiality contract the block store applies to every record: SealRecord on the way in (before the record is stored), OpenRecord on replay-read (before the record is handed back).
A record round-trips through exactly one policy; the two calls must agree on the trailer layout.
Reference implementations span the protection scale: the Null policy is a pass-through that adds no trailer and never rejects (no integrity, no confidentiality); Crc16 is an unkeyed checksum catching accidental corruption; the HmacSha256 and AesGcm policies are keyed and fetch their key on demand from an integrator callback, so an unavailable key fails a seal (nothing is stored) and leaves an open unable to run.
A keyed policy reports why it could not run - its key, or its crypto backend - once per run of such faults, seal and open together, and is re-armed by the next seal or open that reaches a verdict.
Public Attributes Documentation¶
OpenRecord¶
Verify record against its trailer (and, for an AEAD policy, decrypt the body in place).
enum SolidSyslogSecurityPolicyOpenResult(* SolidSyslogSecurityPolicy::OpenRecord) (struct SolidSyslogSecurityPolicy *base, const struct SolidSyslogSecurityRecord *record);
On REJECTED the store steps past the record and reports the loss, so a policy need not report the verdict itself. On COULD_NOT_RUN the store keeps the record where it is and tries it again on the next Service pass; the records behind it wait with it.
SealRecord¶
Authenticate (and, for an AEAD policy, encrypt in place) record and write its trailer.
bool(* SolidSyslogSecurityPolicy::SealRecord) (struct SolidSyslogSecurityPolicy *base, const struct SolidSyslogSecurityRecord *record);
Return value:
falsethe seal could not be produced (e.g. key unavailable); the store drops the record rather than storing it unprotected.
TrailerSize¶
Bytes SealRecord appends per record; the store reserves this and treats it as opaque.
Zero for the Null policy. At most SOLIDSYSLOG_MAX_INTEGRITY_SIZE.
The documentation for this class was generated from the following file Core/Interface/SolidSyslogSecurityPolicyDefinition.h