{"id":15776335,"url":"https://github.com/devigned/pg-vault","last_synced_at":"2025-03-31T14:50:24.105Z","repository":{"id":28183053,"uuid":"31684670","full_name":"devigned/pg-vault","owner":"devigned","description":"PostgreSQL extension which exposes the functionality of the Rust vault crypto library","archived":false,"fork":false,"pushed_at":"2015-05-11T03:30:15.000Z","size":216,"stargazers_count":1,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-11T17:57:32.401Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/devigned.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}},"created_at":"2015-03-04T23:03:37.000Z","updated_at":"2024-05-08T06:27:30.000Z","dependencies_parsed_at":"2022-09-06T04:02:07.926Z","dependency_job_id":null,"html_url":"https://github.com/devigned/pg-vault","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devigned%2Fpg-vault","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devigned%2Fpg-vault/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devigned%2Fpg-vault/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devigned%2Fpg-vault/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devigned","download_url":"https://codeload.github.com/devigned/pg-vault/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246485854,"owners_count":20785408,"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-04T17:20:32.977Z","updated_at":"2025-03-31T14:50:24.082Z","avatar_url":"https://github.com/devigned.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pg-vault\nPostgreSQL extension which exposes the functionality of the Rust vault crypto library. Specifically, \u003cb\u003eEncrypt and Decrypt\u003c/b\u003e via a key stored in Azure Key Vault may be used to encrypt or decrypt a single block of data, the size of which is determined by the key type and the default encryption algorithm (RSA_OAEP).\n\nThis is a prototype and will fail randomly. Do not use this code for production use.\n\nThere are couple assumptions being made with this repo. All of which are required to run or build this code.\n- You are running OSX\n- You have PostgreSQL 9.0.5 installed\n\nThe src directory contains the source for the library. The library depends on libpgcommon, which is included in the lib directory for x86_64-apple-darwin. The other dependencies are listed in the Cargo.toml file ([postgres-extension](https://github.com/devigned/postgres-extension.rs), [rust-key-vault](https://github.com/devigned/rust-key-vault), lazy-static and rustc-serialize).\n\n## Installation\n\n- Clone the repo\n- Run `cargo build`\n- Update the vault.json.example with your vault details and copy it into your PostgreSQL with the name vault.json\n- Update the pg-funcs.sql to point to your libpg_vault...dylib\n- Execute the pg-funcs.sql script and cross your fingers. If all is well, you should see \"hello world!!\" selected twice and one lovely byte array which contains the encrypted value of \"hello world!!\".\n\n## Usage\n\nAfter registering the following in PostgreSQL:\n```sql\nCREATE FUNCTION encrypt(text, bytea) RETURNS bytea AS '{path to libpg_vault...dylib}' LANGUAGE c volatile;\nCREATE FUNCTION decrypt(text, bytea) RETURNS bytea AS '{path to libpg_vault...dylib}' LANGUAGE c volatile;\n```\n\nYou should be able to use encrypt and decrypt as normal SQL functions.\n\n## Development\n\nAfter checking out the repo, run `cargo build` to install dependencies and compile. Then, follow the installation instructions.\n\n## Contributing\n\n1. Fork it ( https://github.com/devigned/pg-vault/fork )\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create a new Pull Request\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevigned%2Fpg-vault","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevigned%2Fpg-vault","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevigned%2Fpg-vault/lists"}