Skip to content

Commit 4172905

Browse files
authored
reorder dac (#30343)
* reorder dac * updates
1 parent d549cfa commit 4172905

5 files changed

Lines changed: 17 additions & 19 deletions

File tree

sdk/identity/azure-identity/README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,9 @@ The Azure Identity library focuses on OAuth authentication with Azure AD. It off
7070
1. **Environment** - `DefaultAzureCredential` will read account information specified via [environment variables](#environment-variables "environment variables") and use it to authenticate.
7171
1. **Workload Identity** - If the application is deployed to Azure Kubernetes Service with Managed Identity enabled, `DefaultAzureCredential` will authenticate with it.
7272
1. **Managed Identity** - If the application is deployed to an Azure host with Managed Identity enabled, `DefaultAzureCredential` will authenticate with it.
73-
1. **Azure Developer CLI** - If the developer has authenticated via the Azure Developer CLI `azd auth login` command, the `DefaultAzureCredential` will authenticate with that account.
7473
1. **Azure CLI** - If a user has signed in via the Azure CLI `az login` command, `DefaultAzureCredential` will authenticate as that user.
7574
1. **Azure PowerShell** - If a user has signed in via Azure PowerShell's `Connect-AzAccount` command, `DefaultAzureCredential` will authenticate as that user.
75+
1. **Azure Developer CLI** - If the developer has authenticated via the Azure Developer CLI `azd auth login` command, the `DefaultAzureCredential` will authenticate with that account.
7676
1. **Interactive browser** - If enabled, `DefaultAzureCredential` will interactively authenticate a user via the default browser. This credential type is disabled by default.
7777

7878
#### Note about `VisualStudioCodeCredential`
@@ -255,8 +255,6 @@ Not all credentials require this configuration. Credentials that authenticate th
255255
|[`PowerShellCredential`][powershell_cred_ref]| Authenticates in a development environment with the Azure PowerShell. | [Azure PowerShell authentication](https://learn.microsoft.com/powershell/azure/authenticate-azureps)
256256
|[`VisualStudioCodeCredential`][vscode_cred_ref]| Authenticates as the user signed in to the Visual Studio Code Azure Account extension. | [VS Code Azure Account extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode.azure-account)
257257

258-
> __Note:__ `AzureDeveloperCliCredential` is in beta and its name may change before the stable release.
259-
260258
## Environment variables
261259

262260
[DefaultAzureCredential][default_cred_ref] and [EnvironmentCredential][environment_cred_ref] can be configured with environment variables. Each type of authentication requires values for specific

sdk/identity/azure-identity/azure/identity/_credentials/default.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,12 @@ class DefaultAzureCredential(ChainedTokenCredential):
3737
2. WorkloadIdentityCredential if environment variable configuration is set by the Azure workload
3838
identity webhook.
3939
3. An Azure managed identity. See :class:`~azure.identity.ManagedIdentityCredential` for more details.
40-
4. The identity currently logged in to the Azure Developer CLI.
41-
5. On Windows only: a user who has signed in with a Microsoft application, such as Visual Studio. If multiple
40+
4. On Windows only: a user who has signed in with a Microsoft application, such as Visual Studio. If multiple
4241
identities are in the cache, then the value of the environment variable ``AZURE_USERNAME`` is used to select
4342
which identity to use. See :class:`~azure.identity.SharedTokenCacheCredential` for more details.
44-
6. The identity currently logged in to the Azure CLI.
45-
7. The identity currently logged in to Azure PowerShell.
43+
5. The identity currently logged in to the Azure CLI.
44+
6. The identity currently logged in to Azure PowerShell.
45+
7. The identity currently logged in to the Azure Developer CLI.
4646
4747
This default behavior is configurable with keyword arguments.
4848
@@ -160,8 +160,6 @@ def __init__(self, **kwargs: Any) -> None: # pylint: disable=too-many-statement
160160
**kwargs
161161
)
162162
)
163-
if not exclude_developer_cli_credential:
164-
credentials.append(AzureDeveloperCliCredential(process_timeout=process_timeout))
165163
if not exclude_shared_token_cache_credential and SharedTokenCacheCredential.supported():
166164
try:
167165
# username and/or tenant_id are only required when the cache contains tokens for multiple identities
@@ -177,6 +175,8 @@ def __init__(self, **kwargs: Any) -> None: # pylint: disable=too-many-statement
177175
credentials.append(AzureCliCredential(process_timeout=process_timeout))
178176
if not exclude_powershell_credential:
179177
credentials.append(AzurePowerShellCredential(process_timeout=process_timeout))
178+
if not exclude_developer_cli_credential:
179+
credentials.append(AzureDeveloperCliCredential(process_timeout=process_timeout))
180180
if not exclude_interactive_browser_credential:
181181
if interactive_browser_client_id:
182182
credentials.append(

sdk/identity/azure-identity/azure/identity/aio/_credentials/default.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ class DefaultAzureCredential(ChainedTokenCredential):
3636
2. WorkloadIdentityCredential if environment variable configuration is set by the Azure workload
3737
identity webhook.
3838
3. An Azure managed identity. See :class:`~azure.identity.aio.ManagedIdentityCredential` for more details.
39-
4. The identity currently logged in to the Azure Developer CLI.
40-
5. On Windows only: a user who has signed in with a Microsoft application, such as Visual Studio. If multiple
39+
4. On Windows only: a user who has signed in with a Microsoft application, such as Visual Studio. If multiple
4140
identities are in the cache, then the value of the environment variable ``AZURE_USERNAME`` is used to select
4241
which identity to use. See :class:`~azure.identity.aio.SharedTokenCacheCredential` for more details.
43-
6. The identity currently logged in to the Azure CLI.
44-
7. The identity currently logged in to Azure PowerShell.
42+
5. The identity currently logged in to the Azure CLI.
43+
6. The identity currently logged in to Azure PowerShell.
44+
7. The identity currently logged in to the Azure Developer CLI.
4545
4646
This default behavior is configurable with keyword arguments.
4747
@@ -150,8 +150,6 @@ def __init__(self, **kwargs: Any) -> None:
150150
**kwargs
151151
)
152152
)
153-
if not exclude_developer_cli_credential:
154-
credentials.append(AzureDeveloperCliCredential(process_timeout=process_timeout))
155153
if not exclude_shared_token_cache_credential and SharedTokenCacheCredential.supported():
156154
try:
157155
# username and/or tenant_id are only required when the cache contains tokens for multiple identities
@@ -167,6 +165,8 @@ def __init__(self, **kwargs: Any) -> None:
167165
credentials.append(AzureCliCredential(process_timeout=process_timeout))
168166
if not exclude_powershell_credential:
169167
credentials.append(AzurePowerShellCredential(process_timeout=process_timeout))
168+
if not exclude_developer_cli_credential:
169+
credentials.append(AzureDeveloperCliCredential(process_timeout=process_timeout))
170170

171171
super().__init__(*credentials)
172172

sdk/identity/azure-identity/images/mermaidjs/DefaultAzureCredentialAuthFlow.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
%% 2. Run command: mmdc -i DefaultAzureCredentialAuthFlow.md -o DefaultAzureCredentialAuthFlow.svg
77
88
flowchart LR;
9-
A(Environment):::deployed ==> B(Workload Identity):::deployed ==> C(Managed Identity):::deployed ==> D(Azure Developer CLI):::developer ==> E(Azure CLI):::developer ==> F(Azure PowerShell):::developer ==> G(Interactive browser):::interactive;
9+
A(Environment):::deployed ==> B(Workload Identity):::deployed ==> C(Managed Identity):::deployed ==> D(Azure CLI):::developer ==> E(Azure PowerShell):::developer ==> F(Azure Developer CLI):::developer ==> G(Interactive browser):::interactive;
1010
1111
subgraph CREDENTIAL TYPES;
1212
direction LR;
@@ -25,7 +25,7 @@ flowchart LR;
2525
%% Add API ref links to credential type boxes
2626
click A "https://learn.microsoft.com/python/api/azure-identity/azure.identity.environmentcredential?view=azure-python" _blank;
2727
click C "https://learn.microsoft.com/python/api/azure-identity/azure.identity.managedidentitycredential?view=azure-python" _blank;
28-
click E "https://learn.microsoft.com/python/api/azure-identity/azure.identity.azureclicredential?view=azure-python" _blank;
29-
click F "https://learn.microsoft.com/python/api/azure-identity/azure.identity.azurepowershellcredential?view=azure-python" _blank;
28+
click D "https://learn.microsoft.com/python/api/azure-identity/azure.identity.azureclicredential?view=azure-python" _blank;
29+
click E "https://learn.microsoft.com/python/api/azure-identity/azure.identity.azurepowershellcredential?view=azure-python" _blank;
3030
click G "https://learn.microsoft.com/python/api/azure-identity/azure.identity.interactivebrowsercredential?view=azure-python" _blank;
3131
```

0 commit comments

Comments
 (0)