gravitational / teleport

The easiest, and most secure way to access and protect all of your infrastructure.
https://goteleport.com
GNU Affero General Public License v3.0
16.94k stars 1.7k forks source link

Audit scp transferred file size #43347

Open philip-teleport opened 1 week ago

philip-teleport commented 1 week ago

What would you like Teleport to do?

Audit the size of files uploaded and downloaded via tsh scp (or via the web UI).

What problem does this solve?

Currently, on the Teleport v15, when downloading a file, the "SFTP Open" audit event does not include file size information and when downloading a file, the file_size attribute in the "SFTP Setstat" is alway set to null.

Auditing file sizes on file upload and download would allow alerts based on file size to be triggered from a SIEM solution, when Teleport audit events are exported.

If a workaround exists, please include it.

None

zmb3 commented 1 week ago

when downloading a file, the "SFTP Open" audit event does not include file size information

This is largely by design and probably not something we will change.

Teleport's SFTP audit events are meant to indicate specific protocol-level actions. To "download" a file, what you are actually doing is:

The only actions that have a size associated with them are read/write actions. There is no concept of size when opening or closing a file.