Skip to content

[fix] require an account to subscribe to the alert and manager streams - #4272

Open
Duansg wants to merge 5 commits into
apache:masterfrom
Duansg:fix-sse-authz
Open

[fix] require an account to subscribe to the alert and manager streams#4272
Duansg wants to merge 5 commits into
apache:masterfrom
Duansg:fix-sse-authz

Conversation

@Duansg

@Duansg Duansg commented Jul 29, 2026

Copy link
Copy Markdown
Member

What's changed?

Require authentication for the alert/manager SSE streams; the front end switches to fetch so it can carry credentials, plus a connection timeout and a concurrency cap.

Checklist

  • I have read the Contributing Guide
  • I have written the necessary doc or comment.
  • I have added the necessary unit tests and all cases have passed.

Add or update API

  • I have added the necessary e2e tests and all cases have passed.

zqr10159
zqr10159 previously approved these changes Jul 30, 2026

@zqr10159 zqr10159 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed against the 1.9.0 pre-release alert and manager SSE findings. The streams are removed from the authentication exclusions, the browser sends bearer authorization, and emitter lifetime/capacity are bounded. The focused local contracts pass (10 tests) and CI is green.

Duansg and others added 2 commits August 3, 2026 14:15
The alert and manager streams moved from `EventSource` to a `fetch` reader so
the bearer token could travel with the request. `EventSource` reconnects on its
own; the reader did not, and the same change bounds an emitter's life to thirty
minutes. Together that meant the notification bell and the alert center stopped
receiving anything half an hour in, until the page was reloaded.

`AuthorizedSseService` now re-establishes a dropped stream itself, with an
exponential backoff from one second to thirty, reset once a connection is up.
The token is read on every attempt so a refreshed one is picked up. A 401 or
403 still ends the observable: reconnecting cannot change that answer and
retrying would only hammer the endpoint.

This mirrors `log-stream.component.ts`, which already reads an authorized
stream through `fetch` and already reconnects.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants