microsoft / VFSForGit

Virtual File System for Git: Enable Git at Enterprise Scale
MIT License
5.97k stars 452 forks source link

VFS for Git background server access and credential expiration #921

Open turbonaitis opened 5 years ago

turbonaitis commented 5 years ago

VFS for Git acquires user credentials from git credentials helper, when it first clones and stores them. What happens when those credentials expire? (https://docs.microsoft.com/en-us/azure/devops/organizations/accounts/use-personal-access-tokens-to-authenticate?view=azure-devops shows PATs default expiration time as 90d)

When the mount process tries to communicate with the server, will get a 401 and will try to invoke git credential fill, it might, or might not work, depending on configured credentials helper. It will work, when credential helper is able to renew credentials without any user interaction, that's the best case. It might also work, if some UI popup shows up and asks the user to fill in their credentials, but could be very confusing to the user. In case if configured git credential helper relies on getting input from terminal, this will not work and whatever operation VFS for Git was trying to perform, will just fail.

Are there any plans to support such scenarios, by perhaps showing some UI message to the user, that VFS for Git mount has failed and is terminating and the user should run gvfs mount again to be able to use it?

jamill commented 5 years ago

Hi!

I think those are all valid observations. As a system that generally operates in the background without any user facing component, VFS4G does not currently have a great place to display messages like this to the user. There are other messages that we also might want to display to the user (an upgrade is available, bring other issues encountered during mounting to the user's attention, ect...) that we also do not currently have a great story for.

We have discussed options for displaying these types of notifications to the user, but we just have not gotten to it. We have been discussing a way to bring platform native (Windows, MacOS, etc..) notifications / UX to communicate these types of issues, with possible actions to try and fix the issue. For Windows, this could be possibly be a notification tray icon.

I think this is to say - yes, these are valid observations, we have discussed how we might improve the situation, but we have not started working on this yet.

jrbriggs commented 5 years ago

958 tracks platform-native notifications.