{"id":19036124,"url":"https://github.com/tx7do/opa-example","last_synced_at":"2025-08-17T21:38:53.112Z","repository":{"id":112433651,"uuid":"557722128","full_name":"tx7do/opa-example","owner":"tx7do","description":null,"archived":false,"fork":false,"pushed_at":"2022-11-08T14:14:43.000Z","size":65,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-30T02:33:32.984Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/tx7do.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":"2022-10-26T07:18:51.000Z","updated_at":"2024-12-20T04:07:27.000Z","dependencies_parsed_at":"2023-05-15T02:45:33.753Z","dependency_job_id":null,"html_url":"https://github.com/tx7do/opa-example","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/tx7do%2Fopa-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tx7do%2Fopa-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tx7do%2Fopa-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tx7do%2Fopa-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tx7do","download_url":"https://codeload.github.com/tx7do/opa-example/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249348729,"owners_count":21255312,"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":[],"created_at":"2024-11-08T21:53:29.217Z","updated_at":"2025-04-17T14:33:53.958Z","avatar_url":"https://github.com/tx7do.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# opa-example\r\n\r\n## 什么是 Open Policy Agent (OPA) ？\r\n\r\n**Open Policy Agent (简称OPA)**，它是使用Go 语言写的一个非常轻量的 **开源的通用策略引擎（Open Source Policy Engine）**，他的目的就是解决在云端环境上的「策略(Policy)」执行问题，他可以在多种环境上运行，包含Microservice、Kubernetes、CI/CD Pipeline、API gateway 等，让你得以使用相同的服务来管理云端系统上所有的Policy，解决各式各样的Policy 判断情境。\r\n\r\nOPA 最初是由 Styra 公司在 2016 年创建并开源的项目，目前该公司的主要产品就是提供可视化策略控制及策略执行的可视化 Dashboard 服务的。\r\n\r\nOPA 首次进入 云原生计算基金会 [CNCF](https://www.cncf.io/) 并成为 sandbox 级别的项目是在 2018 年， 在 2021 年的 2 月份便已经从 CNCF 毕业，这个过程相对来说还是比较快的，由此也可以看出 OPA 是一个比较活跃且应用广泛的项目。\r\n\r\n## Rego 基本语法\r\n\r\n## Playground\r\n\r\n\r\n\r\n## 参考资料\r\n\r\n- [Open Policy Agent - 官网](https://www.openpolicyagent.org/)\r\n- [Open Policy Agent - Github](https://github.com/open-policy-agent/opa)\r\n- [The Rego Playground](https://play.openpolicyagent.org/)\r\n- [Golang访问控制框架：Open Policy Agent vs Casbin](https://juejin.cn/post/7108533587292454949)\r\n- [Open Policy Agent - 快速導入 Authz 至 Microservice 架構](https://engineering.linecorp.com/zh-hant/blog/open-policy-agent-authz-in-microservice/)\r\n- [策略即代码——Open Policy Agent（开放策略代理 OPA）简介](https://cloudnative.to/blog/introducing-policy-as-code-the-open-policy-agent-opa/)\r\n- [Open Policy Agent简介](http://just4coding.com/2020/02/13/open-policy-agent/)\r\n- [Open Policy Agent (OPA) 入门实践](https://moelove.info/2021/12/06/Open-Policy-Agent-OPA-%E5%85%A5%E9%97%A8%E5%AE%9E%E8%B7%B5/)\r\n- [用 Goalng 开发 OPA 策略](https://blog.haohtml.com/archives/31514)\r\n- [How to Implement Role Based Access Control (RBAC) using Open Policy Agent (OPA)](https://www.permit.io/blog/implement-rbac-using-opa)\r\n- [Open Policy Agent vs Casbin](https://qingwave.github.io/openpolicyagent-vs-casbin/#open-policy-agent)\r\n- [Using OPA - AWS](https://docs.aws.amazon.com/prescriptive-guidance/latest/saas-multitenant-api-access-authorization/opa.html)\r\n- [OPA-重新定义规则引擎-入门篇](https://zhuanlan.zhihu.com/p/113110851)\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftx7do%2Fopa-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftx7do%2Fopa-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftx7do%2Fopa-example/lists"}