Skip to content

feat(auth): match the email ignoring case when sharing - #9739

Open
tanishqgandhi1908 wants to merge 1 commit into
apache:mainfrom
tanishqgandhi1908:fix/share-email-case
Open

tanishqgandhi1908 wants to merge 1 commit into
apache:mainfrom
tanishqgandhi1908:fix/share-email-case

Conversation

@tanishqgandhi1908

Copy link
Copy Markdown
Contributor

What changes were proposed in this PR?

Sharing a workflow, dataset, model or compute unit failed with "No registered user with email ..." whenever the typed email's capitalisation differed from the account's. Stored emails keep the casing the user signed up with, and the share lookup compared them exactly.

  • OwnerAccess.registeredUid, which every share endpoint uses, now matches lower(email), like sign-up (AuthResource.fetchUserByEmailIgnoreCase). The email's plain UNIQUE still allows two accounts that differ only in case. In that case the exact match wins, instead of the lookup failing with more than one row.
  • The workflow grant's "you cannot grant access to yourself" check now ignores case too, so it agrees with the lookup.

Any related issues, documentation, discussions?

Closes #9738

How was this PR tested?

  • New OwnerAccessRegisteredUidSpec (MockTexeraDB):
    • any casing finds the account;
    • the exact match wins between two accounts that differ only in case;
    • placeholders and unknown emails are still not found.
  • WorkflowAccessResourceSpec: new test that granting to NewGrantee@Test.com works for the account newgrantee@test.com.
  • Both new casing tests fail without the fix.
  • DatasetAccessResourceSpec, ModelAccessResourceSpec and ComputingUnitAccessResourceSpec still pass.
  • Checked by hand on a local server:
registered email: list-collab2@texera.test
PUT /api/access/workflow/grant/44/List-Collab2@texera.test/READ
before: HTTP 400 {"message":"No registered user with email List-Collab2@texera.test"}
after:  HTTP 204   → list-collab2@texera.test has READ

Was this PR authored or co-authored using generative AI tooling?

Generated-by: Claude Code (Claude Opus 5.5)

OwnerAccess.registeredUid, used by every share endpoint, now matches
lower(email) like sign-up does, preferring an exact match when two
accounts differ only in case. The workflow self-grant check ignores case
too.

Closes apache#9738
@Yicong-Huang Yicong-Huang added release/v1.3 back porting to release/v1.3 release/v1.2 back porting to release/v1.2 labels Nov 28, 2026
@github-actions
github-actions Bot requested review from mengw15 and xuang7 November 28, 2026 18:15
@github-actions

Copy link
Copy Markdown
Contributor

Backport auto-label report

This fix: PR was checked against each actively-supported release branch. A release/* label nominates a backport target; the branch's release manager approving this PR is what sends the fix there. The required Backport Approvals check stays red until every label below is approved, so each manager either approves or removes their own label — which is why the labels left on a merged PR are exactly the branches it reached.

Release branch Analysis
✅ release/v1.3 Change detected on this branch — label added; this fix is queued to backport here. @mengw15 decides: approving sends the fix here, removing this label declines it. The merge waits on one or the other. Review requested.
✅ release/v1.2 Change detected on this branch — label added; this fix is queued to backport here. @xuang7 decides: approving sends the fix here, removing this label declines it. The merge waits on one or the other. Review requested.

Auto-label run.

@github-actions

Copy link
Copy Markdown
Contributor

Automated Reviewer Suggestions

Based on the git blame history of the changed files, we recommend the following reviewers:

  • Contributors with relevant context: @aglinxinyuan
    You can notify them by mentioning @aglinxinyuan in a comment.

@codecov-commenter

codecov-commenter commented Nov 28, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.77%. Comparing base (e8c37e6) to head (e2b3e28).

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #9739   +/-   ##
=========================================
  Coverage     91.77%   91.77%           
+ Complexity     5136     5134    -2     
=========================================
  Files          1308     1308           
  Lines         58013    58015    +2     
  Branches       7552     7552           
=========================================
+ Hits          53240    53244    +4     
+ Misses         2887     2883    -4     
- Partials       1886     1888    +2     
Flag Coverage Δ *Carryforward flag
access-control-service 77.44% <ø> (ø)
agent-service 99.56% <ø> (ø) Carriedforward from e8c37e6
amber 85.96% <100.00%> (+0.01%) ⬆️
computing-unit-managing-service 63.81% <ø> (ø)
config-service 87.50% <ø> (ø)
file-service 82.16% <ø> (ø)
frontend 96.45% <ø> (ø) Carriedforward from e8c37e6
notebook-migration-service 83.84% <ø> (ø)
pyamber 98.70% <ø> (ø) Carriedforward from e8c37e6
result-service 86.48% <ø> (ø)
workflow-compiling-service 80.90% <ø> (ø)

*This pull request uses carry forward flags. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Benchmark changes need a look

🟢 6 better · 🔴 2 worse · ⚪ 7 noise (<±5%) · 0 without baseline

Compared against main e8c37e6 benchmarked on this same runner, so the delta is largely free of cross-runner hardware noise. The "7d avg" column still reflects the gh-pages dashboard. Treat <±5% as noise unless repeated.

Dashboard · Run

config throughput MB/s latency max Δ latest / 7d
🟢 bs=10 sw=10 sl=64 748 0.456 12,941/18,354/18,354 us 🟢 -27.8% / 🔴 +38.2%
🟢 bs=100 sw=10 sl=64 1,761 1.075 56,345/68,575/68,575 us 🟢 -12.8% / 🟢 +35.4%
🔴 bs=1000 sw=10 sl=64 1,984 1.211 496,403/620,264/620,264 us 🔴 +6.2% / 🟢 +47.7%
Baseline details

Latest main e8c37e6 from same runner

config metric PR latest main 7d avg Δ latest Δ 7d
bs=10 sw=10 sl=64 throughput 748 tuples/sec 614 tuples/sec 979.62 tuples/sec +21.8% -23.6%
bs=10 sw=10 sl=64 MB/s 0.456 MB/s 0.375 MB/s 0.598 MB/s +21.6% -23.7%
bs=10 sw=10 sl=64 p50 12,941 us 13,084 us 10,327 us -1.1% +25.3%
bs=10 sw=10 sl=64 p95 18,354 us 25,413 us 13,278 us -27.8% +38.2%
bs=10 sw=10 sl=64 p99 18,354 us 25,413 us 16,337 us -27.8% +12.3%
bs=100 sw=10 sl=64 throughput 1,761 tuples/sec 1,720 tuples/sec 1,301 tuples/sec +2.4% +35.4%
bs=100 sw=10 sl=64 MB/s 1.075 MB/s 1.05 MB/s 0.794 MB/s +2.4% +35.4%
bs=100 sw=10 sl=64 p50 56,345 us 57,268 us 81,097 us -1.6% -30.5%
bs=100 sw=10 sl=64 p95 68,575 us 78,607 us 88,241 us -12.8% -22.3%
bs=100 sw=10 sl=64 p99 68,575 us 78,607 us 100,970 us -12.8% -32.1%
bs=1000 sw=10 sl=64 throughput 1,984 tuples/sec 1,936 tuples/sec 1,344 tuples/sec +2.5% +47.6%
bs=1000 sw=10 sl=64 MB/s 1.211 MB/s 1.182 MB/s 0.82 MB/s +2.5% +47.7%
bs=1000 sw=10 sl=64 p50 496,403 us 513,950 us 790,934 us -3.4% -37.2%
bs=1000 sw=10 sl=64 p95 620,264 us 583,929 us 832,160 us +6.2% -25.5%
bs=1000 sw=10 sl=64 p99 620,264 us 583,929 us 882,542 us +6.2% -29.7%
Raw CSV
config_idx,batch_size,schema_width,string_len,num_batches,total_ms,total_tuples,total_bytes,tuples_per_sec,mb_per_sec,lat_p50_us,lat_p95_us,lat_p99_us
0,10,10,64,20,267.51,200,128000,748,0.456,12941.23,18354.12,18354.12
1,100,10,64,20,1135.54,2000,1280000,1761,1.075,56344.52,68574.98,68574.98
2,1000,10,64,20,10080.17,20000,12800000,1984,1.211,496403.30,620263.54,620263.54

@tanishqgandhi1908 tanishqgandhi1908 changed the title fix(auth): match the email ignoring case when sharing feat(auth): match the email ignoring case when sharing Nov 28, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

common engine fix release/v1.2 back porting to release/v1.2 release/v1.3 back porting to release/v1.3

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sharing fails with "No registered user" when the email's capitalisation differs from the account's

3 participants