Skip to content

Conversation

@MicroFish91
Copy link
Contributor

@MicroFish91 MicroFish91 commented Nov 6, 2025

Overview

This PR adds a secure auth layer that clients should interface with to obtain the Azure Resources core APIs (used for registering branch data resources). For full details on the new auth handshake, please see the auth readme included with this PR. We will continue to publicly provide the core APIs while we let clients onboard. Afterwards we will remove these APIs from the public exports and only expose them through the dedicated auth layer.

Setup

Here are the steps if you would like to try out the changes:

  1. Pull down this branch
  2. npm install & npm run compile in Azure Resources root
  3. npm install & npm pack in Azure Resources API root
  4. Pull down one of the client extension sample branches below
  5. npm install and add the Azure Resources API package built from step 3
  6. Launch Client Extension + Host, observe the onDidReceiveAzureResourcesApis callback to verify we are getting matching Azure Resources APIs

Client Extension Samples

Container Apps example (V2): microsoft/vscode-azurecontainerapps#992
Functions example (internal + V2): microsoft/vscode-azurefunctions#4777

Todos

To add in follow-up PRs.

UPDATE (11/20/2025):

I split up the PRs a bit better, now the client tooling lives in this PR. Therefore if you want to test the functionality described under Setup above, you'll now need to test off of that branch instead.

The order of the PRs to review should be:

  1. Internal Auth Layer - This PR
  2. Client Tools for automating the handshake - Add Azure Resources API (v4) client tooling #1313
  3. Internal Auth Tests - Azure Resources API (v4) internal tests #1288
  4. Client Tools Tests - Azure Resources API (v4) client tools tests #1308

@MicroFish91 MicroFish91 marked this pull request as ready for review November 11, 2025 00:22
@MicroFish91 MicroFish91 requested a review from a team as a code owner November 11, 2025 00:22
@MicroFish91 MicroFish91 marked this pull request as draft November 19, 2025 04:03
@MicroFish91 MicroFish91 changed the title Add an Azure Resources API authentication layer Add an Azure Resources API (v4) authentication layer Nov 19, 2025
@MicroFish91 MicroFish91 marked this pull request as ready for review November 19, 2025 20:12

const v4: string = '4.0.0';

export type AuthApiFactoryDependencies = {
Copy link
Contributor Author

@MicroFish91 MicroFish91 Nov 19, 2025

Choose a reason for hiding this comment

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

Added this type in preparation to leverage dependency injection during tests. It probably belongs in the follow-up test PR, but I'm hoping to not have to extract and re-add it again 😅

@bwateratmsft bwateratmsft self-requested a review December 8, 2025 14:47
@alexweininger
Copy link
Member

We need to write some documentation on how this new layer works. I'd like to help out writing the docs if you want my help, can you post the diagram you made @MicroFish91?

@MicroFish91
Copy link
Contributor Author

MicroFish91 commented Jan 13, 2026

We need to write some documentation on how this new layer works. I'd like to help out writing the docs if you want my help, can you post the diagram you made @MicroFish91?

Yup!

I actually already have some docs and diagrams added in this other PR. Let me know if you think anything else should be added / changed to either the main README or the auth one

README for Client Extensions

Handshake Diagram

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.

4 participants