Skip to content

Commit efc7876

Browse files
committed
update visual studio code auth content
1 parent 12dcd61 commit efc7876

9 files changed

+119
-4
lines changed

docs/azure/sdk/authentication/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Use of connection strings should be limited to scenarios where token-based authe
3232

3333
The specific type of token-based authentication an app should use to authenticate to Azure resources depends on where the app runs. The following diagram provides guidance for different scenarios and environments:
3434

35-
:::image type="content" source="../media/dotnet-sdk-auth-strategy.png" alt-text="A diagram showing the recommended token-based authentication strategies for an app depending on where it's running." :::
35+
:::image type="content" source="../media/mermaidjs/authentication-environments.svg" alt-text="A diagram showing the recommended token-based authentication strategies for an app depending on where it's running." :::
3636

3737
When an app is:
3838

docs/azure/sdk/authentication/local-development-dev-accounts.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,15 @@ During local development, applications need to authenticate to Azure to access v
1919
- How to sign-in to supported local development tools
2020
- How to authenticate using a developer account from your app code
2121

22-
:::image type="content" source="../media/local-dev-dev-accounts-overview.png" alt-text="A diagram showing an app running in local development using a developer tool identity to connect to Azure resources.":::
22+
:::image type="content" source="../media/mermaidjs/local-authentication.png" alt-text="A diagram showing an app running in local development using a developer tool identity to connect to Azure resources.":::
2323

2424
For an app to authenticate to Azure during local development using the developer's Azure credentials, the developer must be signed-in to Azure from one of the following developer tools:
2525

26+
- Visual Studio
27+
- Visual Studio Code
2628
- Azure CLI
27-
- Azure Developer CLI
2829
- Azure PowerShell
29-
- Visual Studio
30+
- Azure Developer CLI
3031

3132
The Azure Identity library can detect that the developer is signed-in from one of these tools. The library can then obtain the Microsoft Entra access token via the tool to authenticate the app to Azure as the signed-in user.
3233

-40 KB
Binary file not shown.
-71.2 KB
Binary file not shown.
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
ms.topic: include
3+
ms.date: 08/07/2024
4+
---
5+
6+
```mermaid
7+
%% STEPS TO GENERATE IMAGE
8+
%% =======================
9+
%% 1. Install mermaid CLI v10.9.1 (see https://github.com/mermaid-js/mermaid-cli/blob/master/README.md):
10+
%% npm i -g @mermaid-js/[email protected]
11+
%% 2. Run command: mmdc -i ChainSequence.md -o ../../media/mermaidjs/ChainSequence.svg
12+
13+
sequenceDiagram
14+
autonumber;
15+
16+
participant A as .NET app;
17+
participant B as Credential chain;
18+
participant C as TokenCredential instance;
19+
20+
A->>B: Authenticate to Microsoft Entra ID;
21+
activate B;
22+
B->>B: GetToken;
23+
loop Traverse TokenCredential collection until AccessToken received
24+
B->>C: Fetch token;
25+
activate C;
26+
C->>C: GetToken;
27+
break when Result is AccessToken
28+
C-->>B: Result;
29+
end;
30+
deactivate C;
31+
end;
32+
33+
B-->>A: AccessToken;
34+
deactivate B;
35+
```
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
ms.topic: include
3+
ms.date: 08/07/2024
4+
---
5+
6+
```mermaid
7+
%%{init: {'theme':'base', 'themeVariables': { 'primaryColor': '#fff', 'edgeLabelBackground':'#fff', 'fontSize': '24px'}}}%%
8+
flowchart LR
9+
Start([Authentication Environment]) --> Q1{Where is the app running?}
10+
11+
%% Local Development Machine Branch
12+
Q1 --> LocalDev[Development Machine]
13+
LocalDev --> AppSP["**Application service principal**"]
14+
LocalDev --> DevAccount["**Developer account**"]
15+
LocalDev --> Broker["**Broker**"]
16+
17+
%% Azure Branch
18+
Q1 --> AzureApp[Azure]
19+
AzureApp --> ManagedId["**Managed identity**"]
20+
21+
%% On-premises Server Branch
22+
Q1 --> OnPremApp[On-premises server]
23+
OnPremApp --> ServicePrincipal["**Service principal**"]
24+
25+
%% Styling
26+
classDef questionBox fill:#4472C4,stroke:#333,stroke-width:2px,color:#fff,font-size:24px
27+
classDef authMethod fill:#e6f2ff,stroke:#4472C4,stroke-width:2px,color:#000,font-size:24px
28+
classDef startNode fill:#2d5f3f,stroke:#333,stroke-width:2px,color:#fff,font-size:24px
29+
classDef envNode fill:#8fbc8f,stroke:#333,stroke-width:2px,color:#000,font-size:24px
30+
31+
%% Edge label styling
32+
linkStyle default font-size:24px
33+
34+
class Start startNode
35+
class Q1 questionBox
36+
class AppSP,DevAccount,Broker,ManagedId,ServicePrincipal authMethod
37+
class LocalDev,AzureApp,OnPremApp envNode
38+
```

docs/azure/sdk/media/mermaidjs/authentication-environments.svg

Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
ms.topic: include
3+
ms.date: 08/07/2024
4+
---
5+
6+
```mermaid
7+
flowchart TD
8+
LA[Authentication environment]
9+
ARL[.NET app running locally]
10+
11+
VS[Visual Studio]
12+
VSC[Visual Studio Code]
13+
AZCLI[Azure CLI]
14+
AZPS[Azure PowerShell]
15+
AZD[Azure Developer CLI]
16+
17+
AS["Azure services <br/><br/> Azure AI Services, Azure Blob Storage, Key Vault, Azure Service Bus, etc."]
18+
19+
LA --> ARL
20+
ARL --> VS
21+
ARL --> VSC
22+
ARL --> AZD
23+
ARL --> AZCLI
24+
ARL --> AZPS
25+
26+
VS --> AS
27+
VSC --> AS
28+
AZD --> AS
29+
AZCLI --> AS
30+
AZPS --> AS
31+
32+
classDef highlight fill:#0078d4,stroke:#005ba1,stroke-width:2px,color:#fff,font-size:16px
33+
classDef tools fill:#e6f3ff,stroke:#0078d4,stroke-width:1px,font-size:14px
34+
classDef default font-size:14px
35+
36+
class AS highlight
37+
class VS,VSC,AZD,AZCLI,AZPS tools
38+
class LA,ARL default
39+
```

docs/azure/sdk/media/mermaidjs/local-authentication.svg

Lines changed: 1 addition & 0 deletions
Loading

0 commit comments

Comments
 (0)