Ben
3fc7b624d8
feat(cron,gateway): NAS-JWT fire verifier + /api/cron/fire webhook (Chronos)
...
Phase 4E (E.1 + E.2). The inbound side of Chronos: NAS POSTs the agent when a
one-shot fires; the agent verifies a NAS-minted JWT and runs the job.
E.1 — plugins/cron/chronos/verify.py:
- verify_nas_fire_token(token, expected_audience, jwks_or_key, issuer): verifies
signature against the NAS JWKS (RS/ES family; symmetric rejected), aud == this
agent, exp/nbf, iss, and purpose == "cron_fire" (so a general agent JWT can't
be replayed against the fire endpoint). Returns claims or None; never raises.
Crypto delegated to PyJWT[crypto] (already a declared dep) — no hand-rolled
JWT, no new dependency. No key configured → refuse (never unsigned-decode a
security boundary).
- get_fire_verifier(): pluggable indirection so the DQ-4 escape hatch
(direct per-job cron-key) can swap in with no handler change.
E.2 — gateway/platforms/api_server.py:
- POST /api/cron/fire (registered only when _CRON_AVAILABLE). Authenticated by
the NAS-JWT via get_fire_verifier() — NOT API_SERVER_KEY (NAS holds no API
key; this is the only inbound that triggers remote job execution, so it gets
its own purpose-scoped check). Verifier args come from cron.chronos.* config.
401 on bad/missing/forged token. 400 on missing job_id. On success: 202 +
fire_due runs in the background (so a long agent turn never trips NAS's HTTP
timeout); the store CAS claim inside fire_due de-dupes a scheduler retry.
Tests:
- test_chronos_verify (11): REAL RS256 signing — valid→claims, wrong-aud,
missing/wrong purpose, expired, wrong-iss, tampered-signature (attacker key),
no-key-refuse, empty-token, JWKS-URL key resolution, get_fire_verifier.
- test_cron_fire_webhook (5): valid→202+fire, invalid→401+no-fire, missing
token→401, missing job_id→400, and fire path does NOT require API_SERVER_KEY.
api_server regression suites (214) green.
E.3 (NAS endpoints) is a separate cross-repo PR; the wire contract lands next
(docs/chronos-managed-cron-contract.md).
2026-06-18 14:46:33 +10:00
..
2026-05-20 13:00:57 -07:00
2026-06-17 16:37:45 -07:00
2026-05-28 22:26:25 -07:00
2026-06-10 14:01:34 +10:00
2026-05-28 22:26:25 -07:00
2026-06-13 06:38:29 -07:00
2026-06-08 11:29:53 -07:00
2026-06-06 09:00:10 -07:00
2026-06-16 03:35:24 +05:30
2026-05-28 22:26:25 -07:00
2026-05-17 02:29:41 -07:00
2026-05-28 22:26:25 -07:00
2026-06-07 10:04:57 -07:00
2026-06-14 03:25:49 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-06-07 18:38:54 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-06-14 05:10:39 -07:00
2026-06-07 18:05:58 -07:00
2026-06-02 16:55:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-24 01:31:45 -07:00
2026-06-01 18:52:05 -07:00
2026-05-18 21:38:05 -07:00
2026-06-03 20:30:59 +08:00
2026-05-28 22:26:25 -07:00
2026-06-15 05:51:47 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-18 10:19:40 -07:00
2026-06-08 06:32:23 -07:00
2026-06-13 04:51:59 -07:00
2026-06-07 22:39:51 -07:00
2026-06-14 03:20:21 -07:00
2026-06-13 07:18:54 -07:00
2026-05-24 01:31:45 -07:00
2026-06-16 05:26:04 -07:00
2026-06-18 14:46:33 +10:00
2026-05-29 19:06:05 -07:00
2026-05-25 14:54:02 -07:00
2026-05-09 11:04:46 -07:00
2026-05-28 22:26:25 -07:00
2026-05-22 14:21:41 -07:00
2026-05-22 14:21:41 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-22 14:21:41 -07:00
2026-05-22 14:21:41 -07:00
2026-05-28 22:26:25 -07:00
2026-06-07 08:27:40 -07:00
2026-06-07 06:21:37 -07:00
2026-06-11 15:39:01 -04:00
2026-05-22 14:21:41 -07:00
2026-05-28 04:52:02 -07:00
2026-05-22 14:21:41 -07:00
2026-05-28 22:26:25 -07:00
2026-05-22 14:21:41 -07:00
2026-06-10 00:24:06 -07:00
2026-05-27 03:35:33 -07:00
2026-05-22 14:21:41 -07:00
2026-05-22 14:21:41 -07:00
2026-05-22 14:21:41 -07:00
2026-05-28 22:26:25 -07:00
2026-05-22 14:21:41 -07:00
2026-05-22 14:21:41 -07:00
2026-06-14 17:02:21 +07:00
2026-05-17 02:29:41 -07:00
2026-05-28 22:26:25 -07:00
2026-06-05 03:10:40 -07:00
2026-06-16 05:49:24 -07:00
2026-05-28 22:26:25 -07:00
2026-06-13 07:18:37 -07:00
2026-06-11 11:58:19 -07:00
2026-05-28 22:26:25 -07:00
2026-06-14 04:16:26 -07:00
2026-05-30 07:28:06 -07:00
2026-05-30 18:58:46 -07:00
2026-05-30 07:38:03 -07:00
2026-05-28 22:26:25 -07:00
2026-06-16 15:49:59 -07:00
2026-06-07 06:21:37 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-06-04 06:15:23 -07:00
2026-05-07 05:09:39 -07:00
2026-06-04 06:15:23 -07:00
2026-05-28 22:26:25 -07:00
2026-05-27 02:41:24 -07:00
2026-05-28 22:26:25 -07:00
2026-06-10 14:01:34 +10:00
2026-06-14 03:25:08 -07:00
2026-05-07 06:31:08 -07:00
2026-05-07 17:33:09 -07:00
2026-05-11 07:06:27 -07:00
2026-06-04 16:54:40 -07:00
2026-06-06 11:46:24 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-24 01:31:45 -07:00
2026-05-28 22:26:25 -07:00
2026-06-01 20:30:24 -07:00
2026-05-28 22:26:25 -07:00
2026-06-07 23:14:18 -07:00
2026-06-12 12:02:41 -07:00
2026-06-04 21:55:20 -07:00
2026-05-28 22:26:25 -07:00
2026-05-24 15:03:27 -07:00
2026-06-11 07:41:43 -04:00
2026-06-11 07:41:43 -04:00
2026-05-28 22:26:25 -07:00
2026-06-11 07:41:43 -04:00
2026-05-28 22:26:25 -07:00
2026-06-13 06:57:08 -07:00
2026-06-16 06:34:54 -07:00
2026-06-08 15:12:12 -07:00
2026-06-05 09:10:26 -07:00
2026-05-26 14:28:51 -07:00
2026-05-28 22:26:25 -07:00
2026-06-08 22:51:03 -07:00
2026-06-16 06:23:53 -07:00
2026-05-16 12:55:23 -07:00
2026-05-28 22:26:25 -07:00
2026-06-16 15:49:59 -07:00
2026-05-28 22:26:25 -07:00
2026-06-10 00:24:06 -07:00
2026-05-25 15:22:23 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-06-12 08:51:10 +00:00
2026-05-29 13:17:46 -07:00
2026-05-28 22:26:25 -07:00
2026-06-02 05:52:54 -07:00
2026-05-29 17:36:58 +00:00
2026-06-04 07:50:22 -07:00
2026-06-17 16:37:45 -07:00
2026-05-28 22:26:25 -07:00
2026-06-02 17:27:44 -07:00
2026-06-04 05:56:45 -07:00
2026-05-28 22:26:25 -07:00
2026-05-07 05:04:37 -07:00
2026-05-28 22:26:25 -07:00
2026-06-06 18:44:44 -07:00
2026-06-03 20:25:17 +08:00
2026-06-17 16:37:45 -07:00
2026-05-22 14:21:41 -07:00
2026-05-28 22:26:25 -07:00
2026-06-14 03:25:08 -07:00
2026-06-10 23:22:43 -07:00
2026-06-08 01:25:35 -07:00
2026-05-28 22:26:25 -07:00
2026-06-14 05:10:39 -07:00
2026-06-15 07:46:34 -07:00
2026-05-20 13:00:57 -07:00
2026-05-27 05:21:53 -07:00
2026-05-28 22:26:25 -07:00
2026-06-12 12:02:41 -07:00
2026-05-30 07:38:03 -07:00
2026-05-15 14:32:14 -07:00
2026-06-07 23:57:32 -07:00
2026-06-03 23:51:44 -06:00
2026-05-07 05:49:16 -07:00
2026-05-08 18:50:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-18 22:25:15 -07:00
2026-06-16 15:49:59 -07:00
2026-06-03 06:36:46 -07:00
2026-05-09 14:18:20 +03:00
2026-05-28 22:26:25 -07:00
2026-06-08 20:52:08 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-23 02:25:53 -07:00
2026-06-07 22:10:32 -07:00
2026-05-27 02:41:24 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-06-04 07:50:45 -07:00
2026-05-28 22:26:25 -07:00
2026-06-11 07:41:43 -04:00
2026-06-08 15:12:12 -07:00
2026-05-10 09:01:51 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-06-12 01:07:50 -07:00
2026-06-12 01:07:50 -07:00
2026-06-07 06:21:37 -07:00
2026-06-07 21:19:59 -07:00
2026-05-07 06:54:29 -07:00
2026-06-12 10:36:14 +05:30
2026-06-13 03:33:27 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-06-07 02:15:23 -07:00
2026-05-28 22:26:25 -07:00
2026-06-15 07:46:34 -07:00
2026-06-15 05:25:07 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-31 09:29:03 -07:00
2026-06-13 13:44:45 -07:00
2026-06-14 11:13:38 -07:00
2026-06-16 06:34:54 -07:00
2026-06-14 11:13:38 -07:00
2026-06-02 00:33:50 -07:00
2026-06-09 23:16:23 -07:00
2026-05-28 22:26:25 -07:00
2026-05-25 16:23:24 +00:00
2026-05-08 11:18:14 -07:00
2026-06-15 14:35:15 -04:00
2026-05-28 22:26:25 -07:00
2026-06-11 11:58:19 -07:00
2026-05-18 22:08:08 -07:00
2026-05-28 22:26:25 -07:00
2026-05-18 22:51:35 -07:00
2026-05-28 22:26:25 -07:00
2026-06-07 22:10:03 -07:00
2026-05-28 22:26:25 -07:00
2026-06-08 15:53:16 -07:00
2026-05-18 22:34:48 -07:00
2026-06-14 04:51:50 -07:00
2026-05-18 22:59:40 -07:00
2026-06-10 00:24:06 -07:00
2026-05-18 22:14:45 -07:00
2026-05-27 02:41:24 -07:00
2026-06-16 06:34:54 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-12 17:02:29 -07:00
2026-05-18 21:52:39 -07:00
2026-05-09 11:10:36 -07:00
2026-06-16 13:04:20 -07:00
2026-06-02 00:33:50 -07:00
2026-05-28 22:26:25 -07:00
2026-05-18 22:28:21 -07:00
2026-05-23 02:42:10 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-31 21:05:53 -07:00
2026-05-28 23:25:52 -07:00
2026-06-11 10:01:51 -04:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-06-01 17:31:32 -07:00
2026-05-28 22:26:25 -07:00
2026-06-16 06:34:54 -07:00
2026-06-07 04:53:22 -07:00
2026-06-01 02:04:14 -07:00
2026-06-12 13:42:42 -04:00
2026-06-04 06:56:28 -07:00
2026-06-08 01:25:35 -07:00
2026-05-28 22:26:25 -07:00
2026-06-05 18:05:05 -07:00
2026-06-13 03:33:27 -07:00
2026-06-10 02:57:39 -07:00
2026-05-28 22:26:25 -07:00
2026-06-14 02:40:54 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-24 01:30:47 -07:00
2026-06-01 19:20:36 -07:00
2026-06-07 21:50:57 -07:00
2026-06-07 22:10:17 -07:00
2026-06-11 07:51:01 -07:00
2026-05-15 14:32:14 -07:00
2026-06-11 07:51:01 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-06-11 03:47:29 -07:00
2026-05-30 07:33:15 -07:00
2026-05-28 22:26:25 -07:00