Commit graph

3 commits

Author SHA1 Message Date
Brandon Kobel b4827ace27
Adding KibanaRequest#uuid (#76822)
* Adding KibanaRequest#uuid

* Adding tests

* Fixing test which was mocking uuid.v4() to get expected IDs

* Fixing another mock

* Updating docs

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-21 09:41:09 -07:00
Josh Dover 51a80c61a0
Add support for reading request ID from X-Opaque-Id header (#71019)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-19 15:41:12 -06:00
Mikhail Shustov aeff8c154b
[Audit Logging] Add AuditTrail service (#69278)
* add generic audit_trail service in core

* expose auditTraik service to plugins

* add auditTrail x-pack plugin

* fix type errors

* update mocks

* expose asScoped interface via start. auditor via  request context

* use type from audit trail service

* wrap getActiveSpace in safeCall only. it throws exception for non-authz

* pass message to log explicitly

* update docs

* create one auditor per request

* wire es client up to auditor

* update docs

* withScope accepts only one scope

* use scoped client in context for callAsInternalUser

* use auditor in scoped cluster client

* adopt auditTrail plugin to new interface. configure log from config

* do not log audit events in console by default

* add audit trail functional tests

* cleanup

* add example

* add mocks for spaces plugin

* add unit tests

* update docs

* test description

* Apply suggestions from code review

apply @jportner suggestions

Co-authored-by: Joe Portner <5295965+jportner@users.noreply.github.com>

* add unit tests

* more robust tests

* make spaces optional

* address comments

* update docs

* fix WebStorm refactoring

Co-authored-by: Joe Portner <5295965+jportner@users.noreply.github.com>
2020-07-07 21:16:39 +02:00