{"id":20463191,"url":"https://github.com/devwithkrishna/keyvault-management","last_synced_at":"2026-05-08T06:05:24.767Z","repository":{"id":211595981,"uuid":"729171302","full_name":"devwithkrishna/keyvault-management","owner":"devwithkrishna","description":"keyvault management in azure using github workflow","archived":false,"fork":false,"pushed_at":"2024-09-10T16:07:21.000Z","size":81,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-01-16T00:55:50.149Z","etag":null,"topics":["azure","azure-sdk-for-python","keyvault","python"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/devwithkrishna.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-12-08T15:30:19.000Z","updated_at":"2024-09-10T16:07:25.000Z","dependencies_parsed_at":"2024-09-10T17:39:38.752Z","dependency_job_id":"ab9c4cf8-54e2-4634-a880-9eced2b92572","html_url":"https://github.com/devwithkrishna/keyvault-management","commit_stats":null,"previous_names":["devwithkrishna/keyvault-management"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devwithkrishna%2Fkeyvault-management","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devwithkrishna%2Fkeyvault-management/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devwithkrishna%2Fkeyvault-management/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devwithkrishna%2Fkeyvault-management/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devwithkrishna","download_url":"https://codeload.github.com/devwithkrishna/keyvault-management/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242023192,"owners_count":20059297,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["azure","azure-sdk-for-python","keyvault","python"],"created_at":"2024-11-15T13:09:48.489Z","updated_at":"2026-05-08T06:05:19.714Z","avatar_url":"https://github.com/devwithkrishna.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# keyvault-management\nkeyvault management in azure using github workflow\n\n## Parameters\n* keyvault_name\n* operation\n    - get\n    - set\n    - list\n    - delete\n    - recover\n    - list_deleted_secrets\n        \n```\nusage: kv_mgmt.py [-h] [--client_id CLIENT_ID] [--client_secret CLIENT_SECRET]\n                  [--tenant_id TENANT_ID] --keyvault_name KEYVAULT_NAME\n                  --operation\n                  {get,set,list,delete,list_deleted_secrets,recover}\n                  [--secret_name SECRET_NAME] [--secret_value SECRET_VALUE]\n                  [--content CONTENT]\n```\n## Table\n\n|parameter name | mandatory values | optional | \n|---------------|------------------|----------|\n|keyvault_name  | yes              |          |\n|operation      | yes              |          |\n|secret_name    |                  |  yes      |\n|secret_value   |                  | yes       |\n|content        |                  |  yes      |\n\n\n## How program works\n\n``` \nThis python program leverages the azure sdks - azure identity and azure-keyvault-secrets.\nAzure identity is used for authentication to azure and azure-keyvault-secrets to work with keyvault secrets.\n```\n* Azure Identity - uses DefaultAzureCredential method for authentication.\n    - This uses the service principal app id, service principal secret and tenant id to do the authentication\n      make sure you have the below.\n    ```\n    AZURE_CLIENT_ID, AZURE_CLIENT_SECRET, AZURE_TENANT_ID are the environment variables it will be using\n    ```\n* I use the .env to supply the above vars and load them using python-dotenv package and use it. or you can pass it as \n    environment variable and use by os method.\n\nThe .env file will be of following \n```\nAZURE_CLIENT_ID= \"value\"\nAZURE_CLIENT_SECRET = \"value\"\nAZURE_SUBSCRIPTION_ID = \"value\"\nAZURE_TENANT_ID = \"value\"\n```\nreplace the value with your original values.\n\nAZURE_SUBSCRIPTION_ID - an optional parameter in .env file.\n\n* The environment variables are passed in the github workflows in a differnt method.\n    ```\n    jobs:\n        keyvault_management:\n            runs-on: ubuntu-latest\n            env:\n            AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}\n            AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}\n            AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}\n    ```\n    * I have configued AZURE_CLIENT_ID, AZURE_CLIENT_SECRET and AZURE_TENANT_ID as repository secrets / organizational secrets.\n    \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevwithkrishna%2Fkeyvault-management","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevwithkrishna%2Fkeyvault-management","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevwithkrishna%2Fkeyvault-management/lists"}