Skip to content

Latest commit

 

History

11 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ams-gra-sim

A clean-room Python simulation of AMS GRA v14.0 messaging — the OMS (Open Mission Systems) stack the architecture extends: UCI-style XML messages, an Abstract Service Bus (ASB) with JMS semantics, and the OMS Critical Abstraction Layer (CAL) that isolates services from the transport.

Clean-room note. The XSDs under uci/schema/ are written from the message conventions the AMS GRA v14.0 corpus describes (OMS Messages structured by XSD per the UCI Schema Style and Design Specification, OAC-SPC-001; status/compute/fault exchanges named in the MPU and MASI volumes). They are not the USAF schema set, and nothing here reimplements the ActiveMQ wire protocol — the ASB simulator reproduces JMS semantics (topics, retained state, durable subscribers, competing consumers, request/reply, latency) in pure asyncio.

Layout

uci/schema/uci_messages_1_0.xsd   envelope + catalog (ServiceStatus,
                                  ComputeResources, FaultReport,
                                  SoftwareRegistry), ns urn:ams-gra:uci:1.0
uci/schema/cyber_messages_1_0.xsd Cyber role messages + secure-channel
                                  envelopes (our minimal Cyber ICD model),
                                  ns urn:ams-gra:cyber:1.0
uci/schema/data_messages_1_0.xsd  DataStorage request/reply,
                                  ns urn:ams-gra:data:1.0
uci/schema/cu_messages_1_0.xsd    Cryptographic Unit seal/open catalog
                                  (our minimal CU invoke interface; the
                                  CU IDD is not in the corpus),
                                  ns urn:ams-gra:cu:1.0
uci/messages.py                   builders / parser / XSD validation
uci/asb.py                        ASB broker: topics (+ '#' wildcards,
                                  retained last value), queues, latency
uci/cal.py                        CAL: validated publish/subscribe,
                                  request/reply with CorrelationID
uci/abb.py                        ABB data plane: binary frames (status,
                                  streaming samples), pub/sub +
                                  point-to-point, no schema/retention;
                                  optional signed-frame mode (GRA-MS-060)
uci/bridge.py                     GRA-MS-079 bridge: ABB status frames
                                  -> XSD-valid UCI ServiceStatus on ASB
uci/masi.py                       MASI lifecycle: ComputeNode capacity/
                                  allocations, ServiceSpec deploy/start/
                                  stop/shutdown (GRA-MASI-001/002),
                                  crash response with RESTART/RELOCATE
                                  recovery (GRA-MASI-012), status board
                                  (GRA-MASI-015/013), consolidated fault
                                  log (GRA-MASI-006/010/011), live
                                  compute reporting (GRA-MASI-034),
                                  MasLog Logging-Function sink,
                                  service.yml deployment (GRA-MPU-090/031)
uci/sysml.py                      minimal SysML v2 subset parser for the
                                  model (parts/ports/connections/
                                  requirements; counts cross-checked
                                  against the sysmlpy authoring tool)
uci/topology.py                   instantiate the Mission System from
                                  model/ams_gra.sysml: 1 physical ABB
                                  (GRA-MS-001), 1 physical ASB
                                  (GRA-MS-002), DPP[1..*] -> ComputeNodes,
                                  MASI, GRA-MS-079 bridge
uci/cyber.py                      Cyber Agent/Manager/Monitor role
                                  messaging per our minimal Cyber ICD
                                  catalog (GRA-CYAGE-002 / GRA-CYMAN-002 /
                                  GRA-CYMON-002); RootOfTrust key
                                  distribution + sealed/signed
                                  manager<->monitor channel (GRA-CYMAN-009 /
                                  GRA-CYMON-005 / GRA-MS-069 / GRA-MS-071)
uci/crypto.py                     toy RSA (deterministic, simulation
                                  only -- NOT approved cryptography) +
                                  SHA-256 keystream sealing
uci/cu.py                         Cryptographic Unit MPU stub: seal/open
                                  with internal at-rest key +
                                  authentication tags; DataStorage archives
                                  CU-sealed blobs (GRA-MS-068 mechanism)
uci/storage.py                    network-accessible DataStorage MPU:
                                  put/get/list over ASB request/reply
                                  (GRA-MS-003), CU-sealed at rest
uci/sbom.py                       SBOM stub: SPDX-shaped open JSON per
                                  deployment (GRA-MPU-051/092)
uci/compliance.py                 the VCRM as runtime checks: all 72
                                  model requirements evaluated against a
                                  reference mission run -> PASS (with
                                  evidence) / FAIL / NOT DEMONSTRATED
                                  (with the reason)
topology/ams_gra.sysml            checked-in copy of the authoring model
                                  (~/ams-gra-sysml); refresh with
                                  tools/refresh_topology.sh, cross-check
                                  with tools/verify_with_sysmlpy.py
topology/*.service.yml            Service MPU configurations (GRA-MPU-090)
demo/two_node_demo.py             DPP-1 OMS Service + DPP-2 MASI pipeline
demo/abb_bridge_demo.py           two-plane demo: ABB streaming ->
                                  bridge -> MASI on the ASB
demo/masi_lifecycle_demo.py       deploy -> crash -> recover ->
                                  shutdown with live compute reporting
demo/sysml_driven_demo.py         model -> instantiation -> mission ->
                                  72-row VCRM compliance report
tests/                            unittest (129 tests)
uci/tap.py                        wire taps: stream any model interface
                                  live (follow) or dump the transcript;
                                  interfaces anchored to model port defs
tools/watch_interface.py          CLI front end for uci.tap

Run

~/ams-gra-sim/.venv/bin/python -m unittest discover -s tests -t .   # from ~/ams-gra-sim
~/ams-gra-sim/.venv/bin/python demo/two_node_demo.py

Demo transcript: a service publishing status through its CAL, MASI durably consuming it (GRA-MASI-033), a fault injection producing a FaultReport (GRA-MPU-085), and a UCI-format compute-resources request/reply (GRA-MASI-034) — all schema-validated end to end.

Observing an interface at will (wire tap)

Any scenario can show what is streaming on a particular interface of the model — live, or as a post-run transcript — without touching the scenario code. Interfaces are named views over the two buses, each anchored to its port/connection defs in topology/ams_gra.sysml:

.venv/bin/python tools/watch_interface.py --list
.venv/bin/python tools/watch_interface.py --interface cu           # live
.venv/bin/python tools/watch_interface.py --interface abb --no-follow
.venv/bin/python tools/watch_interface.py --interface cu --interface management

Sample output (CU interface): the archive seals, then the tamper story — CuReply Status=DENIED for the unauthorized sender, Status=ERROR for the corrupted sealed blob:

+  0.012s  ASB topic  cu.request   CuRequest Sender=DataStorage Operation=seal ...
+  0.015s  ASB topic  cu.reply     CuReply Status=OK ...
+  0.131s  ASB topic  cu.reply     CuReply Status=DENIED
+  0.137s  ASB topic  cu.reply     CuReply Status=ERROR

Programmatic use (any scenario, not just the reference mission):

from uci.tap import Tap

tap = Tap(["cyber"], follow=True)   # or follow=False for silent recording
tap.attach(inst)
# ... run the scenario ...
tap.detach()
print(tap.dump())                   # transcript + per-interface counts

Taps are read-only bus observers (AsbBroker.add_tap / AbbBus.add_tap): they see every transmission at transmit time — including queue sends that drop for want of takers — never alter delivery, and never see the retained replay a durable join produces (that is broker memory, not streaming traffic). The mel radio links are listed but marked not simulated. The tap is an observability aid only: the compliance report never reads tap state.

Requirements for schema work

  • Python 3.12 + lxml (XSD 1.0 validation) — the project venv (uv venv .venv && uv pip install lxml)
  • xmllint available system-wide for one-off checks

Roadmap

  1. ✅ UCI message layer + ASB + CAL, two-node pipeline demo
  2. ✅ ABB (data plane) simulator + the GRA-MS-079 ABB→ASB health/status bridge (binary frames vs UCI XML; deterministic service UUIDs)
  3. ✅ MASI lifecycle: deployment with resource allocation, supervised services, crash detection + restart/relocation, status board, consolidated fault log, live compute reporting (this commit)
  4. ✅ Topology driven by the SysML model (parts/ports/connections → simulated nodes/buses), all 72 VCRM requirements as runtime compliance checks (zero FAIL)
  5. ✅ VCRM depth: Cyber ICD role-message exchange, network-accessible DataStorage, MASI version registry + Local Function access, SBOM stubs (commit f40f5c6)
  6. ✅ Secure communication: RootOfTrust distributes RSA-encrypted session keys; manager<->monitor traffic sealed + signed; tampered ciphertext rejected; Cryptographic Unit at-rest sealing with unauthorized-request denial + tamper rejection; signed ABB telemetry frames verified by the consumer -- 47 PASS / 25 NOT DEMONSTRATED
  7. Ideas: time distribution (Special Signals are non-message, so a clock stub would not honestly map), CDS stub

Provenance and license

  • Clean-room methodology. Everything here is an independent implementation: semantics were derived from the normative text of the AMS GRA v14.0 architecture volumes; no corpus artifact, vendor schema set, or reference implementation is included or reproduced. The XSDs, the SysML model, and the message catalogs in uci/schema/ are this project's own constructions (see the clean-room note above).
  • Source provenance. The AMS GRA v14.0 corpus is a U.S. Government document furnished with UNLIMITED RIGHTS as defined in DFARS 252.227-7013 ("takes precedence over any restrictive marking"), and carries no restrictive distribution statements. Requirement texts quoted in topology/ams_gra.sysml are from that corpus.
  • License. MIT — see LICENSE.

About

Clean-room asyncio simulation of AMS GRA v14.0 (Open Mission Systems) messaging: UCI-style schema-validated XML, ASB with JMS semantics, CAL, ABB data plane, MASI service lifecycle, SysML-driven topology, VCRM compliance report

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages