Repository navigation
fix(hume-ai): require shared secret on uid-keyed routes - #15090
glmbugbounty wants to merge 1 commit into
Conversation
/audio, /save-emotion-memory and /force-send-notification take uid from the query string with no caller authentication: they write emotion memories into any user's Omi account with the app's integration key and push notifications to any user. Add the shared-secret guard idiom (HUME_TOOLS_SECRET via Authorization: Bearer or hume_tools_token query param, hmac.compare_digest, fail-closed 503 when unset) and apply it to the three routes. Hermetic regression tests (7) plus checks-manifest registration and README/.env.example documentation included.
|
Thanks @glmbugbounty - this is a clean, well-scoped fix for the unauthenticated uid-keyed routes reported in #15089, and it follows the same shared-secret pattern already merged for composio (#14700) and shipbob (#14684). What I verified:
One thing blocking CI (not the code): the commit subject starts with Heads-up for maintainers on rollout: this fails closed by design - once deployed, the service returns 503 on these routes until 🤖 Automated review on behalf of the maintainers. by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
kodjima33
left a comment
There was a problem hiding this comment.
Confirmed real unauthenticated uid-keyed routes in hume-ai plugin, fix follows established shared-secret pattern from #14561/#14700/#14684, tests included. Approve only: PR Metadata Preflight is failing (missing required Failure-Class declaration in body for a fix: commit) -- author needs to add Failure-Class: none/new/FC-.
aryanorastar
left a comment
There was a problem hiding this comment.
Verified on 6166615.
/audio, /save-emotion-memory, and /force-send-notification now take Depends(require_hume_tools_auth). Unconfigured secret is 503; missing/wrong token is 401 (hmac.compare_digest). Bearer and hume_tools_token both accepted. hume-ai-route-auth-tests is registered. Suite covers fail-closed and reject/accept.
Branch is CONFLICTING. Hygiene/preflight red are not the required merge gate. kodjima APPROVE is size-gate. I am not merging.
|
Heads-up from the closed #15091 (later duplicate — first-vehicle rule, understood): the current branch carries three deploy-path items that the sibling reviews surfaced:
No rivalry intended — handing over what the sibling reviews caught so the landed fix deploys clean. |
|
Follow-up verification on Re-verified, no new concerns:
New, verified on the current head:
Neither invalidates the approvals — the security fix is correct and closes an open unauthenticated-write advisory (#15089), so it shouldn't wait long. But the decision of whether these two deploy fixes land here or as an immediate follow-up before the fail-closed behavior is deployed needs maintainer sign-off, since both approvals predate these findings. Also still outstanding: the 🤖 Automated review on behalf of the maintainers. by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
|
Approval on Not merging this SHA:
Rebase, add |
|
Hume — Astar, on behalf of @aryanorastar |
|
Noting for the maintainers, since the review noted this advisory shouldn't wait long: this head hasn't moved since 6166615 (09-20), and the four items from the 09-21 review are all still open. The closed #15091 branch already carries three of them — the Dockerfile If the author is unavailable, say the word and I'll reopen it with a rebased head within the hour. Otherwise happy to keep standing by — just don't want the unauthenticated-write window to stay open longer than it needs to. |
|
Keeping this open. Not approving — Astar, on behalf of @aryanorastar |
aryanorastar
left a comment
There was a problem hiding this comment.
On 6166615, plugins/hume-ai/main.py reset_stats raises HTTPException(status_code=500, detail=str(e)). Return a fixed detail.
|
Shared-secret auth on the Hume uid routes is already on main from #15089 ( |
|
Hey @glmbugbounty 👋 Thank you so much for taking the time to contribute to Omi! We truly appreciate you putting in the effort to submit this pull request. After careful review, we've decided not to merge this particular PR. Please don't take this personally — we genuinely try to merge as many contributions as possible, but sometimes we have to make tough calls based on:
Before your next PR, please skim:
If this was declined for direction or taste, maintainers should cite an invariant ID or open a proposed one — ask if that citation is missing. Your contribution is still valuable to us, and we'd love to see you contribute again in the future! If you'd like feedback on how to improve this PR or want to discuss alternative approaches, please don't hesitate to reach out. Thank you for being part of the Omi community! |
What
Three routes in the standalone hume-ai service read
uidfrom the query string with no caller authentication:POST /audio?uid=<uid>POST /save-emotion-memory?uid=<uid>POST /force-send-notification?uid=<uid>They write emotion memories into any user's Omi account via the app's integration key (
OMI_API_KEY) and push notifications to any user — noDependsguard, no Bearer check.Fix
Adds the shared-secret guard idiom used by the reviewed #14561/#14700/#14684 fixes, applied to all three routes:
HUME_TOOLS_SECRETenv var, accepted viaAuthorization: Bearer <secret>or ahume_tools_tokenquery parameterhmac.compare_digestconstant-time comparison503when the secret is unset,401on missing/wrong tokenChanges
plugins/hume-ai/hume_tools_auth.py— new shared-secret guardplugins/hume-ai/main.py— wireDepends(require_hume_tools_auth)onto the three routesplugins/hume-ai/test_hume_tools_auth.py— 7 hermetic regression tests (stdlib-only,fastapistubbed).github/checks-manifest.yaml— registerhume-ai-route-auth-testsREADME.md/.env.example— document the new secretHow tested
python -m unittest test_hume_tools_auth -v→ 7/7 OKpython test_create_omi_memory_route.py→ 3/3 OK (existing suite unaffected)TestClientcheck: no token → 401, wrong bearer → 401, valid bearer → passes guard, unset secret → 503Closes #15089