-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[40] Disallow use of rmw (main) #67
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You got it. It's really that easy sometimes :-)
- What error code return should I use for it? Not sure what's most relevant in this case...
Hmm, did you look through the error code list and find other codes that could work? The error code file is called rodsErrorTable.h
.
Two error codes come to mind:
DEPRECATED_PARAMETER
SYS_NOT_ALLOWED
(I think this is a strong candidate)
- Should admins still be allowed to use rmw?
No, for the following reasons:
- It's a wildcard
- Requires extra, perhaps costly steps to get right
- Could be slow
- We're planning to remove it
- We want to slowly nudge users/admins away from that subcommand
- Allowing admins to use
rmw
makes the plugin's job more difficult
We should probably add a few words to the README that state why imeta rmw
is not allowed.
Thoughts?
irods/irods#6417 was the deprecation in 4.3.0 removal coming in irods/irods#6766, probably 5.0.0 agreed - no special cases for admins please |
Alternatively, we ship |
Found out that addw doesn't seem to bypass metadata_guard, so it doesn't need disabling. |
I get what you're saying, but thinking about it more, disallowing an action and returning a deprecation error code feels wrong. Invoking a deprecated action normally results in the action being allowed at the expense of a warning or log message. For that reason, I think I checked the iRODS server code and we only return |
You are correct - |
Let's make sure we have a test that shows we understand this behavior and have expected results and reasoning. |
Please mark outdated comments as resolved if they have been handled. |
Investigated why |
correct - for addw, the wildcards match the target item name (data object, collection, user, resource). we need to make sure a non-admin user who does have permission to add metadata on an item cannot add a particular AVU that would encroach on a metadata-guarded namespace... i think right now the addw is failing because the user just doesn't even have permission to add any metadata to the target item... regardless of metadata_guard. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few more changes and I think we're good.
Please confirm the tests pass after resolving the review comments.
Let us know the results of the tests.
All tests pass. |
Excellent. Please squash to taste. No pounds just yet. |
Squished and squashed. |
Let's squash the changes for |
Resquished and resquashed. Had to learn a small bit of git-fu for that one. |
! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like your git-fu worked. Nothing appears to have changed.
Good job.
Pound it!
d8aaa61
to
b820d49
Compare
Octothorpe'd! |
It almost is that easy?
Pertinent questions:
New tests for this still pending.