Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat(conduit): Add conduit auth functions #101729

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
IanWoodard wants to merge 4 commits into master
base: master
Choose a base branch
Loading
from ianwoodard/infreng-97-create-helper-functions-for-generating-tokens-and-channel

Conversation

Copy link
Member

@IanWoodard IanWoodard commented Oct 17, 2025

Adds backend helpers for generating Conduit authentication credentials. Conduit is Sentry's real-time delivery platform that enables scalable streaming from backend services to frontend clients.

This PR provides the foundational utilities needed for API endpoints to generate Conduit credentials (JWT tokens and channel IDs) that the conduit-client will use to establish streaming connections.

Changes

  • New utilities in src/sentry/conduit/auth.py

    • generate_channel_id(): UUID4 generation for stream identifiers
    • generate_conduit_token(): RS256 signed JWT with org_id, channel_id, and 10 minute expiration
    • get_conduit_credentials(): Returns {url, token, channel_id} dict for the client
  • Configuration src/sentry/conf/server.py

    • CONDUIT_PRIVATE_KEY (required): RSA private key for JWT signing
    • CONDUIT_GATEWAY_URL: Gateway base URL
    • CONDUIT_JWT_ISSUER / CONDUIT_JWT_AUDIENCE: JWT claims

Note: Requires CONDUIT_PRIVATE_KEY environment variable to be set before use.

seer-by-sentry[bot] reacted with hooray emoji
Copy link

linear bot commented Oct 17, 2025

@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Oct 17, 2025
cursor[bot]

This comment was marked as outdated.

Copy link

codecov bot commented Oct 17, 2025
edited
Loading

Codecov Report

❌ Patch coverage is 97.22222% with 1 line in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/sentry/conf/server.py 75.00% 1 Missing ⚠️
Additional details and impacted files
@@ Coverage Diff @@
## master #101729 +/- ##
===========================================
+ Coverage 80.97% 80.98% +0.01% 
===========================================
 Files 8700 8705 +5 
 Lines 386852 387374 +522 
 Branches 24514 24514 
===========================================
+ Hits 313236 313719 +483 
- Misses 73268 73307 +39 
 Partials 348 348 

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

Reviewers

@cursor cursor[bot] cursor[bot] left review comments

@lynnagara lynnagara Awaiting requested review from lynnagara

@nikhars nikhars Awaiting requested review from nikhars

At least 1 approving review is required to merge this pull request.

Assignees

No one assigned

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

AltStyle によって変換されたページ (->オリジナル) /