{"id":26504963,"url":"https://github.com/olksdr/vault-plugin-secrets-github-apps","last_synced_at":"2025-03-20T20:55:21.785Z","repository":{"id":153527444,"uuid":"226812677","full_name":"olksdr/vault-plugin-secrets-github-apps","owner":"olksdr","description":"Vault Github Apps Secrets plugin","archived":false,"fork":false,"pushed_at":"2019-12-09T08:18:37.000Z","size":2631,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2023-04-18T23:33:59.082Z","etag":null,"topics":["github","vault"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/olksdr.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":"2019-12-09T07:39:12.000Z","updated_at":"2024-06-19T08:55:32.600Z","dependencies_parsed_at":"2023-05-28T08:30:20.857Z","dependency_job_id":null,"html_url":"https://github.com/olksdr/vault-plugin-secrets-github-apps","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olksdr%2Fvault-plugin-secrets-github-apps","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olksdr%2Fvault-plugin-secrets-github-apps/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olksdr%2Fvault-plugin-secrets-github-apps/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olksdr%2Fvault-plugin-secrets-github-apps/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/olksdr","download_url":"https://codeload.github.com/olksdr/vault-plugin-secrets-github-apps/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244688788,"owners_count":20493881,"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":["github","vault"],"created_at":"2025-03-20T20:55:21.359Z","updated_at":"2025-03-20T20:55:21.778Z","avatar_url":"https://github.com/olksdr.png","language":"Go","readme":"Vault Plugin: Github Apps Secrets Backend\n-----------------------\n\nThis is a standalone backend plugin for use with [Hashicorp Vault](https://github.com/hashicorp/vault). This plugin generates\nauth tokens for the installed [applications](https://developer.github.com/v3/apps/) on the managed organizations.\n\n## Getting Started\n\nThis is a [Vault plugin](https://www.vaultproject.io/docs/internals/plugins.html) and is meant to work with Vault. \nThis guide assumes you have already installed Vault and have a basic understanding of how Vault works.\n\nOtherwise, first read this guide on how to [get started with Vault](https://www.vaultproject.io/intro/getting-started/install.html).\n\nTo learn specifically about how plugins work, see documentation on [Vault plugins](https://www.vaultproject.io/docs/internals/plugins.html).\n\n\n### Building\n\nRunning `make` in the rootdirectory of this project should generate a `vault-plugin-secrets-github-apps` binary.\n\n\n### Registration\n\nTo register this plugin with Vault, first copy the binary to the plugin directory configured for your \nrunning instance of Vault, then register the plugin with a command similar to this:\n\n```bash\n$ vault plugin register \\\n      -sha256=\"$(sha256sum vault-plugin-secrets-github-apps | cut -d \" \" -f1)\" \\\n      secret \\\n      vault-plugin-secrets-github-apps\n```\n\nSee the [plugin registration docs](https://www.vaultproject.io/docs/plugin/index.html) for more details.\n\n\n### Usage\n\nOnce the plugin is registered as above, you can enable it on a given path:\n\n```bash\n$ vault secrets enable --path=\"gh\" vault-plugin-secrets-github-apps\n```\n\nThen you can configure the access credentials, for this you need to find out the Application id and the genereated private key:\n\n```bash\n$ vault write gh/config app_id='12345'  private_key=@private.key\n```\n\nAfter plugin is enabled and configured you can get the list of the organizations where the app installed:\n\n```bash\n$ vault read gh/token\nKey              Value\n---              -----\norganizations    [ownername]\n\n```\n\nAnd the token for this installation:\n\n```bash\n $ vault read gh/token/ownername\nKey           Value\n---           -----\nexpires_at    2019-12-07T16:14:48Z\ntoken         v1.d6babb68681d444b8070b30f222222ffffff9999\ntoken_type    token\n```\n\nThis token then can be used to query Github [API](https://developer.github.com/v3/apps/available-endpoints/), according to the permissions\ngranted to the application this token for issued for. \n**Note**: for using this token you need to [provide the custom media type](https://developer.github.com/v3/apps/#get-a-single-github-app) \nin `Accept` header: `application/vnd.github.machine-man-preview+json`\n\nUse `vault path-help gh` to see full documentation on the options available on each endpoint.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Folksdr%2Fvault-plugin-secrets-github-apps","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Folksdr%2Fvault-plugin-secrets-github-apps","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Folksdr%2Fvault-plugin-secrets-github-apps/lists"}