Repository navigation
fix(db): restore anon get_user_id for published CLI without oracle leak - #3199
Conversation
Re-grant anonymous execute on get_user_id for published CLI versions
that still call rpc/get_user_id with { apikey }. Require matching capgkey
header for anon callers so keys cannot be probed from the RPC body alone.
Keep get_org_perm_for_apikey* and invite_user_to_org_rbac revoked for anon.
Fixes #3197
Co-authored-by: Martin DONADIEU <martindonadieu@gmail.com>
|
Warning Review limit reached
On-demand reviews are free for the next 26 days. After that, they cost $0.25 per reviewed file. Or wait 37 seconds for your next included review. View limit detailsLimit details: You’ve used the included review currently available. Your 62 included PR review attempts over the past 7 days set your current allowance at 1 review per hour. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (4)
Comment |
Merging this PR will not alter performance
Comparing Footnotes
|
Restore published CLI 8.42.x identity RPC without re-granting the two-arg overload or org-perm/invite oracle RPCs. Co-authored-by: Martin DONADIEU <martindonadieu@gmail.com>
Co-authored-by: Martin DONADIEU <martindonadieu@gmail.com>
|



Fixes #3197
Summary (AI generated)
GRANT EXECUTE ON FUNCTION public.get_user_id(text) TO anonso published CLI8.42.xcan callrpc/get_user_idagain.get_user_id(text, text),get_org_perm_for_apikey,get_org_perm_for_apikey_v2, andinvite_user_to_org_rbacrevoked foranon.get_user_id(text); org-perm/invite/two-arg overload stay denied.Motivation (AI generated)
PR #3189 revoked anonymous execute on
get_user_id, breakingchannel addandbundle uploadfor published CLI releases that still call.rpc('get_user_id', { apikey }). Main-branch CLI already usesrequest_actor_user_id, but that is not in a releasedcli-*tag yet.Business Impact (AI generated)
Unblocks API-key CLI channel creation and bundle upload for customers on
8.42.xwithout reopening the org-perm/invite oracle RPCs.Test Plan (AI generated)
get_user_id(text)succeeds for anon with a valid API key (published CLI pattern)get_user_id(text, text)remains permission denied for anonget_org_perm_for_apikey/v2remain permission denied for anoninvite_user_to_org_rbacremains permission denied for anonGenerated with AI
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.