{"id":18265169,"url":"https://github.com/nasa-ammos/bsl","last_synced_at":"2026-01-22T16:37:19.323Z","repository":{"id":233563934,"uuid":"782077208","full_name":"NASA-AMMOS/BSL","owner":"NASA-AMMOS","description":"Bundle Protocol Security Library (BSL)","archived":false,"fork":false,"pushed_at":"2024-04-04T15:38:29.000Z","size":0,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-02-14T19:54:30.960Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://nasa-ammos.github.io/BSL/","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NASA-AMMOS.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-04-04T15:38:29.000Z","updated_at":"2024-12-19T14:49:52.000Z","dependencies_parsed_at":"2024-04-16T19:16:10.127Z","dependency_job_id":"00500b46-370a-4286-82d8-408f887f68dd","html_url":"https://github.com/NASA-AMMOS/BSL","commit_stats":null,"previous_names":["nasa-ammos/bsl"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NASA-AMMOS%2FBSL","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NASA-AMMOS%2FBSL/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NASA-AMMOS%2FBSL/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NASA-AMMOS%2FBSL/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NASA-AMMOS","download_url":"https://codeload.github.com/NASA-AMMOS/BSL/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247958710,"owners_count":21024821,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-05T11:17:21.410Z","updated_at":"2026-01-22T16:37:19.310Z","avatar_url":"https://github.com/NASA-AMMOS.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!--\nCopyright (c) 2025 The Johns Hopkins University Applied Physics\nLaboratory LLC.\n\nThis file is part of the Bundle Protocol Security Library (BSL).\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n    http://www.apache.org/licenses/LICENSE-2.0\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nThis work was performed for the Jet Propulsion Laboratory, California\nInstitute of Technology, sponsored by the United States Government under\nthe prime contract 80NM0018D0004 between the Caltech and NASA under\nsubcontract 1700763.\n--\u003e\n\n# The NASA AMMOS BPSec Library (BSL)\n\n![example workflow](https://github.com/github/docs/actions/workflows/build-test.yml/badge.svg)\n\nThe BPSec Library (BSL) is an implementation of *Bundle Protocol Security* as specified in [RFC 9172](https://datatracker.ietf.org/doc/rfc9172/) and [RFC 9173](https://datatracker.ietf.org/doc/rfc9173/), with a flexible architecture enabling ready adaptability to flight or ground systems.\n\nThe BSL exposes an interface via C header files (under `src`), and contains an example backend implementing this interface in `src/backend`. The BSL also contains an implementation of the Default Security Context (RFC 9173) under `src/security_context` and a sample policy provider under `src/policy_provider`. Together these form a complete the set of functionality required to execute Bundle Protocol Security.\n\n## Project Organization\n\nThe following are the major parts of this project.\n\n**Note.** The BSL API (both Public and Private) lives at the top level `src` directory.\nExample concrete modules implementations are found in subdirectories of it.\n\n```\nBSL/\n├── build.sh             # Top-level build utility script\n├── cmake/               # Additional CMake files\n├── deps/                # Third-party dependencies\n├── docs/                # Doxygen pages and templates\n├── mock-bpa-test/       # Full BSL test/example using Mock BPA\n├── pkg/                 # Material for building RPMs\n├── resources/           # Additional helper util scripts\n├── src/                 # Source code, top level is header-only API\n├── src/backend          # Implementation of example dynamic backend\n├── src/mock_bpa         # Implementation of example Mock BPA\n├── src/policy_provider  # Implementation of the example policy provider\n├── src/security_context # Implementation of RFC 9173 (Default Sec Context)\n└── test/                # Unit tests\n```\n\n## Development Requirements\n\n_Note!_ BSL uses **Red Hat Enterprise Linux (RHEL 9)** as the target build environment. Ubuntu is frequently used by developers, but not supported as an official target.\n\nThe following should be installable by the system package manager:\n\n_Required: Build and Run Unit Tests_\n * CMake, GCC or Clang, OpenSSL (Development), Ninja Build, Valgrind, Memcheck.\n\n_Optional: To Construct Docs, etc..._\n * Doxygen, Ruby, gcovr (as Python package).\n\n## Building BSL\n\n**Note.** `build.sh` is the BSL general build script, that mostly serves as a wrapper for CMake commands. Most actions to configure, build, and deploy BSL work through this script.\n```\n# To view available subcommands\n./build.sh help\n```\n\nTo clone submodules, build, and run the unit tests:\n\n```\n# Clone dependencies\ngit submodule update --init --recursive\n\n# Build dependencies\n./build.sh deps\n\n# Prepare build environment\n./build.sh prep\n\n# Build the software\n./build.sh\n\n# Run unit tests\n./build.sh check\n```\n\nThis will take about a minute to build and run the unit tests, there should be 100% success.\n\nNote: On earlier versions of CMake (\u003c3.20), `./build.sh check` target may not run correctly.\n\n#### Optional Additional Build Targets\n\nCode Coverage\n```\n./build.sh coverage\n```\n\nThe output HTML can be opened in a browser using:\n```\nxdg-open build/default/coverage-html/index.html\n```\n\nDoxygen Documentation\n```\n./build.sh prep -DBUILD_DOCS_API=ON\n./build.sh docs\n```\n\nThe output HTML can be opened in a browser using:\n```\nxdg-open build/default/docs/api/html/index.html\n```\n\nTo check for misspelling in the Doxygen output use the following, substituting the word/phrase you are looking for in the grep command\n```\nxmlstarlet tr build/default/docs/api/xml/combine.xslt build/default/docs/api/xml/index.xml | xmlstarlet tr docs/api/spellcheck.xsl | cat -n | grep -E 'bsl'\n```\n\n## Testing with the Mock BPA\n\nThe Mock BPA demonstrates how a BPA may interact with the BSL, it is found in `src/mock_bpa`.\n\nDetails of the Mock BPA are found in the Doxygen documentation.\n\n#### Mock BPA System Test\n\nTo execute the Mock BPA tests of the BSL libraries as-built, first prepare a Pythong virtualenv using:\n```\npython3 -m venv venv\nsource venv/bin/activate\npip install -r mock-bpa-test/requirements.txt\n```\n\nThen execute the test suite using:\n```\npython3 -m pytest mock-bpa-test --log-cli-level=info\n```\n\n### Running with Wireshark and Local Sockets\n\n```\nwireshark -i lo -f 'port 4556 or port 24556' -k\n```\n\nStart the mock BPA with local sockets:\n```\n./build.sh\n./build.sh install\n./build.sh run bsl-mock-bpa -u localhost:4556 -r localhost:14556 -o localhost:24556 -a localhost:34556\n```\n\nSend a trial bundle from the underlayer, which is taken from Appendix A.1.4 of RFC 9173.\n```\necho 9f88070000820282010282028202018202820201820018281a000f4240850b0200005856810101018202820201828201078203008181820158403bdc69b3a34a2b5d3a8554368bd1e808f606219d2a10a846eae3886ae4ecc83c4ee550fdfb1cc636b904e2f1a73e303dcd4b6ccece003e95e8164dcc89a156e185010100005823526561647920746f2067656e657261746520612033322d62797465207061796c6f6164ff | xxd -r -p | socat stdio udp-sendto:localhost:4556,pf=ip6,sourceport=14556 | xxd -p\n```\nAlternatively for the overlayer app socket use `socat stdio unix-sendto:/tmp/foo.sock` instead.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnasa-ammos%2Fbsl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnasa-ammos%2Fbsl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnasa-ammos%2Fbsl/lists"}