Skip to content

Conversation

@sverrejoh
Copy link
Member

Summary

Enables native Linux (x64 and arm64) support for automatic Azure DevOps authentication. The azureauth CLI already provides Linux binaries (v0.8.4+), but the wrapper packages were blocking Linux users.

Changes

packages/ado-npm-auth

  • Added linux: ["x64", "arm64"] to supported platforms in is-supported-platform-and-architecture.ts
  • Updated JSDoc to reflect Linux support

packages/node-azureauth

  • Added linux: ["x64", "arm64"] to supported platforms
  • Fixed AZUREAUTH_NAME_MAP for Linux (binary name is azureauth, not azureauth.exe)
  • Added Linux .deb download support to DOWNLOAD_MAP:
    • azureauth-0.8.4-linux-x64.deb
    • azureauth-0.8.4-linux-arm64.deb
  • Implemented extractDeb() function to handle Debian package extraction:
    • Extracts ar archive
    • Finds and extracts data.tar.*
    • Copies all files from /usr/lib/azureauth/ to install directory
    • Sets proper permissions (0o755)

Testing

Tested on Arch Linux x64:

  • ✅ Binary downloads successfully (v0.8.4)
  • ✅ Binary extracts and installs correctly
  • ✅ Authentication completes successfully
  • ✅ No regression for Windows/macOS/WSL (WSL still uses Windows .exe via interop)

Before/After

Before: Linux users see "Platform linux and architecture x64 not supported" error
After: Linux users can use npm exec azureauth for automatic authentication

Notes

  • WSL continues to use Windows executable (azureauth.exe) via WSL interop as before
  • Only native Linux distributions benefit from this change
  • Requires ar and tar commands (standard on all Linux distributions)

Sverre Johansen added 3 commits October 2, 2025 11:38
This change enables native Linux (x64 and arm64) support for automatic
Azure DevOps authentication in both packages.

Changes in packages/ado-npm-auth:
- Added linux (x64, arm64) to supported platforms in is-supported-platform-and-architecture.ts

Changes in packages/node-azureauth:
- Added linux (x64, arm64) to supported platforms
- Fixed binary name map (azureauth instead of azureauth.exe for Linux)
- Added .deb download support for Linux binaries
- Implemented extractDeb() function to handle .deb package extraction
- Updated DOWNLOAD_MAP to include Linux .deb files for x64 and arm64

The azureauth CLI (v0.8.4+) already provides Linux binaries, this change
enables the wrappers to use them.

Fixes support for native Linux users who previously had to manually
configure PAT tokens.
@dannyvv
Copy link
Member

dannyvv commented Oct 6, 2025

I created an alternative implementation for linux: #77 (even though yours implementation is a lot cleaner) I'm awaiting feedback from repo owners on their view which approach to take. My concern is that linux support is dropped in v9 of azureauth.

There is a chance that internally at Microsoft at some point in the future we have to move to v9 because it supports a later MSAL library.

@sverrejoh
Copy link
Member Author

I created an alternative implementation for linux: #77 (even though yours implementation is a lot cleaner) I'm awaiting feedback from repo owners on their view which approach to take. My concern is that linux support is dropped in v9 of azureauth.

There is a chance that internally at Microsoft at some point in the future we have to move to v9 because it supports a later MSAL library.!

Super! Then I'll test it and abandon this PR. Thanks for the great work!

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.

2 participants