Skip to content
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

Should ecAudit fail Cassandra operation if logging failed in case of pre logging #185

Open
manmagic3 opened this issue Oct 12, 2021 · 4 comments
Labels
enhancement New feature or request

Comments

@manmagic3
Copy link

I think operation should get failed if ecAudit is not able to log the auditing info in case of pre logging. I think this should be a feature in ecAudit for pre logging.

@eperott
Copy link
Collaborator

eperott commented Oct 12, 2021

Hey! Thanks for the feature request.

Do you have any specific kind of failures in mind? Did you encounter scenarios where a pre-audit log failed, but the actual query was later executed? Are you aware of ways to reproduce such a scenario?

At this point I'm able to find one place in our code where we deliberately catch and mute an exception:


But in this case we're raising the interrupt flag on the running thread, so I'd expect the operation to be aborted. Didn't verify this though.

@eperott eperott added the enhancement New feature or request label Oct 12, 2021
@manmagic3
Copy link
Author

As of now I am not able to reproduce such a scenario. If we are doing auditing and some audit message is dropped due to some reason, should operation go on and complete its activity. Is this acceptable behavior for auditing?. Can user complain that even if my auditing was enabled but particular activity was not registered or is acceptable in general. Consider a case where user do some delete operation and we are not able to record it. Is it fair?

Would like to know the thoughts of contributors here? Should we have that behavior of aborting operation on failed logging or we should live with it.

@eperott
Copy link
Collaborator

eperott commented Oct 17, 2021

I think your arguments are valid. It would make sense to abort operations unless pre-auditing is successful. At least as an option.

The point I was trying to make, is that I think this is actually how things already work in ecAudit. As of now, we're not catching/muting exceptions when auditing fails. I believe this would cause the operation to be aborted, and so in practice the feature you're requesting is already implemented. :)

I could be missing details somewhere. Could you point to a place in the code where things need improvement?

@manmagic3
Copy link
Author

I think you are right. Looks like it is already implemented by default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants