Commit Graph
26 Commits
Author SHA1 Message Date
Andrej Tokarčík b86fa7bfa8 Implement where conditions for session recordings list/read (#8289) 2021-10-08 10:18:22 -07:00
Brian Joerger 9b8b9d6d0c rollback - Upgrade api version. (#7751) 2021-07-30 15:34:19 -07:00
Brian Joerger c040aca4c1 Upgrade api version. (#7609) 2021-07-28 13:51:21 -07:00
Joel 98d51c529d Implement an API for exporting session events (#7360) 2021-07-14 01:29:00 +02:00
Joel 01dd8068aa Allow querying for audit events in either an ascending or descending order (#7425) 2021-07-12 13:14:05 +02:00
Brian Joerger 7bff7c41bd Remove API aliases (#6983) 2021-06-04 13:29:31 -07:00
Joel b68c519b4c Implement RFD 19: Event Iteration API (#6731) 2021-05-18 16:46:01 +02:00
Jane Quintero 9b26bfe821 emit session upload event 2021-02-19 17:29:11 -08:00
Sasha Klizhentas d160507430 Session streaming
This commit introduces GRPC API for streaming sessions.

It adds structured events and sync streaming
that avoids storing events on disk.

You can find design in rfd/0002-streaming.md RFD.
2020-09-28 23:08:56 -07:00
Roman Tkachenko 1828e21ef4 [Forward-port] Update audit events with additional fields. (#2655) 2019-04-17 10:16:28 -07:00
Russell Jones 87fe7a397d Added tsh for Windows. 2018-08-03 11:06:08 -07:00
Sasha Klizhentas 350ccc3ecd Delete code deprecated in 2.6.0
This commit fixes #1805
2018-05-03 16:44:39 -07:00
Sasha Klizhentas 9af093e6f6 Introduce new upload API.
This PR improves session recording:

* Nodes and proxies always buffer recorded sessions
to disk during the session what improves performance
and makes the recording more resilient to network failures.

* Async uploader running on proxy or node always uploads the
session tarball to the audit log server.

* Audit log server is the only component uploading
to the S3 or any other API.
2018-03-29 15:15:05 -07:00
Sasha Klizhentas bad1b0498d External events and sessions storage.
Updates #1755

Design
------

This commit adds support for pluggable events and
sessions recordings and adds several plugins.

In case if external sessions recording storage
is used, nodes or proxies depending on configuration
store the session recordings locally and
then upload the recordings in the background.

Non-print session events are always sent to the
remote auth server as usual.

In case if remote events storage is used, auth
servers download recordings from it during playbacks.

DynamoDB event backend
----------------------

Transient DynamoDB backend is added for events
storage. Events are stored with default TTL of 1 year.

External lambda functions should be used
to forward events from DynamoDB.

Parameter audit_table_name in storage section
turns on dynamodb backend.

The table will be auto created.

S3 sessions backend
-------------------

If audit_sessions_uri is specified to s3://bucket-name
node or proxy depending on recording mode
will start uploading the recorded sessions
to the bucket.

If the bucket does not exist, teleport will
attempt to create a bucket with versioning and encryption
turned on by default.

Teleport will turn on bucket-side encryption for the tarballs
using aws:kms key.

File sessions backend
---------------------

If audit_sessions_uri is specified to file:///folder
teleport will start writing tarballs to this folder instead
of sending records to the file server.

This is helpful for plugin writers who can use fuse or NFS
mounted storage to handle the data.

Working dynamic configuration.
2018-03-15 12:42:43 -07:00
Sasha Klizhentas 8eaa342dff Add limits to SearchEvents, fixes #1632
SearchEvents and SearchSessionEvents set
default limits of fetched events of 500 up to 10K events
per interval.

No UI changes are required, as users will be able
to refine the search interval to fetch more sessions.
2018-02-02 08:52:24 -08:00
Russell Jones a2bcf68166 Emit session specific audit events, but not session specific stream
bytes.
2017-12-21 11:48:05 -08:00
Roman Tkachenko 143b834e57 Changes for the upcoming teleport pro:
* Allow external audit log plugins
* Add support for auth API server plugins
* Add license file path configuration parameter (not used in open-source)
* Extend audit log with user login events
2017-11-21 17:35:58 -08:00
Sasha Klizhentas 4089574f53 fix delays and offsets, address review comments 2017-11-16 14:43:35 -08:00
Sasha Klizhentas fed7d2f116 fix audit log file leak, fixes #1433
This is a fix for file leak in audit log server caused
by design issue:

Session file descriptors in audit log were opened on demand
when the session event or byte stream chunk  was reported.

AuditLog server relied on SessionEnd event to close the
file descriptors associated with the session.

However, when SessionEnd event does not arrive (e.g.
there is a timeout or disconnect), the file descriptors
were not closed. This commit adds periodic clean up
of inactive sessions.

SessionEnd is now used as an optimization measure
to close the files, but is not used as the only
trigger to close files.

Now, inactive idle sessions, will close file descriptors
after periods of inactivity and will reopen the file
descriptors when the session activity resumes.

SessionLogger was not designed to open/close files
multiple times as it was reseting offsets
every time the session files were opened. This
change fixes this condition as well.
2017-11-15 18:39:27 -08:00
Russell Jones 432a7ad787 Added services.ClusterConfig resource which controls where (and if) a
session is recorded.
2017-10-25 21:09:21 +00:00
Russell Jones 444d62ef8c Session access controls. 2017-08-26 00:55:20 +00:00
Sasha Klizhentas 858755f182 configuration and defaults 2017-05-27 12:46:03 -07:00
Sasha Klizhentas b72b734979 add grpc 2017-05-26 18:19:22 -07:00
Sasha Klizhentas e766a3c902 work 2017-05-25 18:56:32 -07:00
Sasha Klizhentas 7e97b10032 add support for namespaces almost everywhere 2016-12-14 15:48:36 -08:00
Ev Kontsevoy c7b4934553 Implemented a new Teleport option: "no recording"
Teleport configuration now has a new field: NoAudit (false by default,
which means audit is always on).

When this option is set, Teleport will not record events and will not
record sessions.

It's implemented by adding "DiscardLogger" which implements the same
interface as teh real logger, and it's plugged into the system instead.

NOTE: this option is not exposed in teleport in any way: no config file,
no switch, etc. I quickly needed it for Telecast.
2016-09-05 22:12:57 -07:00