SDK register() skips SaaS routing headers #27

Closed
opened 2026-05-21 18:53:09 +00:00 by hongming · 1 comment
Owner

Finding from communication-parity audit (2026-05-21). RemoteAgentClient._auth_headers supports Authorization, X-Molecule-Org-Id, and Origin, but register() posts to /registry/register without headers. Other client calls use _auth_headers(), and SaaS tenant edges rely on Origin and sometimes X-Molecule-Org-Id to avoid WAF/Next.js rewrite behavior. Fix: include the non-token routing headers on register, and include Authorization when a cached token exists so re-register follows the same auth surface as heartbeat. Add tests for org_id/origin on register and no regression for anonymous first-register when no token exists.

Finding from communication-parity audit (2026-05-21). RemoteAgentClient._auth_headers supports Authorization, X-Molecule-Org-Id, and Origin, but register() posts to /registry/register without headers. Other client calls use _auth_headers(), and SaaS tenant edges rely on Origin and sometimes X-Molecule-Org-Id to avoid WAF/Next.js rewrite behavior. Fix: include the non-token routing headers on register, and include Authorization when a cached token exists so re-register follows the same auth surface as heartbeat. Add tests for org_id/origin on register and no regression for anonymous first-register when no token exists.
Author
Owner

Resolved by merged PR #28: #28\n\nEvidence:\n- SDK CI matrix 3.11/3.12/3.13 successful before merge\n- register() now sends the SaaS routing/auth headers to /registry/register\n- local full suite before merge: 310 passed, 1 skipped

Resolved by merged PR #28: https://git.moleculesai.app/molecule-ai/molecule-sdk-python/pulls/28\n\nEvidence:\n- SDK CI matrix 3.11/3.12/3.13 successful before merge\n- register() now sends the SaaS routing/auth headers to /registry/register\n- local full suite before merge: 310 passed, 1 skipped
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: molecule-ai/molecule-sdk-python#27