zerodds-secure-permissions

Tools — DDS-Security. Command-line tool and library that sign DDS-Security governance and permissions XML as CMS/PKCS#7 for the builtin AccessControl plugin (OMG DDS-Security 1.2 §10.4.1.1).

DDS-Security 1.2 §10.4.1.1 requires the governance and permissions documents to be signed by the Permissions CA as S/MIME (CMS SignedData). The ZeroDDS runtime verifies them in zerodds-security-permissions (CmsPkcs7Verifier); zerodds-secure-permissions produces them.

  • Output: opaque S/MIME application/pkcs7-mime; smime-type=signed-data, one .p7s file that carries the signed XML as embedded eContent and the signature. The file holds MIME headers and base64, not raw DER or PEM; openssl cms -verify reads it with its default -inform SMIME.
  • The signer certificate is the Permissions CA itself. Signature: ECDSA P-256 with SHA-256, ASN.1-DER signature value, computed with ring.
  • The signer key must be PKCS#8 (BEGIN PRIVATE KEY). A SEC1 key (BEGIN EC PRIVATE KEY) is detected and rejected with the conversion command openssl pkcs8 -topk8 -nocrypt.
  • sign checks its result with CmsPkcs7Verifier before it writes the file.
  • Library: sign_xml_opaque (S/MIME document), sign_xml_to_der (DER ContentInfo without the S/MIME envelope), CaKey, SignError.
zerodds-secure-permissions sign   --signer-cert <perm_ca.pem> --signer-key <perm_ca_key.pem> \
                                  --in <doc.xml> --out <doc.p7s>
zerodds-secure-permissions verify --ca <perm_ca.pem> --p7s <doc.p7s> [--out <doc.xml>]

The same sign call applies to governance.xml and permissions.xml. verify prints a status line and, with --out, writes the recovered XML. Exit codes: 0 success, 1 signing or verification error, 2 invalid invocation. The README describes how the SecurityProfileConfig of a participant (zerodds-security-runtime) uses the CA certificate and the two .p7s files; identities are revoked through the CRL of the Identity CA (zerodds-security-pki).

Spec anchors

  • OMG DDS-Security 1.2 §10.4.1.1 (signed governance and permissions documents).
  • RFC 5652 (id-data), RFC 5758 §3.2 (ecdsa-with-SHA256), RFC 5480 §2.1.1, §2.1.1.1, §2.2.3 (id-ecPublicKey, secp256r1, Ecdsa-Sig-Value).

Consumers

  • No crate in the workspace depends on it.

Status

  • std. src/lib.rs has no forbid(unsafe_code) attribute. Safety classification in the crate docs: COMFORT (deployment tooling, outside the runtime path).
  • Builds the binary zerodds-secure-permissions. No cargo features.
  • Test functions in the source: 3 in src/lib.rs, 7 in tests/access_plugin_signed.rs, 2 in tests/from_files_pipeline.rs. The integration tests mint certificates with rcgen and load the signed documents through zerodds-security-permissions and zerodds-security-runtime.

zerodds-secure-permissions

Werkzeuge — DDS-Security. Kommandozeilenwerkzeug und Bibliothek, die Governance- und Permissions-XML von DDS-Security als CMS/PKCS#7 für das eingebaute AccessControl-Plugin signieren (OMG DDS-Security 1.2 §10.4.1.1).

DDS-Security 1.2 §10.4.1.1 verlangt, dass die Governance- und Permissions-Dokumente von der Permissions CA als S/MIME (CMS SignedData) signiert sind. Die ZeroDDS-Laufzeit prüft sie in zerodds-security-permissions (CmsPkcs7Verifier); zerodds-secure-permissions erzeugt sie.

  • Ausgabe: opakes S/MIME application/pkcs7-mime; smime-type=signed-data, eine .p7s-Datei, die das signierte XML als eingebettetes eContent und die Signatur enthält. Die Datei besteht aus MIME-Headern und base64, nicht aus rohem DER oder PEM; openssl cms -verify liest sie mit der Voreinstellung -inform SMIME.
  • Das Zertifikat des Signierers ist die Permissions CA selbst. Signatur: ECDSA P-256 mit SHA-256, Signaturwert in ASN.1-DER, berechnet mit ring.
  • Der Schlüssel des Signierers muss PKCS#8 sein (BEGIN PRIVATE KEY). Ein SEC1-Schlüssel (BEGIN EC PRIVATE KEY) wird erkannt und mit dem Umwandlungsbefehl openssl pkcs8 -topk8 -nocrypt abgelehnt.
  • sign prüft das Ergebnis mit CmsPkcs7Verifier, bevor die Datei geschrieben wird.
  • Bibliothek: sign_xml_opaque (S/MIME-Dokument), sign_xml_to_der (DER-ContentInfo ohne S/MIME-Hülle), CaKey, SignError.
zerodds-secure-permissions sign   --signer-cert <perm_ca.pem> --signer-key <perm_ca_key.pem> \
                                  --in <doc.xml> --out <doc.p7s>
zerodds-secure-permissions verify --ca <perm_ca.pem> --p7s <doc.p7s> [--out <doc.xml>]

Derselbe Aufruf von sign gilt für governance.xml und permissions.xml. verify gibt eine Statuszeile aus und schreibt mit --out das zurückgewonnene XML. Exit-Codes: 0 Erfolg, 1 Fehler beim Signieren oder Prüfen, 2 ungültiger Aufruf. Das README beschreibt, wie die SecurityProfileConfig eines Participants (zerodds-security-runtime) das CA-Zertifikat und die beiden .p7s-Dateien verwendet; Identitäten werden über die CRL der Identity CA widerrufen (zerodds-security-pki).

Spec-Anker

  • OMG DDS-Security 1.2 §10.4.1.1 (signierte Governance- und Permissions-Dokumente).
  • RFC 5652 (id-data), RFC 5758 §3.2 (ecdsa-with-SHA256), RFC 5480 §2.1.1, §2.1.1.1, §2.2.3 (id-ecPublicKey, secp256r1, Ecdsa-Sig-Value).

Konsumenten

  • Keine Crate im Workspace hängt davon ab.

Status

  • std. src/lib.rs hat kein Attribut forbid(unsafe_code). Einstufung in der Crate-Dokumentation (safety classification): COMFORT (Werkzeug für die Bereitstellung, außerhalb des Laufzeitpfads).
  • Baut das Binary zerodds-secure-permissions. Keine Cargo-Features.
  • Testfunktionen im Quelltext: 3 in src/lib.rs, 7 in tests/access_plugin_signed.rs, 2 in tests/from_files_pipeline.rs. Die Integrationstests erzeugen Zertifikate mit rcgen und laden die signierten Dokumente über zerodds-security-permissions und zerodds-security-runtime.