-
Notifications
You must be signed in to change notification settings - Fork 18
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
Fixed azure_key_vault_secret crashes when keyvault name is camel-case Closes #637 #638
Conversation
@@ -2,6 +2,8 @@ | |||
|
|||
Azure Key Vault is a cloud service for securely storing and accessing secrets. A secret is anything that you want to tightly control access to, such as API keys, passwords, certificates, or cryptographic keys. | |||
|
|||
Note: If we intend to list the secrets by vault name using the WHERE clause (select * from azure_key_vault_secret where vault_name = 'test-vault';), the vault name must be in lowercase, even if the vault name appears in camel case in the portal. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we are converting the name to lower case in the code, do we need to add this line to the doc?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we are converting the name to lower case in the code, do we need to add this line to the doc?
@misraved, currently, we use the ToLower function to verify the vault name both from the parent hydrate and the Secret API response. However, we are not streamlining the result to lowercase.
In the azure_key_vault
table, the vault name matches the user-provided name as displayed in the portal. Nevertheless, the response from the Secret API call consistently appears in lowercase.
For those who wish to join data from both the azure_key_vault
and azure_key_vault_secret
tables using the vault name sourced from the azure_key_vault
table, it's important to note that while data can be fetched, it might lead to empty rows. This is due to Steampipe's filtering at the level of casing, meaning that any vault name casing discrepancies will prevent the display of results.
Should any concerns or uncertainties arise, please feel free to reach out. We can sync up. Thank you!
@ParthaI I think it is worth reviewing this section of code - steampipe-plugin-azure/azure/table_azure_key_vault_secret.go Lines 264 to 293 in d5a14b5
I don't think we need to make an additional API call to get Turbot data. We can use the ParentHydrate or the Hydrate call instead. That way we might not have an API mismatch error. |
@misraved, Thanks for pointing it out, We need an extra API call in this case. |
This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Integration test logs
Logs
Example query results
Results