Skip to content

Send ably-pubsub-server in the Ably-Agent header - #746

Draft
AndyTWF wants to merge 5 commits into
mainfrom
server-side-agent
Draft

AndyTWF wants to merge 5 commits into
mainfrom
server-side-agent

Conversation

@AndyTWF

@AndyTWF AndyTWF commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

In order to identify as a server SDK, the agent string needs to include ably-pubsub-server. We currently send only ably-pubsub-python. This PR adds ably-pubsub-server alongside it.

Breaking for native-token auth: Ably accepts a server declaration under token auth only from a signed x-ably-clientType=server JWT claim, which native Ably tokens can't carry, so a server authenticating with a native token is now rejected with 40167. Tests about native tokens are skipped; the other token tests now use JWTs with the claim.

🤖 Generated with Claude Code

@coderabbitai

coderabbitai Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
Pre-merge checks: Passed 1 · Inconclusive 1

Failed Failed checks: 1 inconclusive

Check name Status Explanation Resolution
Title check Pending This assessment has not completed. The check will be retried on the next pre-merge check run.
Passed Passed checks: 1 passed

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

To identify as a server SDK, the agent string needs to include
`ably-pubsub-server`. We only sent `ably-pubsub-python`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Drop the README note on token auth and 40167
A server client declares itself a server, and under token auth Ably
accepts that only from a signed x-ably-clientType JWT claim; native Ably
tokens can't carry it and are rejected with 40167. Tests of general token
behaviour now use JWTs carrying the claim. Tests whose subject is native
tokens are skipped until Ably can accept them from a server.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Port the two renewal tests that still used native tokens to JWTs, and say why the publish error tests call time()
Validate the agents option, keep Options.agents from altering the header, and correct the README's TLS-off auth advice
Check token clientIds from the JWT claims, count failed requests in the protocol harness instead of calling time(), and share the native-token skip reason

@ttypic ttypic left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

ubuntu-latest now resolves to 26.04, where setup-python has no 3.9
build, so the lint job fails before running. check.yml already pins
ubuntu-22.04 for the same reason.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch was successfully deployed

1 active deployment
staging/pull/746/features — 3fe963c8 Deployed Nov 11, 2026 by github-actions[bot]
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.

2 participants