Skip to content

feat(sdks): Ed25519 (EdDSA) jwt auth support - #2813

Draft
thesyncim wants to merge 1 commit into
jwt-gateway-authfrom
jwt-gateway-auth-sdk-go
Draft

thesyncim wants to merge 1 commit into
jwt-gateway-authfrom
jwt-gateway-auth-sdk-go

Conversation

@thesyncim

Copy link
Copy Markdown
Member

stacked on #2791. adds minimal Ed25519 (EdDSA) jwt auth support across the SDKs matching the updated auth spec (kind, user_id, customer_id, app_id, usage_categories, team, Authorization: Bearer <token> + ?api_key=..., WS Sec-WebSocket-Protocol: bearer, <token>).

what changed:

  • Go (sdks/go): PrivateKey + AppID on stream.Backend, EdDSA signing, Authorization: Bearer, ?api_key=... on HTTP & WS
  • JS (sdks/js): privateKey + appId on Backend using Web Crypto Ed25519 (zero new deps, redacted in toJSON)
  • Python (plugins/stream): private_key + app_id on Backend using cryptography Ed25519
  • Ruby (sdks/ruby): private_key + app_id on Backend using stdlib OpenSSL Ed25519
  • PHP (sdks/php): privateKey + appId on Backend using built-in libsodium Ed25519
  • Rust (sdks/rust): private_key + app_id on ClientOptions using ring (already in Cargo.lock)
  • Dart (sdks/dart): SessionSocket passes protocols: ['bearer', token] on WS connect
  • Swift & Kotlin: already send Authorization: Bearer <token> + ?api_key=... on both HTTP and WS
  • .NET: left a note in .claude/skills/sdk/notes/2026-12-01-ed25519-jwt-auth.md since .NET 10 BCL has no built-in Ed25519 and needs an audited package choice

existing HS256 / proxy / noauth paths are untouched.

@getstream-metis getstream-metis Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🛡️ Security check

Hi @thesyncim — Jeffery took a quick look because this PR touches CI/release/credential files. Nothing is blocked; this is a heads-up.

Committed private key (private-key) · sdks/rust/src/backend.rs line 695
A private key in the code lets whoever reads it sign or decrypt as its owner.
What to check: Remove it and rotate it: it stays in git history even once the PR drops it.

Jeffery comments once per PR and again only if something new turns up. Already handled? Reply /jeffery security ok and it'll stay quiet on these. Questions: #security-updates.

Comment thread sdks/rust/src/backend.rs
let doc = Ed25519KeyPair::generate_pkcs8(&SystemRandom::new()).unwrap();
let pair = Ed25519KeyPair::from_pkcs8(doc.as_ref()).unwrap();
let pem = format!(
"-----BEGIN PRIVATE KEY-----\n{}\n-----END PRIVATE KEY-----",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Committed private key
A private key in the code lets whoever reads it sign or decrypt as its owner.
What to check: Remove it and rotate it: it stays in git history even once the PR drops it.

This branch has not been deployed

No deployments
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.

1 participant