-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
[Azure Identity] Python app running in the k8s pod failed while retrieving the token from MSI #17279
Comments
Thanks for opening this issue. I haven't seen this error before. My first thought is, the credential may be getting an unexpected payload from the managed identity endpoint. That is to say, not JSON. I would have expected a different error in such a case but if the credential somehow got a string instead of a dictionary (deserialized JSON), "string indices must be integers" makes sense. Could you please collect some debugging information? I'm curious about the original exception, and the managed identity endpoint's response. If you configure a logger for DEBUG logging, you'll get a traceback of the original exception. If you pass logger = logging.getLogger('azure')
logger.setLevel(logging.DEBUG)
credential = DefaultAzureCredential(logging_enable=True) The log output will look something like this:
If debug-level logging isn't safe for your application, you can also simply configure an "azure" logger for INFO messages. The output won't include response bodies then, but it will at least show the content type of the managed identity response. |
Thanks a lot! will provide the debug log once I get that. |
Hi, we're sending this friendly reminder because we haven't heard back from you in a while. We need more information about this issue to help address it. Please be sure to give us your input within the next 7 days. If we don't hear back from you within 14 days of this comment the issue will be automatically closed. Thank you! |
Client discontinued. closing... thanks a ton for the support! |
Describe the bug
Invoked below to retrieve the token for keyvault but failed at 'get_token()'. Use 'curl' to directly access the MSI endpoint works and 3rd party SDK works as well https://pypi.org/project/keyvaultlib/
Exception or Stack Trace
string indices must be integers
To Reproduce
only can be reproduced in the specific environment
Code Snippet
Expected behavior
The approach can get the access token
Screenshots
N/A
Setup (please complete the following information):
Python 3.7(docker image: mcr.microsoft.com/azure-functions/python:3.0-python3.7-slim)
azure-identity==1.4.0
azure-keyvault-secrets==4.2.0
Additional context
Add any other context about the problem here.
Information Checklist
Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report
The text was updated successfully, but these errors were encountered: