{"id":23552249,"url":"https://github.com/kometen/rusty-psql","last_synced_at":"2026-05-17T00:10:37.642Z","repository":{"id":260168204,"uuid":"878463180","full_name":"kometen/rusty-psql","owner":"kometen","description":"Wrapper around psql where connection information is pulled from Azure Key Vault","archived":false,"fork":false,"pushed_at":"2024-12-20T09:03:55.000Z","size":197,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-17T12:33:47.048Z","etag":null,"topics":["1password-cli","azure-key-vault","psql"],"latest_commit_sha":null,"homepage":"https://github.com/kometen/rusty-psql","language":"Rust","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/kometen.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":"2024-10-25T12:46:56.000Z","updated_at":"2024-12-20T09:03:59.000Z","dependencies_parsed_at":"2024-11-21T16:19:05.899Z","dependency_job_id":"3bc174a6-3330-4a9e-870a-c32193e8ac2f","html_url":"https://github.com/kometen/rusty-psql","commit_stats":null,"previous_names":["kometen/rusty_psql","kometen/rusty-psql"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kometen%2Frusty-psql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kometen%2Frusty-psql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kometen%2Frusty-psql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kometen%2Frusty-psql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kometen","download_url":"https://codeload.github.com/kometen/rusty-psql/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254384990,"owners_count":22062422,"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":["1password-cli","azure-key-vault","psql"],"created_at":"2024-12-26T11:09:42.823Z","updated_at":"2025-10-07T13:49:42.272Z","avatar_url":"https://github.com/kometen.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rusty_psql\n\nA wrapper around psql so information about host to connect to, database, password is retrieved from Azure Key Vault\nand URL to Azure Key Vault from 1password thus avoiding storing passwords in cleartext locally.\n\nRequires 1password  and Azure command line utilities installed locally, an Azure-subscription, a PostgreSQL-client.\nLog in with `az login`.\n\nAdd an entry in 1password that can be accessed by the program. The path is formatted in Rust.\n\n```\nlet op_path = format!(\"op://Production/AzureKeyVault{}/url\", key);\n```\n\nAn example of a key can be `Invoice` and the path becomes `op://Production/AzureKeyVaultInvoice/url`.\n\n![add](./1password-invoice.png)\n\n\nCreate an Azure Key Vault named `invoice` and add the following secrets to Azure Key Vault:\n\n```\ndb-host\ndb-name\ndb-pwd\ndb-user\ndb-domain\n```\n\nChange the path to suit your own requirement with the format `op://[vault-name]/[item]/[text-field]/[value]` in 1password.\n\nClone the repository, test, build and run with\n\n```\ncargo test\ncargo build [--release]\n./target/release/rusty_psql -n invoice\n```\n\nInstall via `brew tap`.\n\n```\nbrew tap kometen/rusty-psql\nbrew install rusty-psql\n```\n\nBuild and run the container-image.\n\n```\ndocker build -t rusty_psql:dev .\ndocker run --user rusty_psql_user rusty_psql:dev\n```\n\nThe container will not inherit the environment from the shell so running from the container will not work.\n\nI had much help from Claude. Used the editor zed at https://github.com/zed-industries/zed.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkometen%2Frusty-psql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkometen%2Frusty-psql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkometen%2Frusty-psql/lists"}