Skip to content

Commit 12ad0ed

Browse files
committed
[Core] Prepare 1.36.0 release
Signed-off-by: Paul Van Eck <paulvaneck@microsoft.com>
1 parent fd0a7b0 commit 12ad0ed

File tree

5 files changed

+11
-14
lines changed

5 files changed

+11
-14
lines changed

sdk/core/azure-core/CHANGELOG.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,17 @@
11
# Release History
22

3-
## 1.36.0 (Unreleased)
3+
## 1.36.0 (2025-10-14)
44

55
### Features Added
66

77
- Added `TypeHandlerRegistry` to `azure.core.serialization` to allow developers to register custom serializers and deserializers for specific types or conditions. #43051
88

9-
### Breaking Changes
10-
119
### Bugs Fixed
1210

1311
- Fixed repeated import attempts of cchardet and chardet when charset_normalizer is used #43092
1412

1513
### Other Changes
1614

17-
- Updated `BearerTokenCredentialPolicy` and `AsyncBearerTokenCredentialPolicy` to set the `enable_cae` parameter to `True` by default. This change enables Continuous Access Evaluation (CAE) for all token requests made through these policies. #42941
1815
- Removed `six` as a dependency since it was unused. #39962
1916
- Added caching to the tracing implementation detection function to prevent potential performance issues from repeated import attempts. #43338
2017

sdk/core/azure-core/azure/core/pipeline/policies/_authentication.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,15 @@ class _BearerTokenCredentialPolicyBase:
4545
:type credential: ~azure.core.credentials.TokenProvider
4646
:param str scopes: Lets you specify the type of access needed.
4747
:keyword bool enable_cae: Indicates whether to enable Continuous Access Evaluation (CAE) on all requested
48-
tokens. Defaults to True.
48+
tokens. Defaults to False.
4949
"""
5050

5151
def __init__(self, credential: TokenProvider, *scopes: str, **kwargs: Any) -> None:
5252
super(_BearerTokenCredentialPolicyBase, self).__init__()
5353
self._scopes = scopes
5454
self._credential = credential
5555
self._token: Optional[Union["AccessToken", "AccessTokenInfo"]] = None
56-
self._enable_cae: bool = kwargs.get("enable_cae", True)
56+
self._enable_cae: bool = kwargs.get("enable_cae", False)
5757

5858
@staticmethod
5959
def _enforce_https(request: PipelineRequest[HTTPRequestType]) -> None:

sdk/core/azure-core/azure/core/pipeline/policies/_authentication_async.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class AsyncBearerTokenCredentialPolicy(AsyncHTTPPolicy[HTTPRequestType, AsyncHTT
4040
:type credential: ~azure.core.credentials_async.AsyncTokenProvider
4141
:param str scopes: Lets you specify the type of access needed.
4242
:keyword bool enable_cae: Indicates whether to enable Continuous Access Evaluation (CAE) on all requested
43-
tokens. Defaults to True.
43+
tokens. Defaults to False.
4444
"""
4545

4646
def __init__(self, credential: AsyncTokenProvider, *scopes: str, **kwargs: Any) -> None:
@@ -49,7 +49,7 @@ def __init__(self, credential: AsyncTokenProvider, *scopes: str, **kwargs: Any)
4949
self._scopes = scopes
5050
self._lock_instance = None
5151
self._token: Optional[Union["AccessToken", "AccessTokenInfo"]] = None
52-
self._enable_cae: bool = kwargs.get("enable_cae", True)
52+
self._enable_cae: bool = kwargs.get("enable_cae", False)
5353

5454
@property
5555
def _lock(self):

sdk/core/azure-core/tests/async_tests/test_authentication_async.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ async def test_bearer_policy_authorize_request(http_request):
7474
assert http_req.headers["Authorization"] == f"Bearer {expected_token.token}"
7575
assert fake_credential.get_token.call_count == 1
7676
assert fake_credential.get_token.call_args[0] == ("scope",)
77-
assert fake_credential.get_token.call_args[1] == {"claims": "foo", "enable_cae": True}
77+
assert fake_credential.get_token.call_args[1] == {"claims": "foo"}
7878

7979

8080
@pytest.mark.asyncio
@@ -132,7 +132,7 @@ async def test_bearer_policy_authorize_request_access_token_info(http_request):
132132
assert policy._token is expected_token
133133
assert http_req.headers["Authorization"] == f"Bearer {expected_token.token}"
134134
assert fake_credential.get_token_info.call_args[0] == ("scope",)
135-
assert fake_credential.get_token_info.call_args[1] == {"options": {"claims": "foo", "enable_cae": True}}
135+
assert fake_credential.get_token_info.call_args[1] == {"options": {"claims": "foo"}}
136136

137137

138138
@pytest.mark.asyncio

sdk/core/azure-core/tests/test_authentication.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def test_bearer_policy_authorize_request(http_request):
7474
assert http_req.headers["Authorization"] == f"Bearer {expected_token.token}"
7575
assert fake_credential.get_token.call_count == 1
7676
assert fake_credential.get_token.call_args[0] == ("scope",)
77-
assert fake_credential.get_token.call_args[1] == {"claims": "foo", "enable_cae": True}
77+
assert fake_credential.get_token.call_args[1] == {"claims": "foo"}
7878

7979

8080
@pytest.mark.parametrize("http_request", HTTP_REQUESTS)
@@ -119,7 +119,7 @@ def test_bearer_policy_authorize_request_access_token_info(http_request):
119119
assert policy._token is expected_token
120120
assert http_req.headers["Authorization"] == f"Bearer {expected_token.token}"
121121
assert fake_credential.get_token_info.call_args[0] == ("scope",)
122-
assert fake_credential.get_token_info.call_args[1] == {"options": {"claims": "foo", "enable_cae": True}}
122+
assert fake_credential.get_token_info.call_args[1] == {"options": {"claims": "foo"}}
123123

124124

125125
@pytest.mark.parametrize("http_request", HTTP_REQUESTS)
@@ -263,7 +263,7 @@ def test_bearer_policy_default_context(http_request):
263263

264264
pipeline.run(http_request("GET", "https://localhost"))
265265

266-
credential.get_token.assert_called_once_with(expected_scope, enable_cae=True)
266+
credential.get_token.assert_called_once_with(expected_scope)
267267

268268

269269
@pytest.mark.parametrize("http_request", HTTP_REQUESTS)
@@ -333,7 +333,7 @@ def test_bearer_policy_cannot_complete_challenge(http_request):
333333

334334
assert response.http_response is expected_response
335335
assert transport.send.call_count == 1
336-
credential.get_token.assert_called_once_with(expected_scope, enable_cae=True)
336+
credential.get_token.assert_called_once_with(expected_scope)
337337

338338

339339
@pytest.mark.parametrize("http_request", HTTP_REQUESTS)

0 commit comments

Comments
 (0)