modelsign 1.4.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.
Files changed (106) hide show
  1. modelsign-1.5.0/.dockerignore +10 -0
  2. {modelsign-1.4.0 → modelsign-1.5.0}/.github/workflows/ci.yml +4 -1
  3. {modelsign-1.4.0 → modelsign-1.5.0}/.gitignore +3 -0
  4. {modelsign-1.4.0 → modelsign-1.5.0}/CHANGELOG.md +9 -0
  5. {modelsign-1.4.0/src/modelsign.egg-info → modelsign-1.5.0}/PKG-INFO +17 -1
  6. {modelsign-1.4.0 → modelsign-1.5.0}/README.md +10 -0
  7. modelsign-1.5.0/deploy/control-plane/Caddyfile +6 -0
  8. modelsign-1.5.0/deploy/control-plane/Dockerfile +8 -0
  9. modelsign-1.5.0/deploy/control-plane/README.md +11 -0
  10. modelsign-1.5.0/deploy/control-plane/compose.yaml +31 -0
  11. modelsign-1.5.0/docs/control-plane.md +181 -0
  12. modelsign-1.5.0/docs/reviews/2026-12-03-control-plane.md +29 -0
  13. modelsign-1.5.0/docs/superpowers/plans/2026-12-03-control-plane.md +52 -0
  14. modelsign-1.5.0/docs/superpowers/specs/2026-12-03-control-plane.md +38 -0
  15. {modelsign-1.4.0 → modelsign-1.5.0}/docs/trust-policy.md +2 -2
  16. modelsign-1.5.0/examples/control_plane_demo.py +237 -0
  17. {modelsign-1.4.0 → modelsign-1.5.0}/pyproject.toml +5 -0
  18. {modelsign-1.4.0 → modelsign-1.5.0}/src/modelsign/__init__.py +1 -1
  19. {modelsign-1.4.0 → modelsign-1.5.0}/src/modelsign/cli.py +18 -4
  20. modelsign-1.5.0/src/modelsign/control/__init__.py +1 -0
  21. modelsign-1.5.0/src/modelsign/control/cli.py +104 -0
  22. modelsign-1.5.0/src/modelsign/control/client.py +132 -0
  23. modelsign-1.5.0/src/modelsign/control/server.py +116 -0
  24. modelsign-1.5.0/src/modelsign/control/static/dashboard.css +3 -0
  25. modelsign-1.5.0/src/modelsign/control/static/dashboard.js +112 -0
  26. modelsign-1.5.0/src/modelsign/control/static/index.html +32 -0
  27. modelsign-1.5.0/src/modelsign/control/store.py +458 -0
  28. {modelsign-1.4.0 → modelsign-1.5.0}/src/modelsign/guard.py +4 -3
  29. {modelsign-1.4.0 → modelsign-1.5.0}/src/modelsign/oms.py +19 -2
  30. {modelsign-1.4.0 → modelsign-1.5.0}/src/modelsign/policy.py +148 -21
  31. {modelsign-1.4.0 → modelsign-1.5.0}/src/modelsign/policy_state.py +13 -5
  32. {modelsign-1.4.0 → modelsign-1.5.0}/src/modelsign/trust_bundle.py +37 -3
  33. {modelsign-1.4.0 → modelsign-1.5.0/src/modelsign.egg-info}/PKG-INFO +17 -1
  34. {modelsign-1.4.0 → modelsign-1.5.0}/src/modelsign.egg-info/SOURCES.txt +23 -0
  35. {modelsign-1.4.0 → modelsign-1.5.0}/src/modelsign.egg-info/requires.txt +10 -0
  36. modelsign-1.5.0/tests/test_control_api.py +169 -0
  37. modelsign-1.5.0/tests/test_control_cli.py +60 -0
  38. modelsign-1.5.0/tests/test_control_store.py +133 -0
  39. modelsign-1.5.0/tests/test_control_transport.py +81 -0
  40. modelsign-1.5.0/tests/test_oms_policy.py +150 -0
  41. {modelsign-1.4.0 → modelsign-1.5.0}/tests/test_policy_state.py +25 -0
  42. {modelsign-1.4.0 → modelsign-1.5.0}/.github/FUNDING.yml +0 -0
  43. {modelsign-1.4.0 → modelsign-1.5.0}/LICENSE +0 -0
  44. {modelsign-1.4.0 → modelsign-1.5.0}/action.yml +0 -0
  45. {modelsign-1.4.0 → modelsign-1.5.0}/docs/attestation.md +0 -0
  46. {modelsign-1.4.0 → modelsign-1.5.0}/docs/aws-kms.md +0 -0
  47. {modelsign-1.4.0 → modelsign-1.5.0}/docs/outreach/demo-verification.md +0 -0
  48. {modelsign-1.4.0 → modelsign-1.5.0}/docs/outreach/modelsign-1.3-engineering-packet.md +0 -0
  49. {modelsign-1.4.0 → modelsign-1.5.0}/docs/reviews/2026-12-03-v1.3.0.md +0 -0
  50. {modelsign-1.4.0 → modelsign-1.5.0}/docs/reviews/2026-12-03-v1.4-development.md +0 -0
  51. {modelsign-1.4.0 → modelsign-1.5.0}/docs/security-policy-follow-ons.md +0 -0
  52. {modelsign-1.4.0 → modelsign-1.5.0}/docs/superpowers/plans/2026-12-03-kms.md +0 -0
  53. {modelsign-1.4.0 → modelsign-1.5.0}/docs/superpowers/plans/2026-12-03-rfc3161.md +0 -0
  54. {modelsign-1.4.0 → modelsign-1.5.0}/docs/superpowers/plans/2026-12-03-trust-rollback.md +0 -0
  55. {modelsign-1.4.0 → modelsign-1.5.0}/docs/superpowers/specs/2026-12-03-kms-design.md +0 -0
  56. {modelsign-1.4.0 → modelsign-1.5.0}/docs/superpowers/specs/2026-12-03-rfc3161-design.md +0 -0
  57. {modelsign-1.4.0 → modelsign-1.5.0}/docs/superpowers/specs/2026-12-03-trust-rollback-design.md +0 -0
  58. {modelsign-1.4.0 → modelsign-1.5.0}/docs/timestamps.md +0 -0
  59. {modelsign-1.4.0 → modelsign-1.5.0}/examples/security_review_demo.py +0 -0
  60. {modelsign-1.4.0 → modelsign-1.5.0}/examples/trust_policy_demo.py +0 -0
  61. {modelsign-1.4.0 → modelsign-1.5.0}/setup.cfg +0 -0
  62. {modelsign-1.4.0 → modelsign-1.5.0}/src/modelsign/api.py +0 -0
  63. {modelsign-1.4.0 → modelsign-1.5.0}/src/modelsign/approvals.py +0 -0
  64. {modelsign-1.4.0 → modelsign-1.5.0}/src/modelsign/attest.py +0 -0
  65. {modelsign-1.4.0 → modelsign-1.5.0}/src/modelsign/crypto/__init__.py +0 -0
  66. {modelsign-1.4.0 → modelsign-1.5.0}/src/modelsign/crypto/aws_kms.py +0 -0
  67. {modelsign-1.4.0 → modelsign-1.5.0}/src/modelsign/crypto/keys.py +0 -0
  68. {modelsign-1.4.0 → modelsign-1.5.0}/src/modelsign/crypto/sign.py +0 -0
  69. {modelsign-1.4.0 → modelsign-1.5.0}/src/modelsign/crypto/signers.py +0 -0
  70. {modelsign-1.4.0 → modelsign-1.5.0}/src/modelsign/crypto/verify.py +0 -0
  71. {modelsign-1.4.0 → modelsign-1.5.0}/src/modelsign/formats/__init__.py +0 -0
  72. {modelsign-1.4.0 → modelsign-1.5.0}/src/modelsign/formats/directory.py +0 -0
  73. {modelsign-1.4.0 → modelsign-1.5.0}/src/modelsign/formats/single.py +0 -0
  74. {modelsign-1.4.0 → modelsign-1.5.0}/src/modelsign/identity/__init__.py +0 -0
  75. {modelsign-1.4.0 → modelsign-1.5.0}/src/modelsign/identity/canonical.py +0 -0
  76. {modelsign-1.4.0 → modelsign-1.5.0}/src/modelsign/identity/card.py +0 -0
  77. {modelsign-1.4.0 → modelsign-1.5.0}/src/modelsign/lineage.py +0 -0
  78. {modelsign-1.4.0 → modelsign-1.5.0}/src/modelsign/middleware/__init__.py +0 -0
  79. {modelsign-1.4.0 → modelsign-1.5.0}/src/modelsign/middleware/response.py +0 -0
  80. {modelsign-1.4.0 → modelsign-1.5.0}/src/modelsign/sig.py +0 -0
  81. {modelsign-1.4.0 → modelsign-1.5.0}/src/modelsign/timestamps.py +0 -0
  82. {modelsign-1.4.0 → modelsign-1.5.0}/src/modelsign.egg-info/dependency_links.txt +0 -0
  83. {modelsign-1.4.0 → modelsign-1.5.0}/src/modelsign.egg-info/entry_points.txt +0 -0
  84. {modelsign-1.4.0 → modelsign-1.5.0}/src/modelsign.egg-info/top_level.txt +0 -0
  85. {modelsign-1.4.0 → modelsign-1.5.0}/tests/conftest.py +0 -0
  86. {modelsign-1.4.0 → modelsign-1.5.0}/tests/test_api.py +0 -0
  87. {modelsign-1.4.0 → modelsign-1.5.0}/tests/test_approvals.py +0 -0
  88. {modelsign-1.4.0 → modelsign-1.5.0}/tests/test_attest.py +0 -0
  89. {modelsign-1.4.0 → modelsign-1.5.0}/tests/test_canonical.py +0 -0
  90. {modelsign-1.4.0 → modelsign-1.5.0}/tests/test_card.py +0 -0
  91. {modelsign-1.4.0 → modelsign-1.5.0}/tests/test_cli.py +0 -0
  92. {modelsign-1.4.0 → modelsign-1.5.0}/tests/test_digest_binding_review.py +0 -0
  93. {modelsign-1.4.0 → modelsign-1.5.0}/tests/test_formats.py +0 -0
  94. {modelsign-1.4.0 → modelsign-1.5.0}/tests/test_guard.py +0 -0
  95. {modelsign-1.4.0 → modelsign-1.5.0}/tests/test_integration.py +0 -0
  96. {modelsign-1.4.0 → modelsign-1.5.0}/tests/test_keys.py +0 -0
  97. {modelsign-1.4.0 → modelsign-1.5.0}/tests/test_kms.py +0 -0
  98. {modelsign-1.4.0 → modelsign-1.5.0}/tests/test_lineage.py +0 -0
  99. {modelsign-1.4.0 → modelsign-1.5.0}/tests/test_middleware.py +0 -0
  100. {modelsign-1.4.0 → modelsign-1.5.0}/tests/test_oms.py +0 -0
  101. {modelsign-1.4.0 → modelsign-1.5.0}/tests/test_policy.py +0 -0
  102. {modelsign-1.4.0 → modelsign-1.5.0}/tests/test_policy_cli.py +0 -0
  103. {modelsign-1.4.0 → modelsign-1.5.0}/tests/test_sig.py +0 -0
  104. {modelsign-1.4.0 → modelsign-1.5.0}/tests/test_sign_verify.py +0 -0
  105. {modelsign-1.4.0 → modelsign-1.5.0}/tests/test_timestamps.py +0 -0
  106. {modelsign-1.4.0 → modelsign-1.5.0}/tests/test_trust_bundle.py +0 -0
@@ -0,0 +1,10 @@
1
+ .git
2
+ .venv
3
+ .pytest_cache
4
+ .mypy_cache
5
+ .playwright-cli
6
+ **/__pycache__
7
+ **/*.pyc
8
+ *.egg-info
9
+ dist
10
+ build
@@ -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
 
@@ -7,3 +7,6 @@ build/
7
7
 
8
8
  # local virtualenv
9
9
  .venv/
10
+
11
+ # Local browser verification artifacts
12
+ .playwright-cli/
@@ -1,5 +1,14 @@
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
+
3
12
  ## v1.4.0 (2026-12-03)
4
13
 
5
14
  - Optional signed trust bundles with pinned roots, exact model grants and current-key revocation policy.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: modelsign
3
- Version: 1.4.0
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
@@ -392,3 +398,13 @@ and local atomic writes.
392
398
  Run `python examples/trust_policy_demo.py` from a checkout with modelsign 1.4 installed
393
399
  to see valid loading, version rollback rejection, publisher revocation and old
394
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.
@@ -358,3 +358,13 @@ and local atomic writes.
358
358
  Run `python examples/trust_policy_demo.py` from a checkout with modelsign 1.4 installed
359
359
  to see valid loading, version rollback rejection, publisher revocation and old
360
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,6 @@
1
+ {$CONTROL_DOMAIN} {
2
+ request_body {
3
+ max_size 1MB
4
+ }
5
+ reverse_proxy control:8787
6
+ }
@@ -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,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,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.
@@ -0,0 +1,38 @@
1
+ # ModelSign control plane and OMS policy
2
+ User authorized implementation, including OMS, without further design handoffs.
3
+
4
+ Build a self-hosted single-authority administration service with a browser dashboard,
5
+ root-signed bundle publication, per-model minimum version/disable controls, scoped
6
+ worker credentials, audit history, and serialized fleet-wide model high-water marks.
7
+ Root/publisher private keys never enter the service. SQLite transactions serialize
8
+ bundle updates and admissions across workers/processes on one host/local volume.
9
+ This is shared fleet state, not distributed consensus or a managed SaaS promise.
10
+
11
+ Clients opt in via control_url, control_token_env and an independently pinned root,
12
+ issuer/audience/model ID. Each load fetches the current signed bundle, verifies it,
13
+ checks artifact bytes/identity/approvals locally, then submits authenticated artifact
14
+ proof for a transactional fleet admission. No offline fallback in central mode.
15
+ Local state is also required and protects against a replayed server database.
16
+ Commit central state after local checks; then local model state. Concurrent bundle
17
+ changes reject/retry rather than admitting under stale authorization.
18
+
19
+ Service checks publisher signature, bundle sequence/digest, model grant, key validity,
20
+ model policy and shared version/content binding; credential grants restrict model IDs.
21
+ Service admission is not proof of execution, local checks, or continuous authorization.
22
+ TLS is mandatory except explicitly allowed loopback development. No redirects.
23
+ Tokens have admin or worker roles, high entropy, server-side hashes, revocation,
24
+ and no URL/log storage. Dashboard keeps bearer token in memory, uses same-origin
25
+ requests, strict CSP, no external assets and no HTML rendering of untrusted values.
26
+ Request/response bodies bounded to 1 MiB. Remote errors fail closed.
27
+
28
+ OMS P-256 key-mode bundles receive the same policy enforcement. Trust bundle schema 2
29
+ adds algorithm-tagged publisher entries (ed25519 raw or ecdsa-p256 SPKI DER), retaining
30
+ schema 1 behavior. Model identity/version must be authenticated in the DSSE predicate
31
+ under "modelsign"; generic OMS files without that metadata cannot claim an identity.
32
+ Policy-enabled OMS forbids arbitrary ignored paths and unsigned files. Unsupported
33
+ native approvals/timestamp requirements on OMS reject explicitly. Keyless Sigstore
34
+ certificate/transparency validation is not implemented or implied.
35
+
36
+ Server deployment artifacts, CLI setup and token administration, end-to-end demo,
37
+ security tests, source docs and CI are part of delivery. Use a development version;
38
+ do not silently replace the released 1.4.0 or expose an unauthenticated public service.
@@ -79,9 +79,9 @@ min_approvals, approver_pubkeys and approver_keyring_dir. Approver trust is sepa
79
79
  from bundle model_signer grants. All required approvals and timestamps must pass
80
80
  before model state advances. Legacy CLI approval flags now use this same pipeline.
81
81
 
82
- Enabled policy blocks unsigned and OMS fallbacks. Installed policy requires local
82
+ Enabled policy blocks unsigned fallbacks. Installed policy requires local
83
83
  coverage and whole-artifact verification; allow_per_file and cover_local=False
84
- are rejected with policy. There is no OMS policy adapter in this release.
84
+ are rejected with policy. OMS P-256 policy is available in 1.5.0; see [the control-plane guide](control-plane.md). Unsupported native approval/timestamp requirements still reject for OMS.
85
85
 
86
86
  ## Current authorization, not historical acceptance
87
87