{"id":17650220,"url":"https://github.com/mongey/vault-plugin-secrets-kafka","last_synced_at":"2025-05-07T03:45:20.766Z","repository":{"id":37981544,"uuid":"137281668","full_name":"Mongey/vault-plugin-secrets-kafka","owner":"Mongey","description":"A vault plugin for generating ACLs for dynamic users","archived":false,"fork":false,"pushed_at":"2024-10-29T06:43:39.000Z","size":11217,"stargazers_count":28,"open_issues_count":11,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-12T11:57:55.356Z","etag":null,"topics":["apache-kafka","kafka","vault","vault-plugin"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Mongey.png","metadata":{"files":{"readme":"README.markdown","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2018-06-13T23:18:08.000Z","updated_at":"2024-10-28T17:23:06.000Z","dependencies_parsed_at":"2024-11-09T08:12:29.663Z","dependency_job_id":null,"html_url":"https://github.com/Mongey/vault-plugin-secrets-kafka","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/Mongey%2Fvault-plugin-secrets-kafka","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mongey%2Fvault-plugin-secrets-kafka/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mongey%2Fvault-plugin-secrets-kafka/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mongey%2Fvault-plugin-secrets-kafka/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Mongey","download_url":"https://codeload.github.com/Mongey/vault-plugin-secrets-kafka/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249714896,"owners_count":21314927,"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":["apache-kafka","kafka","vault","vault-plugin"],"created_at":"2024-10-23T11:37:13.823Z","updated_at":"2025-04-19T14:32:00.295Z","avatar_url":"https://github.com/Mongey.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `[WIP] vault-plugin-kafka-secret`\n\n[![CircleCI](https://circleci.com/gh/Mongey/vault-plugin-secrets-kafka.svg?style=svg)](https://circleci.com/gh/Mongey/vault-plugin-secrets-kafka)\n\nA Vault plugin for generating credentials for Apache Kafka clients.\n\nGenerates a dynamic username and ACL that can be used to create a uniq SSL\ncertificate for a Kafka client.\n\nUse this in combination with the vault pki backend.\n\n## Pre-Install\n\n## 🔌 Installation\n\n* Download the plugin to Vault's plugin directory.\n* Register the plugin with Vault\n  * ```sh\n    vault write sys/plugins/catalog/vault-plugin-secrets-kafka \\\n      sha_256=\"$SHASUM\" \\\n      command=\"vault-plugin-secrets-kafka\"\n    ```\n* Enable the plugin mount\n  * ```sh\n    vault secrets enable -path=kafka -plugin-name=vault-plugin-secrets-kafka plugin\n    ```\n\n## 🛠 Configure\n* Configure the plugin\n  * ```sh\n    vault write kafka/config/access address=\"localhost:9092\" ca_certificate=\"$CA\" client_certificate=\"$CERT\" client_key=\"$PRIVATE_KEY\"\n    ```\n  * The client must be capable of writing creating and deleting ACLs.\n\n* Write a policy\n  * ```json\n    {\n      \"acl\": {\n        \"host\": \"*\",\n        \"operation\": \"Read\",\n        \"permission_type\": \"Allow\"\n      },\n      \"resource\": {\n        \"type\": \"Topic\",\n        \"name\": \"*\",\n        \"pattern_type_filter\": \"any\"\n      }\n    }\n    ```\n* Write the role\n  * `vault write kafka/roles/read-all-topics policy=$(cat bin/policy.json)`\n* Read the credentials, pick the username\n  * `vault read kafka/creds/read-all-topics`\n* Generate a SSL certificate for this client\n  * ```sh\n      NAME=$(vault read -field=user kafka/creds/read-all-topics)\n      DATA=$(vault write -format=json pki/issue/kafka-clients common_name=\"$NAME\" ttl=$TTL | jq -r .data)\n      printf \"%s\" \"$DATA\" | jq -r .private_key \u003e private.key\n      printf \"%s\" \"$DATA\" | jq -r .certificate \u003e client.cert\n      printf \"%s\" \"$DATA\" | jq -r .issuing_ca  \u003e ca.cert\n    ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmongey%2Fvault-plugin-secrets-kafka","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmongey%2Fvault-plugin-secrets-kafka","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmongey%2Fvault-plugin-secrets-kafka/lists"}