Skip to content

feat: support Bearer authentication for SRS and proxy APIs. v8.0.28 - #4726

Merged
winlinvip merged 10 commits into
ossrs:developfrom
winlinvip:develop
Aug 19, 2026
Merged

feat: support Bearer authentication for SRS and proxy APIs. v8.0.28#4726
winlinvip merged 10 commits into
ossrs:developfrom
winlinvip:develop

Conversation

@winlinvip

@winlinvip winlinvip commented Aug 19, 2026

Copy link
Copy Markdown
Member

Fix #4690

  • Require SRS_HTTP_API_AUTH_TYPE when SRS HTTP API authentication is enabled.
  • Add Bearer token authentication for the SRS HTTP API while preserving Basic authentication.
  • Add Bearer authentication for proxy origin registration with PROXY_HTTP_API_AUTH_*.
  • Allow SRS heartbeat requests to authenticate to the proxy with SRS_HEARTBEAT_AUTH_*.
  • Add unit tests, an end-to-end Bearer authentication test, documentation, and separate Basic/Bearer sample configurations.

winlinvip and others added 3 commits August 18, 2026 10:24
Require an explicit basic authentication type whenever HTTP API authentication is enabled, and update tests, sample configuration, and documentation for SRS_HTTP_API_AUTH_TYPE.

---------

Co-authored-by: chatgpt-codex-connector[bot] <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com>
Add Bearer token authentication for the SRS HTTP API and proxy origin registration, including authenticated heartbeat requests, configuration validation, tests, integration coverage, documentation, and Basic/Bearer sample configurations.

---------

Co-authored-by: chatgpt-codex-connector[bot] <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com>
@winlinvip winlinvip changed the title Update feat: support Bearer authentication for SRS and proxy APIs Aug 19, 2026
@winlinvip winlinvip changed the title feat: support Bearer authentication for SRS and proxy APIs feat: support Bearer authentication for SRS and proxy APIs. v8.0.28 Aug 19, 2026
winlinvip and others added 7 commits August 18, 2026 23:14
Synchronize the Go and C++ revision constants and add the changelog entry for Bearer HTTP API authentication in PR ossrs#4726.

---------

Co-authored-by: chatgpt-codex-connector[bot] <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com>
Separate Basic and Bearer validation into scheme-specific authenticators and let the HTTP auth mux depend on a stable strategy interface instead of scheme-specific parameters.

---------

Co-authored-by: chatgpt-codex-connector[bot] <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com>
Apply Bearer authentication to WHIP, WHEP, and other WebRTC signaling APIs while keeping Basic authentication limited to /api/. Add focused and end-to-end coverage and document how Bearer authentication composes with WebRTC HTTP callbacks.

---------

Co-authored-by: chatgpt-codex-connector[bot] <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com>
Move environment validation onto the concrete proxy environment and wrap the SRS registration endpoint with private Bearer authentication middleware. Add focused unit coverage for validation and middleware behavior.

---------

Co-authored-by: chatgpt-codex-connector[bot] <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com>
Rename the system API middleware to withHTTPAPIAuth to reflect its wrapper behavior, and update the focused unit test accordingly.

---------

Co-authored-by: chatgpt-codex-connector[bot] <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com>
Add the rtc_bearer_enabled configuration and environment switch, validate its Bearer-only requirements, and keep HTTP API Bearer authentication enabled independently. Update unit coverage, integration setup, examples, and documentation for WHIP/WHEP and HTTP callback authorization.

---------

Co-authored-by: chatgpt-codex-connector[bot] <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com>
@winlinvip
winlinvip merged commit bb5fde2 into ossrs:develop Aug 19, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

srs-proxy System API -- Unauthenticated Backend Server Registration Enables Stream Hijacking

1 participant