Coder Social home page Coder Social logo

Comments (5)

chancegarcia avatar chancegarcia commented on June 15, 2024

We use this bundle and have some encrypted columns that could use this.

Bonus if xml config in addition to annotation.

from datadogauditbundle.

l3pp4rd avatar l3pp4rd commented on June 15, 2024

well, everyone seems to misunderstand the purpose of this bundle. it is not for logging just something, it is for Auditing. That means, in general the purpose of this bundle is to audit everything to track what has changed, by whom and in order to be able to fully restore everything based on this log. If you ignore few fields or entities, it looses the whole purpose.

If you store sensitive data without encryption, it is the same security issue as you store it not in the audit log but your standard database table. So what is the difference? This audit bundle has only a single subscriber class in it, you may just copy and adapt it the way you like for your own uses.
Instead of trying to adapt the open source project to your specific use cases.

I understand there are tables which are logs itself or just views of something, these could be skipped from audit. but separate fields is something different here and instead of audit bundle it will become logging bundle. Audit bundle is meant to track the history of any change in database and navigate it if needed, that is the only purpose of it. It does one thing well. I do not want this to become a spaceship of whatever possible use case there is, including logging just few fields in whole database.

Just copy this one subscriber class and adapt it for your own purposes. I do not want later people asking me why, I cannot find a relation if I have a foreignkey column ignored in configuration.

from datadogauditbundle.

krzysztofruszczynski avatar krzysztofruszczynski commented on June 15, 2024

Hi @l3pp4rd ,
I see your point. When I talked about critical private data, I thought about things like address (sometimes audit data can be processed by people, who should not see all data).
I thought about adapting it to my needs, but most of methods are private instead of protected, so you can't just extend class. Is there any reason behind this?

from datadogauditbundle.

l3pp4rd avatar l3pp4rd commented on June 15, 2024

well, the code will not change it does everything properly. so instead of extending this class you just copy it into your source code, inject as a subscriber to ORM event listener and adapt it the way you prefer. It is just that mindset in PHP is like for everything use a dependency no matter how simple the task is. in this case copying a class. If that sounds too complicated, I can accept a pull request with a change to protected methods ;)

from datadogauditbundle.

chancegarcia avatar chancegarcia commented on June 15, 2024

*facepalm*

I should never write responses before coffee. I already encrypt those columns so the diff would never have sensitive data when recording the audit because reasons. *goes to get more coffee to use words*

from datadogauditbundle.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.