Repository navigation
rgw: Add Lua functionality for blocking requests - #66065
Conversation
build failure from the Jenkins jobs. Mind taking a look? |
95ab7a1 to
9625ffc
Compare
|
@jmundack I have changed the parameters that was causing the error. It was an oversight from my side, but the jenkins job still seems to be failing for a reason I am not sure how to check for. |
|
jenkins test make check |
|
jenkins test make check arm64 |
|
jenkins test docs |
|
jenkins test make check arm64 |
|
please add information about the new behavior in the doc: https://github.com/ceph/ceph/blob/main/doc/radosgw/lua-scripting.rst
|
0a12ee5 to
11ab982
Compare
|
This is a really useful feature. Thanks for looking into this. 🚀 |
thats a great question. we probably need to add to the doc:
we should probably also add a note that if a message is a borted, the |
4c2cbcd to
b1ead9a
Compare
|
By default, the HTTP response is 403 (Forbidden) when the request is blocked this way, but it can be changed via Request.Response.HTTPStatusCode. Updated the documentation accordingly. |
|
Thanks. Is it also possible to set a message that is shown to the user with an aborted request? That would be really useful to communicate to the user why a request was blocked/aborted in detail. |
|
Yes, it is also possible to change the |
|
jenkins test make check |
|
This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved |
56bc72f to
e41a19d
Compare
Implements the feature for RGW to abort requests when the LUA scripts return a certain error code. This code is implemented in LUA as RGW_ABORT_REQUEST, and in RGW it is interpreted as -EPERM. Fixes: https://tracker.ceph.com/issues/73485 Signed-off-by: mertsunacoglu <[email protected]>
e41a19d to
68396f6
Compare
|
The location of the prerequest hook changed in the rgw_process, causing a merge conflict |
…ase/cobaltcore-storage-v19.2.3+fasttrack-1 PRs: ceph#66065 ceph#67219 ceph#66567 * backports/19.2.3/emin-wip-postauth-lua-squid: backport: Add a variable to the execute function call in unittests Add latest changes to the Bucket Tags PR Limit bucket metadata access to decoded tags only. Fixes: https://tracker.ceph.com/issues/74756 Adjust function signiture to the legacy code Change auth to execute before prerequest Update doc/radosgw/lua-scripting.rst Update doc/radosgw/lua-scripting.rst rgw: Update documentation for lua request blocking behavior Fixes: https://tracker.ceph.com/issues/73485 Update doc/radosgw/lua-scripting.rst Update doc/radosgw/lua-scripting.rst rgw: Document lua request blocking behavior rgw:use lua_isinteger() for lua script return value rgw:Add Tests for Lua blocking requests in RGW rgw: Add Lua functionality for blocking requests
|
Execution complete, tracker approved by @ivancich. tracker detail: https://tracker.ceph.com/issues/73732 |
…ase/cobaltcore-storage-v19.2.3-fasttrack-2 PRs: ceph#66065 ceph#67219 ceph#66567 * backports/19.2.3/emin-wip-postauth-lua-squid: backport: Add a variable to the execute function call in unittests Add latest changes to the Bucket Tags PR Limit bucket metadata access to decoded tags only. Fixes: https://tracker.ceph.com/issues/74756 Adjust function signiture to the legacy code Change auth to execute before prerequest Update doc/radosgw/lua-scripting.rst Update doc/radosgw/lua-scripting.rst rgw: Update documentation for lua request blocking behavior Fixes: https://tracker.ceph.com/issues/73485 Update doc/radosgw/lua-scripting.rst Update doc/radosgw/lua-scripting.rst rgw: Document lua request blocking behavior rgw:use lua_isinteger() for lua script return value rgw:Add Tests for Lua blocking requests in RGW rgw: Add Lua functionality for blocking requests
…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
…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
…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
…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
…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
…tcore-storage-v19.2.3-fasttrack-9 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
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
Backport-Id: 019eb1e8-4991-7231-abf9-77cb82dcb746 Backport-PR: #6 Upstream-PRs: ceph#67219, ceph#67548, ceph#66065
Backport-Id: 01a0d3b1-e48a-7f08-ab0d-0a549f628691 Backport-PR: #17 Upstream-PRs: ceph#67219, ceph#67548, ceph#66065
Backport-Id: 01a11b0e-da4d-7890-bfeb-43841f3aab2d Backport-PR: #24 Upstream-PRs: ceph#67219, ceph#67548, ceph#66065
Backport-Id: 01a0d3b1-e48a-7f08-ab0d-0a549f628691 Backport-PR: #17 Upstream-PRs: ceph#67219, ceph#67548, ceph#66065
Backport-Id: 01a14402-60b5-7b0e-9e40-46b110a790de Backport-PR: #32 Upstream-PRs: ceph#67219, ceph#67548, ceph#66065
https://tracker.ceph.com/issues/73485
This PR implements the feature for RGW to abort requests when the LUA scripts return a certain error code. This code is implemented in LUA as RGW_ABORT_REQUEST, and in RGW it is interpreted as -EPERM.
The changes should not affect already existing Lua scripts people have.
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
xbetween the brackets:[x]. Spaces and capitalization matter when checking off items this way.Checklist
Show available Jenkins commands
jenkins test classic perfJenkins Job | Jenkins Job Definitionjenkins test crimson perfJenkins Job | Jenkins Job Definitionjenkins test signedJenkins Job | Jenkins Job Definitionjenkins test make checkJenkins Job | Jenkins Job Definitionjenkins test make check arm64Jenkins Job | Jenkins Job Definitionjenkins test submodulesJenkins Job | Jenkins Job Definitionjenkins test dashboardJenkins Job | Jenkins Job Definitionjenkins test dashboard cephadmJenkins Job | Jenkins Job Definitionjenkins test apiJenkins Job | Jenkins Job Definitionjenkins test docsReadTheDocs | Github Workflow Definitionjenkins test ceph-volume allJenkins Jobs | Jenkins Jobs Definitionjenkins test windowsJenkins Job | Jenkins Job Definitionjenkins test rook e2eJenkins Job | Jenkins Job DefinitionYou must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.