Repository navigation
fix(zapier/omi-zap): send bearer token alongside uid for gated endpoints - #14471
Conversation
Companion to the server-side uid-as-auth fix (BasedHardware#14429): once ZAPIER_WEBHOOK_SECRET is set, /zapier/* data-plane routes require a shared-secret bearer token, and the published Zapier app would 401 on every call. Adds an optional "Integration Token" auth field whose value is sent as Authorization: Bearer on the auth test and, via requestTemplate, on every trigger/create request. Left optional so existing installs keep working until the secret rollout lands. Refs BasedHardware#14429
Git-on-my-level
left a comment
There was a problem hiding this comment.
Thanks @hridaya423 — this is the right companion to #14429, and the ship order you describe (publish the app update first, then set ZAPIER_WEBHOOK_SECRET) is correct.
I verified the mechanics against the Zapier platform's request-merge behavior:
plugins/zapier/omi-zap/index.js— addingAuthorization: Bearer {{bundle.authData.token}}torequestTemplate.headersreaches every app-client call:create_memory'sperform(POST/zapier/action/memories) declares no headers of its own, andperformSubscribe/performUnsubscribeintriggers/on_memory_created.jsset onlyContent-Type/Accept, which the platform merges case-insensitively without dropping the template header. The inheritance claim in the description checks out.plugins/zapier/omi-zap/authentication.js— the connection test on/zapier/menow sends the same header, and the new optionaltokenfield (password type,required: false) keeps existing installs working during the rollout. Good call keeping it non-required.
Two things to sort out before the rollout, neither blocking the code:
- The
tokenfield's helpText says the Integration Token is "shown next to the Secret Key in the Omi App under Explore > Apps > Zapier > Integration Instructions" — butplugins/templates/setup_zapier.htmlcurrently displays only the Secret Key, and neither this PR nor #14429 provisions or displays a token anywhere. Could you soften the wording (e.g. "will be provisioned alongside the Secret Key") or coordinate so the display lands before the Zapier app update publishes? Otherwise users will go looking for a token that isn't there yet. - Rollout gap for maintainers: once
ZAPIER_WEBHOOK_SECRETis set, existing connections without the token will 401 on every call ({{bundle.authData.token}}renders empty, andremoveMissingValuesFromdoesn't apply to headers), and there's no issuance path yet. Publish-first is still the right order — just noting the token provisioning/display piece needs to land in the same window before the secret is turned on.
Leaving for human maintainer review: the credential-issuance and rollout sequencing with #14429/#14428 need maintainer sign-off before the secret goes live.
— automated maintainer review, posted on David's behalf
by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with need human response.
|
Thanks — addressed item 1 in f53c37d: the Item 2 (token issuance/display + the secret rollout window) is maintainer-side as noted — publish-first ordering with #14429 stands, and the display piece needs to land in the same window before |
kodjima33
left a comment
There was a problem hiding this comment.
Small, low-risk client-side addition (optional Integration Token field on the Zapier connector, required:false). Not yet an active bug fix -- companion backend enforcement PR #14429 is still open/unmerged, so this is currently a no-op until that lands. Author hridaya423 has 0/17 merged history (part of the flagged auth-hardening PR volume); change itself is benign (no secret handling, no verification logic), approve-only per confidence gate (<4/5, preparatory not a live fix).
|
Keeping this open on remaining-hole zapier bearer-alongside-uid companion to #14429; 0-CI no tests so not APPROVE. kodjima APPROVE is the size gate, not maintainer merge. I am not approving or merging this SHA. |
|
Keeping this open. Not approving — Astar, on behalf of @aryanorastar |
aryanorastar
left a comment
There was a problem hiding this comment.
On f53c37dff44e4a1052fd08612e825d1bf3cc5134, plugins/zapier/omi-zap/authentication.js Integration Token is required:false and no test pins a bearer gate. The hole is still on this head.
|
Re-reviewed at the maintainer's request, with execution evidence gathered fresh against head Approach verified correct. The bearer-shared-secret-with-uid pattern mirrors the merged On the outstanding review points:
Remaining rollout coordination (post-merge, tracked elsewhere): publish the updated Zapier app before enabling the secret; token provisioning in Verdict: approve-pending-green — with the body fix in, the next CI run should be clean; this is ready to merge once checks pass. |
Summary
Companion to #14429. Once
ZAPIER_WEBHOOK_SECRETis configured, the gated/zapier/*data-plane routes require a shared-secret bearer token, and the published Zapier app (omi-zap) would 401 on every call since it only sends the uid.Adds an optional
Integration Tokenauth field inauthentication.js, sent asAuthorization: Bearer <token>on the connection test and, viarequestTemplate, on every trigger/create request (trigger/subscribe,action/memories,me, etc.).performSubscribe/performUnsubscribeinherit the template header as well.Left
required: falseso existing installs keep working until the secret rollout lands; the token can be provisioned next to the Secret Key in the app's Integration Instructions. Ship order: publish the app update first (harmless no-op while no secret is set), then setZAPIER_WEBHOOK_SECRET.Refs #14429, per the review note that the rollout needs a client-side companion.
Failure-Class: none