{"id":28028399,"url":"https://github.com/permitio/opal-example-policy-repo","last_synced_at":"2025-05-11T07:13:22.466Z","repository":{"id":45208479,"uuid":"355358437","full_name":"permitio/opal-example-policy-repo","owner":"permitio","description":"An example repository for OPAL policy tracking","archived":false,"fork":false,"pushed_at":"2025-01-28T21:52:53.000Z","size":48,"stargazers_count":29,"open_issues_count":1,"forks_count":172,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-05-11T07:13:16.314Z","etag":null,"topics":["example"],"latest_commit_sha":null,"homepage":"https://opal.ac","language":"Open Policy Agent","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/permitio.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":"2021-04-06T23:43:56.000Z","updated_at":"2025-05-09T07:03:40.000Z","dependencies_parsed_at":"2022-09-05T15:11:28.326Z","dependency_job_id":"9b2708b6-5f58-4766-85af-f09bbe09937a","html_url":"https://github.com/permitio/opal-example-policy-repo","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/permitio%2Fopal-example-policy-repo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/permitio%2Fopal-example-policy-repo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/permitio%2Fopal-example-policy-repo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/permitio%2Fopal-example-policy-repo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/permitio","download_url":"https://codeload.github.com/permitio/opal-example-policy-repo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253528978,"owners_count":21922637,"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":["example"],"created_at":"2025-05-11T07:13:21.802Z","updated_at":"2025-05-11T07:13:22.459Z","avatar_url":"https://github.com/permitio.png","language":"Open Policy Agent","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp  align=\"center\"\u003e\n \u003cimg src=\"https://i.ibb.co/BGVBmMK/opal.png\" height=170 alt=\"opal\" border=\"0\" /\u003e\n\u003c/p\u003e\n\u003ch2 align=\"center\"\u003e\nOPAL Example Policy Repo\n\u003c/h2\u003e\n\n[Check out OPAL main repo here.](https://github.com/permitio/opal)\n\n### What's in this repo?\nThis repo contain an example git repo containing a basic [OPA](https://www.openpolicyagent.org/docs/latest/) policy written in [Rego](https://www.openpolicyagent.org/docs/latest/policy-language/#what-is-rego).\n\nThis repo is used in [OPAL](https://github.com/permitio/opal)'s Getting Started [tutorial](https://opal.ac/getting-started/quickstart/docker-compose-config/overview) to **demonstrate** how OPAL keeps your OPA agents in sync with policy and data changes. When commits are affecting this repo, the OPAL server will immediately push updates (over websockets pub/sub interface) to the connected OPAL clients, and they in turn will push the updated policy and data to OPA.\n\nIf you follow [the tutorial](https://opal.ac/getting-started/quickstart/docker-compose-config/overview), you will see how this repo is used by OPAL in a real example running in docker-compose. The entire tutorial is also available as [video](https://asciinema.org/a/5IMzZRPltUiFdsNnZ81t14ERk?t=1).\n\n#### The policy in this repo\nThis repo has a very simple [RBAC policy](https://en.wikipedia.org/wiki/Role-based_access_control):\n- each user is granted certain roles\n- a user can perform an action on a resource, only if:\n  - one of his roles has permission to do so\n  - the user \"location\" is in the US (a special **twist** that is **non-standard** to RBAC, but is useful for the tutorial)\n- a user with admin role can do anything\n\n### About OPA (Open Policy Agent)\n\n#### Why use OPA?\nOPA enables decoupling policy from code in your applications, and enables you to evolve your application and your authorization policies (i.e: \"permissions logic\") separately.\n\n#### Who uses OPA?\nCompanies like [Netflix](https://www.youtube.com/watch?v=R6tUNpRpdnY) and [Pinterest](https://www.youtube.com/watch?v=LhgxFICWsA8) built their authorization layer using OPA\n\n### About OPAL (Open Policy Administration Layer)\n[OPAL](https://github.com/permitio/opal) is an administration layer for Open Policy Agent (OPA), detecting changes to both policy and policy data in realtime and pushing live updates to your agents.\n\nOPAL brings open-policy up to the speed needed by live applications. As your application state changes (whether it's via your APIs, DBs, git, S3 or 3rd-party SaaS services), OPAL will make sure your services are always in sync with the authorization data and policy they need (and only those they need).\n\nCheck out OPAL's main site at [OPAL.ac](https://opal.ac).\n\n\u003cimg src=\"https://i.ibb.co/CvmX8rR/simplified-diagram-highlight.png\" alt=\"simplified\" border=\"0\"\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpermitio%2Fopal-example-policy-repo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpermitio%2Fopal-example-policy-repo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpermitio%2Fopal-example-policy-repo/lists"}