{"id":13520974,"url":"https://github.com/authzed/authzed-rb","last_synced_at":"2025-04-06T04:11:01.622Z","repository":{"id":38238607,"uuid":"337195647","full_name":"authzed/authzed-rb","owner":"authzed","description":"Official SpiceDB client library for Ruby","archived":false,"fork":false,"pushed_at":"2025-03-10T20:52:33.000Z","size":104999,"stargazers_count":17,"open_issues_count":2,"forks_count":13,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-03-30T21:45:42.150Z","etag":null,"topics":["acl","authorization","authzed","authzed-client","fine-grained-access-control","fine-grained-authorization","grpc","grpc-ruby","permissions","ruby","sdk","security","security-tools","spicedb","spicedb-client","zanzibar"],"latest_commit_sha":null,"homepage":"https://authzed.com/docs","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/authzed.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE-OF-CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-02-08T20:06:39.000Z","updated_at":"2025-03-10T20:52:37.000Z","dependencies_parsed_at":"2024-01-13T20:39:34.866Z","dependency_job_id":"d61a36a0-8a92-4a0e-8ee0-3396d0d95a66","html_url":"https://github.com/authzed/authzed-rb","commit_stats":{"total_commits":166,"total_committers":9,"mean_commits":"18.444444444444443","dds":0.6927710843373494,"last_synced_commit":"079bf4ecc1ae58fe0bb6211d2aeb485086f2811c"},"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/authzed%2Fauthzed-rb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/authzed%2Fauthzed-rb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/authzed%2Fauthzed-rb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/authzed%2Fauthzed-rb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/authzed","download_url":"https://codeload.github.com/authzed/authzed-rb/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247430870,"owners_count":20937874,"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":["acl","authorization","authzed","authzed-client","fine-grained-access-control","fine-grained-authorization","grpc","grpc-ruby","permissions","ruby","sdk","security","security-tools","spicedb","spicedb-client","zanzibar"],"created_at":"2024-08-01T06:00:25.341Z","updated_at":"2025-04-06T04:11:01.603Z","avatar_url":"https://github.com/authzed.png","language":"Ruby","readme":"# Authzed Ruby Client\n\n[![Ruby Gems](https://img.shields.io/gem/v/authzed?include_prereleases)](https://rubygems.org/gems/authzed)\n[![Docs](https://img.shields.io/badge/docs-authzed.com-%234B4B6C \"Authzed Documentation\")](https://docs.authzed.com)\n[![License](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](https://www.apache.org/licenses/LICENSE-2.0.html)\n[![Build Status](https://github.com/authzed/authzed-rb/workflows/build/badge.svg)](https://github.com/authzed/authzed-rb/actions)\n[![Discord Server](https://img.shields.io/discord/844600078504951838?color=7289da\u0026logo=discord \"Discord Server\")](https://discord.gg/jTysUaxXzM)\n[![Twitter](https://img.shields.io/twitter/follow/authzed?color=%23179CF0\u0026logo=twitter\u0026style=flat-square)](https://twitter.com/authzed)\n\nThis repository houses the official Ruby client library for Authzed and SpiceDB.\n\n[SpiceDB] is a database system for managing security-critical permissions checking.\n\nSpiceDB acts as a centralized service that stores authorization data.\nOnce stored, data can be performantly queried to answer questions such as \"Does this user have access to this resource?\" and \"What are all the resources this user has access to?\".\n\n[Authzed] operates the globally available, serverless database platform for SpiceDB.\n\nSupported client API versions:\n- [v1](https://buf.build/authzed/api/docs/main/authzed.api.v1)\n\nYou can find more info about the API in the [Authzed Documentation API Reference] or the [Authzed API Buf Registry repository].\n\nSee [CONTRIBUTING.md] for instructions on how to contribute and perform common tasks like building the project and running tests.\n\n[SpiceDB]: https://github.com/authzed/spicedb\n[Authzed]: https://authzed.com\n[Authzed Documentation API Reference]: https://docs.authzed.com/reference/api\n[Authzed API Buf Registry repository]: https://buf.build/authzed/api\n[CONTRIBUTING.md]: CONTRIBUTING.md\n[Discord]: https://authzed.com/discord\n[Urgent]: https://github.com/authzed/authzed-rb/labels/priority%2F0%20urgent\n[High]: https://github.com/authzed/authzed-rb/labels/priority%2F1%20high\n[Medium]: https://github.com/authzed/authzed-rb/labels/priority%2F2%20medium\n[Low]: https://github.com/authzed/authzed-rb/labels/priority%2F3%20low\n[Maybe]: https://github.com/authzed/authzed-rb/labels/priority%2F4%20maybe\n[good first issues]: https://github.com/authzed-rb/spicedb/labels/hint%2Fgood%20first%20issue\n\n## Getting Started\n\nWe highly recommend following the **[Protecting Your First App]** guide to learn the latest best practice to integrate an application with Authzed.\n\nIf you're interested in example uses of the API, see the spec files in the [spec directory].\n\n[Protecting Your First App]: https://docs.authzed.com/guides/first-app\n[spec directory]: /spec\n\n## Basic Usage\n\n### Installation\n\nThis project is packaged as the gem `authzed` on [Ruby Gems].\n\nThe command to install the library is:\n\n```sh\ngem install authzed\n```\n\n[Ruby Gems]: https://rubygems.org\n\n### Initializing a client\n\nIn order to successfully connect, you will have to provide a [Bearer Token] with your own API Token from the [Authzed dashboard] in place of `t_your_token_here_1234567deadbeef` in the following example:\n\n[Bearer Token]: https://datatracker.ietf.org/doc/html/rfc6750#section-2.1\n[Authzed Dashboard]: https://app.authzed.com\n\n```rb\nrequire 'authzed'\n\n\nclient = Authzed::Api::V1::Client.new(\n    target: \"localhost:50051\",\n    credentials: :this_channel_is_insecure,\n    interceptors: [Authzed::GrpcUtil::BearerToken.new(token: \"somerandomkeyhere\")],\n)\n```\n\n### Performing an API call\n\n```rb\nrequire 'authzed'\n\n# Is Emilia in the set of users that can read post #1?\nresp = client.permissions_service.check_permission(\n  Authzed::Api::V1::CheckPermissionRequest.new(\n    consistency: Authzed::Api::V1::Consistency.new(\n      at_least_as_fresh: Authzed::Api::V1::ZedToken.new(token: zed_token)\n    ),\n    resource: Authzed::Api::V1::ObjectReference.new(object_type: 'blog/post', object_id: '1'),\n    permission: 'read',\n    subject: Authzed::Api::V1::SubjectReference.new(\n      object: Authzed::Api::V1::ObjectReference.new(object_type: 'blog/user', object_id: 'emilia')\n    )\n  )\n)\ncan_read = Authzed::Api::V1::CheckPermissionResponse::Permissionship.resolve(resp.permissionship) ==\n  Authzed::Api::V1::CheckPermissionResponse::Permissionship::PERMISSIONSHIP_HAS_PERMISSION\n```\n","funding_links":[],"categories":["Clients","Ruby"],"sub_categories":["Official Libraries"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fauthzed%2Fauthzed-rb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fauthzed%2Fauthzed-rb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fauthzed%2Fauthzed-rb/lists"}