{"id":38269867,"url":"https://github.com/sebastianliu/etcd-adapter","last_synced_at":"2026-01-17T01:49:09.768Z","repository":{"id":45151130,"uuid":"157146042","full_name":"sebastianliu/etcd-adapter","owner":"sebastianliu","description":"ETCD adapter for Casbin https://github.com/casbin/casbin","archived":false,"fork":false,"pushed_at":"2023-01-31T13:18:36.000Z","size":40,"stargazers_count":7,"open_issues_count":0,"forks_count":9,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-08-13T22:09:04.026Z","etag":null,"topics":["adapter","authorization","casbin","etcd","rbac"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sebastianliu.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":"2018-11-12T02:35:58.000Z","updated_at":"2024-08-06T08:27:31.000Z","dependencies_parsed_at":"2024-06-20T23:26:07.629Z","dependency_job_id":"00813183-2f4c-4214-bf87-85488cabfb3b","html_url":"https://github.com/sebastianliu/etcd-adapter","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/sebastianliu/etcd-adapter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sebastianliu%2Fetcd-adapter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sebastianliu%2Fetcd-adapter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sebastianliu%2Fetcd-adapter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sebastianliu%2Fetcd-adapter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sebastianliu","download_url":"https://codeload.github.com/sebastianliu/etcd-adapter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sebastianliu%2Fetcd-adapter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28491667,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T00:50:05.742Z","status":"ssl_error","status_checked_at":"2026-01-17T00:43:11.982Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["adapter","authorization","casbin","etcd","rbac"],"created_at":"2026-01-17T01:49:09.657Z","updated_at":"2026-01-17T01:49:09.735Z","avatar_url":"https://github.com/sebastianliu.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"etcd-adapter\n====\n\n[![Build Status](https://travis-ci.org/sebastianliu/etcd-adapter.svg?branch=master)](https://travis-ci.org/sebastianliu/etcd-adapter)\n[![Coverage Status](https://coveralls.io/repos/github/sebastianliu/etcd-adapter/badge.svg)](https://coveralls.io/github/sebastianliu/etcd-adapter)\n[![Godoc](https://godoc.org/github.com/sebastianliu/etcd-adapter?status.svg)](https://godoc.org/github.com/sebastianliu/etcd-adapter)\n\nETCD adapter is the policy storage adapter for [Casbin](https://github.com/casbin/casbin). With this library, Casbin can load policy from ETCD and save policy to it. ETCD adapter support the __Auto-Save__ feature for Casbin policy. This means it can support adding a single policy rule to the storage, or removing a single policy rule from the storage.\n\n## Installation\n```bash\ngo get github.com/sebastianliu/etcd-adapter\n```\n\n## Sample Example\n```go\npackage main\n\nimport (\n\t\"github.com/sebastianliu/etcd-adapter\"\n\t\"github.com/casbin/casbin\"\n)\n\nfunc main() {\n\t// Initialize a casbin etcd adapter and use it in a Casbin enforcer:\n\t// The adapter will use the ETCD and a named path with the key you give.\n\t// If not provided, the adapter will try to use the default value casbin_policy.\n\t// If you have namespace to distinguish keys in your etcd, you can use your_namespace/casbin_root_path\n\ta := etcdadapter.NewAdapter([]string{\"http://127.0.0.1:2379\"}, \"casbin_policy_test\") // Your etcd endpoints and the path key.\n\n\te := casbin.NewEnforcer(\"rbac_model.conf\", a)\n\n\t// Load the policy from ETCD.\n\te.LoadPolicy()\n\n\t// Check the permission.\n\te.Enforce(\"alice\", \"data1\", \"read\")\n\n\t// Modify the policy.\n\t// e.AddPolicy(...)\n\t// e.RemovePolicy(...)\n\n\t// Save the policy back to DB.\n\te.SavePolicy()\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsebastianliu%2Fetcd-adapter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsebastianliu%2Fetcd-adapter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsebastianliu%2Fetcd-adapter/lists"}