-
Notifications
You must be signed in to change notification settings - Fork 334
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Managed Identity auth_source: msi no longer works with collection 1.11, returns KeyError: 'credential' #757
Labels
Comments
For:
Full verbosity:
|
BUMP |
Bump for visibility. MI's not working is a big issue. Seems to be an easy fix. Hopefully this will get some traction soon. |
danielino
pushed a commit
to danielino/azure
that referenced
this issue
Feb 22, 2022
Fred-sun
added
medium_priority
Medium priority
work in
In trying to solve, or in working with contributors
has_pr
PR fixes have been made
and removed
work in
In trying to solve, or in working with contributors
labels
Feb 27, 2022
xuzhang3
pushed a commit
that referenced
this issue
Mar 4, 2022
* fix a typo error. related to #757 * remove unused line Co-authored-by: Daniele Marcocci <[email protected]>
Fred-sun
added a commit
to Fred-sun/ansible_collections_azure
that referenced
this issue
Mar 8, 2022
* azure_rm_sqldatabase: parse datetime module arguments (ansible-collections#623) * rm_sqldatabase: parse datetime arguments * Remove unused sanity test exception on rm_sqldatabase module schema * Remove unused sanity test exception on rm_sqldatabase module schema bis * sqldatabase: import dateutil in try/except * Add dateutil install to test suite * sqldatabase_info: Add earliest_restore_date value to returned facts * sqldatabase: add point in time restore test * Conditionally call non MSI auth when interacting with keyvault (ansible-collections#770) * Added the VM status detection mechanism (ansible-collections#772) * Set the parameter to a random number * Update storage account name Update azure_rm_virtualmachine vars add new change add new change 02 add new change 03 add new change 05 add new change 06 add new change 08 add new change09 update new Update new 02 Improve code logic * fix a typo error. related to ansible-collections#757 (ansible-collections#769) * fix a typo error. related to ansible-collections#757 * remove unused line Co-authored-by: Daniele Marcocci <[email protected]> * Update test region (ansible-collections#776) Co-authored-by: Max <[email protected]> Co-authored-by: Daniele Marcocci <[email protected]> Co-authored-by: Daniele Marcocci <[email protected]>
xuzhang3
pushed a commit
that referenced
this issue
Mar 8, 2022
* Ugrade azure-mgmt-compute SDK to track2 * fix small * Modify version from v2021-07-01 to v2020-04-01, no disk encryptions operation * Update small * fix azure_rm_diskencryption test fail * fix azure_rm_diskencryption test fail02 * fix sanity error * fix azure_rm_diskcryptionset test fail * fix azure_rm_virtualmachinescalesetinstance_info bug * fix azure_rm_virtualmachinescalesetinstance_info bug 02 * fix azure_rm_virtualmachien*extension test fail * Update azure_rm_virtualmachinescalesetinstance func paramter to vm_instance_i_ds * fix azure_rm_virtualmachinescalesetinstance test fail * fix sanity test fail * change exception type * fix azure_rm_hostgroup module * Update the code that throws the exception * Merge dev to local branch (#10) * azure_rm_sqldatabase: parse datetime module arguments (#623) * rm_sqldatabase: parse datetime arguments * Remove unused sanity test exception on rm_sqldatabase module schema * Remove unused sanity test exception on rm_sqldatabase module schema bis * sqldatabase: import dateutil in try/except * Add dateutil install to test suite * sqldatabase_info: Add earliest_restore_date value to returned facts * sqldatabase: add point in time restore test * Conditionally call non MSI auth when interacting with keyvault (#770) * Added the VM status detection mechanism (#772) * Set the parameter to a random number * Update storage account name Update azure_rm_virtualmachine vars add new change add new change 02 add new change 03 add new change 05 add new change 06 add new change 08 add new change09 update new Update new 02 Improve code logic * fix a typo error. related to #757 (#769) * fix a typo error. related to #757 * remove unused line Co-authored-by: Daniele Marcocci <[email protected]> * Update test region (#776) Co-authored-by: Max <[email protected]> Co-authored-by: Daniele Marcocci <[email protected]> Co-authored-by: Daniele Marcocci <[email protected]> * Revert "Merge dev to local branch (#10)" (#11) This reverts commit 1dce8f3. Co-authored-by: Max <[email protected]> Co-authored-by: Daniele Marcocci <[email protected]> Co-authored-by: Daniele Marcocci <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
SUMMARY
In azure.azcollection version 1.10 managed identity auth_source: msi on tasks worked without errors.
Starting with azure.azcollection version 1.11 we get a traceback error on the file azure_rm_common.py with KeyError: 'credential'
This error happens when calling any of the modules in the collection.
Looking at the code for azure_rm_common.py three things are apparent
When manually editing the file azure_rm_common.py we were able to fix the managed identity issues.
We found two different modifications in azure_rm_common.py that both work and don't know which one is correct:
if self.credentials.get('credentials') is not None:
# AzureCLI credentials
self.azure_credentials = self.credentials['credentials']
self.azure_credential_track2 = self.credentials['credential']
Don't know the code well enough to understand which of these two fixes would correct the root bug versus masking it.
ISSUE TYPE
COMPONENT NAME
azure_rm_common.py
ANSIBLE VERSION
Multiple
COLLECTION VERSION
azure.azcollection 1.11.0
STEPS TO REPRODUCE
Create a managed identity in Azure with contributor role on the subscription to be tested.
Run a playbook using any module and the auth_source: msi setting
EXPECTED RESULTS
We expect the managed identity to work and allow the module to execute sucessfully.
ACTUAL RESULTS
What actually happens is a traceback error that ends in KeyError: 'credential'
The text was updated successfully, but these errors were encountered: