Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v12] SFTP fixes #24831

Merged
merged 6 commits into from Apr 19, 2023
Merged

[v12] SFTP fixes #24831

merged 6 commits into from Apr 19, 2023

Conversation

This change also greatly reduces the number of SFTP audit logs.
Now SFTP events are only sent when files are opened or modified
in any way, instead of for *every* SFTP request.

* added to SFTP integration test

* fix error when handling setstat on dirs

* fix linter warning

* move file/dir permission constants to lib/defaults package
@capnspacehook capnspacehook added backport sftp Issues related to Teleport's SFTP implementation labels Apr 19, 2023
@github-actions github-actions bot added audit-log Issues related to Teleports Audit Log size/lg tsh tsh - Teleport's command line tool for logging into nodes running Teleport. labels Apr 19, 2023
Also fix copying symlinked files.
The sftp package is where modern file transfer logic lives and is
being maintained. Make the web UI use this package to unify
how we transfer files.
@jakule
Copy link
Contributor

jakule commented Apr 19, 2023

@capnspacehook
Copy link
Contributor Author

I actually did tidy it, but I think when I did I forgot to update the e submodule which caused it to make a dep direct instead of indirect. I'll fix it

Previously a Teleport client using SFTP would resolve remote host user
home directories by making a subsystem request to a Teleport server
which would return the home directory. The problem was the subsystem
request counted as an open session, which could make the SFTP file
transfer fail. This was frustrating and didn't make much sense, but
after reading the SFTP specification again I realized that SFTP servers
are to handle relative paths by assuming they start at the user's home
directory. So let the server figure out the correct path and remove any
tilde prefixes from remote paths.
@capnspacehook
Copy link
Contributor Author

capnspacehook commented Apr 19, 2023

Interesting, whenever I run go mod tidy locally, it moves golang/x/time to be a direct dependency. But when it's run in CI it's not. Is this a bug with the Lint Go action, because it doesn't checkout the e submodule?

@capnspacehook capnspacehook added this pull request to the merge queue Apr 19, 2023
Merged via the queue into branch/v12 with commit 8a770ad Apr 19, 2023
20 checks passed
@capnspacehook capnspacehook deleted the capnspacehook/v12/sftp-fixes branch April 19, 2023 21:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
audit-log Issues related to Teleports Audit Log backport sftp Issues related to Teleport's SFTP implementation size/lg tsh tsh - Teleport's command line tool for logging into nodes running Teleport.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants