-
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
[Key Vault] 'TypeError: string indices must be integers' Raised During Retrieval #20399
Comments
Thanks for your feedback, we'll investigate asap. |
Hi @ColtAllen, thank you for opening an issue! Both of these packages support Python 3.6+, so you should be good there. I don't remember having seen this error before, so I'm looking into it now and will try to reproduce this locally. In the meantime, I have a couple of questions that would help me understand the context more:
|
Update on this: I created an AzureML Notebook and tried to reproduce the issue, but I was able to successfully get a key and secret. Would it be possible to share a snippet of code from where this error is happening? |
Hey @mccoyp, I appreciate your prompt response.
We did not encounter any errors when using the asynchronous azure.keyvault.secrets.aio package, which has an identical code syntax to that of azure-keyvault-secrets. However, the secrets in question are database credentials, and the DB connector was not able to interpret the coroutine objects returned by azure.keyvault.secrets.aio. Asynchronous processes are also outside the scope of our project.
I am not. At this time the Key Vault does not contain any keys, only secrets. However, the same
The error trace is provided in my original post for this issue.
Unfortunately the original code was wiped out while resolving a merge conflict and is no longer available. However, after escalating this issue I was granted access to the Key Vault and noticed the secrets I was attempting to retrieve were expired. I'll recreate the secrets and see if I'm still getting the same error. I will direct any further questions about the Key Vault service to Security Support. However, seeing as this now may be an issue regarding error handling (please see my bolded comments in this post) I would like to keep this open for now. |
You're right that this kind of error response is surprising -- usually an |
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! |
After working with MS Security and registering an app in the Azure Active Directory, I am now able to access the key vault without issue. However, I can also retrieve expired secrets; shouldn't that raise an error? The code that raised the original error generated an authentication token via a user-defined function to access the key vault. It's interesting an improper authentication would raise a TypeError, but that seems to be what caused the issue. I've notified MS Security about the expired secret access. If that is outside the scope of error handling, then this issue can be closed out. |
I was just notified by MS Security that my above inquiry is expected behavior. This issue can now be closed. |
[2022-04-01-preview] Add New Api-version for Microsoft.ApiManagement (Azure#20399) * Adds base for updating Microsoft.ApiManagement from version preview/2021-12-01-preview to version 2022-04-01-preview * Updates readme * Updates API version in new specs and examples * APIM Auth Servers (Azure#19234) * APIM Auth Servers * adding x-ms-identifiers * removing some weird, invisible special char * formatting * oAuth2AuthenticationSettings moved to AuthSettings * Formatting Co-authored-by: Milan Zolota <[email protected]> * API Management Authorization Endpoints (Azure#19615) * Add blockchain to latest profile * Add additional types * add authorizations definitions * authorizations operations * add examples * update readme * fix examples * fix linter delete errors * address CI validation errors * prettier fix * update to 2022-04 * fix readme * Update specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2022-04-01-preview/apimauthorizationproviders.json Co-authored-by: Sean Kim <[email protected]> * update versions * Apply suggestions from code review Co-authored-by: Mark Cowlishaw <[email protected]> Co-authored-by: Annaji Sharma Ganti <[email protected]> Co-authored-by: Annaji Sharma Ganti <[email protected]> * Move Long running Create Operation from Location based to Azure-AsyncOperation Header (Azure#19733) * azure-asyncOperation * prettier * fix(apim): Add missing 'metrics' property to diagnostics contract in 2022-04-01-preview (Azure#20317) * apim /PUT apis import add translateRequiredQueryParameters (Azure#20333) * [2022-04-01-preview] Replace resource with proxyresource and TrackedResource (Azure#20461) * replace resource with proxyresource * revert to proxyresource * Add type object to authorization definitions (Azure#20631) Authorization definitions were missing "type": "object", and this change adds that key/value pair * Add type object to policy fragment definition (Azure#20585) * APIM Open ID Connect providers (Azure#20622) * APIM Open ID Connect providers * added new proeprties for update * prettier * [APIM] Add Nat Gateway (Azure#19990) * Update apimdeployment.json * Create ApiManagementCreateServiceWithNatGatewayEnabled.json * fix typo in file * Change Nat Gateway property to enum * modify type of natgateway state * update property name * add example reference * small fix in example * rename to outboundPublicIPAddresses Co-authored-by: Samir Solanki <[email protected]> * [2022-04-01-preview] MIgrate2Stv2 API (Azure#20504) * migrate2stv2 * updated to post * 202 and location * add body to 202 * remove body from 202 Co-authored-by: Vatsa Patel <[email protected]> Co-authored-by: Samir Solanki <[email protected]> Co-authored-by: [email protected] <[email protected]> * Address Authorizations MissingTypeObject errors (Azure#20919) * Add forgotten If-Match header (Azure#20920) * Add forgotten If-Match header `If-Match` header for the `DeleteAuthorizationAccessPolicy.json file` was forgotten. This change adds the wildcard character for the `If-Match` header for that file. * Update ApiManagementDeleteAuthorization.json * Use common types for specs and count as readonly (Azure#21023) * common types * count readonly * Sasolank/more review comments (Azure#21025) * XML * proxy to gateway * Update Authorizations Spec (Azure#21027) * Update definitions.json Update wording for PostGetLoginLink endpoint description * Update apimauthorizationproviders.json Add 201 response to all Authorization PUT requests * Updated examples and fixed formatting There was a formatting issue within apimauthorizationproviders.json, and the Authorization examples needed to be updated with the new 201 responses for creating/updating Authorization entities. * Add long-running-operation key/value Added x-ms-long-running-operation: true to Authorization PUT requests * Remove long-running-operations * readonly revert (Azure#21050) * Set SchemaContract.Document as required. (Azure#20110) * Updated documentation of the SchemaContract. Server use to return code 500 in case SchemaContract.Document is null. That issue was fixed in the APIM and server will return proper response code. * Fix AzureApiValidation * update field with properties * revert remaining readonly on collection (Azure#21051) * Change to camel casing for "accesspolicies" (Azure#21070) * Change to camel casing for "accesspolicies" * More camel casing updates for access policies * list example fixed (Azure#21089) * fix definition (Azure#21110) * upgrade to v3 for common types (Azure#21109) * upgrade to v3 * Space * revert to v2 proxyResource Co-authored-by: Milan Zolota <[email protected]> Co-authored-by: Milan Zolota <[email protected]> Co-authored-by: Sean D Kim <[email protected]> Co-authored-by: Mark Cowlishaw <[email protected]> Co-authored-by: Annaji Sharma Ganti <[email protected]> Co-authored-by: Annaji Sharma Ganti <[email protected]> Co-authored-by: Tom Kerkhove <[email protected]> Co-authored-by: Korolev Dmitry <[email protected]> Co-authored-by: Logan Zipkes <[email protected]> Co-authored-by: Rafał Mielowski <[email protected]> Co-authored-by: malincrist <[email protected]> Co-authored-by: GuanchenIntern <[email protected]> Co-authored-by: VatsaPatel <[email protected]> Co-authored-by: Vatsa Patel <[email protected]> Co-authored-by: [email protected] <[email protected]> Co-authored-by: Maxim Agapov <[email protected]>
When attempting to retrieve KeyVault keys or secrets using either the SecretClient() or KeyClient() method in an AzureML Notebook, the following error trace is returned:
This type of error is usually raised whenever a list iterator is ran against a dictionary. Do these packages require Python>3.8.1?
The text was updated successfully, but these errors were encountered: