-
Notifications
You must be signed in to change notification settings - Fork 423
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
Access control failures must be logged at WARN level #1074
Comments
I'd like to solve this issue, if I could. I checked the logs.py, and from what I saw, the access control failures aren't tested for right now. Am I off track already? |
Thanks for looking at this! Don't worry, you're not off the track. In this issue, we'd like to log access control failures with warn. It means we want to log something when:
The first part is more complex and can be done in a second step/ticket, but the second happens here in the authorization code: Let's know! Don't hesitate to submit a draft ;) Thanks again! |
So you're finding the permission type in 50+, but at 53 it's testing whether the user is allowed to access/ change the file, or whether further testing has to be done (in case the permission is dynamic, and the permission will be checked while running.) Then some of the fail cases show up at 77, 85. Would a block of code saying if not allowed or not allowed_to_create, log something work there? Obviously, after determining the need to actually log something, we could again check to see which one to log, and then add on log statements in logs.py to facilitate logging. |
I sent you a link that points to it ;)
I don't follow you. Wouldn't something like that be sufficient ? if not allowed:
logger.warn("{userid} is not allowed to {permission} {object_id}".format(...)) |
Access control failures are logged with WARN level (fixes #1074)
Ref mozilla-services/kinto-dist#108
The text was updated successfully, but these errors were encountered: