Skip to content

Commit

Permalink
Update docs for azd (#33277)
Browse files Browse the repository at this point in the history
* fix javadoc ordering

* update docs for AzureDeveloperCliCredential

* pr feedback

* fix graph with correct mermaid version
  • Loading branch information
billwert authored Feb 2, 2023
1 parent 4132cdf commit 9635dac
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 14 deletions.
11 changes: 6 additions & 5 deletions sdk/identity/azure-identity/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,12 @@ The `DefaultAzureCredential` is appropriate for most scenarios where the applica
The `DefaultAzureCredential` will attempt to authenticate via the following mechanisms in order.

![DefaultAzureCredential authentication flow](https://github.com/Azure/azure-sdk-for-java/raw/main/sdk/identity/azure-identity/images/mermaidjs/DefaultAzureCredentialAuthFlow.svg)
![DefaultAzureCredential authentication flow](images/mermaidjs/DefaultAzureCredentialAuthFlow.svg)

1. **Environment** - The `DefaultAzureCredential` will read account information specified via [environment variables](#environment-variables) and use it to authenticate.
1. **Managed Identity** - If the application is deployed to an Azure host with Managed Identity enabled, the `DefaultAzureCredential` will authenticate with that account.
1. **IntelliJ** - If the developer has authenticated via Azure Toolkit for IntelliJ, the `DefaultAzureCredential` will authenticate with that account.
1. **Azure Developer CLI** - If the developer has authenticated an account via the Azure Developer CLI `azd login` command, the `DefaultAzureCredential` will authenticate with that account.
1. **IntelliJ** - If the developer has authenticated via Azure Toolkit for IntelliJ, the `DefaultAzureCredential` will authenticate with that account.
1. **Azure CLI** - If the developer has authenticated an account via the Azure CLI `az login` command, the `DefaultAzureCredential` will authenticate with that account.
1. **Azure PowerShell** - If the developer has authenticated an account via the Azure PowerShell `Connect-AzAccount` command, the `DefaultAzureCredential` will authenticate with that account.

Expand Down Expand Up @@ -328,7 +328,7 @@ Not all credentials require this configuration. Credentials that authenticate th
<td><a href="https://learn.microsoft.com/azure/active-directory/develop/app-objects-and-service-principals">Service principal authentication</a></td>
</tr>
<tr>
<td><code><a href="https://docs.microsoft.com/java/api/com.azure.identity.clientsecretcredential?view=azure-java-stable">ClientSecretCredential</a></code></td>
<td><code><a href="https://learn.microsoft.com/java/api/com.azure.identity.clientsecretcredential?view=azure-java-stable">ClientSecretCredential</a></code></td>
<td>authenticates a service principal using a secret</td>
<td><a href="https://github.com/Azure/azure-sdk-for-java/wiki/Azure-Identity-Examples#authenticating-a-service-principal-with-a-client-secret">example</a></td>
<td><a href="https://learn.microsoft.com/azure/active-directory/develop/app-objects-and-service-principals">Service principal authentication</a></td>
Expand Down Expand Up @@ -400,8 +400,7 @@ Not all credentials require this configuration. Credentials that authenticate th
<td>Authenticate in a development environment with the enabled user or service principal in Azure Developer CLI</td>
<!-- Example and Reference for azd is WIP -->
<td></td>
<td></td>
<!-- Example and Reference for azd is WIP -->
<td><a href="https://learn.microsoft.com/azure/developer/azure-developer-cli/reference">Azure Developer CLI Reference</a></td>
</tr>
<tr>
<td><code><a href="https://learn.microsoft.com/java/api/com.azure.identity.azureclicredential?view=azure-java-stable">AzureCliCredential</a></code></td>
Expand Down Expand Up @@ -430,6 +429,8 @@ Not all credentials require this configuration. Credentials that authenticate th
</tbody>
</table>

> __Note:__ `AzureDeveloperCliCredential` is in beta and its name may change before the stable release.
> __Note:__ All credential implementations in the Azure Identity library are threadsafe, and a single credential instance can be used to create multiple service clients.
Credentials can be chained together to be tried in turn until one succeeds using the `ChainedTokenCredential`; see [chaining credentials](#define-a-custom-authentication-flow-with-the-chainedtokencredential) for details.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,28 @@
%% STEPS TO GENERATE IMAGE
%% =======================
%% 1. Install mermaid CLI (see https://github.com/mermaid-js/mermaid-cli/blob/master/README.md)
%% v8.14.0 is known good for our process. npm install -g @mermaid-js/mermaid-cli@8.14.0
%% 2. Run command: mmdc -i DefaultAzureCredentialAuthFlow.md -o DefaultAzureCredentialAuthFlow.svg
flowchart LR;
A(Environment):::deployed ==> B(Managed Identity):::deployed ==> C(IntelliJ):::developer ==> D(Azure CLI):::developer ==> E(Azure PowerShell):::developer;
A(Environment):::deployed ==> B(Managed Identity):::deployed ==> C(Azure Developer CLI):::developer ==> D(IntelliJ):::developer ==> E(Azure CLI):::developer ==> F(Azure PowerShell):::developer;
subgraph CREDENTIAL TYPES;
direction LR;
Deployed(Deployed service):::deployed ==> Developer(Developer):::developer;
%% Hide links between boxes in the legend by setting width to 0. The integers after "linkStyle" represent link indices.
linkStyle 4 stroke-width:0px;
linkStyle 5 stroke-width:0px;
end;
%% Define styles for credential type boxes
classDef deployed fill:#95C37E, stroke:#71AD4C;
classDef developer fill:#F5AF6F, stroke:#EB7C39;
%% Add API ref links to credential type boxes
click A "https://docs.microsoft.com/java/api/com.azure.identity.environmentcredential?view=azure-java-stable" _blank;
click B "https://docs.microsoft.com/java/api/com.azure.identity.managedidentitycredential?view=azure-java-stable" _blank;
click C "https://docs.microsoft.com/java/api/com.azure.identity.intellijcredential?view=azure-java-stable" _blank;
click E "https://docs.microsoft.com/java/api/com.azure.identity.azureclicredential?view=azure-java-stable" _blank;
click F "https://docs.microsoft.com/java/api/com.azure.identity.azurepowershellcredential?view=azure-java-stable" _blank;
click A "https://learn.microsoft.com/java/api/com.azure.identity.environmentcredential?view=azure-java-stable" _blank;
click B "https://learn.microsoft.com/java/api/com.azure.identity.managedidentitycredential?view=azure-java-stable" _blank;
click D "https://learn.microsoft.com/java/api/com.azure.identity.intellijcredential?view=azure-java-stable" _blank;
click E "https://learn.microsoft.com/java/api/com.azure.identity.azureclicredential?view=azure-java-stable" _blank;
click F "https://learn.microsoft.com/java/api/com.azure.identity.azurepowershellcredential?view=azure-java-stable" _blank;
```
Loading

0 comments on commit 9635dac

Please sign in to comment.