From 57b0afd99796af32161a2f11245c6b62dba4d938 Mon Sep 17 00:00:00 2001 From: Dominik Roos Date: Fri, 13 Sep 2024 10:00:59 +0200 Subject: [PATCH] docs: add interactive TRC signing ceremony builder And an interactive TRC signing ceremony builder. It supports all three types of TRC ceremony: base, regular, and sensitive. The user can select between scion-pki and openssl. Furthermore, support for pkcs11 is available for openssl. In a future iteration, support for scion-pki kms will be added. The builder is intended to be used by a voting (or root CA) participant. The adminstrator role is not supported in this version. (Administrators should be very knowledgable about the TRC ceremony anyway.) --- doc/Makefile | 3 +- doc/conf.py | 5 + doc/cryptography/index.rst | 1 + .../trc-signing-ceremony-builder.rst | 1011 +++++++++++++++++ tools/cryptoplayground/crypto_lib.sh | 2 +- tools/cryptoplayground/trc_ceremony.sh | 2 +- 6 files changed, 1021 insertions(+), 3 deletions(-) create mode 100644 doc/cryptography/trc-signing-ceremony-builder.rst diff --git a/doc/Makefile b/doc/Makefile index 92fe92a6fa..4da3aebaeb 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -13,6 +13,7 @@ SPHINX_AUTOBUILD ?= bazel run //doc:sphinx-autobuild -- SPHINXOPTS ?= -W --keep-going # treat warnings as errors, but process all files when an error occurs SOURCEDIR = $(abspath .) BUILDDIR = $(abspath ./_build) +HOST ?= localhost # Build docs with Sphinx using the "make mode" option. # Explicitly list the main build targets so they auto-complete in shells. @@ -30,7 +31,7 @@ html latex latexpdf linkcheck help: # Note: most options are forwarded as-is to sphinx, but --keep-going is not understood and we explicitly drop it. .PHONY: autobuild autobuild: - $(SPHINX_AUTOBUILD) "$(SOURCEDIR)" "$(BUILDDIR)" $(filter-out --keep-going,$(SPHINXOPTS)) + $(SPHINX_AUTOBUILD) "--host=$(HOST)" "$(SOURCEDIR)" "$(BUILDDIR)" $(filter-out --keep-going,$(SPHINXOPTS)) .PHONY: clean clean: diff --git a/doc/conf.py b/doc/conf.py index 9f26c8ac5d..4e4e959ba9 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -97,3 +97,8 @@ html_css_files = [ "css/custom.css", ] + +html_js_files = [ + "https://unpkg.com/@alpinejs/persist@3.14.1/dist/cdn.min.js", + "https://unpkg.com/alpinejs@3.14.1/dist/cdn.min.js", +] diff --git a/doc/cryptography/index.rst b/doc/cryptography/index.rst index 4945e66f1a..711a58b477 100644 --- a/doc/cryptography/index.rst +++ b/doc/cryptography/index.rst @@ -11,6 +11,7 @@ SCION Cryptography trc-signing-ceremony-preparations trc-signing-ceremony-phases-base trc-signing-ceremony-phases-sensitive + trc-signing-ceremony-builder ca-operations interactions drkey diff --git a/doc/cryptography/trc-signing-ceremony-builder.rst b/doc/cryptography/trc-signing-ceremony-builder.rst new file mode 100644 index 0000000000..faeb6d2dcd --- /dev/null +++ b/doc/cryptography/trc-signing-ceremony-builder.rst @@ -0,0 +1,1011 @@ +.. _trc-signing-ceremony-builder: + +.. raw:: html + + + + + +.. raw:: html + + + +
+ + +
+

TRC Ceremony Builder

+ +
+

TRC

+ + + + + + + + + + + + + + + + + + + +
Ceremony Type + +
ISD + +
ISD required
+
Base Number + +
Serial Number + +
+
+ + +
+

Actions

+ + + + + + + + + + + + + + + + + + + + + + + + + +
SelectAction
+ + New sensitive voting certificate
+ + New regular voting certificate
+ + New root certificate
+ + Cast a vote
+
+ + +
+

General Settings

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Working Directory + +
Signing Tool + +
Short ID + +
Short Identifier required
+
Exchange Mechanism + +
Shared Drive + +
Skip Preparation + +
Skip Certificate Exchange + +
Show Expected Output Hints + +
+
+ + +
+

Certificate Subject

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
ISD-AS + +
ISD-AS required
+
Country + +
State + +
Locality + +
Organization + +
Organizational Unit + +
+
+ + + + + + + + + + +
+ + +
+
+ + + + + + + + + + + +
+
+

Phase 2: Creation of Payload

+
+ Follow the instructions of the TRC ceremony adminstrator to + receive the TRC payload. +
+
+ + + + + +
+

2. Check TRC Payload

+
sha256sum
+ + +
+ +
+

3. Inspect TRC Payload

+
scion-pki trc inspect
+ + +
+
+ + +
+
+

Phase 3: Signing of the TRC Payload

+
+ Follow the instructions of the TRC ceremony adminstrator and + create the required signatures. +
+
+ + + + + + + + +
+ + +
+
+

Phase 4: Assembly of the TRC

+
+ Follow the instructions of the TRC ceremony adminstrator to + recieve the signed TRC. This step concludes the ceremony. +
+
+ + + + + +
+

2. Check TRC

+
sha256sum .trc
+ + +
+ +
+

3. Inspect TRC

+
scion-pki trc inspect --predecessor
+
+ +
+

4. Format TRC

+
+ The output of the TRC ceremony is a DER encoded TRC. To convert + it to a more ergonomic PEM format, use the following command. +
+
scion-pki trc format --format pem
+ + +
+
+ +
+ diff --git a/tools/cryptoplayground/crypto_lib.sh b/tools/cryptoplayground/crypto_lib.sh index 6bdb1e0dd9..ffa47ba58c 100644 --- a/tools/cryptoplayground/crypto_lib.sh +++ b/tools/cryptoplayground/crypto_lib.sh @@ -92,7 +92,7 @@ in_docker() { -e TRCID=$TRCID \ -e PREDID=$PREDID \ nginx:1.27.1 \ - sh -c "set -e && . /scripts/crypto_lib.sh && $@" + sh -c "set -ex && . /scripts/crypto_lib.sh && $@" } ###################### diff --git a/tools/cryptoplayground/trc_ceremony.sh b/tools/cryptoplayground/trc_ceremony.sh index 7405ba550f..4dc0688f3d 100755 --- a/tools/cryptoplayground/trc_ceremony.sh +++ b/tools/cryptoplayground/trc_ceremony.sh @@ -12,7 +12,7 @@ export USE_SCION_PKI_SIGN=${USE_SCION_PKI_SIGN:-} . $PLAYGROUND/crypto_lib.sh -set -e +set -ex if [ -z "$USE_SCION_PKI_SIGN" ]; then STARTDATE="20200624120000Z"