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
17.26k stars 1.73k forks source link

Web SCP Globbing #2689

Open russjones opened 5 years ago

russjones commented 5 years ago

The Web UI does not handle downloads that have glob patterns in it correctly. For example, if a user attempts to download ~/some-directory/foo-*.json, the Web UI will create a file called foo-_.json in the Download folder whose contents will be the last file that matched the glob pattern.

It's not clear if all the files are downloaded and the Web UI overwrites them, or if only the last one is downloaded.

alex-kovoy commented 5 years ago

We can serve the files in 1 tar file where we can automatically append the new content (file/dir) when processing the SCP stream.

But since there is no an easy way to know how many files are there in advance, the tar would be our default format for web scp downloads.

alex-kovoy commented 5 years ago

We can also switch to websockets and process the SCP stream on the client side. This way we can change the type of the file on the fly while everything is in the browser memory (which currently is anyway)

alex-kovoy commented 5 years ago

Actually we can handle multiple downloads just fine (although not the folders) even without having to use tar. This is if we switch to websockets and handle the SCP stream on the client side.

sjackman commented 1 year ago

I'd like to be able to download an entire directory as either a ZIP file or compressed or uncompressed TAR file.