{"id":18715093,"url":"https://github.com/cerbos/cerbos-sdk-ruby","last_synced_at":"2025-04-12T13:08:04.320Z","repository":{"id":37082914,"uuid":"486591925","full_name":"cerbos/cerbos-sdk-ruby","owner":"cerbos","description":"Ruby SDK for authorization via Cerbos","archived":false,"fork":false,"pushed_at":"2024-11-05T10:27:36.000Z","size":323,"stargazers_count":6,"open_issues_count":0,"forks_count":3,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-11-05T11:36:57.781Z","etag":null,"topics":["authorization","cerbos","ruby"],"latest_commit_sha":null,"homepage":"","language":"Ruby","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/cerbos.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","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-04-28T12:49:01.000Z","updated_at":"2024-11-05T10:27:39.000Z","dependencies_parsed_at":"2023-09-26T11:39:38.343Z","dependency_job_id":"494dbfff-676c-444f-a54d-072781329e60","html_url":"https://github.com/cerbos/cerbos-sdk-ruby","commit_stats":{"total_commits":78,"total_committers":2,"mean_commits":39.0,"dds":"0.33333333333333337","last_synced_commit":"d16f20ba50b9295eef19e4ec1a696f934454016c"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cerbos%2Fcerbos-sdk-ruby","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cerbos%2Fcerbos-sdk-ruby/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cerbos%2Fcerbos-sdk-ruby/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cerbos%2Fcerbos-sdk-ruby/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cerbos","download_url":"https://codeload.github.com/cerbos/cerbos-sdk-ruby/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":["authorization","cerbos","ruby"],"created_at":"2024-11-07T13:07:33.489Z","updated_at":"2024-11-07T13:07:33.938Z","avatar_url":"https://github.com/cerbos.png","language":"Ruby","readme":"# Cerbos Ruby SDK\n\n[![Gem](https://img.shields.io/gem/v/cerbos?style=flat-square)](https://rubygems.org/gems/cerbos)\n\u0026ensp;\n[![Documentation](https://img.shields.io/badge/yard-docs-blue?style=flat-square)](https://www.rubydoc.info/gems/cerbos)\n\n[Cerbos](https://cerbos.dev) helps you super-charge your authorization implementation by writing context-aware access control policies for your application resources.\nAuthor access rules using an intuitive YAML configuration language, use your Git-ops infrastructure to test and deploy them, and make simple API requests to the Cerbos policy decision point (PDP) server to evaluate the policies and make dynamic access decisions.\n\nThe Cerbos Ruby SDK makes it easy to interact with the Cerbos PDP from your Ruby applications.\n\n## Prerequisites\n\n- Cerbos 0.16+\n- Ruby 3.1+\n\n## Installation\n\nInstall the gem and add it to your application's Gemfile by running\n\n```console\n$ bundle add cerbos\n```\n\nIf you're not using Bundler to manage dependencies, install the gem by running\n\n```console\n$ gem install cerbos\n```\n\n## Example usage\n\n```ruby\nclient = Cerbos::Client.new(\"localhost:3593\", tls: false)\n\ndecision = client.check_resource(\n  principal: {\n    id: \"user@example.com\",\n    roles: [\"USER\"],\n  },\n  resource: {\n    kind: \"document\",\n    id: \"1\",\n    attr: {\n      owner: \"author@example.com\"\n    }\n  },\n  actions: [\"view\", \"edit\"]\n)\n\ndecision.allow?(\"view\") # =\u003e true\ndecision.allow?(\"edit\") # =\u003e false\n```\n\nFor more details, [see the `Client` documentation](https://www.rubydoc.info/gems/cerbos/Cerbos/Client).\n\n## Further reading\n\n- [API reference](https://www.rubydoc.info/gems/cerbos/Cerbos)\n- [Cerbos documentation](https://docs.cerbos.dev)\n\n## Get help\n\n- [Join the Cerbos community on Slack](http://go.cerbos.io/slack)\n- [Email us at help@cerbos.dev](mailto:help@cerbos.dev)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcerbos%2Fcerbos-sdk-ruby","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcerbos%2Fcerbos-sdk-ruby","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcerbos%2Fcerbos-sdk-ruby/lists"}