28#ifndef BSLP_SAMPLE_POLICY_PROVIDER_H
29#define BSLP_SAMPLE_POLICY_PROVIDER_H
95 BSL_StaticString_t description;
151#define BSLP_POLICYPREDICATE_ARRAY_CAPACITY (100)
155 BSL_StaticString_t name;
157 size_t predicate_count;
162void BSLP_Deinit(
void *user_data);
Single entry-point include file for all of the BPSec Lib (BSL) frontend API.
BSL_SecBlockType_e
RFC 9172-specified block type codes for BIB and BCB.
BSL_BundleBlockTypeCode_e
Block types using IANA-assigned code points from .
BSL_PolicyAction_e
Codes indicating the fate of a block if a security operation over it fails.
BSL_SecRole_e
Security role of an operation.
BSL_PolicyLocation_e
Indicates where in the lifecycle of the BPA the bundle is querying for security policy.
struct BSLP_PolicyProvider_s BSLP_PolicyProvider_t
Concrete definition of the BSL_PolicyProvider_t.
int BSLP_PolicyRule_EvaluateAsSecOper(const BSLP_PolicyRule_t *self, BSL_SecOper_t *sec_oper, const BSL_BundleRef_t *bundle, BSL_PolicyLocation_e location)
Critical function creating a security operation from a bundle and location.
int BSLP_PolicyRule_Init(BSLP_PolicyRule_t *self, const char *desc, BSLP_PolicyPredicate_t *predicate, uint64_t context_id, BSL_SecRole_e role, BSL_SecBlockType_e sec_block_type, BSL_BundleBlockTypeCode_e target_block_type, BSL_PolicyAction_e failure_action_code)
Initialize this policy rule.
bool BSLP_PolicyPredicate_IsMatch(const BSLP_PolicyPredicate_t *self, BSL_PolicyLocation_e location, BSL_HostEID_t src_eid, BSL_HostEID_t dst_eid)
Returns true if the given predicate matches the arguments.
void BSLP_PolicyRule_AddParam(BSLP_PolicyRule_t *self, const BSL_SecParam_t *param)
Include a BPSec parameter to this rule.
void BSLP_PolicyPredicate_Init(BSLP_PolicyPredicate_t *self, BSL_PolicyLocation_e location, BSL_HostEIDPattern_t src_eid_pattern, BSL_HostEIDPattern_t secsrc_eid_pattern, BSL_HostEIDPattern_t dst_eid_pattern)
Initialize this policy predicate.
int BSLP_QueryPolicy(const void *user_data, BSL_SecurityActionSet_t *output_action_set, const BSL_BundleRef_t *bundle, BSL_PolicyLocation_e location)
Note that criticality is HIGH.
void BSLP_PolicyRule_Deinit(BSLP_PolicyRule_t *self)
De-initialize, release any resources, and zero this struct.
struct BSLP_PolicyRule_s BSLP_PolicyRule_t
Represents a policy rule.
THE key function that matches a bundle against a rule to provide the output action and specific param...
Concrete definition of the BSL_PolicyProvider_t.
Represents a policy rule.
Reference to a Bundle owned and stored in the host BPA.
Reference to a EID pattern owned and stored in the BPA.
Opaque pointer to BPA-specific Endpoint ID storage.
Contains the populated security operations for this bundle.