sshiv012 opened a new issue, #9078:
URL: https://github.com/apache/texera/issues/9078
### What happened?
**Root cause:** `agent-service/src/api/compile-api.ts#compileWorkflowAsync`
POSTs to `${WORKFLOW_COMPILING_SERVICE_ENDPOINT}/api/compile` with only
`Content-Type`. Since #5199 / #5404, `WorkflowCompilationResource`
(`@RolesAllowed(REGULAR, ADMIN)`) sits behind `JwtAuthFilter`, which returns
401 when no Bearer token is present. The agent client (added in #4495) was
never updated.
```
Before: agent prepareStep -> POST /api/compile (no Authorization) -> 401 ->
null -> agent sees no schemas / compile errors
After: agent prepareStep -> POST /api/compile (Bearer <delegate token>) ->
200 -> schemas + operatorErrors in context
```
The failure is silent: it is logged as `compilation failed` and the agent
proceeds without output schemas.
Expected: the compile call forwards the delegating user's token, the same
way `workflow-api.ts` (`createAuthHeaders`) and the execution tool already do.
Audit of the other agent-service HTTP calls:
| Call | Auth sent | Needs auth |
| --- | --- | --- |
| `/api/compile` (compile-api.ts) | no | **yes** |
| `/api/workflow/persist`, `/api/workflow/{wid}` (workflow-api.ts) | yes |
yes |
| workflow execution (workflow-execution-tools.ts) | yes | yes |
| `/api/resources/operator-metadata` (backend-api.ts) | no | no
(unannotated, public) |
### How to reproduce?
1. Deploy main with agent-service and workflow-compiling-service.
2. Start an agent on a workflow with at least one operator and send a
message.
3. agent-service logs `CompileAPI ... status 401 ... compilation failed` on
every step.
### Version/Branch
1.4.0-incubating-SNAPSHOT (main)
### Commit Hash (Optional)
3ba45ee5a
### Relevant log output
```shell
{"module":"CompileAPI","status":401,"statusText":"Unauthorized","msg":"compilation
failed"}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]