Skip to content

Add authentication support for Linux#77

Merged
dannyvv merged 5 commits intomicrosoft:mainfrom
dannyvv:pr/AddLinux2
Oct 7, 2025
Merged

Add authentication support for Linux#77
dannyvv merged 5 commits intomicrosoft:mainfrom
dannyvv:pr/AddLinux2

Conversation

@dannyvv
Copy link
Member

@dannyvv dannyvv commented Oct 6, 2025

AzureAuth has dropped support for Linux since 0.9.0 :(
There is still authentication support for authenticating to azure artifacts on linux by the Microsoft Credential provider used by dotnet for nuget authentication.

This change adds support for running the nuget auth tool.

Related work:

There are 2 active PR's to fix #71.
This PR and #76.
The other PR is the cleaner one, it extends the patterned use of AzureAuth library.
Unfortunately, that library has stopped supporting linux since v9.0.0 :(
This approach is a lot more ugly and 1-off for linux from the rest.... But it would allow us to use later versions of the library...
I worry that a future compliance pass will require us to update to v9 because it uses a later MSAL library.

@dannyvv dannyvv requested review from Copilot and jcreamer898 October 6, 2025 20:33
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds authentication support for Linux by implementing Microsoft's NuGet Credential Provider as an alternative authentication method. The main purpose is to enable Linux users to authenticate with Azure DevOps package feeds.

  • Implements credential provider authentication for Linux platforms
  • Adds file download and process execution utilities
  • Updates the token generation logic to use platform-specific authentication methods

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
packages/ado-npm-auth/src/utils/request.ts Adds downloadFile function for downloading credential provider
packages/ado-npm-auth/src/utils/exec.ts Adds execProcess function for running external commands
packages/ado-npm-auth/src/npmrc/nugetCredentialProvider.ts Implements NuGet Credential Provider integration for Linux authentication
packages/ado-npm-auth/src/npmrc/generate-npmrc-pat.ts Updates token generation to use platform-specific authentication methods
packages/ado-npm-auth/src/cli.ts Modifies feed processing to support new authentication flow
packages/ado-npm-auth/.gitignore Adds .bin directory to ignore downloaded tools

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@dannyvv dannyvv merged commit 57a5bc5 into microsoft:main Oct 7, 2025
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Does not work in github codespaces with Ubuntu

4 participants