You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Question] Should a redirect from the Guardian endpoint block the step like a 4xx? #809
The spec leads need to decide what an Observed Agent does when the Guardian endpoint answers with a redirect.
Today the AGT host adapter's guardianClient.post in reference-implementations/agt/packages/host-adapter/src/guardian-client.ts calls fetch with the default redirect: "follow". When a proxy in front of the Guardian answers 302 to a login page, fetch follows it, gets a 200 with an HTML body, and res.json() throws. The step then has no usable answer, so it follows on_decision_failure. A deployment whose own configuration says proceed fails open on it.
0.1.6 already blocks an HTTP 4xx other than 408 whatever the posture, so an authenticating proxy's 401 or 403 blocks the step (PR #544). A proxy that redirects to a login page instead of answering 401 gets the opposite result.
Two options:
Treat a redirect as a refusal. The client sets redirect: "error" or "manual", and any 3xx blocks the step whatever the posture, like a 4xx.
Treat a redirect as no usable answer, as today, so it follows the posture.
Option 1 matches the reason PR #544 gave for blocking a 4xx: a proxy that turned the request away has refused it. Whichever we pick, the specification's §6.4 text and the decision log should say it.
Activity