Fix authenticated API and operator forge gating. - Add :authenticated_api pipeline and require_authenticated_api_user. - Move /api/computers, /api/computer-agent-jobs, and /machines into correct scopes. - Gate /admin/forge on Accounts.admin? and re-check on promote. - Use git-backed commit_store in AdminForgeLive so only WAL-pushed SHAs promote. - Unskip and green computers, computer agent jobs, and admin forge live tests.
Fix authenticated API and operator forge gating.
Deploy story
What this commit did to the running system — joined from the forge receipt chain, the part a commit page elsewhere cannot show.
Not deployed through the forge lane
No push, promotion, build, or deploy receipt references this commit (receipts are scanned over a bounded recent window). Changes shipped by full node replacement carry their proof in the release gate receipt instead.
Changed files
-
modified
lib/openagents_web/live/admin_forge_live.ex -
modified
lib/openagents_web/router.ex -
modified
lib/openagents_web/user_auth.ex -
modified
test/openagents_web/controllers/computer_agent_jobs_controller_test.exs -
modified
test/openagents_web/controllers/computers_controller_test.exs -
modified
test/openagents_web/live/admin_forge_live_test.exs
Diff
6 files changed, +66 -23
lib/openagents_web/live/admin_forge_live.ex modified +33 -14
@@ -11,30 +11,38 @@ defmodule OpenAgentsWeb.AdminForgeLive do
| 11 | 11 |
|
| 12 | 12 |
|
| 13 | 13 |
|
| 14 |
|
|
| 14 | 15 |
|
| 15 | 16 |
|
| 16 | 17 |
|
| 17 | 18 |
|
| 18 | 19 |
|
| 19 |
|
|
| 20 |
|
|
| 21 |
|
|
| 22 |
|
|
| 23 |
|
|
| 20 |
|
|
| 21 |
|
|
| 22 |
|
|
| 23 |
|
|
| 24 |
|
|
| 25 |
|
|
| 24 | 26 |
|
| 25 |
|
|
| 26 |
|
|
| 27 |
|
|
| 28 |
|
|
| 29 |
|
|
| 27 |
|
|
| 28 |
|
|
| 29 |
|
|
| 30 |
|
|
| 31 |
|
|
| 32 |
|
|
| 33 |
|
|
| 34 |
|
|
| 30 | 35 |
|
| 31 | 36 |
|
| 32 | 37 |
|
| 33 | 38 |
|
| 34 |
|
|
| 39 |
|
|
| 40 |
|
|
| 41 |
|
|
| 42 |
|
|
| 35 | 43 |
|
| 36 |
|
|
| 37 |
|
|
| 44 |
|
|
| 45 |
|
|
| 38 | 46 |
|
| 39 | 47 |
|
| 40 | 48 |
|
@@ -49,7 +57,8 @@ defmodule OpenAgentsWeb.AdminForgeLive do
| 49 | 57 |
|
| 50 | 58 |
|
| 51 | 59 |
|
| 52 |
|
|
| 60 |
|
|
| 61 |
|
|
| 53 | 62 |
|
| 54 | 63 |
|
| 55 | 64 |
|
@@ -80,6 +89,16 @@ defmodule OpenAgentsWeb.AdminForgeLive do
| 80 | 89 |
|
| 81 | 90 |
|
| 82 | 91 |
|
| 92 |
|
|
| 93 |
|
|
| 94 |
|
|
| 95 |
|
|
| 96 |
|
|
| 97 |
|
|
| 98 |
|
|
| 99 |
|
|
| 100 |
|
|
| 101 |
|
|
| 83 | 102 |
|
| 84 | 103 |
|
| 85 | 104 |
|
lib/openagents_web/router.ex modified +19 -6
@@ -23,6 +23,14 @@ defmodule OpenAgentsWeb.Router do
| 23 | 23 |
|
| 24 | 24 |
|
| 25 | 25 |
|
| 26 |
|
|
| 27 |
|
|
| 28 |
|
|
| 29 |
|
|
| 30 |
|
|
| 31 |
|
|
| 32 |
|
|
| 33 |
|
|
| 26 | 34 |
|
| 27 | 35 |
|
| 28 | 36 |
|
@@ -102,16 +110,21 @@ defmodule OpenAgentsWeb.Router do
| 102 | 110 |
|
| 103 | 111 |
|
| 104 | 112 |
|
| 105 |
|
|
| 106 |
|
|
| 107 |
|
|
| 108 |
|
|
| 109 |
|
|
| 110 |
|
|
| 111 | 113 |
|
| 112 | 114 |
|
| 113 | 115 |
|
| 114 | 116 |
|
| 117 |
|
|
| 118 |
|
|
| 119 |
|
|
| 120 |
|
|
| 121 |
|
|
| 122 |
|
|
| 123 |
|
|
| 124 |
|
|
| 125 |
|
|
| 126 |
|
|
| 127 |
|
|
| 115 | 128 |
|
| 116 | 129 |
|
| 117 | 130 |
|
lib/openagents_web/user_auth.ex modified +14
@@ -83,4 +83,18 @@ defmodule OpenAgentsWeb.UserAuth do
| 83 | 83 |
|
| 84 | 84 |
|
| 85 | 85 |
|
| 86 |
|
|
| 87 |
|
|
| 88 |
|
|
| 89 |
|
|
| 90 |
|
|
| 91 |
|
|
| 92 |
|
|
| 93 |
|
|
| 94 |
|
|
| 95 |
|
|
| 96 |
|
|
| 97 |
|
|
| 98 |
|
|
| 99 |
|
|
| 86 | 100 |
|