Skip to content

rgw/lua: Add new Lua postAuth hook that is being run after authorization - #67548

Merged
yuvalif merged 1 commit into
ceph:mainfrom
mertsunacoglu:wip-rgw-lua-postauth
Apr 20, 2026
Merged

yuvalif merged 1 commit into
ceph:mainfrom
mertsunacoglu:wip-rgw-lua-postauth

Conversation

@mertsunacoglu

@mertsunacoglu mertsunacoglu commented Feb 26, 2026 •

Copy link
Copy Markdown
Contributor

Currently, the prerequest Lua context runs after authentication is done, but before the authorization. Because of this, bucket specific data like bucket tags and tenant info are not loaded yet into the environment when the prerequest script runs.

PR implements a new Lua hook after user is authorized and bucket context is ready, but before we handle the actual request.

Fixes: https://tracker.ceph.com/issues/75195

Contribution Guidelines

  • To sign and title your commits, please refer to Submitting Patches to Ceph.

  • If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.

  • When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an x between the brackets: [x]. Spaces and capitalization matter when checking off items this way.

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands

You must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Can one of the admins verify this patch?

14 similar comments
@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Can one of the admins verify this patch?

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Can one of the admins verify this patch?

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Can one of the admins verify this patch?

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Can one of the admins verify this patch?

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Can one of the admins verify this patch?

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Can one of the admins verify this patch?

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Can one of the admins verify this patch?

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Can one of the admins verify this patch?

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Can one of the admins verify this patch?

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Can one of the admins verify this patch?

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Can one of the admins verify this patch?

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Can one of the admins verify this patch?

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Can one of the admins verify this patch?

@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Can one of the admins verify this patch?

@adamemerson

Copy link
Copy Markdown
Contributor

@yuvalif Could you take a look at this, please?

@mertsunacoglu
mertsunacoglu force-pushed the wip-rgw-lua-postauth branch 2 times, most recently from d72855f to ba48a33 Compare March 3, 2026 10:47
@mertsunacoglu
mertsunacoglu requested review from a team as code owners March 3, 2026 10:47
@mertsunacoglu
mertsunacoglu force-pushed the wip-rgw-lua-postauth branch from ba48a33 to d72855f Compare March 3, 2026 10:52
irq0 added a commit to irq0/ceph that referenced this pull request Mar 6, 2026
…tcore-storage-v19.2.3-fasttrack-4

PR ceph#66065, ceph#67219, ceph#66567, ceph#67548

* backports/19.2.3/emin-lua-writelock:
  rgw/lua: Add teuthology test for writelock
  backport: Add the missing driver attribute in the execute function
  rgw: Add new Lua postAuth hook that is being run after authorization
  rgw: Add Bucket tags attribute for Lua scripts
  rgw/lua: Add Lua functionality for blocking requests
irq0 added a commit to irq0/ceph that referenced this pull request Mar 6, 2026
…tcore-storage-v19.2.3-fasttrack-5

PR ceph#66065, ceph#67219, ceph#66567, ceph#67548

* backports/19.2.3/emin-lua-writelock:
  rgw/lua: Add teuthology test for writelock
  backport: Add the missing driver attribute in the execute function
  rgw: Add new Lua postAuth hook that is being run after authorization
  rgw: Add Bucket tags attribute for Lua scripts
  rgw/lua: Add Lua functionality for blocking requests
irq0 added a commit to irq0/ceph that referenced this pull request Mar 10, 2026
…tcore-storage-v19.2.3-fasttrack-6

PR ceph#66065, ceph#67219, ceph#66567, ceph#67548

* backports/19.2.3/emin-lua-writelock:
  rgw/lua: Add teuthology test for writelock
  backport: Add the missing driver attribute in the execute function
  rgw: Add new Lua postAuth hook that is being run after authorization
  rgw: Add Bucket tags attribute for Lua scripts
  rgw/lua: Add Lua functionality for blocking requests
irq0 added a commit to irq0/ceph that referenced this pull request Mar 10, 2026
…tcore-storage-v19.2.3-fasttrack-7

PR ceph#66065, ceph#67219, ceph#66567, ceph#67548

* backports/19.2.3/emin-lua-writelock:
  rgw/lua: Add teuthology test for writelock
  backport: Add the missing driver attribute in the execute function
  rgw: Add new Lua postAuth hook that is being run after authorization
  rgw: Add Bucket tags attribute for Lua scripts
  rgw/lua: Add Lua functionality for blocking requests
irq0 added a commit to irq0/ceph that referenced this pull request Mar 10, 2026
…tcore-storage-v19.2.3-fasttrack-8

PR ceph#66065, ceph#67219, ceph#66567, ceph#67548

* backports/19.2.3/emin-lua-writelock:
  rgw/lua: Add teuthology test for writelock
  backport: Add the missing driver attribute in the execute function
  rgw: Add new Lua postAuth hook that is being run after authorization
  rgw: Add Bucket tags attribute for Lua scripts
  rgw/lua: Add Lua functionality for blocking requests
@github-actions

Copy link
Copy Markdown

This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved

@anrao19 anrao19 removed the needs-qa label Mar 30, 2026
@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Thank you for your contribution. Since you, the author, are not a member of the Ceph GitHub Org yet, our CI will not automatically run. Any member of the Ceph Org may comment "ok - to - test" (without the dashes) to allow the Jenkins jobs to run.

@mertsunacoglu

Copy link
Copy Markdown
Contributor Author

jenkins test make check arm64

@mertsunacoglu

Copy link
Copy Markdown
Contributor Author

I have rebased the branch and resolved the merge conflicts which were on the docs, sorry for the delay, I missed that it needed the rebase. @yuvalif could you please re-add the needs-qa label?

Comment thread doc/radosgw/lua-scripting.rst Resolved
Currently, the prerequest Lua context runs after authentication is done, but before the authorization. Because of this, bucket specific data like bucket tags and tenant info are not loaded yet into the environment when the prerequest script runs.

PR implements a new Lua hook after user is authorized and bucket context is ready, but before we handle the actual request.

Fixes: https://tracker.ceph.com/issues/75195

Signed-off-by: Emin Sunacoglu <[email protected]>
@mertsunacoglu

Copy link
Copy Markdown
Contributor Author

jenkins test api

@anrao19

anrao19 commented Apr 20, 2026

Copy link
Copy Markdown
Contributor

Pr testing completed and approved by @ivancich, More details in : https://tracker.ceph.com/issues/76032.
@mertsunacoglu , if no further testing needed we can merge this pr

@mertsunacoglu

Copy link
Copy Markdown
Contributor Author

No further testing needed from my side. Thank you! I don't think I have the required permissions to merge this myself, so please go ahead when ready.

@yuvalif

yuvalif commented Apr 20, 2026

Copy link
Copy Markdown
Contributor

jenkins test make check arm64

@yuvalif

yuvalif commented Apr 20, 2026

Copy link
Copy Markdown
Contributor

jenkins test api

@yuvalif
yuvalif merged commit 15a36f1 into ceph:main Apr 20, 2026
6 checks passed
irq0 added a commit to irq0/ceph that referenced this pull request Jun 4, 2026
Retroactive <uuid>.md for the Lua write-lock backport (postAuth hook,
bucket tags, request blocking) already landed on this branch as merge
commit 14149f3.

Backport-Id: 019e92ed-d2cb-72c0-a34e-b5bf55eac620
Backport-Merge: 14149f3
Upstream-PRs: ceph#66065, ceph#67219, ceph#66567, ceph#67548
irq0 added a commit to cobaltcore-dev/ceph that referenced this pull request Jun 10, 2026
Backport-Id: 019eb1e8-4991-7231-abf9-77cb82dcb746
Backport-PR: #6
Upstream-PRs: ceph#67219, ceph#67548, ceph#66065
uw-sc added a commit to cobaltcore-dev/ceph that referenced this pull request Sep 25, 2026
Backport-Id: 01a0d3b1-e48a-7f08-ab0d-0a549f628691
Backport-PR: #17
Upstream-PRs: ceph#67219, ceph#67548, ceph#66065
uw-sc added a commit to cobaltcore-dev/ceph that referenced this pull request Oct 8, 2026
Backport-Id: 01a11b0e-da4d-7890-bfeb-43841f3aab2d
Backport-PR: #24
Upstream-PRs: ceph#67219, ceph#67548, ceph#66065
uw-sc added a commit to cobaltcore-dev/ceph that referenced this pull request Oct 14, 2026
Backport-Id: 01a0d3b1-e48a-7f08-ab0d-0a549f628691
Backport-PR: #17
Upstream-PRs: ceph#67219, ceph#67548, ceph#66065
uw-sc added a commit to cobaltcore-dev/ceph that referenced this pull request Oct 16, 2026
Backport-Id: 01a14402-60b5-7b0e-9e40-46b110a790de
Backport-PR: #32
Upstream-PRs: ceph#67219, ceph#67548, ceph#66065
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants