Skip to content

[Question] Should a redirect from the Guardian endpoint block the step like a 4xx? #809

Backlog

Description

@rocklambros

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:

  1. 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.
  2. 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.

@bar-capsule @afogel, this needs your ruling.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions