Comments (5)
We use this bundle and have some encrypted columns that could use this.
Bonus if xml config in addition to annotation.
from datadogauditbundle.
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.
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.
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.
*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)
- Can we override or at least change the order of which labels are added? HOT 3
- Symfony 4.4 TokenStorageInterface should be used instead of TokenStorage in AuditSubscriber
- Symfony 5 Compatibility
- Doctrine Proxies Associations
- Log rotation / log lifetime HOT 2
- Change default table names HOT 1
- Purging specific data sets
- Ldap User Provider : Attempted to call an undefined method named "getId" of class "Symfony\Component\Security\Core\User\User".
- "Maximum function nesting level" php recursion error when using this bundle and flushing more than 256 times in a script.
- Symfony 6 Compatibility
- Error on save undefined method named "addLogger" HOT 3
- v1.0 Release
- Automated Testing HOT 1
- Drop Unsupported Versions
- Table Indexes
- Entity Repository
- [bug][code-smell] Wrong Type hint for $blameUser in AuditSubscriber.php HOT 1
- 1.0-dev: inserting associations causes error on Postgres HOT 3
- Demo is Borken HOT 1
- The class 'DataDog\AuditBundle\Entity\AuditLog' was not found in the chain configured namespaces HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from datadogauditbundle.