{"id":49225750,"url":"https://github.com/jfarleyx/go-keyvault-cert","last_synced_at":"2026-04-24T07:04:57.812Z","repository":{"id":57510804,"uuid":"238325582","full_name":"jfarleyx/go-keyvault-cert","owner":"jfarleyx","description":"An easy way to fetch TLS Certificates from Azure Key Vault using Go","archived":false,"fork":false,"pushed_at":"2024-12-11T23:35:12.000Z","size":49,"stargazers_count":1,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-15T05:18:09.350Z","etag":null,"topics":["azure-key-vault","azure-keyvault","certificate","go","golang","tls"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jfarleyx.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":"2020-02-04T23:07:23.000Z","updated_at":"2023-01-24T13:16:41.000Z","dependencies_parsed_at":"2024-04-05T02:34:05.748Z","dependency_job_id":"8a5f859d-7f6d-48fd-a608-7b1d644ab3e1","html_url":"https://github.com/jfarleyx/go-keyvault-cert","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/jfarleyx/go-keyvault-cert","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jfarleyx%2Fgo-keyvault-cert","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jfarleyx%2Fgo-keyvault-cert/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jfarleyx%2Fgo-keyvault-cert/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jfarleyx%2Fgo-keyvault-cert/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jfarleyx","download_url":"https://codeload.github.com/jfarleyx/go-keyvault-cert/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jfarleyx%2Fgo-keyvault-cert/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32212813,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-24T03:15:14.334Z","status":"ssl_error","status_checked_at":"2026-04-24T03:15:11.608Z","response_time":64,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["azure-key-vault","azure-keyvault","certificate","go","golang","tls"],"created_at":"2026-04-24T07:04:26.323Z","updated_at":"2026-04-24T07:04:57.804Z","avatar_url":"https://github.com/jfarleyx.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# THIS LIBRARY IS NO LONGER MAINTAINED\n\n# GO-KEYVAULT-CERT\n[![GoDoc](https://godoc.org/github.com/jfarleyx/go-keyvault-cert?status.svg)](http://godoc.org/github.com/jfarleyx/go-keyvault-cert)\n[![Go Report](https://goreportcard.com/badge/github.com/jfarleyx/go-keyvault-cert)](https://goreportcard.com/report/github.com/jfarleyx/go-keyvault-cert)\n\ngo-keyvault-cert is an easy-to-use wrapper around [azure-sdk-for-go](https://github.com/Azure/azure-sdk-for-go) that allows you \nto fetch the most recent PEM encoded certificate from Azure Key Vault. go-keyvault-cert returns an x509 ```tls.Certificate{}``` that you can easily use with your API's web server.  \n\n## Install\n\n``` go get github.com/jfarleyx/go-keyvault-cert/v2 ```\n\n## Usage\n\ngo-keyvault-cert is really easy to use. \n\nFirst, register your API in Azure AD App Registration and retreive your tenant Id, client Id, and the client secret. \n\nNext, make the following environment variables available to your application: \n\n- ```AZURE_TENANT_ID```: an Azure tenant Id\n- ```AZURE_CLIENT_ID```: an Azure app client Id\n- ```AZURE_CLIENT_SECRET```: an Azure app client secret\n\nThe environment variables are used to authenticate your application with Azure Key Vault. \n\n**Note: The Azure client app referenced above must have the following permissions to Azure Key Vault:**\n- Certificate permissions: Get \u0026 List\n- Secret permissions: Get\n\nHere is an simple example of using go-keyvault-cert to fetch an x509 certificate from Azure Key Vault and use it in an HTTP server. The global variables ```KEY_VAULT_NAME``` \u0026 ```KEY_VAULT_CERT_NAME``` are used for example purposes only. You can provide strings in place of those two environment variables. \n\n```\npackage main\n\n  import (\n  \t\"context\"\n  \t\"crypto/tls\"\n  \t\"log\"\n  \t\"net/http\"\n\n  \tkvcert \"github.com/jfarleyx/go-keyvault-cert/v2\"\n  )\n\n  func main() {\n  \t// Create new key vault certificate object that will be used to fetch certificate\n  \takv := kvcert.New(os.Getenv(\"KEY_VAULT_NAME\"))\n\n  \t// Authorize access to Azure Key Vault utilizing environment variables mentioned above.\n  \terr := akv.AuthorizeFromEnvironment()\n  \tif err != nil {\n  \t  log.Fatalf(\"Error attempting to authorize azure key vault: %v\", err)\n  \t}\n\n  \tctx := context.Background()\n\n  \t// Fetch certificate from Azure Key Vault\n  \tcert, err := akv.GetCertificate(ctx, os.Getenv(\"KEY_VAULT_CERT_NAME\"))\n  \tif err != nil {\n  \t  log.Fatalf(\"Error attempting to fetch certificate: %v\", err)\n  \t}\n  \t\n  \t// Add cert to tls configuration\n  \tconfig := \u0026tls.Config{\n  \t  Certificates: []tls.Certificates{*cert},\n  \t}\n\n  \t// Add tls configuration to http server\n  \tserver := \u0026http.Server{\n  \t  Addr:      \":44366\",\n  \t  TLSConfig: config,\n  \t}\n\n  \tserver.ListenAndServeTLS(\"\", \"\")\n  }\n```\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjfarleyx%2Fgo-keyvault-cert","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjfarleyx%2Fgo-keyvault-cert","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjfarleyx%2Fgo-keyvault-cert/lists"}