-
Notifications
You must be signed in to change notification settings - Fork 255
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
[Bug]: dotnet list package --outdated --interactive
makes credential provider invalidate cache for every package listed
#11169
[Bug]: dotnet list package --outdated --interactive
makes credential provider invalidate cache for every package listed
#11169
Comments
Is this something that's still happening with restore as well? |
@nkolev92 No, I don’t have a repro with package restore using NuGet CLI 5.10 and latest credprovider (0.1.25), auth prompted only once and credprovider cache is being respected properly. At this moment we’re only aware of the issue with list command. |
@erdembayar would you mind looking into this and checking if it's a regression? |
@ByAgenT |
@donnie-msft @aortiz-msft |
Since this was must fix issue changing back to P1. |
NuGet Product Used
dotnet.exe
Product Version
NuGet Command Line 5.11.0.10
Worked before?
No response
Impact
It's more difficult to complete my work
Repro Steps & Context
Hello,
I am from Azure Artifacts team.
We received an issue that when
dotnet list package --outdated --interactive
command is executed against project that set up with Azure Artifacts feed that require auth through Azure Artifacts Credential Provider, NuGet sends "GetAuthenticationCredentials" request to cred provider for every package in the list, and for every next request starting from second package to the same source, NuGet sets request parameterIsRetry: true
to cred provider, which is a signal to invalidate credential cache and issue a new PAT and prompt for credentials interactively again. This behavior results in a looped interactive auth prompt instead of respecting cred provider cache. I was able to reproduce issue on both Windows and Ubuntu.We don't see a good way how we can work around this behavior and fix issue from cred provider side, because if we won't invalidate cache when IsRetry is true, we will introduce complexity to the user to understand when they need to clear NuGet cache manually when credentials are expired in other scenarios.
Steps to reproduce (Ubuntu):
Note: this is best to repro in Unix system, because in Windows you may not be prompted interactively if your machine is AAD joined and you have permissions to access Azure Artifacts feed.
dotnet restore --interactive
dotnet list package --outdated --interactive
in the same projectResult behavior:
Expected behavior:
Attaching logs of calling
dotnet list package --outdated --interactive --verbosity detailed
for a project with 2 NuGet packages. In the logs you can see that for the first package cred provider receives request withIsRetry: false
and returns credentials from the cache successfully, but for the next package from the same source, cred provider receivesIsRetry: true
which indicated that previous call was unsuccessful and cred provider should invalidate the cache and prompt for credentials again.Link to the issue in developer community. Let me know if any additional information needed.
Verbose Logs
The text was updated successfully, but these errors were encountered: