Found by isaac review of genie-agent vs main, and verified against the source.
What happens
The proxy fetches upstream with redirects unfollowed:
// src/app/api/agent-proxy/[[...path]]/route.ts:154
redirect: "manual",
location is not in STRIPPED_RESPONSE_HEADERS (:57), and there is no 3xx handling anywhere
in the file. A 3xx has no text/html body, so it takes the passthrough branch and the real
Location reaches the browser untouched.
When the agent app redirects an unauthenticated or expired request to Databricks OIDC, the
browser follows that Location cross-origin to databricksapps.com — the exact OAuth wall this
proxy was built to keep guests away from.
Status: latent, not active
This is reachable on token expiry, not on the happy path. Every E2E run has had a valid
session (app.data_path_status=200), so the suite has never exercised it. Guests are the group
most likely to hit it, since their links and sessions lapse by design.
I am flagging the code shape as proven and the user-visible impact as inferred — I have not
observed the redirect in a live run.
Suggested fix
Detect a 3xx upstream response and either rewrite a same-origin/relative Location back under
the /api/agent-proxy mount, or translate an OIDC redirect into a 401 so the client re-mints a
token. Do not pass the raw cross-origin Location through.
Found by
isaac reviewofgenie-agentvsmain, and verified against the source.What happens
The proxy fetches upstream with redirects unfollowed:
locationis not inSTRIPPED_RESPONSE_HEADERS(:57), and there is no 3xx handling anywherein the file. A 3xx has no
text/htmlbody, so it takes the passthrough branch and the realLocationreaches the browser untouched.When the agent app redirects an unauthenticated or expired request to Databricks OIDC, the
browser follows that
Locationcross-origin todatabricksapps.com— the exact OAuth wall thisproxy was built to keep guests away from.
Status: latent, not active
This is reachable on token expiry, not on the happy path. Every E2E run has had a valid
session (
app.data_path_status=200), so the suite has never exercised it. Guests are the groupmost likely to hit it, since their links and sessions lapse by design.
I am flagging the code shape as proven and the user-visible impact as inferred — I have not
observed the redirect in a live run.
Suggested fix
Detect a 3xx upstream response and either rewrite a same-origin/relative
Locationback underthe
/api/agent-proxymount, or translate an OIDC redirect into a 401 so the client re-mints atoken. Do not pass the raw cross-origin
Locationthrough.