Skip to content

Commit 3bdfb63

Browse files
authored
[Identity] Prepare release (#45112)
Removing beta feature for this patch release. Signed-off-by: Paul Van Eck <paulvaneck@microsoft.com>
1 parent fa2d335 commit 3bdfb63

13 files changed

+4
-1775
lines changed

sdk/identity/azure-identity/CHANGELOG.md

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,6 @@
11
# Release History
22

3-
## 1.26.0b2 (Unreleased)
4-
5-
### Features Added
6-
7-
### Breaking Changes
8-
9-
> These changes do not impact the API of stable versions such as 1.25.1.
10-
> Only code written against beta version 1.26.0b1 is affected.
11-
- Renamed `use_token_proxy` keyword argument to `enable_azure_proxy` in `WorkloadIdentityCredential` to better reflect its purpose. ([#44147](https://github.com/Azure/azure-sdk-for-python/pull/44147))
3+
## 1.25.2 (2026-02-10)
124

135
### Bugs Fixed
146

sdk/identity/azure-identity/TROUBLESHOOTING.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -278,12 +278,6 @@ Get-AzAccessToken -ResourceUrl "https://management.core.windows.net"
278278
|---|---|---|
279279
|WorkloadIdentityCredential authentication unavailable. The workload options are not fully configured|The `WorkloadIdentityCredential` requires `client_id`, `tenant_id` and `token_file_path` to authenticate with Microsoft Entra ID.| <ul><li>If using `DefaultAzureCredential` then:</li><ul><li>Ensure client ID is specified via the `workload_identity_client_id` keyword argument or the `AZURE_CLIENT_ID` env variable.</li><li>Ensure tenant ID is specified via the `AZURE_TENANT_ID` env variable.</li><li>Ensure token file path is specified via `AZURE_FEDERATED_TOKEN_FILE` env variable.</li><li>Ensure authority host is specified via `AZURE_AUTHORITY_HOST` env variable.</ul><li>If using `WorkloadIdentityCredential` then:</li><ul><li>Ensure tenant ID is specified via the `tenant_id` keyword argument or the `AZURE_TENANT_ID` env variable.</li><li>Ensure client ID is specified via the `client_id` keyword argument or the `AZURE_CLIENT_ID` env variable.</li><li>Ensure token file path is specified via the `token_file_path` keyword argument or the `AZURE_FEDERATED_TOKEN_FILE` environment variable. </li></ul></li><li>Consult the [product troubleshooting guide](https://azure.github.io/azure-workload-identity/docs/troubleshooting.html) for other issues.</li></ul>|
280280
281-
#### `ClientAuthenticationError` for applications using [Azure Kubernetes Service identity bindings](https://learn.microsoft.com/azure/aks/identity-bindings-concepts)
282-
283-
| Error Message |Description| Mitigation |
284-
|---|---|---|
285-
|<ul><li>AADSTS700211: No matching federated identity record found for presented assertion issuer ...</li><li>AADSTS700212: No matching federated identity record found for presented assertion audience 'api://AKSIdentityBinding'.</li></ul> |`WorkloadIdentityCredential` isn't configured to use the identity binding proxy|Set the `enable_azure_proxy` keyword argument to `True` when creating `WorkloadIdentityCredential`. Note that identity binding mode isn't supported when `WorkloadIdentityCredential` is used via `DefaultAzureCredential`. `WorkloadIdentityCredential` should be used directly in this scenario.|
286-
287281
## Troubleshoot `AzurePipelinesCredential` authentication issues
288282
289283
[comment]: # ( cspell:ignore oidcrequesturi )

sdk/identity/azure-identity/azure/identity/_constants.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,6 @@ class EnvironmentVariables:
6868
AZURE_REGIONAL_AUTHORITY_NAME = "AZURE_REGIONAL_AUTHORITY_NAME"
6969

7070
AZURE_FEDERATED_TOKEN_FILE = "AZURE_FEDERATED_TOKEN_FILE"
71-
AZURE_KUBERNETES_SNI_NAME = "AZURE_KUBERNETES_SNI_NAME"
72-
AZURE_KUBERNETES_TOKEN_PROXY = "AZURE_KUBERNETES_TOKEN_PROXY"
73-
AZURE_KUBERNETES_CA_FILE = "AZURE_KUBERNETES_CA_FILE"
74-
AZURE_KUBERNETES_CA_DATA = "AZURE_KUBERNETES_CA_DATA"
7571

7672
AZURE_TOKEN_CREDENTIALS = "AZURE_TOKEN_CREDENTIALS"
7773
WORKLOAD_IDENTITY_VARS = (AZURE_AUTHORITY_HOST, AZURE_TENANT_ID, AZURE_FEDERATED_TOKEN_FILE)

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

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,13 @@
99

1010
from .client_assertion import ClientAssertionCredential
1111
from .._constants import EnvironmentVariables
12-
from .._internal import within_credential_chain
1312

1413

1514
WORKLOAD_CONFIG_ERROR = (
1615
"WorkloadIdentityCredential authentication unavailable. The workload options are not fully "
1716
"configured. See the troubleshooting guide for more information: "
1817
"https://aka.ms/azsdk/python/identity/workloadidentitycredential/troubleshoot"
1918
)
20-
CA_DATA_FILE_ERROR = "Both AZURE_KUBERNETES_CA_FILE and AZURE_KUBERNETES_CA_DATA are set. Only one should be set."
21-
CUSTOM_PROXY_ENV_ERROR = (
22-
"AZURE_KUBERNETES_TOKEN_PROXY is not set but other custom endpoint-related environment variables are present."
23-
)
2419

2520

2621
class TokenFileMixin:
@@ -105,51 +100,10 @@ def __init__(
105100

106101
self._token_file_path = token_file_path
107102

108-
if kwargs.pop("enable_azure_proxy", False) and not within_credential_chain.get():
109-
token_proxy_endpoint = os.environ.get(EnvironmentVariables.AZURE_KUBERNETES_TOKEN_PROXY)
110-
sni = os.environ.get(EnvironmentVariables.AZURE_KUBERNETES_SNI_NAME)
111-
ca_file = os.environ.get(EnvironmentVariables.AZURE_KUBERNETES_CA_FILE)
112-
ca_data = os.environ.get(EnvironmentVariables.AZURE_KUBERNETES_CA_DATA)
113-
if token_proxy_endpoint:
114-
if ca_file and ca_data:
115-
raise ValueError(CA_DATA_FILE_ERROR)
116-
117-
transport = _get_transport(
118-
sni=sni,
119-
token_proxy_endpoint=token_proxy_endpoint,
120-
ca_file=ca_file,
121-
ca_data=ca_data,
122-
)
123-
124-
if transport:
125-
kwargs["transport"] = transport
126-
else:
127-
raise ValueError(
128-
"Transport creation failed. Ensure that the requests package is installed to enable token "
129-
"proxy usage in this credential."
130-
)
131-
elif sni or ca_file or ca_data:
132-
raise ValueError(CUSTOM_PROXY_ENV_ERROR)
133-
134103
super(WorkloadIdentityCredential, self).__init__(
135104
tenant_id=tenant_id,
136105
client_id=client_id,
137106
func=self._get_service_account_token,
138107
token_file_path=token_file_path,
139108
**kwargs,
140109
)
141-
142-
143-
def _get_transport(sni, token_proxy_endpoint, ca_file, ca_data):
144-
try:
145-
from .._internal.token_binding_transport_requests import CustomRequestsTransport
146-
147-
return CustomRequestsTransport(
148-
sni=sni,
149-
proxy_endpoint=token_proxy_endpoint,
150-
ca_file=ca_file,
151-
ca_data=ca_data,
152-
)
153-
154-
except ImportError:
155-
return None

sdk/identity/azure-identity/azure/identity/_internal/token_binding_transport_mixin.py

Lines changed: 0 additions & 123 deletions
This file was deleted.

sdk/identity/azure-identity/azure/identity/_internal/token_binding_transport_requests.py

Lines changed: 0 additions & 61 deletions
This file was deleted.

sdk/identity/azure-identity/azure/identity/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
# Copyright (c) Microsoft Corporation.
33
# Licensed under the MIT License.
44
# ------------------------------------
5-
VERSION = "1.26.0b2"
5+
VERSION = "1.25.2"

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

Lines changed: 1 addition & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,8 @@
77
from typing import Any, Optional
88

99
from .client_assertion import ClientAssertionCredential
10-
from ..._credentials.workload_identity import (
11-
TokenFileMixin,
12-
WORKLOAD_CONFIG_ERROR,
13-
CA_DATA_FILE_ERROR,
14-
CUSTOM_PROXY_ENV_ERROR,
15-
)
10+
from ..._credentials.workload_identity import TokenFileMixin, WORKLOAD_CONFIG_ERROR
1611
from ..._constants import EnvironmentVariables
17-
from ..._internal import within_credential_chain
1812

1913

2014
class WorkloadIdentityCredential(ClientAssertionCredential, TokenFileMixin):
@@ -81,61 +75,10 @@ def __init__(
8175

8276
self._token_file_path = token_file_path
8377

84-
if kwargs.pop("enable_azure_proxy", False) and not within_credential_chain.get():
85-
token_proxy_endpoint = os.environ.get(EnvironmentVariables.AZURE_KUBERNETES_TOKEN_PROXY)
86-
sni = os.environ.get(EnvironmentVariables.AZURE_KUBERNETES_SNI_NAME)
87-
ca_file = os.environ.get(EnvironmentVariables.AZURE_KUBERNETES_CA_FILE)
88-
ca_data = os.environ.get(EnvironmentVariables.AZURE_KUBERNETES_CA_DATA)
89-
if token_proxy_endpoint:
90-
if ca_file and ca_data:
91-
raise ValueError(CA_DATA_FILE_ERROR)
92-
93-
transport = _get_transport(
94-
sni=sni,
95-
token_proxy_endpoint=token_proxy_endpoint,
96-
ca_file=ca_file,
97-
ca_data=ca_data,
98-
)
99-
100-
if transport:
101-
kwargs["transport"] = transport
102-
else:
103-
raise ValueError(
104-
"Async transport creation failed. Ensure that the aiohttp or requests package is installed to "
105-
"enable token proxy usage in this credential."
106-
)
107-
elif sni or ca_file or ca_data:
108-
raise ValueError(CUSTOM_PROXY_ENV_ERROR)
109-
11078
super().__init__(
11179
tenant_id=tenant_id,
11280
client_id=client_id,
11381
func=self._get_service_account_token,
11482
token_file_path=token_file_path,
11583
**kwargs,
11684
)
117-
118-
119-
def _get_transport(sni, token_proxy_endpoint, ca_file, ca_data):
120-
try:
121-
from .._internal.token_binding_transport_aiohttp import CustomAioHttpTransport
122-
123-
return CustomAioHttpTransport(
124-
sni=sni,
125-
proxy_endpoint=token_proxy_endpoint,
126-
ca_file=ca_file,
127-
ca_data=ca_data,
128-
)
129-
except ImportError:
130-
# Fallback to async-wrapped requests transport
131-
try:
132-
from .._internal.token_binding_transport_asyncio import CustomAsyncioRequestsTransport
133-
134-
return CustomAsyncioRequestsTransport(
135-
sni=sni,
136-
proxy_endpoint=token_proxy_endpoint,
137-
ca_file=ca_file,
138-
ca_data=ca_data,
139-
)
140-
except ImportError:
141-
return None

0 commit comments

Comments
 (0)