Skip to content

Repository files navigation

Internal Control and Audit (ICA) processes

Research prototype for the paper Enforcing Corporate Governance Controls With Cloud-Based Services.

What is implemented

  • Go HTTP server exposing ICA workflow operations
  • Go CLI for bootstrapping demo identities and exercising employee/director/auditor phases
  • ICA state machine with:
    • employee, director, and auditor phases
    • per-phase tag gating
    • layered phase-tag evolution
    • operation/phase-bound tag integrity checks on workflow tags
    • chained seals for accountability
  • Two backend modes:
    • standalone mode with in-memory repository and key manager
    • external mode with the FoundationDB key-value store and the OpenBao key management service

Requirements

  • Go toolchain
  • C compiler toolchain for cgo builds, such as gcc or clang
  • FoundationDB client 7.3.77 installed on the host
  • Docker and Docker Compose when running the external services locally

Build

Build the server, CLI client, and benchmark runner into ./bin:

mkdir -p bin
go build -o ./bin/ica-server ./cmd/ica-server
go build -o ./bin/ica ./cmd/ica
go build -o ./bin/ica-bench ./cmd/ica-bench

Run

Server

Standalone

./bin/ica-server --standalone

With external services

docker compose up --build

This starts:

  • app: the Go ICA server on http://localhost:8080
  • foundationdb: FoundationDB on localhost:4500
  • openbao: OpenBao dev server on http://localhost:8200

Client

In another terminal:

./bin/ica bootstrap-demo

# without director delegation to vice-director
./bin/ica create-operation x1 op-1 '{"amount":100}'
./bin/ica phase x1 op-1 employee start ''
./bin/ica phase x1 op-1 employee write '{"report":"ok"}'
./bin/ica phase x1 op-1 employee complete ''
./bin/ica phase dX op-1 director start ''
./bin/ica phase dX op-1 director write '{"report":"approved"}'
./bin/ica phase dX op-1 director complete ''
./bin/ica phase a1 op-1 auditor start ''
./bin/ica phase a1 op-1 auditor write '{"report":"verified"}'
./bin/ica phase a1 op-1 auditor complete ''
./bin/ica get-operation a1 op-1
./bin/ica get-operation-events a1 op-1

# with director delegation to vice-director
./bin/ica delegation dX X activate
./bin/ica create-operation x2 op-2 '{"amount":200}'
./bin/ica phase x2 op-2 employee start ''
./bin/ica phase x2 op-2 employee write '{"report":"ok"}'
./bin/ica phase x2 op-2 employee complete ''
./bin/ica phase vX op-2 director start ''
./bin/ica phase vX op-2 director write '{"report":"approved-by-vice"}'
./bin/ica phase vX op-2 director complete ''
./bin/ica delegation dX X deactivate

Test

go test ./...

To include the integration tests that use the FoundationDB key-value store and the OpenBao key management service:

export FOUNDATIONDB_CLUSTER_FILE="$PWD/test/foundationdb/fdb.cluster"
export OPENBAO_ADDR='http://127.0.0.1:8200'
export OPENBAO_TOKEN='root'
go test ./...

Benchmark

Use the dedicated benchmark harness against an already-running server.

Standalone example:

./bin/ica-server --standalone --enable-op-deletion
./bin/ica-bench --backend standalone --output-dir bench-results/standalone

External-backend example:

ICA_ENABLE_OP_DELETION=true docker compose up --build
./bin/ica-bench --backend external --output-dir bench-results/external

The benchmark runner:

  • warms up each case before measuring
  • measures isolated workflow steps
  • runs 1000 timed requests per case/concurrency point by default
  • deletes benchmark-generated operations after each workflow step
  • sweeps concurrency levels 1,2,4,8 by default
  • writes raw per-request timings to raw.csv
  • writes aggregated summaries and environment metadata to summary.json

Useful flags:

./bin/ica-bench --help
./bin/ica-bench --smoke
./bin/ica-bench --requests 1000 --concurrency 1,2,4,8

Generate figures

Generate figures from a benchmark summary:

python3 scripts/plot_benchmark_figures.py bench-results/standalone/summary.json

By default, output goes to <summary-dir>/figures; override it with --output-dir:

python3 scripts/plot_benchmark_figures.py bench-results/standalone/summary.json \
  --output-dir bench-results/standalone/figures

Outputs include:

  • throughput_by_concurrency.pdf
  • p95_latency_by_concurrency.pdf
  • mean_latency_by_concurrency.pdf
  • process_mean_latency_c<N>.pdf
  • process_p95_latency_c<N>.pdf
  • process_throughput_c<N>.pdf

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages