{"id":18715134,"url":"https://github.com/cerbos/demo-admin-api","last_synced_at":"2025-04-12T13:06:38.208Z","repository":{"id":103109208,"uuid":"556911858","full_name":"cerbos/demo-admin-api","owner":"cerbos","description":null,"archived":false,"fork":false,"pushed_at":"2024-04-25T09:08:51.000Z","size":288,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-06-21T15:44:17.727Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cerbos.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2022-10-24T18:49:32.000Z","updated_at":"2024-04-25T09:08:52.000Z","dependencies_parsed_at":null,"dependency_job_id":"f6ec34bf-8e36-4911-8750-59d9ede748d1","html_url":"https://github.com/cerbos/demo-admin-api","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/cerbos%2Fdemo-admin-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cerbos%2Fdemo-admin-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cerbos%2Fdemo-admin-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cerbos%2Fdemo-admin-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cerbos","download_url":"https://codeload.github.com/cerbos/demo-admin-api/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223518540,"owners_count":17158689,"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-07T13:07:40.926Z","updated_at":"2024-11-07T13:07:41.563Z","avatar_url":"https://github.com/cerbos.png","language":"Go","readme":"# Admin API demo\n\nA demo implementation of a Golang backend with APIs for creating, updating and validating policies using the [Admin API](https://docs.cerbos.dev/cerbos/latest/api/admin_api.html). The demo also provides a sample client (built in React) which utilises the API.\n\nThe client provides basic policy creation, as well as an editing interface (via the [Monaco editor](https://microsoft.github.io/monaco-editor/)) which continually validates the policy and allows updates.\n\n## Dependencies\n\n- Docker for running the [Cerbos Policy Decision Point (PDP)](https://docs.cerbos.dev/cerbos/latest/installation/container.html), or both services via `docker-compose`\n- Golang 1.19 (required if running manually)\n- Node.js (required if running manually)\n\n## Getting started\n\n### Manually\n\n1. Start up the Cerbos PDP instance docker container. This will be called by the Go app to check authorization.\n\n```sh\ncd cerbos\n./start.sh\n```\n\n2. Build the React front end\n\n```sh\n# from project root\ncd client\nnpm i\nnpm run build\n```\n\n3. Start the Go server\n\n```sh\n# from project root\ngo run main.go\n```\n\n4. Open the web app at `localhost:8090`\n\n### Docker-compose\n\n```sh\ndocker-compose up -d\n```\n\n## Audit logs\n\nA separate endpoint is provided demoing the retrieval of audit logs from the PDP:\n\n```sh\ncurl \"http://localhost:8090/auditlog\"\n```\n\n## Other considerations\n\n- Similar APIs are provided by the AdminClient which allow management of Schemas.\n- The Admin API is under heavy development, and might include breaking changes in future releases. This demo represents it's current state.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcerbos%2Fdemo-admin-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcerbos%2Fdemo-admin-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcerbos%2Fdemo-admin-api/lists"}