Skip to content
This repository was archived by the owner on Feb 15, 2024. It is now read-only.
This repository was archived by the owner on Feb 15, 2024. It is now read-only.

question: Is there any way to list keyvault keys and secrets with get_azure_cli_credentials #6

@kbroughton

Description

@kbroughton

I'm working on a scanner and have most of the work done by python-azure-sdk apis but keyvault seems extra tricky. My use case is one where we are often given normal read-only user credentials by clients and don't have the ability to create our own service principals. As such, I'm trying to stick with just the get_azure_cli_credentials of azure/common/credentials.py.

The azure_cli can do the following with only my regular user creds
az keyvault key list --vault-name my-keyvault

So i'm hoping for the same with the api.

in
https://github.com/Azure-Samples/key-vault-recovery-python/blob/master/key_vault_sample_base.py

 self.keyvault_mgmt_client = KeyVaultManagementClient(self.mgmt_creds, 
           self.config.subscription_id)

 self.keyvault_data_client = KeyVaultClient(self.data_creds)

But self.data_creds uses ServicePrincipalCredentials.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions