-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
share manager should emit share.link auth events to catch all accesses #37430
Conversation
Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes. |
599161f
to
a2f9582
Compare
a2f9582
to
59dfc8e
Compare
No codecov result had come. The branch was off a quite-old version of master. |
Question: how about triggering a new event? I'm concerned this PR might break things because the events are triggered in a different place, so it could happen that the event was triggered before an error happened, but this might not happen any longer. |
Codecov Report
@@ Coverage Diff @@
## master #37430 +/- ##
=========================================
Coverage 64.68% 64.68%
Complexity 19331 19331
=========================================
Files 1277 1277
Lines 75506 75522 +16
Branches 1331 1331
=========================================
+ Hits 48838 48854 +16
Misses 26276 26276
Partials 392 392
Continue to review full report at Codecov.
|
@jvillafanez before and after share link auth events was already newly added with this pr #34158, for the purpose of using it in brute force protection app. So, by assuming there is no other usage of it in the organization-wide (not even brute force protection app yet), I can say there is no need to afraid to move them to a different class.
I assume this event is intended to emit on every access attempt of a share. However, currently, WebDAV accesses miss these events. I identify this situation as a bug. I agree with you on about the error code issue but could not find a better solution. I kept the event format the same for compatibility reasons as you said. Since Another solution would be adding the same events to dav app, but I think, unifying emitting logic in the share manager is a better solution. |
I still think it's a better idea to deprecate the old events (leaving them for a while) and add new events to fix this, then the app can switch to the new events once they're in place. This way we can adjust the event name to be more intuitive (using this the "checkPassword" function doesn't mean that a link is being accessed, but a link, in this particular case, has its password checked), and adjust what the event is sending to be more meaningful. |
I will open a new pr without touching existing events. Closing this for now. |
Description
Currently, WebDAV access for the password-protected public links is not emitting any link share auth events. These events are only emitted when ShareController used.
This PR moves link share auth events emitting logic to share manager to cover all access cases.
Related Issue
How Has This Been Tested?
Types of changes
Checklist: