This commit is contained in:
azure-sdk 2024-04-09 00:03:34 +00:00
Родитель ea06758261
Коммит c84d801f5f
4 изменённых файлов: 48 добавлений и 36 удалений

Просмотреть файл

@ -1,12 +1,12 @@
---
title: Azure Identity Brokered Authentication client library for Java
keywords: Azure, java, SDK, API, azure-identity-broker, identity
ms.date: 03/15/2024
ms.date: 04/09/2024
ms.topic: reference
ms.devlang: java
ms.service: identity
---
# Azure Identity Brokered Authentication client library for Java - version 1.0.4
# Azure Identity Brokered Authentication client library for Java - version 1.1.0
The Azure Identity Brokered Authentication library extends the Azure Identity library to provide brokered authentication support. This options class can be used to create an `InteractiveBrowserCredential` capable of using the system authentication broker in lieu of the web browser when available.
@ -19,7 +19,7 @@ The Azure Identity Brokered Authentication library extends the Azure Identity li
#### Include the BOM file
Include the `azure-sdk-bom` in your project to take a dependency on the stable version of the library. In the following snippet, replace the `{bom_version_to_target}` placeholder with the version number. To learn more about the BOM, see the [Azure SDK BOM README](https://github.com/Azure/azure-sdk-for-java/blob/azure-identity-broker_1.0.4/sdk/boms/azure-sdk-bom/README.md).
Include the `azure-sdk-bom` in your project to take a dependency on the stable version of the library. In the following snippet, replace the `{bom_version_to_target}` placeholder with the version number. To learn more about the BOM, see the [Azure SDK BOM README](https://github.com/Azure/azure-sdk-for-java/blob/azure-identity-broker_1.1.0/sdk/boms/azure-sdk-bom/README.md).
```xml
<dependencyManagement>
@ -55,7 +55,7 @@ To take dependency on a particular version of the library that isn't present in
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-identity-broker</artifactId>
<version>1.0.2</version>
<version>1.0.4</version>
</dependency>
```
[//]: # ({x-version-update-end})
@ -98,6 +98,18 @@ InteractiveBrowserCredential cred = new InteractiveBrowserBrokerCredentialBuilde
.build();
```
#### Use the default account for sign-in
When this option is enabled, the credential will attempt to silently use the default broker account. If using the default account fails, the credential will fall back to interactive authentication.
```java com.azure.identity.broker.interactivebrowserbrokercredentialbuilder.useinteractivebrowserbroker.defaultaccount
long windowHandle = getWindowHandle(); // Samples below
InteractiveBrowserCredential cred = new InteractiveBrowserBrokerCredentialBuilder()
.setWindowHandle(windowHandle)
.useDefaultBrokerAccount()
.build();
```
#### Obtain a window handle
##### JavaFX
@ -123,7 +135,7 @@ Credentials raise exceptions when they fail to authenticate or can't execute aut
When credentials can't execute authentication due to one of the underlying resources required by the credential being unavailable on the machine a `CredentialUnavailableException` is raised. The exception has a `message` attribute that describes why the credential is unavailable for authentication execution. When this exception is raised by `ChainedTokenCredential`, the message collects error messages from each credential in the chain.
See the [troubleshooting guide](https://github.com/Azure/azure-sdk-for-java/blob/azure-identity-broker_1.0.4/sdk/identity/azure-identity/TROUBLESHOOTING.md) for details on how to diagnose various failure scenarios.
See the [troubleshooting guide](https://github.com/Azure/azure-sdk-for-java/blob/azure-identity-broker_1.1.0/sdk/identity/azure-identity/TROUBLESHOOTING.md) for details on how to diagnose various failure scenarios.
## Next steps
@ -141,14 +153,14 @@ This project has adopted the [Microsoft Open Source Code of Conduct][code_of_con
<!-- LINKS -->
[azure_core_library]: https://github.com/Azure/azure-sdk-for-java/tree/azure-identity-broker_1.0.4/sdk/core
[azure_identity_library]: https://github.com/Azure/azure-sdk-for-java/tree/azure-identity-broker_1.0.4/sdk/identity
[azure_core_library]: https://github.com/Azure/azure-sdk-for-java/tree/azure-identity-broker_1.1.0/sdk/core
[azure_identity_library]: https://github.com/Azure/azure-sdk-for-java/tree/azure-identity-broker_1.1.0/sdk/identity
[azure_sub]: https://azure.microsoft.com/free/java
[entra_id_doc]: https://learn.microsoft.com/entra/identity/
[code_of_conduct]: https://opensource.microsoft.com/codeofconduct/
[javadoc]: https://learn.microsoft.com/java/api/com.azure.identity.broker?view=azure-java-stable
[jdk_link]: https://learn.microsoft.com/java/azure/jdk/?view=azure-java-stable
[logging]: https://github.com/Azure/azure-sdk-for-java/wiki/Logging-with-Azure-SDK
[secrets_client_library]: https://github.com/Azure/azure-sdk-for-java/tree/azure-identity-broker_1.0.4/sdk/keyvault/azure-security-keyvault-secrets
[source]: https://github.com/Azure/azure-sdk-for-java/tree/azure-identity-broker_1.0.4/sdk/identity/azure-identity-broker
[secrets_client_library]: https://github.com/Azure/azure-sdk-for-java/tree/azure-identity-broker_1.1.0/sdk/keyvault/azure-security-keyvault-secrets
[source]: https://github.com/Azure/azure-sdk-for-java/tree/azure-identity-broker_1.1.0/sdk/identity/azure-identity-broker

Просмотреть файл

@ -1,15 +1,15 @@
---
title: Azure Identity client library for Java
keywords: Azure, java, SDK, API, azure-identity, identity
ms.date: 03/15/2024
ms.date: 04/09/2024
ms.topic: reference
ms.devlang: java
ms.service: identity
---
# Azure Identity client library for Java - version 1.11.4
# Azure Identity client library for Java - version 1.12.0
The Azure Identity library provides [Microsoft Entra ID](https://learn.microsoft.com/azure/active-directory/fundamentals/active-directory-whatis) ([formerly Azure Active Directory](https://learn.microsoft.com/azure/active-directory/fundamentals/new-name)) token authentication support across the Azure SDK. It provides a set of [TokenCredential](https://learn.microsoft.com/java/api/com.azure.core.credential.tokencredential?view=azure-java-stable) implementations that can be used to construct Azure SDK clients that support Microsoft Entra token authentication.
The Azure Identity library provides [Microsoft Entra ID](https://learn.microsoft.com/entra/fundamentals/whatis) ([formerly Azure Active Directory](https://learn.microsoft.com/entra/fundamentals/new-name)) token authentication support across the Azure SDK. It provides a set of [TokenCredential](https://learn.microsoft.com/java/api/com.azure.core.credential.tokencredential?view=azure-java-stable) implementations that can be used to construct Azure SDK clients that support Microsoft Entra token authentication.
[Source code][source] | [API reference documentation][javadoc] | [Microsoft Entra ID documentation][entraid_doc]
@ -19,7 +19,7 @@ The Azure Identity library provides [Microsoft Entra ID](https://learn.microsoft
#### Include the BOM file
Include the `azure-sdk-bom` in your project to take a dependency on the stable version of the library. In the following snippet, replace the `{bom_version_to_target}` placeholder with the version number. To learn more about the BOM, see the [Azure SDK BOM README](https://github.com/Azure/azure-sdk-for-java/blob/azure-identity_1.11.4/sdk/boms/azure-sdk-bom/README.md).
Include the `azure-sdk-bom` in your project to take a dependency on the stable version of the library. In the following snippet, replace the `{bom_version_to_target}` placeholder with the version number. To learn more about the BOM, see the [Azure SDK BOM README](https://github.com/Azure/azure-sdk-for-java/blob/azure-identity_1.12.0/sdk/boms/azure-sdk-bom/README.md).
```xml
<dependencyManagement>
@ -55,7 +55,7 @@ To take dependency on a particular version of the library that isn't present in
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-identity</artifactId>
<version>1.11.2</version>
<version>1.11.4</version>
</dependency>
```
[//]: # ({x-version-update-end})
@ -196,17 +196,17 @@ public void createDefaultAzureCredentialForIntelliJ() {
## Managed Identity support
The [Managed identity authentication](https://learn.microsoft.com/azure/active-directory/managed-identities-azure-resources/overview) is supported via either the `DefaultAzureCredential` or the `ManagedIdentityCredential` directly for the following Azure Services:
The [Managed identity authentication](https://learn.microsoft.com/entra/identity/managed-identities-azure-resources/overview) is supported via either the `DefaultAzureCredential` or the `ManagedIdentityCredential` directly for the following Azure Services:
- [Azure App Service and Azure Functions](https://learn.microsoft.com/azure/app-service/overview-managed-identity?tabs=dotnet)
- [Azure Arc](https://learn.microsoft.com/azure/azure-arc/servers/managed-identity-authentication)
- [Azure Cloud Shell](https://learn.microsoft.com/azure/cloud-shell/msi-authorization)
- [Azure Kubernetes Service](https://learn.microsoft.com/azure/aks/use-managed-identity)
- [Azure Service Fabric](https://learn.microsoft.com/azure/service-fabric/concepts-managed-identity)
- [Azure Virtual Machines](https://learn.microsoft.com/azure/active-directory/managed-identities-azure-resources/how-to-use-vm-token)
- [Azure Virtual Machines Scale Sets](https://learn.microsoft.com/azure/active-directory/managed-identities-azure-resources/qs-configure-powershell-windows-vmss)
- [Azure Virtual Machines](https://learn.microsoft.com/entra/identity/managed-identities-azure-resources/how-to-use-vm-token)
- [Azure Virtual Machines Scale Sets](https://learn.microsoft.com/entra/identity/managed-identities-azure-resources/qs-configure-powershell-windows-vmss)
**Note:** Use `azure-identity` version `1.7.0` or later to utilize [token caching](https://github.com/Azure/azure-sdk-for-java/blob/azure-identity_1.11.4/sdk/identity/azure-identity/TOKEN_CACHING.md) support for managed identity authentication.
**Note:** Use `azure-identity` version `1.7.0` or later to utilize [token caching](https://github.com/Azure/azure-sdk-for-java/blob/azure-identity_1.12.0/sdk/identity/azure-identity/TOKEN_CACHING.md) support for managed identity authentication.
### Examples
@ -348,13 +348,13 @@ Not all credentials require this configuration. Credentials that authenticate th
<td><code><a href="https://learn.microsoft.com/java/api/com.azure.identity.clientcertificatecredential?view=azure-java-stable">ClientCertificateCredential</a></code></td>
<td>authenticates a service principal using a certificate</td>
<td><a href="https://github.com/Azure/azure-sdk-for-java/wiki/Azure-Identity-Examples#authenticating-a-service-principal-with-a-client-certificate">example</a></td>
<td><a href="https://learn.microsoft.com/azure/active-directory/develop/app-objects-and-service-principals">Service principal authentication</a></td>
<td><a href="https://learn.microsoft.com/entra/identity-platform/app-objects-and-service-principals">Service principal authentication</a></td>
</tr>
<tr>
<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>
<td><a href="https://learn.microsoft.com/entra/identity-platform/app-objects-and-service-principals">Service principal authentication</a></td>
</tr>
</tbody>
</table>
@ -376,31 +376,31 @@ Not all credentials require this configuration. Credentials that authenticate th
<td><code><a href="https://learn.microsoft.com/java/api/com.azure.identity.authorizationcodecredential?view=azure-java-stable">AuthorizationCodeCredential</a></code></td>
<td>authenticate a user with a previously obtained authorization code as part of an Oauth 2 flow</td>
<td></td>
<td><a href="https://learn.microsoft.com/azure/active-directory/develop/v2-oauth2-auth-code-flow">OAuth2 authentication code</a></td>
<td><a href="https://learn.microsoft.com/entra/identity-platform/v2-oauth2-auth-code-flow">OAuth2 authentication code</a></td>
</tr>
<tr>
<td><code><a href="https://learn.microsoft.com/java/api/com.azure.identity.devicecodecredential?view=azure-java-stable">DeviceCodeCredential</a></code></td>
<td>interactively authenticates a user on devices with limited UI</td>
<td><a href="https://github.com/Azure/azure-sdk-for-java/wiki/Azure-Identity-Examples#authenticating-a-user-account-with-device-code-flow">example</a></td>
<td><a href="https://learn.microsoft.com/azure/active-directory/develop/v2-oauth2-device-code">Device code authentication</a></td>
<td><a href="https://learn.microsoft.com/entra/identity-platform/v2-oauth2-device-code">Device code authentication</a></td>
</tr>
<tr>
<td><code><a href="https://learn.microsoft.com/java/api/com.azure.identity.interactivebrowsercredential?view=azure-java-stable">InteractiveBrowserCredential</a></code></td>
<td>interactively authenticates a user with the default system browser</td>
<td><a href="https://github.com/Azure/azure-sdk-for-java/wiki/Azure-Identity-Examples#authenticating-a-user-account-interactively-in-the-browser">example</a></td>
<td><a href="https://learn.microsoft.com/azure/active-directory/develop/v2-oauth2-auth-code-flow">OAuth2 authentication code</a></td>
<td><a href="https://learn.microsoft.com/entra/identity-platform/v2-oauth2-auth-code-flow">OAuth2 authentication code</a></td>
</tr>
<tr>
<td><code><a href="https://learn.microsoft.com/java/api/com.azure.identity.onbehalfofcredential?view=azure-java-stable">OnBehalfOfCredential</a></code></td>
<td>propagates the delegated user identity and permissions through the request chain</td>
<td></td>
<td><a href="https://learn.microsoft.com/azure/active-directory/develop/v2-oauth2-on-behalf-of-flow">On-behalf-of authentication</a></td>
<td><a href="https://learn.microsoft.com/entra/identity-platform/v2-oauth2-on-behalf-of-flow">On-behalf-of authentication</a></td>
</tr>
<tr>
<td><code><a href="https://learn.microsoft.com/java/api/com.azure.identity.usernamepasswordcredential?view=azure-java-stable">UsernamePasswordCredential</a></code></td>
<td>authenticates a user with a username and password without multi-factored auth</td>
<td><a href="https://github.com/Azure/azure-sdk-for-java/wiki/Azure-Identity-Examples#authenticating-a-user-account-with-username-and-password">example</a></td>
<td><a href="https://learn.microsoft.com/azure/active-directory/develop/v2-oauth-ropc">Username + password authentication</a></td>
<td><a href="https://learn.microsoft.com/entra/identity-platform/v2-oauth-ropc">Username + password authentication</a></td>
</tr>
</tbody>
</table>
@ -549,7 +549,7 @@ Configuration is attempted in the above order. For example, if values for a clie
## Continuous Access Evaluation
As of v1.10.0, accessing resources protected by [Continuous Access Evaluation](https://learn.microsoft.com/azure/active-directory/conditional-access/concept-continuous-access-evaluation) (CAE) is possible on a per-request basis. This can be enabled using the [`TokenRequestContext.setCaeEnabled(boolean)` API](https://learn.microsoft.com/java/api/com.azure.core.credential.tokenrequestcontext?view=azure-java-stable#com-azure-core-credential-tokenrequestcontext-setcaeenabled(boolean)). CAE isn't supported for developer credentials.
As of v1.10.0, accessing resources protected by [Continuous Access Evaluation](https://learn.microsoft.com/entra/identity/conditional-access/concept-continuous-access-evaluation) (CAE) is possible on a per-request basis. This can be enabled using the [`TokenRequestContext.setCaeEnabled(boolean)` API](https://learn.microsoft.com/java/api/com.azure.core.credential.tokenrequestcontext?view=azure-java-stable#com-azure-core-credential-tokenrequestcontext-setcaeenabled(boolean)). CAE isn't supported for developer credentials.
## Token caching
Token caching is a feature provided by the Azure Identity library that allows apps to:
@ -557,7 +557,7 @@ Token caching is a feature provided by the Azure Identity library that allows ap
- Improve resilience and performance.
- Reduce the number of requests made to Microsoft Entra ID to obtain access tokens.
The Azure Identity library offers both in-memory and persistent disk caching. For more details, see the [token caching documentation](https://github.com/Azure/azure-sdk-for-java/blob/azure-identity_1.11.4/sdk/identity/azure-identity/TOKEN_CACHING.md).
The Azure Identity library offers both in-memory and persistent disk caching. For more details, see the [token caching documentation](https://github.com/Azure/azure-sdk-for-java/blob/azure-identity_1.12.0/sdk/identity/azure-identity/TOKEN_CACHING.md).
## Brokered authentication
@ -569,7 +569,7 @@ Credentials raise exceptions when they fail to authenticate or can't execute aut
When credentials can't execute authentication due to one of the underlying resources required by the credential being unavailable on the machine, the`CredentialUnavailableException` is raised. The exception has a `message` attribute that describes why the credential is unavailable for authentication execution. When this exception is raised by `ChainedTokenCredential`, the message collects error messages from each credential in the chain.
See the [troubleshooting guide](https://github.com/Azure/azure-sdk-for-java/blob/azure-identity_1.11.4/sdk/identity/azure-identity/TROUBLESHOOTING.md) for details on how to diagnose various failure scenarios.
See the [troubleshooting guide](https://github.com/Azure/azure-sdk-for-java/blob/azure-identity_1.12.0/sdk/identity/azure-identity/TROUBLESHOOTING.md) for details on how to diagnose various failure scenarios.
## Next steps
@ -586,17 +586,17 @@ When you submit a pull request, a CLA-bot will automatically determine whether y
This project has adopted the [Microsoft Open Source Code of Conduct][code_of_conduct]. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.
<!-- LINKS -->
[azure_core_library]: https://github.com/Azure/azure-sdk-for-java/tree/azure-identity_1.11.4/sdk/core
[azure_core_library]: https://github.com/Azure/azure-sdk-for-java/tree/azure-identity_1.12.0/sdk/core
[azure_identity_broker]: https://central.sonatype.com/artifact/com.azure/azure-identity-broker
[azure_identity_broker_readme]: https://github.com/Azure/azure-sdk-for-java/blob/azure-identity_1.11.4/sdk/identity/azure-identity-broker/README.md
[azure_identity_broker_readme]: https://github.com/Azure/azure-sdk-for-java/blob/azure-identity_1.12.0/sdk/identity/azure-identity-broker/README.md
[azure_sub]: https://azure.microsoft.com/free/
[code_of_conduct]: https://opensource.microsoft.com/codeofconduct/
[entraid_doc]: https://learn.microsoft.com/entra/identity/
[javadoc]: https://learn.microsoft.com/java/api/com.azure.identity?view=azure-java-stable
[jdk_link]: https://learn.microsoft.com/java/azure/jdk/?view=azure-java-stable
[logging]: https://github.com/Azure/azure-sdk-for-java/wiki/Logging-with-Azure-SDK
[secrets_client_library]: https://github.com/Azure/azure-sdk-for-java/tree/azure-identity_1.11.4/sdk/keyvault/azure-security-keyvault-secrets
[source]: https://github.com/Azure/azure-sdk-for-java/tree/azure-identity_1.11.4/sdk/identity/azure-identity
[secrets_client_library]: https://github.com/Azure/azure-sdk-for-java/tree/azure-identity_1.12.0/sdk/keyvault/azure-security-keyvault-secrets
[source]: https://github.com/Azure/azure-sdk-for-java/tree/azure-identity_1.12.0/sdk/identity/azure-identity
![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-java%2Fsdk%2Fidentity%2Fazure-identity%2FREADME.png)

Просмотреть файл

@ -1,6 +1,6 @@
{
"Name": "azure-identity-broker",
"Version": "1.0.4",
"Version": "1.1.0",
"DevVersion": null,
"DirectoryPath": "sdk/identity/azure-identity-broker",
"ServiceDirectory": "identity",
@ -10,7 +10,7 @@
"SdkType": "client",
"IsNewSdk": true,
"ArtifactName": "azure-identity-broker",
"ReleaseStatus": "2024-03-14",
"ReleaseStatus": "2024-04-08",
"Namespaces": [
"com.azure.identity.broker"
]

Просмотреть файл

@ -1,6 +1,6 @@
{
"Name": "azure-identity",
"Version": "1.11.4",
"Version": "1.12.0",
"DevVersion": null,
"DirectoryPath": "sdk/identity/azure-identity",
"ServiceDirectory": "identity",
@ -10,7 +10,7 @@
"SdkType": "client",
"IsNewSdk": true,
"ArtifactName": "azure-identity",
"ReleaseStatus": "2024-03-14",
"ReleaseStatus": "2024-04-08",
"Namespaces": [
"com.azure.identity"
]