{"id":42639138,"url":"https://github.com/infraboard/keyauth","last_synced_at":"2026-01-29T06:08:35.952Z","repository":{"id":38157972,"uuid":"220575852","full_name":"infraboard/keyauth","owner":"infraboard","description":"keyauth是一个微服务权限治理中心, 提供用户认证与授权管理","archived":false,"fork":false,"pushed_at":"2023-06-01T20:14:20.000Z","size":2987,"stargazers_count":90,"open_issues_count":5,"forks_count":28,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-06-18T15:31:14.778Z","etag":null,"topics":["auth-provider","authentication","authorization","microservice","oauth2","rbac-management","ucenter","user-management"],"latest_commit_sha":null,"homepage":"","language":"Go","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/infraboard.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-11-09T01:45:30.000Z","updated_at":"2024-03-18T06:52:44.000Z","dependencies_parsed_at":"2024-06-18T15:25:55.432Z","dependency_job_id":"f55cfbcf-fd39-4331-b85a-19b1b39db0c7","html_url":"https://github.com/infraboard/keyauth","commit_stats":null,"previous_names":[],"tags_count":57,"template":false,"template_full_name":null,"purl":"pkg:github/infraboard/keyauth","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/infraboard%2Fkeyauth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/infraboard%2Fkeyauth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/infraboard%2Fkeyauth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/infraboard%2Fkeyauth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/infraboard","download_url":"https://codeload.github.com/infraboard/keyauth/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/infraboard%2Fkeyauth/sbom","scorecard":{"id":488463,"data":{"date":"2025-08-11","repo":{"name":"github.com/infraboard/keyauth","commit":"249f383f450a309993f0687d4f4c29a3664fb3ef"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 2/26 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 6 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"10 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GO-2022-0619 / GHSA-r48q-9g5r-8q2h","Warn: Project is vulnerable to: GHSA-3vp4-m3rf-835h","Warn: Project is vulnerable to: GO-2023-1737 / GHSA-2c4m-59x9-fr2g","Warn: Project is vulnerable to: GO-2021-0356 / GHSA-8c26-wmh5-6g9v","Warn: Project is vulnerable to: GO-2024-2961","Warn: Project is vulnerable to: GO-2023-2402 / GHSA-45x7-px36-x8w8","Warn: Project is vulnerable to: GO-2024-3321 / GHSA-v778-237x-gjrc","Warn: Project is vulnerable to: GO-2025-3487 / GHSA-hcg3-q754-cr77","Warn: Project is vulnerable to: GO-2023-2153 / GHSA-m425-mq94-257g / GHSA-qppj-fm5r-hxr3","Warn: Project is vulnerable to: GO-2024-2611 / GHSA-8r3f-844c-mc37"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-19T18:25:55.045Z","repository_id":38157972,"created_at":"2025-08-19T18:25:55.045Z","updated_at":"2025-08-19T18:25:55.045Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28865391,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-29T05:56:06.453Z","status":"ssl_error","status_checked_at":"2026-01-29T05:55:57.668Z","response_time":59,"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":["auth-provider","authentication","authorization","microservice","oauth2","rbac-management","ucenter","user-management"],"created_at":"2026-01-29T06:08:35.348Z","updated_at":"2026-01-29T06:08:35.942Z","avatar_url":"https://github.com/infraboard.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# keyauth\n\n[![Go Report Card](https://goreportcard.com/badge/github.com/infraboard/keyauth)](https://goreportcard.com/report/github.com/infraboard/keyauth)\n![](https://img.shields.io/github/license/infraboard/keyauth)\n\nkeyauth是一个微服务权限治理中心, 提供用户认证与授权管理.\n\ndemo访问地址: [Demo](http://keyauth.nbtuan.vip/) 用户: admin, 密码: 12345678mM@1\n\n## 功能\n\n+ 登录安全\n    + 用户认证: Password/LDAP/AccessToken/Oauth2.0其他模式\n    + 单点登录: 同一账号同一时间只能在一个客户端登录\n    + 密码安全: 密码强度校验, 密码过期提醒, 密码重复限制\n    + IP黑白名: 用户登录IP黑白名单限制\n    + 异常登录: 失败重试检测, 异地登录检测, 30天未登录检测\n    + 智能多因子认证: 异常登录时 支持邮件/短信方式对用户进行二次身份验证\n    + 登录日志: 记录用户登录时间, 地点, IP, 登录端 等\n\n+ 权限管理: \n    + 部门管理: 部门人员和部门工作空间管理\n    + 权限模型: 基于工作空间的【RBAC】授权 \n    + 角色管理: 基于标签的权限条目匹配, 灵活编辑角色\n    + 服务目录: 服务将功能注册到keyauth, keyauth基于这些服务功能 提供RBAC鉴权机制\n\n\n## SDK使用\n\n\n注意SDK权限很大, 仅供内部服务调用, 如果对外，请走HTTP API\n```go\npackage main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/infraboard/keyauth/apps/domain\"\n\t\"github.com/infraboard/keyauth/apps/user\"\n\t\"github.com/infraboard/keyauth/client\"\n)\n\nfunc main() {\n\tconf := client.NewDefaultConfig()\n\t// 提前注册一个服务, 获取服务的client_id和client_secret\n\tconf.SetClientCredentials(\"pz3HiVQA3indzSHzFKtLHaJW\", \"vDvlAtqN3rS9CZcHugXp6QBuk28zRjud\")\n\tc, err := client.NewClient(conf)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\t// 查询用户信息, 查询admin domain里面的用户\n\treq := user.NewQueryAccountRequest()\n\treq.Domain = domain.AdminDomainName\n\teps, err := c.User().QueryAccount(context.Background(), req)\n\tfmt.Println(eps, err)\n}\n```\n\n## 快速开发\n\n1. 依赖环境搭建:\n\n+ [MongoDB数据库安装](./docs/mongodb/install.md) (必须)\n+ [OpenLDAP安装](./docs/ldap/install.md) (开启LDAP认证时需要安装)\n+ [消息总线](./docs/bus/install.md) (开启操作审计时需要安装)\n+ [安装protobuf](./docs/protobuf/install.md)(keyauth开发者)\n\n2. 快速运行\n\n```sh\n# 安装依赖\nmake install\n\n# 配置\nmv /etc/keyauth_sample.toml /etc/keyauth.toml\nvim /etc/keyauth.toml\n\n# 初始化服务\nmake init\n\n# 启动服务\nmake run\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finfraboard%2Fkeyauth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finfraboard%2Fkeyauth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finfraboard%2Fkeyauth/lists"}