Refactor web UI file transfers to use sftp package#24260
Refactor web UI file transfers to use sftp package#24260capnspacehook merged 1 commit intomasterfrom
Conversation
38dcbaa to
6fcc338
Compare
|
Please make sure file transfers still work when per session MFA is enabled. Cc @avatus |
Tested locally and the current iteration has per-session-mfa still working. I also love that this doesn't change anything on the frontend so, 👍 from me |
|
A couple notes from local testing.
|
9b8c49f to
b7282b8
Compare
|
@avatus thanks for manually testing! I think I fixed the file transfer check, can you take a look and make sure everything looks good? |
228035a to
2b4617e
Compare
b02964a to
2344c81
Compare
2344c81 to
200e6f2
Compare
|
Friendly ping @strideynet |
| return nil | ||
| } | ||
| if registry == nil { | ||
| return errCannotStartUnattendedSession |
There was a problem hiding this comment.
Should these errors be wrapped so we get a trace to within this function ?
There was a problem hiding this comment.
I actually was thinking about that and forgot to do something about it... These should probably be normal errors constructed from errors.New and wrapped when returned, yeah.
There was a problem hiding this comment.
Actually since trace.AccessDenied takes strings, I guess errCannotStartUnattendedSession needs to be a string constant. You think I should drop the err prefix though since it's not an error?
There was a problem hiding this comment.
I opted to just wrap the existing errors, though imo that's not ideal as the trace will include the var block the errors are defined in. Maybe we need to add functions to the trace package to wrap existing errors with a flavor, ie AccessDenied or something.
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.
200e6f2 to
d284e81
Compare
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.
Closes #23595.