Skip to content

Commit c5063a6

Browse files
mgmt, azure-resourcemanager, update auth doc, avoid ClientSecretCredential (Azure#40826)
1 parent cff1db1 commit c5063a6

File tree

28 files changed

+145
-187
lines changed

28 files changed

+145
-187
lines changed

eng/mgmt/automation/parameters.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
SDK_ROOT = "../../../" # related to file dir
1818
AUTOREST_CORE_VERSION = "3.9.7"
19-
AUTOREST_JAVA = "@autorest/[email protected].31"
19+
AUTOREST_JAVA = "@autorest/[email protected].32"
2020
DEFAULT_VERSION = "1.0.0-beta.1"
2121
GROUP_ID = "com.azure.resourcemanager"
2222
API_SPECS_FILE = "api-specs.yaml"

sdk/resourcemanager/README.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -121,15 +121,12 @@ Alternatively, [Azure Core OkHttp HTTP client][azure_core_http_okhttp] is anothe
121121

122122
### Authentication
123123

124-
By default, Microsoft Entra ID token authentication depends on correct configure of following environment variables.
124+
Microsoft Entra ID token authentication relies on the [credential class][azure_identity_credentials] from [Azure Identity][azure_identity] package.
125125

126-
- `AZURE_CLIENT_ID` for Azure client ID.
127-
- `AZURE_TENANT_ID` for Azure tenant ID.
128-
- `AZURE_CLIENT_SECRET` or `AZURE_CLIENT_CERTIFICATE_PATH` for client secret or client certificate.
126+
Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment variable.
127+
Azure tenant ID can be configured via `AZURE_TENANT_ID` environment variable.
129128

130-
In addition, Azure subscription ID can be configured via environment variable `AZURE_SUBSCRIPTION_ID`.
131-
132-
With above configuration, the manager class can be authenticated by following code:
129+
Assuming the use of the `DefaultAzureCredential` credential class, the client can be authenticated using the following code:
133130

134131
```java readme-sample-authenticate
135132
AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE);
@@ -451,6 +448,7 @@ For details on contributing to this repository, see the [contributing guide](htt
451448
[jdk]: https://learn.microsoft.com/azure/developer/java/fundamentals/
452449
[azure_subscription]: https://azure.microsoft.com/free/
453450
[azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/identity/azure-identity
451+
[azure_identity_credentials]: https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/identity/azure-identity#credentials
454452
[azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core-http-netty
455453
[azure_core_http_okhttp]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core-http-okhttp
456454
[azure_core]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core

sdk/resourcemanager/azure-resourcemanager-appplatform/README.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,12 @@ Azure Management Libraries require a `TokenCredential` implementation for authen
3131

3232
### Authentication
3333

34-
By default, Microsoft Entra ID token authentication depends on correct configure of following environment variables.
34+
Microsoft Entra ID token authentication relies on the [credential class][azure_identity_credentials] from [Azure Identity][azure_identity] package.
3535

36-
- `AZURE_CLIENT_ID` for Azure client ID.
37-
- `AZURE_TENANT_ID` for Azure tenant ID.
38-
- `AZURE_CLIENT_SECRET` or `AZURE_CLIENT_CERTIFICATE_PATH` for client secret or client certificate.
36+
Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment variable.
37+
Azure tenant ID can be configured via `AZURE_TENANT_ID` environment variable.
3938

40-
In addition, Azure subscription ID can be configured via environment variable `AZURE_SUBSCRIPTION_ID`.
41-
42-
With above configuration, `azure` client can be authenticated by following code:
39+
Assuming the use of the `DefaultAzureCredential` credential class, the client can be authenticated using the following code:
4340

4441
```java readme-sample-authenticate
4542
AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE);
@@ -80,6 +77,7 @@ For details on contributing to this repository, see the [contributing guide](htt
8077
[jdk]: https://learn.microsoft.com/azure/developer/java/fundamentals/
8178
[azure_subscription]: https://azure.microsoft.com/free/
8279
[azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/identity/azure-identity
80+
[azure_identity_credentials]: https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/identity/azure-identity#credentials
8381
[azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core-http-netty
8482
[authenticate]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/AUTH.md
8583
[sample]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/SAMPLE.md

sdk/resourcemanager/azure-resourcemanager-appservice/README.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,12 @@ Azure Management Libraries require a `TokenCredential` implementation for authen
3131

3232
### Authentication
3333

34-
By default, Microsoft Entra ID token authentication depends on correct configure of following environment variables.
34+
Microsoft Entra ID token authentication relies on the [credential class][azure_identity_credentials] from [Azure Identity][azure_identity] package.
3535

36-
- `AZURE_CLIENT_ID` for Azure client ID.
37-
- `AZURE_TENANT_ID` for Azure tenant ID.
38-
- `AZURE_CLIENT_SECRET` or `AZURE_CLIENT_CERTIFICATE_PATH` for client secret or client certificate.
36+
Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment variable.
37+
Azure tenant ID can be configured via `AZURE_TENANT_ID` environment variable.
3938

40-
In addition, Azure subscription ID can be configured via environment variable `AZURE_SUBSCRIPTION_ID`.
41-
42-
With above configuration, `azure` client can be authenticated by following code:
39+
Assuming the use of the `DefaultAzureCredential` credential class, the client can be authenticated using the following code:
4340

4441
```java readme-sample-authenticate
4542
AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE);
@@ -80,6 +77,7 @@ For details on contributing to this repository, see the [contributing guide](htt
8077
[jdk]: https://learn.microsoft.com/azure/developer/java/fundamentals/
8178
[azure_subscription]: https://azure.microsoft.com/free/
8279
[azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/identity/azure-identity
80+
[azure_identity_credentials]: https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/identity/azure-identity#credentials
8381
[azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core-http-netty
8482
[authenticate]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/AUTH.md
8583
[sample]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/SAMPLE.md

sdk/resourcemanager/azure-resourcemanager-authorization/README.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,12 @@ Azure Management Libraries require a `TokenCredential` implementation for authen
3131

3232
### Authentication
3333

34-
By default, Microsoft Entra ID token authentication depends on correct configure of following environment variables.
34+
Microsoft Entra ID token authentication relies on the [credential class][azure_identity_credentials] from [Azure Identity][azure_identity] package.
3535

36-
- `AZURE_CLIENT_ID` for Azure client ID.
37-
- `AZURE_TENANT_ID` for Azure tenant ID.
38-
- `AZURE_CLIENT_SECRET` or `AZURE_CLIENT_CERTIFICATE_PATH` for client secret or client certificate.
36+
Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment variable.
37+
Azure tenant ID can be configured via `AZURE_TENANT_ID` environment variable.
3938

40-
In addition, Azure subscription ID can be configured via environment variable `AZURE_SUBSCRIPTION_ID`.
41-
42-
With above configuration, `azure` client can be authenticated by following code:
39+
Assuming the use of the `DefaultAzureCredential` credential class, the client can be authenticated using the following code:
4340

4441
```java readme-sample-authenticate
4542
AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE);
@@ -80,6 +77,7 @@ For details on contributing to this repository, see the [contributing guide](htt
8077
[jdk]: https://learn.microsoft.com/azure/developer/java/fundamentals/
8178
[azure_subscription]: https://azure.microsoft.com/free/
8279
[azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/identity/azure-identity
80+
[azure_identity_credentials]: https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/identity/azure-identity#credentials
8381
[azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core-http-netty
8482
[authenticate]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/AUTH.md
8583
[sample]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/SAMPLE.md

sdk/resourcemanager/azure-resourcemanager-cdn/README.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,12 @@ Azure Management Libraries require a `TokenCredential` implementation for authen
3131

3232
### Authentication
3333

34-
By default, Microsoft Entra ID token authentication depends on correct configure of following environment variables.
34+
Microsoft Entra ID token authentication relies on the [credential class][azure_identity_credentials] from [Azure Identity][azure_identity] package.
3535

36-
- `AZURE_CLIENT_ID` for Azure client ID.
37-
- `AZURE_TENANT_ID` for Azure tenant ID.
38-
- `AZURE_CLIENT_SECRET` or `AZURE_CLIENT_CERTIFICATE_PATH` for client secret or client certificate.
36+
Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment variable.
37+
Azure tenant ID can be configured via `AZURE_TENANT_ID` environment variable.
3938

40-
In addition, Azure subscription ID can be configured via environment variable `AZURE_SUBSCRIPTION_ID`.
41-
42-
With above configuration, `azure` client can be authenticated by following code:
39+
Assuming the use of the `DefaultAzureCredential` credential class, the client can be authenticated using the following code:
4340

4441
```java readme-sample-authenticate
4542
AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE);
@@ -80,6 +77,7 @@ For details on contributing to this repository, see the [contributing guide](htt
8077
[jdk]: https://learn.microsoft.com/azure/developer/java/fundamentals/
8178
[azure_subscription]: https://azure.microsoft.com/free/
8279
[azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/identity/azure-identity
80+
[azure_identity_credentials]: https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/identity/azure-identity#credentials
8381
[azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core-http-netty
8482
[authenticate]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/AUTH.md
8583
[sample]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/SAMPLE.md

sdk/resourcemanager/azure-resourcemanager-compute/README.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,12 @@ Azure Management Libraries require a `TokenCredential` implementation for authen
3131

3232
### Authentication
3333

34-
By default, Microsoft Entra ID token authentication depends on correct configure of following environment variables.
34+
Microsoft Entra ID token authentication relies on the [credential class][azure_identity_credentials] from [Azure Identity][azure_identity] package.
3535

36-
- `AZURE_CLIENT_ID` for Azure client ID.
37-
- `AZURE_TENANT_ID` for Azure tenant ID.
38-
- `AZURE_CLIENT_SECRET` or `AZURE_CLIENT_CERTIFICATE_PATH` for client secret or client certificate.
36+
Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment variable.
37+
Azure tenant ID can be configured via `AZURE_TENANT_ID` environment variable.
3938

40-
In addition, Azure subscription ID can be configured via environment variable `AZURE_SUBSCRIPTION_ID`.
41-
42-
With above configuration, `azure` client can be authenticated by following code:
39+
Assuming the use of the `DefaultAzureCredential` credential class, the client can be authenticated using the following code:
4340

4441
```java readme-sample-authenticate
4542
AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE);
@@ -80,6 +77,7 @@ For details on contributing to this repository, see the [contributing guide](htt
8077
[jdk]: https://learn.microsoft.com/azure/developer/java/fundamentals/
8178
[azure_subscription]: https://azure.microsoft.com/free/
8279
[azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/identity/azure-identity
80+
[azure_identity_credentials]: https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/identity/azure-identity#credentials
8381
[azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core-http-netty
8482
[authenticate]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/AUTH.md
8583
[sample]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/SAMPLE.md

sdk/resourcemanager/azure-resourcemanager-containerinstance/README.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,12 @@ Azure Management Libraries require a `TokenCredential` implementation for authen
3131

3232
### Authentication
3333

34-
By default, Microsoft Entra ID token authentication depends on correct configure of following environment variables.
34+
Microsoft Entra ID token authentication relies on the [credential class][azure_identity_credentials] from [Azure Identity][azure_identity] package.
3535

36-
- `AZURE_CLIENT_ID` for Azure client ID.
37-
- `AZURE_TENANT_ID` for Azure tenant ID.
38-
- `AZURE_CLIENT_SECRET` or `AZURE_CLIENT_CERTIFICATE_PATH` for client secret or client certificate.
36+
Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment variable.
37+
Azure tenant ID can be configured via `AZURE_TENANT_ID` environment variable.
3938

40-
In addition, Azure subscription ID can be configured via environment variable `AZURE_SUBSCRIPTION_ID`.
41-
42-
With above configuration, `azure` client can be authenticated by following code:
39+
Assuming the use of the `DefaultAzureCredential` credential class, the client can be authenticated using the following code:
4340

4441
```java readme-sample-authenticate
4542
AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE);
@@ -80,6 +77,7 @@ For details on contributing to this repository, see the [contributing guide](htt
8077
[jdk]: https://learn.microsoft.com/azure/developer/java/fundamentals/
8178
[azure_subscription]: https://azure.microsoft.com/free/
8279
[azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/identity/azure-identity
80+
[azure_identity_credentials]: https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/identity/azure-identity#credentials
8381
[azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core-http-netty
8482
[authenticate]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/AUTH.md
8583
[sample]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/SAMPLE.md

sdk/resourcemanager/azure-resourcemanager-containerregistry/README.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,12 @@ Azure Management Libraries require a `TokenCredential` implementation for authen
3131

3232
### Authentication
3333

34-
By default, Microsoft Entra ID token authentication depends on correct configure of following environment variables.
34+
Microsoft Entra ID token authentication relies on the [credential class][azure_identity_credentials] from [Azure Identity][azure_identity] package.
3535

36-
- `AZURE_CLIENT_ID` for Azure client ID.
37-
- `AZURE_TENANT_ID` for Azure tenant ID.
38-
- `AZURE_CLIENT_SECRET` or `AZURE_CLIENT_CERTIFICATE_PATH` for client secret or client certificate.
36+
Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment variable.
37+
Azure tenant ID can be configured via `AZURE_TENANT_ID` environment variable.
3938

40-
In addition, Azure subscription ID can be configured via environment variable `AZURE_SUBSCRIPTION_ID`.
41-
42-
With above configuration, `azure` client can be authenticated by following code:
39+
Assuming the use of the `DefaultAzureCredential` credential class, the client can be authenticated using the following code:
4340

4441
```java readme-sample-authenticate
4542
AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE);
@@ -80,6 +77,7 @@ For details on contributing to this repository, see the [contributing guide](htt
8077
[jdk]: https://learn.microsoft.com/azure/developer/java/fundamentals/
8178
[azure_subscription]: https://azure.microsoft.com/free/
8279
[azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/identity/azure-identity
80+
[azure_identity_credentials]: https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/identity/azure-identity#credentials
8381
[azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core-http-netty
8482
[authenticate]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/AUTH.md
8583
[sample]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/SAMPLE.md

sdk/resourcemanager/azure-resourcemanager-containerservice/README.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,12 @@ Azure Management Libraries require a `TokenCredential` implementation for authen
3131

3232
### Authentication
3333

34-
By default, Microsoft Entra ID token authentication depends on correct configure of following environment variables.
34+
Microsoft Entra ID token authentication relies on the [credential class][azure_identity_credentials] from [Azure Identity][azure_identity] package.
3535

36-
- `AZURE_CLIENT_ID` for Azure client ID.
37-
- `AZURE_TENANT_ID` for Azure tenant ID.
38-
- `AZURE_CLIENT_SECRET` or `AZURE_CLIENT_CERTIFICATE_PATH` for client secret or client certificate.
36+
Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment variable.
37+
Azure tenant ID can be configured via `AZURE_TENANT_ID` environment variable.
3938

40-
In addition, Azure subscription ID can be configured via environment variable `AZURE_SUBSCRIPTION_ID`.
41-
42-
With above configuration, `azure` client can be authenticated by following code:
39+
Assuming the use of the `DefaultAzureCredential` credential class, the client can be authenticated using the following code:
4340

4441
```java readme-sample-authenticate
4542
AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE);
@@ -80,6 +77,7 @@ For details on contributing to this repository, see the [contributing guide](htt
8077
[jdk]: https://learn.microsoft.com/azure/developer/java/fundamentals/
8178
[azure_subscription]: https://azure.microsoft.com/free/
8279
[azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/identity/azure-identity
80+
[azure_identity_credentials]: https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/identity/azure-identity#credentials
8381
[azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core-http-netty
8482
[authenticate]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/AUTH.md
8583
[sample]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/SAMPLE.md

0 commit comments

Comments
 (0)