This package is deprecated and no longer receives updates
- The authentication part of this package has been moved to azure-identity
- The other parts of this library are covered by azure-mgmt-core
As such, we will no longer accept PR and fix issues on this project.
To install:
$ pip install msrestazure
Bugfix
- Unable to raise exception if JSON body contains UTF-8 characters on Python 2 #150
Bugfix
- Unable to raise exception if JSON body contains UTF-8 characters #144
- Prepare old poller implementation to Python 3.9 #138
Features
- Add Microsoft Graph to Cloud environment #142
Thanks to @psignoret and @tirkarthi for his contribution
Bugfix
- Fix ARM error parsing if Type info is used #135
Features
- Add User Assigned identity support for WebApp/Functions #124
- Add timeout parameter for MSI token, is used from a VM #131
Thanks to @noelbundick for his contribution
Features
- Implementation of LRO async, based on msrest 0.6.x series (experimental)
Disclaimer
- This version contains no direct breaking changes, but is bumped to 0.6.x since it requires a breaking change version of msrest.
Thanks to @gison93 for his documentation contribution
Bugfixes
- Fix CloudError if response and error message are provided at the same time #114
- Fix LRO polling if last call is an empty Location (Autorest.Python 3.x only) #120
Features
- Altered resource id parsing logic to allow for resource group IDs #117
Features
- Implementation is now using ADAL and not request-oauthlib. This allows more AD scenarios (like federated) #94
- Add additionalInfo parsing for CloudError #102
Breaking changes
These breaking changes applies to ServicePrincipalCredentials, UserPassCredentials, AADTokenCredentials
- Remove "auth_uri" attribute and parameter. This was unused.
- Remove "state" attribute. This was unused.
- Remove "client" attribute. This was exposed by mistake and should have been internal. No replacement is possible.
- Remove "token_uri" attribute and parameter. Use "cloud_environment" and "tenant" to impact the login url now.
- Remove token caching based on "keyring". Token caching should be implemented using ADAL now. This implies:
- Remove the "keyring" parameter
- Remove the "clear_cached_token" method
- Remove the "retrieve_session" method
Bugfixes
- MSIAuthentication regression for KeyVault since IMDS support #109
Bugfixes
- MSIAuthentication should initialize the token attribute on creation #106
Bugfixes
- Fixes refreshToken in UserPassCredentials and AADTokenCredentials #103
- Fix US government cloud definition #104
Thanks to mjcaley for his contribution
Features
- Implement new LRO options of Autorest #101
Bug fixes
- Reduce max MSI polling time for VM #100
Features
- Improve MSI for VM token polling algorithm
Features
- Allow ADAL 0.5.0 to 2.0.0 excluded as valid ADAL dependency
Bugfixes
- Fix refresh Token on AADTokenCredentials (was broken in 0.4.27)
- Now UserPasswordCredentials correctly use the refreshToken, and not user/password to refresh the session (was broken in 0.4.27)
- Bring back keyring, with minimal dependency 12.0.2 that fixes the installation problem on old Python
Disclaimer
Do to some stability issues with "keyring" dependency that highly change from one system to another, this package is no longer a dependency of "msrestazure". If you were using the secured token cache of ServicePrincipalCredentials and UserPassCredentials, the feature is still available, but you need to install manually "keyring". The functionnality will activate automatically.
Features
- Implements new features of msrest 0.4.28 on session improvement. See msrest ChangeLog for details.
Update msrest dependency to 0.4.28
Bugfixes
- IMDS/MSI: Retry on more error codes (#87)
- IMDS/MSI: fix a boundary case on timeout (#86)
Features
- MSIAuthentication now uses IMDS endpoint if available
- MSIAuthentication can be used in any environment that defines MSI_ENDPOINT env variable
Bugfix
- Fix parse_resource_id() tool to be case-insensitive to keywords when matching #81
- Add missing baseclass init call for AdalAuthentication #82
Bugfix
- Fix LRO result if POST uses AsyncOperation header (Autorest.Python 3.0 only) #79
Bugfix
- Remove a possible infinite loop with MSIAuthentication #77
Disclaimer
From this version, MSIAuthentication will fail instantly if you try to get MSI token from a VM where the extension is not installed, or not yet ready. You need to do your own retry mechanism if you think the extension is provisioning and the call might succeed later. This behavior is consistent with other Azure SDK implementation of MSI scenarios.
- Update allowed ADAL dependency to 0.5.x
Features
- CloudError now includes the "innererror" attribute to match OData v4 #73
- Introduces ARMPolling implementation of Azure Resource Management LRO. Requires msrest 0.4.25 (new dependency). This is used by code generated with Autorest.Python 3.0, and is not used by code generated by previous Autorest version.
- Change msrest dependency to ">=0.4.25,<2.0.0" to allow (future) msrest 1.0.0 as compatible dependency.
Thank you to demyanenko for his contribution.
Feature
- Improve MSIAuthentication to support User Assigned Identity #70
Bugfixes
- Fix session obj for cloudmetadata endpoint #67
- Fix authentication resource node for AzureSatck #65
- Better detection of AppService with MSIAuthentication #70
Bugfixes
- get_cloud_from_metadata_endpoint incorrect on AzureStack #62
- get_cloud_from_metadata_endpoint certificate issue #61
Bugfixes
- Fix AttributeError if error JSON from ARM does not follow ODatav4 (as it should)
Bugfixes
- Fix AttributeError if input JSON is not a dict (#54)
Features
- Add support for WebApp/Functions in MSIAuthentication classes
- Add parse_resource_id(), resource_id(), validate_resource_id() to parse ARM ids
- Retry strategy now n reach 24 seconds (instead of 12 seconds)
Features
- Add Managed Service Integrated (MSI) authentication
Bug fix
- Fix AdalError handling in some scenarios (#44)
Thank you to Hexadite-Omer for his contribution
Features
- "keyring" is now completely optional
Features
- add "timeout" to ServicePrincipalCredentials and UserPasswordCredentials
- Threads created by AzureOperationPoller have now a name prefixed by "AzureOperationPoller" to help identify them
Bugfixes
- Do not fail if keyring is badly installed
- Update Azure Gov login endpoint
- Update metadata ARM endpoint parser
Breaking changes
- Remove InteractiveCredentials. This class was deprecated and unusable. Use ADAL device code instead.
Features
- Add cloud definitions for public Azure, German Azure, China Azure and Azure Gov
- Add get_cloud_from_metadata_endpoint to automatically create a Cloud object from an ARM endpoint
- Add cloud_environment to all Credentials objects (except AdalAuthentication)
Note
- This deprecates "china=True", to be replaced by "cloud_environment=AZURE_CHINA_CLOUD"
Example:
from msrestazure.azure_cloud import AZURE_CHINA_CLOUD
from msrestazure.azure_active_directory import UserPassCredentials
credentials = UserPassCredentials(
login,
password,
cloud_environment=AZURE_CHINA_CLOUD
)
base_url of SDK client can be pointed to "cloud_environment.endpoints.resource_manager" for basic scenario:
Example:
from msrestazure.azure_cloud import AZURE_CHINA_CLOUD
from msrestazure.azure_active_directory import UserPassCredentials
from azure.mgmt.resource import ResourceManagementClient
credentials = UserPassCredentials(
login,
password,
cloud_environment=AZURE_CHINA_CLOUD
)
client = ResourceManagementClient(
credentials,
subscription_id,
base_url=AZURE_CHINA_CLOUD.endpoints.resource_manager
)
Azure Stack connection can be done:
from msrestazure.azure_cloud import get_cloud_from_metadata_endpoint
from msrestazure.azure_active_directory import UserPassCredentials
from azure.mgmt.resource import ResourceManagementClient
mystack_cloud = get_cloud_from_metadata_endpoint("https://myazurestack-arm-endpoint.com")
credentials = UserPassCredentials(
login,
password,
cloud_environment=mystack_cloud
)
client = ResourceManagementClient(
credentials,
subscription_id,
base_url=mystack_cloud.endpoints.resource_manager
)
Bugfixes
- Accept PATCH/201 as LRO valid state
- Close token session on exit (ServicePrincipal and UserPassword credentials)
Features
- Add proxies parameters to ServicePrincipal and UserPassword credentials class #29
- Add automatic Azure provider registration if needed (requires msrest 0.4.10) #28
Thank you to likel for his contribution
Bugfixes
- Fix LRO if first call never returns 200, but ends on 201 (#26)
- FiX LRO AttributeError if timeout is short (#21)
Features
- Expose a "status()" method in AzureOperationPoller (#18)
Bugfixes
- Adding accept_language and generate_client_request_id default values
Bugfixes
Refactor Long Running Operation algorithm.
- There is no breaking changes, however you might need to record again your offline HTTP records if you use unittests with VCRpy.
- Fix a couple of latent bugs
New features
- Add AdalAuthentification class to wrap ADAL library (#8)
Bugfixes
- More informative and well-formed CloudError exceptions (Azure/autorest#1460)
- Raise CustomException is defined in Swagger (Azure/autorest#1404)
Bugfixes
- Make AzureOperationPoller thread as daemon (do not block anymore a Ctrl+C) (Azure/autorest#1379)
Bugfixes
- Better exception message (Azure/autorest#1300)
This version needs msrest >= 0.4.3
Bugfixes
- Fix for LRO PUT operation Azure/autorest#1133
Update msrest dependency to 0.4.0
Bugfixes
- Fix for several AAD issues Azure/autorest#1055
- Fix for LRO PATCH bug and refactor Azure/autorest#993
Behaviour changes
- Needs Autorest > 0.17.0 Nightly 20160525
Update msrest dependency to 0.3.0
Bugfixes
- Read only values are no longer in __init__ or sent to the server (Azure/autorest#959)
- Useless kwarg removed
Behaviour changes
- Needs Autorest > 0.16.0 Nightly 20160426
Bugfixes
- Fix AzurePollerOperation if Swagger defines provisioning status as enum type (Azure/autorest#892)
Update msrest dependency to 0.2.0
Behaviour change
- async methods called with raw=True don't return anymore AzureOperationPoller but ClientRawResponse
- Needs Autorest > 0.16.0 Nightly 20160324
Update msrest dependency to 0.1.3
Bugfixes
- AzureOperationPoller.wait() failed to raise exception if query error (Azure/autorest#856)
Bugfixes
- Source package corrupted in Pypi (Azure/autorest#799)
Behaviour change
- Replaced _required attribute in CloudErrorData class with _validation dict.
Bugfixes
- Fixed AAD bug to include connection verification in UserPassCredentials. (Azure/autorest#725)
- Source package corrupted in Pypi (Azure/autorest#718)
- Initial release.