Skip to content

armgit / cua

Public Imported from GitHub
0

Scale computer-use 2.0 with open-source drivers, cross-OS sandboxes, and benchmarks for training, evaluation, and data generation.

fix(cyclops): accept GitHub WIF on service proxy (#6713)

r33drichardse0219e0c0ef5
diff --git a/libs/fleet/tests/nginx-config.test.mjs b/libs/fleet/tests/nginx-config.test.mjs
index 952b53cb1d..0f654636fe 100644
--- a/libs/fleet/tests/nginx-config.test.mjs
+++ b/libs/fleet/tests/nginx-config.test.mjs
@@ -7,6 +7,10 @@ import path from "node:path"
const __filename = fileURLToPath(import.meta.url)
const __dirname = path.dirname(__filename)
const nginxConf = path.resolve(__dirname, "../nginx.conf")
+const backendDeployment = path.resolve(
+ __dirname,
+ "../../clusters/kopf-k3s/cyclops-cs/backend-deployment.yaml",
+)
test("backend API nginx route includes GitHub trust policy endpoints", async () => {
const conf = await readFile(nginxConf, "utf8")
@@ -26,3 +30,13 @@ test("backend API nginx route includes GitHub trust policy endpoints", async ()
"expected /api/state/query to proxy to cyclops-cs-backend",
)
})
+
+test("oauth2-proxy accepts Fleets GitHub WIF bearer tokens", async () => {
+ const deployment = await readFile(backendDeployment, "utf8")
+
+ assert.match(
+ deployment,
+ /--extra-jwt-issuers=https:\/\/token\.actions\.githubusercontent\.com=fleets/,
+ "expected oauth2-proxy to verify GitHub OIDC tokens with the Fleets audience",
+ )
+})