Skip to main content

Module token

Module token 

Source
Expand description

DDS-Security 1.2 token structures (DataHolder + property records).

Spec: §7.2.6 (Property_t / BinaryProperty_t), §7.2.7 (DataHolder), §7.4.1.4 (IdentityToken in the SPDP announce).

A DataHolder is the generic wire representation of all security tokens (IdentityToken, PermissionsToken, IdentityStatus- Token, AuthRequestMessageToken, HandshakeMessageToken, CryptoToken, ParticipantCryptoToken, etc.). Fields:

struct DataHolder_t {
    string                       class_id;
    sequence<Property_t>         properties;
    sequence<BinaryProperty_t>   binary_properties;
};
struct Property_t        { string name; string value; };
struct BinaryProperty_t  { string name; sequence<octet> value; };

IMPORTANT: the wire Property_t (spec §7.2.6 Tab.5) has no propagate field — that is local filter state in the plug-configured zerodds_security::PropertyList.

The encoding is OMG-CDR (XCDR1) — the DataHolder is serialized as a big-/little-endian stream, depending on which encapsulation context it sits in (typically PL_CDR_LE of the ParameterList, i.e. LE).

§Usage

use zerodds_security::token::{DataHolder, IdentityToken};
let tok = IdentityToken::pki_dh_v12("01:23:45", "rsa-2048", "FA:CE", "rsa-2048");
let bytes = tok.to_cdr_le();
let back = DataHolder::from_cdr_le(&bytes).unwrap();
assert_eq!(tok, back);

Modules§

class_id
Plugin class-id constants — spec-1.2-versioned (see C3.3).
prop
Property names — spec 1.2 (selection).

Structs§

BinaryProperty
Spec §7.2.6 Tab.6 — wire BinaryProperty_t (name + value as sequence<octet>).
DataHolder
Spec §7.2.7 Tab.7 — generic DataHolder_t wire struct. All security tokens are type aliases of DataHolder with a fixed class_id value.
WireProperty
Spec §7.2.6 Tab.5 — wire Property_t (name + value, both CDR strings). Unlike crate::Property, no propagate field; token properties are always propagated.

Type Aliases§

AuthRequestMessageToken
AuthRequestMessageToken (Spec §10.3.2 Tab.55).
CryptoToken
CryptoToken (Spec §10.5.2 Tab.72).
HandshakeMessageToken
HandshakeMessageToken — Request/Reply/Final (Spec §10.3.2 Tab.56-58).
IdentityStatusToken
IdentityStatusToken (spec §7.4.1.6, §10.3.2 Tab.53). PID_IDENTITY_ STATUS_TOKEN (0x1006). Carrier for OCSP live status.
IdentityToken
IdentityToken (spec §7.4.1.4 Tab.16; PKI-DH §10.3.2 Tab.51). Sent in the SPDP announce as PID_IDENTITY_TOKEN (0x1001).
PermissionsCredentialToken
PermissionsCredentialToken (spec §10.4.2 Tab.64). Transported in the stateless-topic handshake, not in SPDP.
PermissionsToken
PermissionsToken (spec §7.4.1.5 Tab.17; PKI-Permissions §10.4.2 Tab.65). PID_PERMISSIONS_TOKEN (0x1002).