mirror of
https://gitlab.com/d3tn/ud3tn.git
synced 2026-08-13 12:33:27 +02:00
With the addition of the storage agent and the compat. BDM we have the issue that two new agents accept configuration through bundles, which cannot check that those bundles come from trustworthy sources. In the past we restricted contact configuration messages to local clients and performed an "EID spoofing detection" so that we could check the source EID - if it is the same as the local node ID, we allowed the configuration bundle to be processed. With AAPv2 and potentially more security-relevant components (such as BDMs) appearing in the future, we need a new mechanism. The idea behind the implemented mechanism is to reuse the existing AAP 2.0 shared-secret authentication that is applied for BDMs themselves also for sending configuration messages: We add the possibility to register an AAP 2.0 RPC agent (one that sends commands *toward* uD3TN) with the "dispatch" authorization flag. This client can then request a special flag to be added when sending bundles. The new flag is only added internally by uD3TN to its in-memory data structure and is delivered to all internal agents as well as AAP 2.0 clients receiving the marked bundles. Those agents and clients (such as the sqlite/storage agent) can then easily check for the flag to be present and thus determine whether the bundle comes from an authenticated and authorized source. Note: The `adu_flags` field for the BundleADU AAP 2.0 message is now a `repeated` field to represent the option of multiple flags being present (Protobuf does not support bit fields for this purpose). Fixes: #187 Signed-off-by: Felix Walter <felix.walter@d3tn.com> |
||
|---|---|---|
| .. | ||
| sqlite_agent.c | ||
| storage_agent.options | ||
| storage_agent.proto | ||