Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,6 @@ jobs:
- run: cargo fmt --all -- --check
- run: cargo clippy --workspace --all-targets --locked -- -D warnings
- run: cargo test --workspace --locked
- name: Name the system call when the worker sandbox's filter killed a grant worker
if: failure() && runner.os == 'Linux'
run: sudo dmesg | grep 'type=1326' | tail -n 20 || true
29 changes: 29 additions & 0 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,32 @@ concurrency:
permissions:
contents: read
jobs:
gateway-arm64:
# The seccomp allow-list is written per architecture. On x86-64 the
# containment test runs in ci.yml and the runtime test in the job below.
runs-on: ubuntu-24.04-arm
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- run: sudo apt-get update && sudo apt-get install -y apparmor-profiles bubblewrap libnss-wrapper
- name: Enable the distribution's bubblewrap profile when the host restricts user namespaces
run: |
if ! bwrap --unshare-all --cap-drop ALL --ro-bind /usr /usr --symlink usr/lib /lib --symlink usr/lib64 /lib64 -- /usr/bin/true; then
sudo apparmor_parser --replace /usr/share/apparmor/extra-profiles/bwrap-userns-restrict
bwrap --unshare-all --cap-drop ALL --ro-bind /usr /usr --symlink usr/lib /lib --symlink usr/lib64 /lib64 -- /usr/bin/true
fi
- uses: Swatinem/rust-cache@v2
- run: pip install cryptography==50.0.2
- run: cargo test --locked -p countersign-gateway
- run: cargo build --locked -p countersign-gateway
- name: Exercise shared and sidecar workers and lease cutoff
run: timeout 120 python crates/countersign-gateway/tests/runtime.py target/debug/countersign-gateway
- name: Name the system call when the worker sandbox's filter killed a grant worker
if: failure()
run: sudo dmesg | grep 'type=1326' | tail -n 20 || true
curl:
runs-on: ubuntu-24.04
timeout-minutes: 40
Expand All @@ -32,6 +58,9 @@ jobs:
- run: cargo build --locked --workspace
- name: Exercise shared and sidecar workers and lease cutoff
run: timeout 120 python crates/countersign-gateway/tests/runtime.py target/debug/countersign-gateway
- name: Name the system call when the worker sandbox's filter killed a grant worker
if: failure()
run: sudo dmesg | grep 'type=1326' | tail -n 20 || true
- run: node scripts/native-package.mjs debug
- run: pnpm --filter @countersign/companion exec electron-builder --dir --publish never
- name: Choose the last identity and compare it to the upstream TLS peer
Expand Down
23 changes: 23 additions & 0 deletions GLOSSARY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Countersign

Desktop approval for HTTPS Workloads that use an installed client certificate. The design record, `docs/specs/2026-11-17-countersign-design.md`, defines the rest of the language until it moves here.

## Language

### Gateway isolation

**Grant worker**:
The short-lived, low-privilege process the Gateway supervisor starts for one grant version, which carries that grant's traffic and nothing else.
_Avoid_: worker process, child, sandbox

**Worker sandbox**:
The OS isolation around every grant worker, chosen by the operator, that keeps it from the supervisor's credentials, other grant workers and the network.
_Avoid_: sandbox mode, isolation level

**Namespace sandbox**:
The default worker sandbox: the filter sandbox's guarantees plus a separate view of the filesystem, processes and network for each grant worker.
_Avoid_: bubblewrap mode, bwrap sandbox

**Filter sandbox**:
The worker sandbox for hosts that cannot give a grant worker its own namespaces, where the kernel refuses every action a grant worker does not need.
_Avoid_: seccomp mode, seccomp sandbox, fallback sandbox
4 changes: 4 additions & 0 deletions crates/countersign-gateway/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,7 @@ aws-runtime = "1.10"
aws-smithy-http-client = { version = "1.5", features = ["test-util"] }
aws-smithy-types = "1"
tempfile = "3"

[[test]]
name = "worker_sandbox"
harness = false
16 changes: 16 additions & 0 deletions crates/countersign-gateway/prototype-isolation-probe/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"rustc_fingerprint":4815122195271935405,"outputs":{"7971740275564407648":{"success":true,"status":"","code":0,"stdout":"___\nlib___.rlib\nlib___.so\nlib___.so\nlib___.a\nlib___.so\n/home/sodre/.rustup/toolchains/1.99.0-aarch64-unknown-linux-gnu\noff\npacked\nunpacked\n___\ndebug_assertions\npanic=\"unwind\"\nproc_macro\ntarget_abi=\"\"\ntarget_arch=\"aarch64\"\ntarget_endian=\"little\"\ntarget_env=\"gnu\"\ntarget_family=\"unix\"\ntarget_feature=\"neon\"\ntarget_has_atomic=\"128\"\ntarget_has_atomic=\"16\"\ntarget_has_atomic=\"32\"\ntarget_has_atomic=\"64\"\ntarget_has_atomic=\"8\"\ntarget_has_atomic=\"ptr\"\ntarget_has_atomic_primitive_alignment=\"128\"\ntarget_has_atomic_primitive_alignment=\"16\"\ntarget_has_atomic_primitive_alignment=\"32\"\ntarget_has_atomic_primitive_alignment=\"64\"\ntarget_has_atomic_primitive_alignment=\"8\"\ntarget_has_atomic_primitive_alignment=\"ptr\"\ntarget_os=\"linux\"\ntarget_pointer_width=\"64\"\ntarget_vendor=\"unknown\"\nunix\n","stderr":""},"11741312833096633296":{"success":true,"status":"","code":0,"stdout":"rustc 1.99.0 (b940084d7 2026-09-28)\nbinary: rustc\ncommit-hash: b940084d7eb6a299eb4bfeb8e34901bc051e7ac4\ncommit-date: 2026-09-28\nhost: aarch64-unknown-linux-gnu\nrelease: 1.99.0\nLLVM version: 23.1.1\n","stderr":""}},"successes":{}}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Signature: 8a477f597d28d172789f06886806bc55
# This file is a cache directory tag created by cargo.
# For information about cache directory tags see https://bford.info/cachedir/
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
72fa28d41811c602
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"rustc":7244470188377863884,"features":"[]","declared_features":"[]","target":12218276445456869961,"profile":854319013279132213,"path":4942398508502643691,"deps":[[18070707816531966863,"libc",false,11853295208726224446]],"local":[{"CheckDepInfo":{"dep_info":"release/.fingerprint/isolation-probe-78135a7c460b42b6/dep-bin-isolation-probe","checksum":false}}],"rustflags":[],"config":9396254390672932401,"compile_kind":0}
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This file has an mtime of when this was started.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
8430af7cddf2df56
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"rustc":7244470188377863884,"features":"","declared_features":"","target":0,"profile":0,"path":0,"deps":[[18070707816531966863,"build_script_build",false,4011722116619456885]],"local":[{"RerunIfChanged":{"output":"release/build/libc-54ae003d211a90e7/output","paths":["build.rs"]}},{"RerunIfEnvChanged":{"var":"LIBC_BUILD_VERBOSE","val":null}},{"RerunIfEnvChanged":{"var":"RUST_LIBC_UNSTABLE_FREEBSD_VERSION","val":null}}],"rustflags":[],"config":0,"compile_kind":0}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
7551ae920280ac37
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"rustc":7244470188377863884,"features":"[\"default\", \"std\"]","declared_features":"[\"align\", \"const-extern-fn\", \"default\", \"extra_traits\", \"rustc-dep-of-std\", \"rustc-std-workspace-core\", \"std\", \"use_std\"]","target":5408242616063297496,"profile":4660699631208531281,"path":3108924039311900754,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"release/.fingerprint/libc-5b62a56144055547/dep-build-script-build-script-build","checksum":false}}],"rustflags":[],"config":9396254390672932401,"compile_kind":0}
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This file has an mtime of when this was started.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This file has an mtime of when this was started.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3e5ef7dd305d7fa4
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"rustc":7244470188377863884,"features":"[\"default\", \"std\"]","declared_features":"[\"align\", \"const-extern-fn\", \"default\", \"extra_traits\", \"rustc-dep-of-std\", \"rustc-std-workspace-core\", \"std\", \"use_std\"]","target":17682796336736096309,"profile":12904552893056240883,"path":12859706116575813970,"deps":[[18070707816531966863,"build_script_build",false,6259989040161828996]],"local":[{"CheckDepInfo":{"dep_info":"release/.fingerprint/libc-aebea1749fc1a15b/dep-lib-libc","checksum":false}}],"rustflags":[],"config":9396254390672932401,"compile_kind":0}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This file has an mtime of when this was started.
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
cargo:rerun-if-changed=build.rs
cargo:rerun-if-env-changed=LIBC_BUILD_VERBOSE
cargo:rerun-if-env-changed=RUST_LIBC_UNSTABLE_FREEBSD_VERSION
cargo:rustc-check-cfg=cfg(libc_deny_warnings)
cargo:rustc-check-cfg=cfg(emscripten_old_stat_abi)
cargo:rustc-check-cfg=cfg(emscripten_fsblkcnt_is_32bit)
cargo:rustc-check-cfg=cfg(emscripten_sigset_large)
cargo:rustc-check-cfg=cfg(emscripten_nfds_is_ulong)
cargo:rustc-check-cfg=cfg(espidf_picolibc)
cargo:rustc-check-cfg=cfg(espidf_time32)
cargo:rustc-check-cfg=cfg(freebsd10)
cargo:rustc-check-cfg=cfg(freebsd11)
cargo:rustc-check-cfg=cfg(freebsd12)
cargo:rustc-check-cfg=cfg(freebsd13)
cargo:rustc-check-cfg=cfg(freebsd14)
cargo:rustc-check-cfg=cfg(freebsd15)
cargo:rustc-check-cfg=cfg(libc_elfv2)
cargo:rustc-check-cfg=cfg(vxworks_lt_25_09)
cargo:rustc-check-cfg=cfg(libc_pauthtest)
cargo:rustc-check-cfg=cfg(gnu_file_offset_bits64)
cargo:rustc-check-cfg=cfg(gnu_time_bits64)
cargo:rustc-check-cfg=cfg(linux_time_bits64)
cargo:rustc-check-cfg=cfg(musl_v1_2)
cargo:rustc-check-cfg=cfg(musl32_time64)
cargo:rustc-check-cfg=cfg(musl_redir_time64)
cargo:rustc-check-cfg=cfg(uclibc32_time64)
cargo:rustc-check-cfg=cfg(target_os,values("switch","aix","ohos","hurd","rtems","visionos","nuttx","cygwin","qurt","qnx","helenos"))
cargo:rustc-check-cfg=cfg(target_env,values("illumos","wasi","aix","ohos","nto71_iosock"))
cargo:rustc-check-cfg=cfg(target_arch,values("loongarch64","mips32r6","mips64r6","csky"))
cargo:rustc-cfg=linux_time_bits64
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/home/sodre/.t3/worktrees/countersign/t3-26f407de-ddf9b5024cab1ef0/crates/countersign-gateway/prototype-isolation-probe/target/release/build/libc-54ae003d211a90e7/out
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/home/sodre/.t3/worktrees/countersign/t3-26f407de-ddf9b5024cab1ef0/crates/countersign-gateway/prototype-isolation-probe/target/release/build/libc-5b62a56144055547/build_script_build-5b62a56144055547.d: /home/sodre/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.191/build.rs

/home/sodre/.t3/worktrees/countersign/t3-26f407de-ddf9b5024cab1ef0/crates/countersign-gateway/prototype-isolation-probe/target/release/build/libc-5b62a56144055547/build_script_build-5b62a56144055547: /home/sodre/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.191/build.rs

/home/sodre/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.191/build.rs:
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/home/sodre/.t3/worktrees/countersign/t3-26f407de-ddf9b5024cab1ef0/crates/countersign-gateway/prototype-isolation-probe/target/release/deps/isolation_probe-78135a7c460b42b6.d: src/main.rs

/home/sodre/.t3/worktrees/countersign/t3-26f407de-ddf9b5024cab1ef0/crates/countersign-gateway/prototype-isolation-probe/target/release/deps/isolation_probe-78135a7c460b42b6: src/main.rs

src/main.rs:
Loading
Loading