modelsign 1.3.0__tar.gz → 1.5.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- modelsign-1.5.0/.dockerignore +10 -0
- {modelsign-1.3.0 → modelsign-1.5.0}/.github/workflows/ci.yml +4 -1
- {modelsign-1.3.0 → modelsign-1.5.0}/.gitignore +3 -0
- {modelsign-1.3.0 → modelsign-1.5.0}/CHANGELOG.md +19 -0
- {modelsign-1.3.0 → modelsign-1.5.0}/PKG-INFO +29 -1
- {modelsign-1.3.0 → modelsign-1.5.0}/README.md +22 -0
- modelsign-1.5.0/deploy/control-plane/Caddyfile +6 -0
- modelsign-1.5.0/deploy/control-plane/Dockerfile +8 -0
- modelsign-1.5.0/deploy/control-plane/README.md +11 -0
- modelsign-1.5.0/deploy/control-plane/compose.yaml +31 -0
- modelsign-1.5.0/docs/control-plane.md +181 -0
- modelsign-1.5.0/docs/outreach/demo-verification.md +26 -0
- modelsign-1.5.0/docs/outreach/modelsign-1.3-engineering-packet.md +113 -0
- modelsign-1.5.0/docs/reviews/2026-12-03-control-plane.md +29 -0
- modelsign-1.5.0/docs/reviews/2026-12-03-v1.4-development.md +53 -0
- modelsign-1.5.0/docs/superpowers/plans/2026-12-03-control-plane.md +52 -0
- modelsign-1.5.0/docs/superpowers/plans/2026-12-03-trust-rollback.md +64 -0
- modelsign-1.5.0/docs/superpowers/specs/2026-12-03-control-plane.md +38 -0
- modelsign-1.5.0/docs/superpowers/specs/2026-12-03-trust-rollback-design.md +258 -0
- modelsign-1.5.0/docs/trust-policy.md +138 -0
- modelsign-1.5.0/examples/control_plane_demo.py +237 -0
- modelsign-1.5.0/examples/security_review_demo.py +73 -0
- modelsign-1.5.0/examples/trust_policy_demo.py +119 -0
- {modelsign-1.3.0 → modelsign-1.5.0}/pyproject.toml +5 -0
- {modelsign-1.3.0 → modelsign-1.5.0}/src/modelsign/__init__.py +4 -1
- {modelsign-1.3.0 → modelsign-1.5.0}/src/modelsign/api.py +24 -6
- {modelsign-1.3.0 → modelsign-1.5.0}/src/modelsign/cli.py +108 -25
- modelsign-1.5.0/src/modelsign/control/__init__.py +1 -0
- modelsign-1.5.0/src/modelsign/control/cli.py +104 -0
- modelsign-1.5.0/src/modelsign/control/client.py +132 -0
- modelsign-1.5.0/src/modelsign/control/server.py +116 -0
- modelsign-1.5.0/src/modelsign/control/static/dashboard.css +3 -0
- modelsign-1.5.0/src/modelsign/control/static/dashboard.js +112 -0
- modelsign-1.5.0/src/modelsign/control/static/index.html +32 -0
- modelsign-1.5.0/src/modelsign/control/store.py +458 -0
- {modelsign-1.3.0 → modelsign-1.5.0}/src/modelsign/guard.py +13 -2
- {modelsign-1.3.0 → modelsign-1.5.0}/src/modelsign/identity/card.py +13 -0
- {modelsign-1.3.0 → modelsign-1.5.0}/src/modelsign/oms.py +19 -2
- modelsign-1.5.0/src/modelsign/policy.py +402 -0
- modelsign-1.5.0/src/modelsign/policy_state.py +236 -0
- modelsign-1.5.0/src/modelsign/trust_bundle.py +268 -0
- {modelsign-1.3.0 → modelsign-1.5.0}/src/modelsign.egg-info/PKG-INFO +29 -1
- {modelsign-1.3.0 → modelsign-1.5.0}/src/modelsign.egg-info/SOURCES.txt +39 -1
- {modelsign-1.3.0 → modelsign-1.5.0}/src/modelsign.egg-info/requires.txt +10 -0
- modelsign-1.5.0/tests/test_control_api.py +169 -0
- modelsign-1.5.0/tests/test_control_cli.py +60 -0
- modelsign-1.5.0/tests/test_control_store.py +133 -0
- modelsign-1.5.0/tests/test_control_transport.py +81 -0
- modelsign-1.5.0/tests/test_oms_policy.py +150 -0
- modelsign-1.5.0/tests/test_policy.py +348 -0
- modelsign-1.5.0/tests/test_policy_cli.py +186 -0
- modelsign-1.5.0/tests/test_policy_state.py +180 -0
- modelsign-1.5.0/tests/test_trust_bundle.py +147 -0
- {modelsign-1.3.0 → modelsign-1.5.0}/.github/FUNDING.yml +0 -0
- {modelsign-1.3.0 → modelsign-1.5.0}/LICENSE +0 -0
- {modelsign-1.3.0 → modelsign-1.5.0}/action.yml +0 -0
- {modelsign-1.3.0 → modelsign-1.5.0}/docs/attestation.md +0 -0
- {modelsign-1.3.0 → modelsign-1.5.0}/docs/aws-kms.md +0 -0
- {modelsign-1.3.0 → modelsign-1.5.0}/docs/reviews/2026-12-03-v1.3.0.md +0 -0
- {modelsign-1.3.0 → modelsign-1.5.0}/docs/security-policy-follow-ons.md +0 -0
- {modelsign-1.3.0 → modelsign-1.5.0}/docs/superpowers/plans/2026-12-03-kms.md +0 -0
- {modelsign-1.3.0 → modelsign-1.5.0}/docs/superpowers/plans/2026-12-03-rfc3161.md +0 -0
- {modelsign-1.3.0 → modelsign-1.5.0}/docs/superpowers/specs/2026-12-03-kms-design.md +0 -0
- {modelsign-1.3.0 → modelsign-1.5.0}/docs/superpowers/specs/2026-12-03-rfc3161-design.md +0 -0
- {modelsign-1.3.0 → modelsign-1.5.0}/docs/timestamps.md +0 -0
- {modelsign-1.3.0 → modelsign-1.5.0}/setup.cfg +0 -0
- {modelsign-1.3.0 → modelsign-1.5.0}/src/modelsign/approvals.py +0 -0
- {modelsign-1.3.0 → modelsign-1.5.0}/src/modelsign/attest.py +0 -0
- {modelsign-1.3.0 → modelsign-1.5.0}/src/modelsign/crypto/__init__.py +0 -0
- {modelsign-1.3.0 → modelsign-1.5.0}/src/modelsign/crypto/aws_kms.py +0 -0
- {modelsign-1.3.0 → modelsign-1.5.0}/src/modelsign/crypto/keys.py +0 -0
- {modelsign-1.3.0 → modelsign-1.5.0}/src/modelsign/crypto/sign.py +0 -0
- {modelsign-1.3.0 → modelsign-1.5.0}/src/modelsign/crypto/signers.py +0 -0
- {modelsign-1.3.0 → modelsign-1.5.0}/src/modelsign/crypto/verify.py +0 -0
- {modelsign-1.3.0 → modelsign-1.5.0}/src/modelsign/formats/__init__.py +0 -0
- {modelsign-1.3.0 → modelsign-1.5.0}/src/modelsign/formats/directory.py +0 -0
- {modelsign-1.3.0 → modelsign-1.5.0}/src/modelsign/formats/single.py +0 -0
- {modelsign-1.3.0 → modelsign-1.5.0}/src/modelsign/identity/__init__.py +0 -0
- {modelsign-1.3.0 → modelsign-1.5.0}/src/modelsign/identity/canonical.py +0 -0
- {modelsign-1.3.0 → modelsign-1.5.0}/src/modelsign/lineage.py +0 -0
- {modelsign-1.3.0 → modelsign-1.5.0}/src/modelsign/middleware/__init__.py +0 -0
- {modelsign-1.3.0 → modelsign-1.5.0}/src/modelsign/middleware/response.py +0 -0
- {modelsign-1.3.0 → modelsign-1.5.0}/src/modelsign/sig.py +0 -0
- {modelsign-1.3.0 → modelsign-1.5.0}/src/modelsign/timestamps.py +0 -0
- {modelsign-1.3.0 → modelsign-1.5.0}/src/modelsign.egg-info/dependency_links.txt +0 -0
- {modelsign-1.3.0 → modelsign-1.5.0}/src/modelsign.egg-info/entry_points.txt +0 -0
- {modelsign-1.3.0 → modelsign-1.5.0}/src/modelsign.egg-info/top_level.txt +0 -0
- {modelsign-1.3.0 → modelsign-1.5.0}/tests/conftest.py +0 -0
- {modelsign-1.3.0 → modelsign-1.5.0}/tests/test_api.py +0 -0
- {modelsign-1.3.0 → modelsign-1.5.0}/tests/test_approvals.py +0 -0
- {modelsign-1.3.0 → modelsign-1.5.0}/tests/test_attest.py +0 -0
- {modelsign-1.3.0 → modelsign-1.5.0}/tests/test_canonical.py +0 -0
- {modelsign-1.3.0 → modelsign-1.5.0}/tests/test_card.py +0 -0
- {modelsign-1.3.0 → modelsign-1.5.0}/tests/test_cli.py +0 -0
- {modelsign-1.3.0 → modelsign-1.5.0}/tests/test_digest_binding_review.py +0 -0
- {modelsign-1.3.0 → modelsign-1.5.0}/tests/test_formats.py +0 -0
- {modelsign-1.3.0 → modelsign-1.5.0}/tests/test_guard.py +0 -0
- {modelsign-1.3.0 → modelsign-1.5.0}/tests/test_integration.py +0 -0
- {modelsign-1.3.0 → modelsign-1.5.0}/tests/test_keys.py +0 -0
- {modelsign-1.3.0 → modelsign-1.5.0}/tests/test_kms.py +0 -0
- {modelsign-1.3.0 → modelsign-1.5.0}/tests/test_lineage.py +0 -0
- {modelsign-1.3.0 → modelsign-1.5.0}/tests/test_middleware.py +0 -0
- {modelsign-1.3.0 → modelsign-1.5.0}/tests/test_oms.py +0 -0
- {modelsign-1.3.0 → modelsign-1.5.0}/tests/test_sig.py +0 -0
- {modelsign-1.3.0 → modelsign-1.5.0}/tests/test_sign_verify.py +0 -0
- {modelsign-1.3.0 → modelsign-1.5.0}/tests/test_timestamps.py +0 -0
|
@@ -36,11 +36,14 @@ jobs:
|
|
|
36
36
|
python-version: ${{ matrix.python-version }}
|
|
37
37
|
|
|
38
38
|
- name: Install dependencies
|
|
39
|
-
run: pip install -e ".[dev,timestamp,aws-kms]"
|
|
39
|
+
run: pip install -e ".[dev,timestamp,aws-kms,control,control-test]"
|
|
40
40
|
|
|
41
41
|
- name: Run tests
|
|
42
42
|
run: pytest tests/ -v --tb=short
|
|
43
43
|
|
|
44
|
+
- name: Exercise central native and OMS policy over HTTP
|
|
45
|
+
run: python examples/control_plane_demo.py
|
|
46
|
+
|
|
44
47
|
- name: Type check
|
|
45
48
|
run: mypy
|
|
46
49
|
|
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## v1.5.0 (2026-12-03)
|
|
4
|
+
|
|
5
|
+
- Direct control connections ignore proxy environment settings; configurable state lock waits accommodate slow admissions.
|
|
6
|
+
- Optional self-hosted dashboard, bundle distribution, scoped credentials, audit history and fleet rollback state.
|
|
7
|
+
- Online verifier/guard policy with root pinning, local state, HTTPS and fail-closed admissions.
|
|
8
|
+
- OMS P-256 deployment policy and signed identity/version metadata; schema-2 mixed publisher algorithms.
|
|
9
|
+
- OMS rollback binds the full signed statement, including paths and serialization policy.
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
## v1.4.0 (2026-12-03)
|
|
13
|
+
|
|
14
|
+
- Optional signed trust bundles with pinned roots, exact model grants and current-key revocation policy.
|
|
15
|
+
- Signed model IDs/security versions and deployment floors.
|
|
16
|
+
- Explicitly initialized POSIX rollback state with locking, atomic updates and cross-model trust sequence memory.
|
|
17
|
+
- Shared API/CLI/guard policy enforcement, including approvals before model-state commits.
|
|
18
|
+
- Offline bundle issuance and explicit state initialization/reset with audit backup.
|
|
19
|
+
- Identity-only policies do not require a security version; version floors and state still do.
|
|
20
|
+
- Preserve operational verification errors (CLI exit 2) and explicit embedded-key verification for approval-only checks.
|
|
21
|
+
|
|
3
22
|
## v1.3.0 (2026-12-03)
|
|
4
23
|
|
|
5
24
|
- Optional AWS KMS Ed25519 signing for models and approvals; pinned key/algorithm,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: modelsign
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.5.0
|
|
4
4
|
Summary: Sign AI models with identity. Verify anywhere. Part of the AURE Provenance stack by Constant Systems.
|
|
5
5
|
Author-email: James Kerr <qj@constantqj.com>
|
|
6
6
|
License: Apache-2.0
|
|
@@ -22,6 +22,12 @@ Requires-Dist: click>=8.0
|
|
|
22
22
|
Requires-Dist: rfc8785>=0.1.2
|
|
23
23
|
Provides-Extra: middleware
|
|
24
24
|
Requires-Dist: fastapi>=0.100; extra == "middleware"
|
|
25
|
+
Provides-Extra: control
|
|
26
|
+
Requires-Dist: fastapi<1,>=0.115; extra == "control"
|
|
27
|
+
Requires-Dist: uvicorn<1,>=0.30; extra == "control"
|
|
28
|
+
Provides-Extra: control-test
|
|
29
|
+
Requires-Dist: httpx<1,>=0.27; extra == "control-test"
|
|
30
|
+
Requires-Dist: httpx2<3,>=2; python_version >= "3.10" and extra == "control-test"
|
|
25
31
|
Provides-Extra: timestamp
|
|
26
32
|
Requires-Dist: asn1crypto>=1.5.1; extra == "timestamp"
|
|
27
33
|
Provides-Extra: aws-kms
|
|
@@ -380,3 +386,25 @@ keeping verification offline. See [the KMS guide](docs/aws-kms.md) for the signe
|
|
|
380
386
|
interface, optional SDK extra, IAM requirements and 4,096-byte signing-message
|
|
381
387
|
limit. This backend has SDK-contract tests, not live AWS validation, and is
|
|
382
388
|
available through `pip install "modelsign[aws-kms]==1.3.0"`.
|
|
389
|
+
|
|
390
|
+
## Deployment trust and rollback policy (v1.4)
|
|
391
|
+
|
|
392
|
+
Version 1.4 adds optional root-signed trust bundles and signed model
|
|
393
|
+
security versions. See [the policy guide](docs/trust-policy.md) for offline bundle
|
|
394
|
+
issuance, API/CLI/guard enforcement, explicit state initialization, shared sequence
|
|
395
|
+
tracking and administrative recovery. Persistent state requires POSIX flock
|
|
396
|
+
and local atomic writes.
|
|
397
|
+
|
|
398
|
+
Run `python examples/trust_policy_demo.py` from a checkout with modelsign 1.4 installed
|
|
399
|
+
to see valid loading, version rollback rejection, publisher revocation and old
|
|
400
|
+
bundle replay rejection using disposable keys and files.
|
|
401
|
+
|
|
402
|
+
|
|
403
|
+
## Central administration and OMS policy (v1.5)
|
|
404
|
+
|
|
405
|
+
An optional self-hosted control plane adds a dashboard, authenticated root-signed
|
|
406
|
+
bundle distribution, model policies, scoped credentials, audit history and
|
|
407
|
+
transactional fleet high-water marks. Both native signatures and OMS P-256 bundles
|
|
408
|
+
can use deployment policy. Clients verify pinned roots locally and fail closed.
|
|
409
|
+
See [the control-plane guide](docs/control-plane.md) for TLS, state, OMS identity
|
|
410
|
+
requirements and the two-node demonstration. Available in 1.5.0 as a self-hosted service; this is not a hosted SaaS.
|
|
@@ -346,3 +346,25 @@ keeping verification offline. See [the KMS guide](docs/aws-kms.md) for the signe
|
|
|
346
346
|
interface, optional SDK extra, IAM requirements and 4,096-byte signing-message
|
|
347
347
|
limit. This backend has SDK-contract tests, not live AWS validation, and is
|
|
348
348
|
available through `pip install "modelsign[aws-kms]==1.3.0"`.
|
|
349
|
+
|
|
350
|
+
## Deployment trust and rollback policy (v1.4)
|
|
351
|
+
|
|
352
|
+
Version 1.4 adds optional root-signed trust bundles and signed model
|
|
353
|
+
security versions. See [the policy guide](docs/trust-policy.md) for offline bundle
|
|
354
|
+
issuance, API/CLI/guard enforcement, explicit state initialization, shared sequence
|
|
355
|
+
tracking and administrative recovery. Persistent state requires POSIX flock
|
|
356
|
+
and local atomic writes.
|
|
357
|
+
|
|
358
|
+
Run `python examples/trust_policy_demo.py` from a checkout with modelsign 1.4 installed
|
|
359
|
+
to see valid loading, version rollback rejection, publisher revocation and old
|
|
360
|
+
bundle replay rejection using disposable keys and files.
|
|
361
|
+
|
|
362
|
+
|
|
363
|
+
## Central administration and OMS policy (v1.5)
|
|
364
|
+
|
|
365
|
+
An optional self-hosted control plane adds a dashboard, authenticated root-signed
|
|
366
|
+
bundle distribution, model policies, scoped credentials, audit history and
|
|
367
|
+
transactional fleet high-water marks. Both native signatures and OMS P-256 bundles
|
|
368
|
+
can use deployment policy. Clients verify pinned roots locally and fail closed.
|
|
369
|
+
See [the control-plane guide](docs/control-plane.md) for TLS, state, OMS identity
|
|
370
|
+
requirements and the two-node demonstration. Available in 1.5.0 as a self-hosted service; this is not a hosted SaaS.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
FROM python:3.12-slim
|
|
2
|
+
WORKDIR /app
|
|
3
|
+
COPY . /app
|
|
4
|
+
RUN pip install --no-cache-dir '.[control]' && useradd --uid 10001 --create-home modelsign
|
|
5
|
+
USER 10001:10001
|
|
6
|
+
EXPOSE 8787
|
|
7
|
+
ENTRYPOINT ["modelsign", "control", "serve"]
|
|
8
|
+
CMD ["--db", "/data/control.db", "--host", "0.0.0.0", "--behind-tls-proxy"]
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Self-hosted deployment
|
|
2
|
+
Initialize a database with "modelsign control init" first. The bind-mounted
|
|
3
|
+
directory must be owned/writable by container UID/GID 10001, including SQLite WAL
|
|
4
|
+
files. Move bootstrap credentials into your secret store. Set
|
|
5
|
+
MODELSIGN_CONTROL_DATA and CONTROL_DOMAIN, then run:
|
|
6
|
+
docker compose -f deploy/control-plane/compose.yaml up --build -d
|
|
7
|
+
|
|
8
|
+
DNS must point to the host and ports 80/443 must be reachable for Caddy certificate
|
|
9
|
+
issuance. The application port is not published. Restrict administrative access
|
|
10
|
+
at your network boundary. See docs/control-plane.md for backup and threat model.
|
|
11
|
+
This template is not evidence of a live hosted or HA service.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
services:
|
|
2
|
+
control:
|
|
3
|
+
build:
|
|
4
|
+
context: ../..
|
|
5
|
+
dockerfile: deploy/control-plane/Dockerfile
|
|
6
|
+
restart: unless-stopped
|
|
7
|
+
volumes:
|
|
8
|
+
- ${MODELSIGN_CONTROL_DATA:?Set path to initialized control database directory}:/data
|
|
9
|
+
networks: [internal]
|
|
10
|
+
read_only: true
|
|
11
|
+
tmpfs: [/tmp]
|
|
12
|
+
cap_drop: [ALL]
|
|
13
|
+
security_opt: [no-new-privileges:true]
|
|
14
|
+
proxy:
|
|
15
|
+
image: caddy:2
|
|
16
|
+
restart: unless-stopped
|
|
17
|
+
ports: ["443:443", "80:80"]
|
|
18
|
+
environment:
|
|
19
|
+
CONTROL_DOMAIN: ${CONTROL_DOMAIN:?Set a DNS name pointing at this host}
|
|
20
|
+
volumes:
|
|
21
|
+
- ./Caddyfile:/etc/caddy/Caddyfile:ro
|
|
22
|
+
- caddy_data:/data
|
|
23
|
+
- caddy_config:/config
|
|
24
|
+
networks: [internal, external]
|
|
25
|
+
networks:
|
|
26
|
+
internal:
|
|
27
|
+
internal: true
|
|
28
|
+
external:
|
|
29
|
+
volumes:
|
|
30
|
+
caddy_data:
|
|
31
|
+
caddy_config:
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
# ModelSign Control: central policy and fleet admission
|
|
2
|
+
|
|
3
|
+
This optional self-hosted service distributes root-signed trust bundles, manages
|
|
4
|
+
model version floors and disable controls, and serializes accepted model versions
|
|
5
|
+
across enrolled clients. Its dashboard manages bundles, policies and credentials
|
|
6
|
+
and displays fleet state and paged audit history.
|
|
7
|
+
|
|
8
|
+
**Status:** available in ModelSign 1.5.0.
|
|
9
|
+
Install with `pip install "modelsign[control]==1.5.0"`. Clients need only the base
|
|
10
|
+
package; FastAPI/Uvicorn are optional server dependencies.
|
|
11
|
+
|
|
12
|
+
## Trust model
|
|
13
|
+
|
|
14
|
+
The server holds public root material, hashed bearer credentials and policy state,
|
|
15
|
+
never root or publisher private keys. Administrators publish already root-signed
|
|
16
|
+
bundles. Clients independently verify the signature, root, issuer and audience.
|
|
17
|
+
|
|
18
|
+
Each enrolled load fetches the current bundle over authenticated HTTPS, verifies
|
|
19
|
+
artifact bytes and local requirements, checks local rollback state under a lock,
|
|
20
|
+
and requests atomic central admission. The server verifies the publisher's signed
|
|
21
|
+
claim and checks current bundle sequence/digest, revocation, exact credential/model
|
|
22
|
+
grants, disable/floor and shared high-water mark. Then the client commits local
|
|
23
|
+
state. A rejected local version/content check cannot mutate fleet state.
|
|
24
|
+
|
|
25
|
+
Central mode has **no offline fallback**. Authentication, network, signature,
|
|
26
|
+
state or policy failures block loading. Request/response bodies are limited to
|
|
27
|
+
1 MiB. Native proofs omit weights/manifests; OMS proofs include their signed
|
|
28
|
+
statement, so large OMS manifests may exceed this limit. Network timeout is
|
|
29
|
+
configurable from 1–30 seconds per request.
|
|
30
|
+
|
|
31
|
+
This is not proof of inference, model quality, client integrity, or continuing
|
|
32
|
+
authorization of a model already in memory. Workers possessing valid newer signed
|
|
33
|
+
artifacts can advance their permitted models' floors; protect their credentials.
|
|
34
|
+
Local approvals/timestamps are checked by the client, not attested by the service.
|
|
35
|
+
The service is trusted for availability and central floors. Local state helps
|
|
36
|
+
detect restored server state; restoring both sides is outside this protection.
|
|
37
|
+
|
|
38
|
+
## Bootstrap
|
|
39
|
+
|
|
40
|
+
Use an operator-controlled directory on a local durable filesystem:
|
|
41
|
+
|
|
42
|
+
~~~sh
|
|
43
|
+
mkdir -m 700 /var/lib/modelsign-control
|
|
44
|
+
modelsign control init \
|
|
45
|
+
--db /var/lib/modelsign-control/control.db \
|
|
46
|
+
--root-pubkey /etc/modelsign/policy-root-public.pem \
|
|
47
|
+
--issuer example.org --audience production \
|
|
48
|
+
--admin-token-out /var/lib/modelsign-control/bootstrap-admin.token
|
|
49
|
+
modelsign control serve --db /var/lib/modelsign-control/control.db
|
|
50
|
+
~~~
|
|
51
|
+
|
|
52
|
+
Open http://127.0.0.1:8787 locally and enter the bootstrap credential. It stays in
|
|
53
|
+
tab memory, is cleared on reload/disconnect, and is never placed in cookies,
|
|
54
|
+
browser storage or URLs. Do not expose this development HTTP address publicly.
|
|
55
|
+
|
|
56
|
+
The dashboard can publish root-signed bundles, enroll exact model IDs, raise
|
|
57
|
+
minimum versions, disable new admissions, create/revoke scoped workers and other
|
|
58
|
+
administrators, and inspect high-water marks and history. Create a second admin
|
|
59
|
+
before revoking an old one. It shows at most 50 records per category per page;
|
|
60
|
+
long grant lists/event details are explicitly summarized. Complete records remain
|
|
61
|
+
in the database. There is no SSO/MFA or multi-tenant organization boundary:
|
|
62
|
+
use one dedicated instance/database/root scope per authority.
|
|
63
|
+
|
|
64
|
+
Generate a scoped worker credential locally if preferred:
|
|
65
|
+
|
|
66
|
+
~~~sh
|
|
67
|
+
modelsign control token-create \
|
|
68
|
+
--db /var/lib/modelsign-control/control.db \
|
|
69
|
+
--admin-token-file /var/lib/modelsign-control/bootstrap-admin.token \
|
|
70
|
+
--name serving-node-01 --model-id example.org/sentiment \
|
|
71
|
+
--out /var/lib/modelsign-control/serving-node-01.token
|
|
72
|
+
~~~
|
|
73
|
+
|
|
74
|
+
Move credentials into a deployment secret store. Never put tokens or private
|
|
75
|
+
signing keys in model repositories or policy JSON.
|
|
76
|
+
|
|
77
|
+
## Enroll clients
|
|
78
|
+
|
|
79
|
+
Provision policy through a trusted deployment channel:
|
|
80
|
+
|
|
81
|
+
~~~json
|
|
82
|
+
{
|
|
83
|
+
"control_url": "https://modelsign-control.example.org",
|
|
84
|
+
"control_token_env": "MODELSIGN_CONTROL_TOKEN",
|
|
85
|
+
"root_pubkey": "/etc/modelsign/policy-root-public.pem",
|
|
86
|
+
"issuer": "example.org",
|
|
87
|
+
"audience": "production",
|
|
88
|
+
"expected_model_id": "example.org/sentiment",
|
|
89
|
+
"min_security_version": 1,
|
|
90
|
+
"min_bundle_sequence": 1,
|
|
91
|
+
"max_trust_age_seconds": 86400,
|
|
92
|
+
"state_path": "/var/lib/model-service/modelsign-state.json"
|
|
93
|
+
}
|
|
94
|
+
~~~
|
|
95
|
+
|
|
96
|
+
Initialize once with "modelsign policy-state init --policy policy.json".
|
|
97
|
+
Supply the worker token via MODELSIGN_CONTROL_TOKEN. Use the existing
|
|
98
|
+
"modelsign verify --policy ..." or load_policy/require_verified/guard.install APIs.
|
|
99
|
+
Each node keeps its own persistent state. On a node, models sharing a root,
|
|
100
|
+
issuer and audience share a state file.
|
|
101
|
+
|
|
102
|
+
Do not configure a local trust_bundle in central mode. Each verification retrieves
|
|
103
|
+
the latest signed bundle without modifying the model snapshot. Changes affect
|
|
104
|
+
subsequent loads, not models already running. Bundle renewal still requires a
|
|
105
|
+
new signature by the root-key operator; the server cannot forge renewed bundles.
|
|
106
|
+
|
|
107
|
+
For tests only, control_allow_loopback_http=true permits HTTP to literal
|
|
108
|
+
127.0.0.1 or ::1. Production requires HTTPS, normal TLS certificate validation,
|
|
109
|
+
no redirects and no credentials/query strings in the endpoint URL.
|
|
110
|
+
|
|
111
|
+
## OMS policy
|
|
112
|
+
|
|
113
|
+
OMS P-256 key-mode bundles use the same authorization, local state, central floors,
|
|
114
|
+
revocation and fleet admission:
|
|
115
|
+
|
|
116
|
+
~~~sh
|
|
117
|
+
modelsign oms export ./model --key publisher-ec-private.pem \
|
|
118
|
+
--model-id example.org/sentiment --security-version 4
|
|
119
|
+
modelsign oms verify ./model --pubkey publisher-ec-public.pem --policy policy.json
|
|
120
|
+
~~~
|
|
121
|
+
|
|
122
|
+
Use modelsign.oms.verify_bundle(..., pubkey=..., policy=...) in Python or
|
|
123
|
+
guard.install(oms_pubkey=..., policy=...) for supported loading paths.
|
|
124
|
+
|
|
125
|
+
Identity/version are authenticated in the DSSE statement under predicate.modelsign.
|
|
126
|
+
Generic OMS bundles lacking that metadata fail identity/version policy. A canonical
|
|
127
|
+
full-statement digest enters the rollback binding, covering resource paths and
|
|
128
|
+
serialization rules. Policy permits only standard OMS ignore paths and the bundle
|
|
129
|
+
itself, never arbitrary unsigned model files.
|
|
130
|
+
|
|
131
|
+
Root-signed trust schema 2 supports algorithm-tagged publisher entries:
|
|
132
|
+
"ed25519" uses base64 raw 32-byte public keys; "ecdsa-p256" uses base64 canonical
|
|
133
|
+
SPKI DER. key_id is "sha256:" plus the canonical key bytes' digest. Root signatures
|
|
134
|
+
remain Ed25519; schema 1 remains supported. Version 1.4 clients reject schema 2,
|
|
135
|
+
so upgrade before distribution.
|
|
136
|
+
|
|
137
|
+
This does not add Sigstore keyless certificate/transparency validation. The
|
|
138
|
+
existing P-256 key-mode verifier is retained, including legacy PAE compatibility.
|
|
139
|
+
Native approval-chain and RFC 3161 requirements are not silently mapped to OMS;
|
|
140
|
+
unsupported requirements reject explicitly. Identity-only policy can use a pinned
|
|
141
|
+
P-256 key; persistent OMS policy requires a root-signed trust bundle.
|
|
142
|
+
|
|
143
|
+
## Operations and limitations
|
|
144
|
+
|
|
145
|
+
Deploy behind a TLS reverse proxy on a private application network. Included
|
|
146
|
+
Docker/Compose files use Caddy and a persistent local volume. The app does not
|
|
147
|
+
trust forwarded identity headers. Bearer authentication remains required.
|
|
148
|
+
Set proxy rate, connection and timeout limits appropriate to your environment.
|
|
149
|
+
|
|
150
|
+
SQLite BEGIN IMMEDIATE serializes bundle, credential, policy and admission changes.
|
|
151
|
+
Multiple processes may share the same database on one host. Do not use independent
|
|
152
|
+
database replicas as writers or put the database on NFS. This is shared fleet
|
|
153
|
+
state through one authority, not distributed consensus or automatic HA.
|
|
154
|
+
|
|
155
|
+
Use SQLite's online backup API, or stop the service and back up the database and
|
|
156
|
+
WAL/SHM consistently. Test restores. No API silently resets high-water marks;
|
|
157
|
+
recovery needs an operator process and preserved client state. Expired bundles
|
|
158
|
+
fail closed even during outages.
|
|
159
|
+
|
|
160
|
+
History records administrative changes and accepted admissions, without raw
|
|
161
|
+
credentials, weights or request bodies. It is not an independently witnessed
|
|
162
|
+
transparency log. Retain operator backups as required.
|
|
163
|
+
|
|
164
|
+
## Reproduce
|
|
165
|
+
|
|
166
|
+
~~~sh
|
|
167
|
+
python examples/control_plane_demo.py
|
|
168
|
+
python examples/control_plane_demo.py --keep /tmp/modelsign-control-demo --serve
|
|
169
|
+
~~~
|
|
170
|
+
|
|
171
|
+
The demo starts a real loopback service, configures it through authenticated APIs,
|
|
172
|
+
verifies native and OMS packages from two independent node states, exercises
|
|
173
|
+
rollback/disable and publishes revocation. All keys are disposable. Ctrl-C stops
|
|
174
|
+
the optional persistent dashboard demo.
|
|
175
|
+
|
|
176
|
+
Authenticated endpoints: GET/PUT /v1/bundle, PUT /v1/rules, POST /v1/admit,
|
|
177
|
+
GET /v1/status?offset=0&limit=25, POST /v1/credentials, POST /v1/credentials/revoke.
|
|
178
|
+
Use the Authorization bearer header. No CORS is enabled. Nonce-bound admission
|
|
179
|
+
receipts are not reusable authorization tickets.
|
|
180
|
+
|
|
181
|
+
Control clients connect directly: environment and system proxy settings are ignored to keep bearer credentials on the configured route. The local state lock remains held during admission. Policies may set `state_lock_timeout_seconds` (default 120, range 1–3600); in central mode it must exceed `control_timeout_seconds` by at least 10 seconds. Both bundle acceptance and model commits use this wait. Size the wait for expected concurrent loads; sustained contention still fails closed on timeout.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Sharing demo verification
|
|
2
|
+
|
|
3
|
+
Executed on 2026-12-03 with Python 3.12 in a virtual environment containing the
|
|
4
|
+
published PyPI ModelSign 1.3.0 package (not an editable source installation).
|
|
5
|
+
|
|
6
|
+
Command: `python examples/security_review_demo.py`
|
|
7
|
+
|
|
8
|
+
Result: exit status 0. All eight checks returned true:
|
|
9
|
+
|
|
10
|
+
- Valid model and trusted approval accepted.
|
|
11
|
+
- Output, request, model and signer comparisons all performed.
|
|
12
|
+
- Changed output rejected.
|
|
13
|
+
- Changed request rejected.
|
|
14
|
+
- Wrong attestor key rejected.
|
|
15
|
+
- Wrong model signer rejected.
|
|
16
|
+
- Changed model blocked by the pre-load guard.
|
|
17
|
+
- Restored original model still verifies.
|
|
18
|
+
|
|
19
|
+
The script uses disposable synthetic model bytes and a synthetic response. It does
|
|
20
|
+
not run inference or call AWS/TSA/network services. The separate FinSense artifact
|
|
21
|
+
compatibility check was completed during the v1.3.0 release verification.
|
|
22
|
+
|
|
23
|
+
The v1.4 design received a builder review. Its two findings—approval checks before
|
|
24
|
+
model-state commit and shared bundle-sequence state across model IDs—were resolved;
|
|
25
|
+
the follow-up review reported no important unanswered planning questions. This is
|
|
26
|
+
not implementation verification or a security audit of code that does not yet exist.
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
# ModelSign 1.3.0: engineering review packet
|
|
2
|
+
|
|
3
|
+
Status: draft for sharing. No outreach has been sent by preparing this packet.
|
|
4
|
+
Audience: engineers responsible for model artifact verification, ML deployment
|
|
5
|
+
pipelines, inference services, or software supply-chain security.
|
|
6
|
+
|
|
7
|
+
## Short message
|
|
8
|
+
|
|
9
|
+
I released ModelSign 1.3.0, an Apache-2.0 Python library/CLI for signing model
|
|
10
|
+
artifacts and enforcing verification before loading them. It supports timestamped
|
|
11
|
+
approval chains and serving-key attestations that bind response/request hashes to
|
|
12
|
+
the verified model's content, identity card and signer.
|
|
13
|
+
|
|
14
|
+
I've published a FinSense v5 example with a timestamped signature and a pre-load
|
|
15
|
+
verification gate. There is also a small offline demo that rejects changed model
|
|
16
|
+
bytes, changed outputs/requests and incorrect keys. The offline demo uses synthetic
|
|
17
|
+
bytes and does not run inference.
|
|
18
|
+
|
|
19
|
+
I'd value a technical review: can you reproduce the failure cases, find a trust or
|
|
20
|
+
policy bypass, or identify friction in putting this into an MLOps pipeline?
|
|
21
|
+
|
|
22
|
+
Runtime attestations are signed claims by a serving key, not proof of execution.
|
|
23
|
+
AWS KMS support is experimental and tested at the SDK boundary, not with a live
|
|
24
|
+
AWS key. Revocation feeds and rollback floors are design work for v1.4, not shipped
|
|
25
|
+
features.
|
|
26
|
+
|
|
27
|
+
- Release: https://pypi.org/project/modelsign/1.3.0/
|
|
28
|
+
- Source and notes: https://github.com/QuantQJ/modelsign/releases/tag/v1.3.0
|
|
29
|
+
- FinSense: https://huggingface.co/ConstantQJ/finsense-v5
|
|
30
|
+
- Review scope: https://github.com/QuantQJ/modelsign/blob/v1.3.0/docs/reviews/2026-12-03-v1.3.0.md
|
|
31
|
+
|
|
32
|
+
James Kerr / Constant Systems
|
|
33
|
+
|
|
34
|
+
## Reproduce the offline demonstration
|
|
35
|
+
|
|
36
|
+
Use a fresh environment with Python 3.9 or later. This demo requires neither
|
|
37
|
+
OpenSSL, an external TSA, AWS, nor ML frameworks:
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
python3 -m venv .venv-modelsign-review
|
|
41
|
+
.venv-modelsign-review/bin/python -m pip install 'modelsign==1.3.0'
|
|
42
|
+
.venv-modelsign-review/bin/python examples/security_review_demo.py
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
The script accompanies this packet in the repository branch/PR containing the
|
|
46
|
+
packet; it was added after the v1.3.0 tag, so do not expect it in that tag's tree.
|
|
47
|
+
Run the commands from a checkout containing it. It uses temporary keys and files,
|
|
48
|
+
cleans them up, and exits nonzero if an expected security check fails. On Windows
|
|
49
|
+
use the environment's Scripts/python.exe instead of bin/python.
|
|
50
|
+
|
|
51
|
+
Expected: modelsign_version is 1.3.0, synthetic_demo is true, and all eight checks
|
|
52
|
+
are true. This shows integrity/policy behavior with known fixtures; it is not an
|
|
53
|
+
independent security audit or an ML accuracy benchmark.
|
|
54
|
+
|
|
55
|
+
## Reproduce the real FinSense artifact gate
|
|
56
|
+
|
|
57
|
+
Use the pinned public revision:
|
|
58
|
+
https://huggingface.co/ConstantQJ/finsense-v5/tree/822405c196aa16b6c3cb2030f8e231fc88a31ca1
|
|
59
|
+
|
|
60
|
+
Follow that revision's SIGNING.md snapshot download instructions. Fetch all actual
|
|
61
|
+
LFS objects, not just Git pointer files. Download into a clean directory, keep
|
|
62
|
+
keys/CA outside the snapshot, and do not add files before verifying its manifest.
|
|
63
|
+
The signed guide pins ModelSign 1.2.0; v1.3.0 was separately tested against this
|
|
64
|
+
unchanged artifact. Install the timestamp extra when evaluating v1.3.0:
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
python -m pip install 'modelsign[timestamp]==1.3.0'
|
|
68
|
+
modelsign verify /path/to/clean-snapshot \
|
|
69
|
+
--sig /path/to/clean-snapshot/modelsign.sig \
|
|
70
|
+
--pubkey /path/to/independently-trusted-publisher.pem \
|
|
71
|
+
--require-timestamp --tsa-ca /path/to/independently-trusted-tsa-ca.pem --json
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
OpenSSL 3 must be available; on macOS with Homebrew set MODELSIGN_OPENSSL to the
|
|
75
|
+
installed OpenSSL 3 executable if the system command is LibreSSL.
|
|
76
|
+
|
|
77
|
+
Confirm the publisher key independently. Its full SHA-256 fingerprint of the raw
|
|
78
|
+
32-byte public key is:
|
|
79
|
+
`fac28faad5cb425998539313db2ba0e26ea42320c3ca620c39e11be22eaed1d5`.
|
|
80
|
+
This packet is a reference, not an independent trust channel for someone obtaining
|
|
81
|
+
all their files from one untrusted source. Do not use the short display fingerprint
|
|
82
|
+
as an authorization identifier. The TSA CA also requires independent trust.
|
|
83
|
+
|
|
84
|
+
For the changed-file case, run TAMPER_DEMO.md from the pinned revision using this
|
|
85
|
+
v1.3 environment. It modifies only a temporary copy. Model verification does not
|
|
86
|
+
validate sentiment accuracy or the provenance of training data. Review the model
|
|
87
|
+
card's evaluation limitations separately. FinSense does not automatically publish
|
|
88
|
+
per-response runtime attestations; those are demonstrated by the separate script.
|
|
89
|
+
|
|
90
|
+
## Reviewer questions
|
|
91
|
+
|
|
92
|
+
1. Can altered bytes, identity fields, approvals or serving statements be accepted
|
|
93
|
+
under pinned keys and the explicitly required policy?
|
|
94
|
+
2. Are the actual checked properties clear in API and CLI results? Can a caller
|
|
95
|
+
confuse signature-only verification with output/model/signer verification?
|
|
96
|
+
3. Does the pre-load gate fit artifact caching, container builds and inference
|
|
97
|
+
startup? What concrete integration would remove the most friction?
|
|
98
|
+
4. For the proposed v1.4 policy, are bundle scope, revocation behavior and state
|
|
99
|
+
transitions sufficiently explicit? The design is separate from this release.
|
|
100
|
+
|
|
101
|
+
## How to share without overstating it
|
|
102
|
+
|
|
103
|
+
Send the short message and demo to a small number of engineers who own the relevant
|
|
104
|
+
pipeline, or use a community's designated project/showcase channel after checking
|
|
105
|
+
its current rules. Ask for reproducible findings rather than endorsements. A useful
|
|
106
|
+
bug report contains version, OS/Python version, command, expected/actual outcome and
|
|
107
|
+
minimal non-sensitive fixture. Never ask reviewers to share private keys or cloud
|
|
108
|
+
credentials. Do not describe ModelSign as proof of AI execution, regulatory
|
|
109
|
+
compliance, prevention of every supply-chain attack, or validation of FinSense's
|
|
110
|
+
financial performance.
|
|
111
|
+
|
|
112
|
+
Recipient selection and sending remain separate actions; this packet is ready for
|
|
113
|
+
review and has not been emailed, posted, or sent as a direct message.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Control-plane implementation review
|
|
2
|
+
|
|
3
|
+
An independent reviewer inspected the service, transport, policy integration,
|
|
4
|
+
OMS adapter, UI and threat model against the implementation plan.
|
|
5
|
+
|
|
6
|
+
Findings fixed with regressions:
|
|
7
|
+
- Bind canonical signed OMS statement content so resource renames and serialization
|
|
8
|
+
changes cannot reuse an accepted security version.
|
|
9
|
+
- Support the same standard and legacy PAE encodings at local and central verifiers.
|
|
10
|
+
- Check local rollback/binding state under the held lock before central admission;
|
|
11
|
+
reject known-invalid artifacts without poisoning restored fleet state.
|
|
12
|
+
- Bound status responses with pagination and explicit detail/grant summaries.
|
|
13
|
+
|
|
14
|
+
Focused re-review: no remaining critical or important issue in the reviewed fixes.
|
|
15
|
+
This is an engineering review, not an independent third-party security certification.
|
|
16
|
+
|
|
17
|
+
Validation:
|
|
18
|
+
- Full suite: 424 tests; mypy clean across 32 source files.
|
|
19
|
+
- Real HTTP demo with two independent node states: native and OMS version
|
|
20
|
+
acceptance, fleet rollback rejection, disable policy and automatic revocation.
|
|
21
|
+
- Fresh installed wheel exercised that same demo.
|
|
22
|
+
- Upstream model-signing 1.1.1 CLI accepted an OMS bundle carrying the signed
|
|
23
|
+
modelsign identity/version extension. Its fresh environment additionally needed
|
|
24
|
+
certifi and pyOpenSSL to run the CLI.
|
|
25
|
+
- Browser: authentication, policy update, credential creation/revocation; desktop
|
|
26
|
+
and narrow viewport inspected.
|
|
27
|
+
- Wheel/sdist build and Twine validation.
|
|
28
|
+
- Docker Compose configuration validated. Docker daemon unavailable, so no
|
|
29
|
+
container build/runtime or public TLS service was tested.
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# v1.4 development review
|
|
2
|
+
|
|
3
|
+
Implemented the accepted trust-bundle/rollback design on a separate feature branch.
|
|
4
|
+
Runtime version is 1.4.0.dev0, deliberately not a published v1.4.0 release.
|
|
5
|
+
|
|
6
|
+
## Implementation
|
|
7
|
+
|
|
8
|
+
- Strict bounded bundle/policy JSON, domain-separated Ed25519 root signatures,
|
|
9
|
+
exact issuer/audience/model grants, current key authorization and revocation.
|
|
10
|
+
- Explicit optional signed model_id/security_version fields; legacy positional
|
|
11
|
+
ModelCard construction retained, reserved-field shadowing rejected.
|
|
12
|
+
- Frozen VerificationPolicy shared by verify_model, CLI and direct/installed guards.
|
|
13
|
+
Required approvals and timestamps precede the model-state commit. A single loaded
|
|
14
|
+
signature snapshot supplies all model, approval and timestamp checks.
|
|
15
|
+
- Shared per-authority bundle state accepted before model checks; model high-water
|
|
16
|
+
marks committed only after all required checks. POSIX flock, atomic replacement,
|
|
17
|
+
fsync, commit-time concurrency recheck and equal-version equivocation checks.
|
|
18
|
+
- Explicit initialization and administrative reset with exclusive audit backup and
|
|
19
|
+
reason. No state auto-reset, unsigned/OMS bypass, or hidden network fetching.
|
|
20
|
+
- Offline root-signing and policy-state CLI commands; relative deployment paths.
|
|
21
|
+
|
|
22
|
+
## Independent review and fixes
|
|
23
|
+
|
|
24
|
+
The reviewer found positional ModelCard compatibility and weak stored-digest
|
|
25
|
+
validation. Both were reproduced and fixed. The same positional safeguard was
|
|
26
|
+
applied to VerifyResult. Additional findings concerning idempotent verification
|
|
27
|
+
against unwritable state and structured CLI JSON errors were also fixed.
|
|
28
|
+
|
|
29
|
+
The scoped follow-up reported no remaining important findings in these fixes.
|
|
30
|
+
It independently ran 50 policy/trust/state tests and the four-outcome CLI demo.
|
|
31
|
+
|
|
32
|
+
## Acceptance coverage
|
|
33
|
+
|
|
34
|
+
Tests cover invalid bundle signatures/scope/schema/time, duplicate JSON/keys,
|
|
35
|
+
explicit floors, shared revocation memory across model IDs, unauthorized model
|
|
36
|
+
identities and keys, rotation without resetting floors, failed approvals and
|
|
37
|
+
missing timestamps without model-state advancement, valid old TSA tokens followed
|
|
38
|
+
by revocation, actual multi-process model races, bundle updates during full API
|
|
39
|
+
verification, corrupt/missing/unwritable state, pre/post-replacement fsync errors,
|
|
40
|
+
reset audit backups, installed Hub policy and legacy constructor compatibility.
|
|
41
|
+
|
|
42
|
+
The CLI demo shows authorized version 12 accepted, version 11 rejected, a revoked
|
|
43
|
+
publisher rejected, and replay of the earlier trust bundle rejected. Its data and
|
|
44
|
+
keys are disposable, and it makes no network or AWS requests.
|
|
45
|
+
|
|
46
|
+
## Limits
|
|
47
|
+
|
|
48
|
+
Persistent state is for cooperating POSIX processes on suitable local filesystems,
|
|
49
|
+
not a distributed consensus/anti-snapshot mechanism. A trusted clock and deployed
|
|
50
|
+
initial floors are operational prerequisites. Current revocation rejects even
|
|
51
|
+
historical timestamped artifacts; historical authorization is not implemented.
|
|
52
|
+
Already loaded models are not retroactively unloaded. Administrative reset lowers
|
|
53
|
+
the entire shared scope explicitly and is not a cryptographically signed audit.
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# Control Plane Implementation Plan
|
|
2
|
+
> **For agentic workers:** REQUIRED SUB-SKILL: superpowers:executing-plans.
|
|
3
|
+
**Goal:** Central administration, authenticated automatic bundle retrieval and fleet
|
|
4
|
+
rollback enforcement for ModelSign and OMS.
|
|
5
|
+
**Architecture:** Optional FastAPI service, SQLite atomic admission, stdlib HTTPS
|
|
6
|
+
client, shared policy verifier. Signed bundles remain root-authenticated locally.
|
|
7
|
+
**Tech Stack:** Python, cryptography, SQLite, FastAPI/Uvicorn, plain HTML/JS.
|
|
8
|
+
**Spec:** docs/superpowers/specs/2026-12-03-control-plane.md
|
|
9
|
+
|
|
10
|
+
## Global Constraints
|
|
11
|
+
No private keys on server. Root pin required. 1 MiB bounds. No remote fallback.
|
|
12
|
+
Single local durable database; no distributed consensus claim. Preserve v1.4 APIs.
|
|
13
|
+
|
|
14
|
+
## Review Focus
|
|
15
|
+
- Concurrent revoked/stale bundle admission must fail atomically.
|
|
16
|
+
- Unauthenticated/worker credentials cannot administer policy or other models.
|
|
17
|
+
- Unsigned version metadata cannot poison a floor.
|
|
18
|
+
- Redirects, outages, malformed payloads and disk failures fail closed.
|
|
19
|
+
- OMS ignore lists and mixed formats must not weaken policy.
|
|
20
|
+
|
|
21
|
+
## Tasks
|
|
22
|
+
- [x] 1. Tests then algorithm-tagged trust keys and OMS policy adapter:
|
|
23
|
+
trust_bundle.py, oms.py, policy.py, guard.py, cli.py; tests/test_oms_policy.py.
|
|
24
|
+
Verify signed identity/version and local rollback on both formats.
|
|
25
|
+
- [x] 2. Tests then SQLite service store:
|
|
26
|
+
control/store.py and tests/test_control_store.py. Atomic bundle/policy/admission,
|
|
27
|
+
credential revocation and exact model scopes; concurrent clients and stale proof.
|
|
28
|
+
- [x] 3. Tests then transport/API and shared client integration:
|
|
29
|
+
control/client.py, control/server.py, policy.py, tests/test_control_api.py.
|
|
30
|
+
Exercise actual verifier against API, no silent downgrade, independent nodes.
|
|
31
|
+
- [x] 4. CLI/dashboard/deployment/demo:
|
|
32
|
+
control/cli.py, control/static/*, docs/control-plane.md, examples/control_plane_demo.py,
|
|
33
|
+
deploy/control-plane/*. Test CLI setup, dashboard access and end-to-end workflow.
|
|
34
|
+
- [x] 5. Full tests, mypy, build/package install, live localhost exercise, fresh review,
|
|
35
|
+
fix findings, push reviewable PR and report exact deployment/release status.
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
## Execution record
|
|
39
|
+
Native execution in /Users/qj/modelsign-control, isolated from published main.
|
|
40
|
+
Tests were introduced before their corresponding implementations; review regressions
|
|
41
|
+
reproduced OMS path-binding, compatibility encoding and local-before-central issues.
|
|
42
|
+
Ruling: use a locked before_commit callback rather than an unlocked preflight;
|
|
43
|
+
this preserves local ordering across concurrent verifiers during admission.
|
|
44
|
+
Ruling: include canonical authenticated OMS statement digest in policy identity;
|
|
45
|
+
this binds resource names and ignore settings, while legacy bundles preserve
|
|
46
|
+
their original result shape.
|
|
47
|
+
Ruling: page dashboard/status and summarize large audit details instead of allowing
|
|
48
|
+
unbounded responses. Complete records remain in SQLite.
|
|
49
|
+
Fresh reviewer found no remaining critical/important issue in the corrected scope.
|
|
50
|
+
Docker Compose validates, but daemon is unavailable; container runtime/TLS rollout
|
|
51
|
+
is not claimed. Real native HTTP service, fresh wheel, browser and upstream OMS
|
|
52
|
+
verification were executed. No production fleet or public service was changed.
|