{"id":17703248,"url":"https://github.com/nagyesta/lowkey-vault-example-python","last_synced_at":"2025-06-30T07:33:24.811Z","repository":{"id":37991462,"uuid":"492156600","full_name":"nagyesta/lowkey-vault-example-python","owner":"nagyesta","description":"POC example for using Lowkey Vault in your Python project.","archived":false,"fork":false,"pushed_at":"2025-06-23T04:58:49.000Z","size":272,"stargazers_count":0,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-23T05:34:50.664Z","etag":null,"topics":[],"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/nagyesta.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-05-14T08:28:52.000Z","updated_at":"2025-06-23T04:58:51.000Z","dependencies_parsed_at":"2024-01-03T06:39:10.382Z","dependency_job_id":"d9a41837-fea4-4327-9688-836031ec9236","html_url":"https://github.com/nagyesta/lowkey-vault-example-python","commit_stats":{"total_commits":207,"total_committers":3,"mean_commits":69.0,"dds":0.06763285024154586,"last_synced_commit":"f038286b6c1569fe087f1ffbd0be6a891516d44c"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nagyesta/lowkey-vault-example-python","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nagyesta%2Flowkey-vault-example-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nagyesta%2Flowkey-vault-example-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nagyesta%2Flowkey-vault-example-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nagyesta%2Flowkey-vault-example-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nagyesta","download_url":"https://codeload.github.com/nagyesta/lowkey-vault-example-python/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nagyesta%2Flowkey-vault-example-python/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262731718,"owners_count":23355404,"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":[],"created_at":"2024-10-24T20:06:36.702Z","updated_at":"2025-06-30T07:33:24.711Z","avatar_url":"https://github.com/nagyesta.png","language":"Python","readme":"![LowkeyVault](https://raw.githubusercontent.com/nagyesta/lowkey-vault/main/.github/assets/LowkeyVault-logo-full.png)\n\n[![GitHub license](https://img.shields.io/github/license/nagyesta/lowkey-vault-example-python?color=informational)](https://raw.githubusercontent.com/nagyesta/lowkey-vault-example-python/main/LICENSE)\n[![Python package](https://img.shields.io/github/actions/workflow/status/nagyesta/lowkey-vault-example-python/python.yml?logo=github\u0026branch=main)](https://github.com/nagyesta/lowkey-vault-example-python/actions/workflows/python.yml)\n[![Lowkey secure](https://img.shields.io/badge/lowkey-secure-0066CC)](https://github.com/nagyesta/lowkey-vault)\n\n# Lowkey Vault - Example Python\n\nThis is an example for [Lowkey Vault](https://github.com/nagyesta/lowkey-vault). It demonstrates a basic scenario where\na key is used for encrypt/decrypt operations and database connection specific credentials as well as getting a PKCS12 \nstore with a certificate and matching private key inside.\n\n### Points of interest\n\n* [Key \"repository\"](src/azure_key_repository.py)\n* [Secret \"repository\"](src/azure_secret_repository.py)\n* [Certificate \"repository\"](src/azure_certificate_repository.py)\n* [Empty credentials for connecting to Lowkey Vault](tests/noop_credential.py) (not needed if [Assumed Identity](https://github.com/nagyesta/assumed-identity) is used)\n* [Tests](tests/test.py)\n  * TestRepository is using [NoopCredential](tests/noop_credential.py) for authentication to demonstrate integration with\n    * Secrets\n    * Keys\n    * Certificates\n  * TestRepositoryWithManagedIdentity is performing exactly the same but, it is using the DefaultAzureCredential with [Assumed Identity](https://github.com/nagyesta/assumed-identity)\n\n### Usage\n\n1. Start [Lowkey Vault](https://github.com/nagyesta/lowkey-vault) and [Assumed Identity](https://github.com/nagyesta/assumed-identity)\n   1. Either by following the steps [here](https://github.com/nagyesta/lowkey-vault#quick-start-guide) and [here](https://github.com/nagyesta/assumed-identity#usage).\n   2. Or running ```docker-compose up -d```\n2. Set ```REQUESTS_CA_BUNDLE``` environment variable to reference [lowkeyvault.pem](lowkeyvault.pem)\n3. If you are not using the default `169.254.169.254:80` address for Assumed Identity (because for example you are running it in the cloud)\n   1. Set ```AZURE_POD_IDENTITY_AUTHORITY_HOST``` environment variable to point to the Assumed Identity base URL e.g., http://localhost:8080\n   2. Set ```IMDS_ENDPOINT``` environment variable to point to the Assumed Identity base URL e.g., http://localhost:8080\n   3. Set ```IDENTITY_ENDPOINT``` environment variable to point to the `/metadata/identity/oauth2/token` path of Assumed Identity e.g., http://localhost:8080/metadata/identity/oauth2/token\n   4. Create an empty file named ```/var/opt/azcmagent/tokens/assumed-identity.key``` to let the client think that you are using Azure Arc for Managed Identity\n4. Run the tests\n\n\u003e [!NOTE]\n\u003e In order to better understand what is needed in general to make similar examples work, please find a generic overview \n[here](https://github.com/nagyesta/lowkey-vault/wiki/Example:-How-can-you-use-Lowkey-Vault-in-your-tests).\n\n\u003e [!TIP]\n\u003e Since v2.4.2, Lowkey Vault is providing the same token endpoint on the `8080` port by default. Therefore, you don't need to start another container.\n\n\u003e [!NOTE]\n\u003e To be able to use Azure Identity 1.18.0+ you must use Lowkey Vault 2.5.0+ as earlier versions don't provide the necessary headers in the token response.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnagyesta%2Flowkey-vault-example-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnagyesta%2Flowkey-vault-example-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnagyesta%2Flowkey-vault-example-python/lists"}