graviton / graviton-service-bundle-audit-tracking
Audit tracking bundle to be used in graviton/graviton
Installs: 4 769
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 13
Forks: 0
Open Issues: 0
Type:project
Requires
- graviton/graviton: >=4.0.0
- graviton/link-header-rel-parser: ~1
Requires (Dev)
- libgraviton/codesniffer: ~1.3
- phpunit/phpunit: @stable
- squizlabs/php_codesniffer: ~2.6
README
Inner Auditing tool bundle
This tool is meant to run as a hidden service in order to know what each user request or modifies. It will not limit nor interfere with the users request but only store the changes and data received.
- x-header-audit-thread → id-string-uuid
- Api to list thread: /auditing/?eq(thread,string:id-string-uuid)`
version
v0.1.0
: 2016/09/28 First version with basic auditing enabled by default, collection changes.
Configuration
- Need Graviton ^v0.77.0, so ModelEvent is fired on Document Updates.
- Setup configuration in
AuditTracking/Resources/config/parameters.yml
.
parameters: graviton_audit_tracking: # General on/off switch log_enabled: true # Localhost and not Real User on/off switch log_test_calls: false # Store request log also on 400 error log_on_failure: false # Request methods to be saved, array PUT,POST,DELETE,PATCH... requests: [] # Store full request header request data. request_headers: false # Store full request content body. if true full lenght, can be limited with a integer request_content: false # Store reponse basic information. if true full lenght, can be limited with a integer response: false # Store full response header request data. response_headers: false # Store response body content response_content: false # Store data base events, array of events, insert, update, delete database: ['insert','update','delete'] # Store all exception exceptions: false # Exclude header status exceptions code, 400=bad request, form validation exceptions_exclude: [400] # Exclude listed URLS, array exlude_urls: ["/auditing"]
Testing in Graviton
- composer require graviton/graviton-service-bundle-audit-tracking
- Inside graviton load the bundle: GravitonBundleBundle:getBundles - add the load of this new bundle
- Enable in config the log_test_calls: true ( also, so you use the bundle in dev mode )
Enabling in a Wrapper
- Enable in resources/configuration.sh the new bundle:
\\Graviton\\AuditTrackingBundle\\GravitonAuditTrackingBundle
- composer require graviton/graviton-service-bundle-audit-tracking
- sh dev-cleanstart.sh