BSL v1.1.1 - 52.g7dc5be1
AMMOS Bundle Protocol Security Library (BSL)
Loading...
Searching...
No Matches
Example PPs, SCs, and Mock BPA

This page discusses examples of Policy Providers (PPs), Security Contexts (SCs), and a mock BPA used for testing the BSL proper. The BSL proper is associated with the Frontend and Dynamic Backend groups.

Example Policy Providers

The unit tests of the BSL use, where necessary, very minimal implementations of a PP to set up preconditons for test cases.

Bit Field Policy

The Mock BPA uses a PP implementation tailored to meet the needs of the BSL acceptance tests. This PP uses a set of bit fields within an integer program argument to control policy options; the fields are documented on BSLP_PolicyParser_BitstringConfig_t. It also allows multiple integer policy values to be configured in a single running Mock BPA. This PP is registered and used by the Mock BPA for many BSL testing cases.

Sources for this policy provider are internal to the Mock BP Agent group and its library used for unit testing.

ION-Heritage Sample Policy Provider

A more full-featured draft PP maintained as part of the BSL source is based on the JSON-encoded policy structure used in the earlier ION implementation of the Default Security Contexts [8]. This PP parses an ION-Like JSON structure to configure policy rules within a running Mock BPA. See the BSL User Guide [10] for details on specific JSON structure and attributes. This PP is registered and used by the Mock BPA for many BSL testing cases.

Sources related to this provider are associated with the Sample Policy Provider group.

Example Security Contexts

The BSL source contains example implementations of three security contexts which all use the BSL Crypto Library for their cryptographic processing.

These SCs are registered and used by the Mock BPA for BSL testing.

Default Contexts

The two Default Security Contexts defined in RFC 9173 [2] offer minimal, interoperable, and pre-shared-key-focused integrity and confidentiality operations.

Sources related to these example SCs are associated with the Default Security Contexts group.

COSE Context

The COSE Context defined in an internet draft [17] offers more full-featured, layered symmetric key options including key wrapping and key derivation.

Sources related to the COSE SC are associated with the COSE Context group.

BSL Crypto Library

This is a wrapper for the OpenSSL library [13] from the host OS and an API to access a shared key store (part of the BPA Callback APIs).

Mock BPA

The BSL source repository contains a "Mock BPA" application which performs a minimal amount of BPv7 PDU processing and exercises the BSL service interface on those bundles. The Mock BPA uses an un-framed UDPCL-like interface for its underlayer and also its application overlayer for ease of integration with a larger test fixture.

The Mock BPA is limited to a single registered endpoint, and does no other handling normally required by RFC 9171 [4]. So for this reason it is not a true BPA and must not be treated as one.

Upon startup, the Mock BPA registers a single ION-Heritage Sample Policy Provider and all of the Example Security Contexts.

Sources related to the Mock BPA are associated with the Mock BP Agent group.

Policy Management

The policies used by the Mock BPA sample policy providers can be provided with two different methods.

Policy Bit Fields

This policy provider initializes its policy using a set of bit fields within an integer program argument to control policy options; the fields are documented on BSLP_PolicyParser_BitstringConfig_t. The bit fields should be comma-separated, and passed to the Mock BPA with the -p command line option (see Command Line Options).

ION-Like JSON-Encoded Policy

This policy provider initializes its policy using ION-like JSON-encoded structures [8]. The path to the JSON file should be passed to the Mock BPA with the -j command line option (see Command Line Options).

Key Management

The keys used by the example SCs registered in the Mock BPA's key store are obtained from a file using either the JSON Web Key (JWK) Set format of RFC 7517 [11] or the COSE Key Set format of RFC 9052 [15]. This key store is accessed via the BSL Crypto Library APIs for use by the policy providers registered with the Mock BPA.

The implementation to support these SCs only handles symmetric keys and only the minimal header parameters needed for key ID ("kid") and symmetric key material itself ("k").

Command Line Options

The table below contains the Mock BPA executable command line options. See the Mock BPA man page for more details.

Option Description
-h Get command help information and exit.
-o Overlayer local address-and-port to bind to.
-a Overlayer application address-and-port to send to and receive from.
-u Underlayer local address-and-port to bind to.
-r Underlayer router address-and-port to send to and receive from.
-e The endpoint ID of the local application which is registered.
-s The endpoint ID of the local security source used to handle BPSec.
-p The comma-separated bit fields representing policies to initialize Mock BPA with.
-j The path to a ION-Like Policy JSON-encoded policy structure file containing policies to initialize Mock BPA with.
-k The path to a JSON Web Key (JWK) file (named ".json") or COSE Key Set (named ".cbor") containing keys to register with the BPA's key store.