authzed 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE +201 -0
- data/README.md +68 -0
- data/lib/authzed/api/v0/acl_service_pb.rb +102 -0
- data/lib/authzed/api/v0/acl_service_services_pb.rb +31 -0
- data/lib/authzed/api/v0/core_pb.rb +78 -0
- data/lib/authzed/api/v0/developer_pb.rb +123 -0
- data/lib/authzed/api/v0/developer_services_pb.rb +30 -0
- data/lib/authzed/api/v0/namespace_pb.rb +82 -0
- data/lib/authzed/api/v0/namespace_service_pb.rb +37 -0
- data/lib/authzed/api/v0/namespace_service_services_pb.rb +27 -0
- data/lib/authzed/api/v0/watch_service_pb.rb +27 -0
- data/lib/authzed/api/v0/watch_service_services_pb.rb +26 -0
- data/lib/authzed/api/v1alpha1/schema_pb.rb +32 -0
- data/lib/authzed/api/v1alpha1/schema_services_pb.rb +36 -0
- data/lib/authzed.rb +14 -0
- metadata +62 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: d9075c7150852dae34510b7e08f6000b5fef15c53908d68e48eb30a38952ca66
|
4
|
+
data.tar.gz: a08da7d303c4d43441cb45cca1bc15a21fd4945425d0067203f7082a502c73ba
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: c2d302f5c93cd931b68af5945c9b8211bf086c2e5f8a833ca091e2d5c76ffbc23be3882263a3ada9111bad41aa02051e086b2af68a81c2d7e1bc757974a05a1a
|
7
|
+
data.tar.gz: 002ae50d35ffc1ee1e60aa9959d05e2a680b30ad968966478756964d94b4f680dabe54fffeba3ec42c37b01cd2c76cd00c1047f206058fd46d1a62efc9c2145f
|
data/LICENSE
ADDED
@@ -0,0 +1,201 @@
|
|
1
|
+
Apache License
|
2
|
+
Version 2.0, January 2004
|
3
|
+
http://www.apache.org/licenses/
|
4
|
+
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
6
|
+
|
7
|
+
1. Definitions.
|
8
|
+
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
11
|
+
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
13
|
+
the copyright owner that is granting the License.
|
14
|
+
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
16
|
+
other entities that control, are controlled by, or are under common
|
17
|
+
control with that entity. For the purposes of this definition,
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
19
|
+
direction or management of such entity, whether by contract or
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
22
|
+
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
24
|
+
exercising permissions granted by this License.
|
25
|
+
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
27
|
+
including but not limited to software source code, documentation
|
28
|
+
source, and configuration files.
|
29
|
+
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
31
|
+
transformation or translation of a Source form, including but
|
32
|
+
not limited to compiled object code, generated documentation,
|
33
|
+
and conversions to other media types.
|
34
|
+
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
36
|
+
Object form, made available under the License, as indicated by a
|
37
|
+
copyright notice that is included in or attached to the work
|
38
|
+
(an example is provided in the Appendix below).
|
39
|
+
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
46
|
+
the Work and Derivative Works thereof.
|
47
|
+
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
49
|
+
the original version of the Work and any modifications or additions
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
61
|
+
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
64
|
+
subsequently incorporated within the Work.
|
65
|
+
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
72
|
+
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
78
|
+
where such license applies only to those patent claims licensable
|
79
|
+
by such Contributor that are necessarily infringed by their
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
82
|
+
institute patent litigation against any entity (including a
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
85
|
+
or contributory patent infringement, then any patent licenses
|
86
|
+
granted to You under this License for that Work shall terminate
|
87
|
+
as of the date such litigation is filed.
|
88
|
+
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
91
|
+
modifications, and in Source or Object form, provided that You
|
92
|
+
meet the following conditions:
|
93
|
+
|
94
|
+
(a) You must give any other recipients of the Work or
|
95
|
+
Derivative Works a copy of this License; and
|
96
|
+
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
98
|
+
stating that You changed the files; and
|
99
|
+
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
102
|
+
attribution notices from the Source form of the Work,
|
103
|
+
excluding those notices that do not pertain to any part of
|
104
|
+
the Derivative Works; and
|
105
|
+
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
108
|
+
include a readable copy of the attribution notices contained
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
111
|
+
of the following places: within a NOTICE text file distributed
|
112
|
+
as part of the Derivative Works; within the Source form or
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
114
|
+
within a display generated by the Derivative Works, if and
|
115
|
+
wherever such third-party notices normally appear. The contents
|
116
|
+
of the NOTICE file are for informational purposes only and
|
117
|
+
do not modify the License. You may add Your own attribution
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
120
|
+
that such additional attribution notices cannot be construed
|
121
|
+
as modifying the License.
|
122
|
+
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
124
|
+
may provide additional or different license terms and conditions
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
128
|
+
the conditions stated in this License.
|
129
|
+
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
133
|
+
this License, without any additional terms or conditions.
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
135
|
+
the terms of any separate license agreement you may have executed
|
136
|
+
with Licensor regarding such Contributions.
|
137
|
+
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
140
|
+
except as required for reasonable and customary use in describing the
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
142
|
+
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
152
|
+
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
158
|
+
incidental, or consequential damages of any character arising as a
|
159
|
+
result of this License or out of the use or inability to use the
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
162
|
+
other commercial damages or losses), even if such Contributor
|
163
|
+
has been advised of the possibility of such damages.
|
164
|
+
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
168
|
+
or other liability obligations and/or rights consistent with this
|
169
|
+
License. However, in accepting such obligations, You may act only
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
174
|
+
of your accepting any such warranty or additional liability.
|
175
|
+
|
176
|
+
END OF TERMS AND CONDITIONS
|
177
|
+
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
179
|
+
|
180
|
+
To apply the Apache License to your work, attach the following
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
182
|
+
replaced with your own identifying information. (Don't include
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
184
|
+
comment syntax for the file format. We also recommend that a
|
185
|
+
file or class name and description of purpose be included on the
|
186
|
+
same "printed page" as the copyright notice for easier
|
187
|
+
identification within third-party archives.
|
188
|
+
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
190
|
+
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
192
|
+
you may not use this file except in compliance with the License.
|
193
|
+
You may obtain a copy of the License at
|
194
|
+
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
196
|
+
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
200
|
+
See the License for the specific language governing permissions and
|
201
|
+
limitations under the License.
|
data/README.md
ADDED
@@ -0,0 +1,68 @@
|
|
1
|
+
# Authzed Ruby Client
|
2
|
+
|
3
|
+
[![Ruby Gems](https://img.shields.io/gem/v/authzed?include_prereleases)](https://rubygems.org/gems/authzed)
|
4
|
+
[![License](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](https://www.apache.org/licenses/LICENSE-2.0.html)
|
5
|
+
[![Build Status](https://github.com/authzed/authzed-rb/workflows/build/badge.svg)](https://github.com/authzed/authzed-rb/actions)
|
6
|
+
[![Mailing List](https://img.shields.io/badge/email-google%20groups-4285F4)](https://groups.google.com/g/authzed-oss)
|
7
|
+
[![Discord Server](https://img.shields.io/discord/844600078504951838?color=7289da&logo=discord "Discord Server")](https://discord.gg/jTysUaxXzM)
|
8
|
+
[![Twitter](https://img.shields.io/twitter/follow/authzed?color=%23179CF0&logo=twitter&style=flat-square)](https://twitter.com/authzed)
|
9
|
+
|
10
|
+
This repository houses the Ruby client library for Authzed.
|
11
|
+
|
12
|
+
[Authzed] is a database and service that stores, computes, and validates your application's permissions.
|
13
|
+
|
14
|
+
Developers create a schema that models their permissions requirements and use a client library, such as this one, to apply the schema to the database, insert data into the database, and query the data to efficiently check permissions in their applications.
|
15
|
+
|
16
|
+
Supported client API versions:
|
17
|
+
- [v1alpha1](https://docs.authzed.com/reference/api#authzedapiv1alpha1)
|
18
|
+
- [v0](https://docs.authzed.com/reference/api#authzedapiv0)
|
19
|
+
|
20
|
+
You can find more info on each API on the [Authzed API reference documentation].
|
21
|
+
Additionally, Protobuf API documentation can be found on the [Buf Registry Authzed API repository].
|
22
|
+
|
23
|
+
See [CONTRIBUTING.md] for instructions on how to contribute and perform common tasks like building the project and running tests.
|
24
|
+
|
25
|
+
[Authzed]: https://authzed.com
|
26
|
+
[Authzed API Reference documentation]: https://docs.authzed.com/reference/api
|
27
|
+
[Buf Registry Authzed API repository]: https://buf.build/authzed/api/docs/main
|
28
|
+
[CONTRIBUTING.md]: CONTRIBUTING.md
|
29
|
+
|
30
|
+
## Getting Started
|
31
|
+
|
32
|
+
We highly recommend following the **[Protecting Your First App]** guide to learn the latest best practice to integrate an application with Authzed.
|
33
|
+
|
34
|
+
If you're interested in examples of a specific version of the API, they can be found in their respective folders in the [examples directory].
|
35
|
+
|
36
|
+
[Protecting Your First App]: https://docs.authzed.com/guides/first-app
|
37
|
+
[examples directory]: /examples
|
38
|
+
|
39
|
+
## Basic Usage
|
40
|
+
|
41
|
+
### Installation
|
42
|
+
|
43
|
+
This project is packaged as the gem `authzed` on [Ruby Gems].
|
44
|
+
|
45
|
+
The command to install the library is:
|
46
|
+
|
47
|
+
```sh
|
48
|
+
gem install authzed
|
49
|
+
```
|
50
|
+
|
51
|
+
[Ruby Gems]: https://rubygems.org
|
52
|
+
|
53
|
+
### Initializing a client
|
54
|
+
|
55
|
+
In 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:
|
56
|
+
|
57
|
+
[Bearer Token]: https://datatracker.ietf.org/doc/html/rfc6750#section-2.1
|
58
|
+
[Authzed Dashboard]: https://app.authzed.com
|
59
|
+
|
60
|
+
```rb
|
61
|
+
TODO
|
62
|
+
```
|
63
|
+
|
64
|
+
### Performing an API call
|
65
|
+
|
66
|
+
```rb
|
67
|
+
TODO
|
68
|
+
```
|
@@ -0,0 +1,102 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: authzed/api/v0/acl_service.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
require 'authzed/api/v0/core_pb'
|
7
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
8
|
+
add_file("authzed/api/v0/acl_service.proto", :syntax => :proto3) do
|
9
|
+
add_message "authzed.api.v0.RelationTupleFilter" do
|
10
|
+
optional :namespace, :string, 1, json_name: "namespace"
|
11
|
+
optional :object_id, :string, 2, json_name: "objectId"
|
12
|
+
optional :relation, :string, 3, json_name: "relation"
|
13
|
+
optional :userset, :message, 5, "authzed.api.v0.ObjectAndRelation", json_name: "userset"
|
14
|
+
repeated :filters, :enum, 6, "authzed.api.v0.RelationTupleFilter.Filter", json_name: "filters"
|
15
|
+
end
|
16
|
+
add_enum "authzed.api.v0.RelationTupleFilter.Filter" do
|
17
|
+
value :UNKNOWN, 0
|
18
|
+
value :OBJECT_ID, 1
|
19
|
+
value :RELATION, 2
|
20
|
+
value :USERSET, 4
|
21
|
+
end
|
22
|
+
add_message "authzed.api.v0.ReadRequest" do
|
23
|
+
repeated :tuplesets, :message, 1, "authzed.api.v0.RelationTupleFilter", json_name: "tuplesets"
|
24
|
+
optional :at_revision, :message, 2, "authzed.api.v0.Zookie", json_name: "atRevision"
|
25
|
+
end
|
26
|
+
add_message "authzed.api.v0.ReadResponse" do
|
27
|
+
repeated :tuplesets, :message, 1, "authzed.api.v0.ReadResponse.Tupleset", json_name: "tuplesets"
|
28
|
+
optional :revision, :message, 2, "authzed.api.v0.Zookie", json_name: "revision"
|
29
|
+
end
|
30
|
+
add_message "authzed.api.v0.ReadResponse.Tupleset" do
|
31
|
+
repeated :tuples, :message, 1, "authzed.api.v0.RelationTuple", json_name: "tuples"
|
32
|
+
end
|
33
|
+
add_message "authzed.api.v0.WriteRequest" do
|
34
|
+
repeated :write_conditions, :message, 1, "authzed.api.v0.RelationTuple", json_name: "writeConditions"
|
35
|
+
repeated :updates, :message, 2, "authzed.api.v0.RelationTupleUpdate", json_name: "updates"
|
36
|
+
end
|
37
|
+
add_message "authzed.api.v0.WriteResponse" do
|
38
|
+
optional :revision, :message, 1, "authzed.api.v0.Zookie", json_name: "revision"
|
39
|
+
end
|
40
|
+
add_message "authzed.api.v0.CheckRequest" do
|
41
|
+
optional :test_userset, :message, 1, "authzed.api.v0.ObjectAndRelation", json_name: "testUserset"
|
42
|
+
optional :user, :message, 2, "authzed.api.v0.User", json_name: "user"
|
43
|
+
optional :at_revision, :message, 3, "authzed.api.v0.Zookie", json_name: "atRevision"
|
44
|
+
end
|
45
|
+
add_message "authzed.api.v0.ContentChangeCheckRequest" do
|
46
|
+
optional :test_userset, :message, 1, "authzed.api.v0.ObjectAndRelation", json_name: "testUserset"
|
47
|
+
optional :user, :message, 2, "authzed.api.v0.User", json_name: "user"
|
48
|
+
end
|
49
|
+
add_message "authzed.api.v0.CheckResponse" do
|
50
|
+
optional :is_member, :bool, 1, json_name: "isMember"
|
51
|
+
optional :revision, :message, 2, "authzed.api.v0.Zookie", json_name: "revision"
|
52
|
+
optional :membership, :enum, 3, "authzed.api.v0.CheckResponse.Membership", json_name: "membership"
|
53
|
+
end
|
54
|
+
add_enum "authzed.api.v0.CheckResponse.Membership" do
|
55
|
+
value :UNKNOWN, 0
|
56
|
+
value :NOT_MEMBER, 1
|
57
|
+
value :MEMBER, 2
|
58
|
+
end
|
59
|
+
add_message "authzed.api.v0.ExpandRequest" do
|
60
|
+
optional :userset, :message, 1, "authzed.api.v0.ObjectAndRelation", json_name: "userset"
|
61
|
+
optional :at_revision, :message, 2, "authzed.api.v0.Zookie", json_name: "atRevision"
|
62
|
+
end
|
63
|
+
add_message "authzed.api.v0.ExpandResponse" do
|
64
|
+
optional :tree_node, :message, 1, "authzed.api.v0.RelationTupleTreeNode", json_name: "treeNode"
|
65
|
+
optional :revision, :message, 3, "authzed.api.v0.Zookie", json_name: "revision"
|
66
|
+
end
|
67
|
+
add_message "authzed.api.v0.LookupRequest" do
|
68
|
+
optional :object_relation, :message, 1, "authzed.api.v0.RelationReference", json_name: "objectRelation"
|
69
|
+
optional :user, :message, 2, "authzed.api.v0.ObjectAndRelation", json_name: "user"
|
70
|
+
optional :at_revision, :message, 3, "authzed.api.v0.Zookie", json_name: "atRevision"
|
71
|
+
optional :page_reference, :string, 4, json_name: "pageReference"
|
72
|
+
optional :limit, :uint32, 5, json_name: "limit"
|
73
|
+
end
|
74
|
+
add_message "authzed.api.v0.LookupResponse" do
|
75
|
+
repeated :resolved_object_ids, :string, 1, json_name: "resolvedObjectIds"
|
76
|
+
optional :next_page_reference, :string, 2, json_name: "nextPageReference"
|
77
|
+
optional :revision, :message, 3, "authzed.api.v0.Zookie", json_name: "revision"
|
78
|
+
end
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
82
|
+
module Authzed
|
83
|
+
module Api
|
84
|
+
module V0
|
85
|
+
RelationTupleFilter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.RelationTupleFilter").msgclass
|
86
|
+
RelationTupleFilter::Filter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.RelationTupleFilter.Filter").enummodule
|
87
|
+
ReadRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.ReadRequest").msgclass
|
88
|
+
ReadResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.ReadResponse").msgclass
|
89
|
+
ReadResponse::Tupleset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.ReadResponse.Tupleset").msgclass
|
90
|
+
WriteRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.WriteRequest").msgclass
|
91
|
+
WriteResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.WriteResponse").msgclass
|
92
|
+
CheckRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.CheckRequest").msgclass
|
93
|
+
ContentChangeCheckRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.ContentChangeCheckRequest").msgclass
|
94
|
+
CheckResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.CheckResponse").msgclass
|
95
|
+
CheckResponse::Membership = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.CheckResponse.Membership").enummodule
|
96
|
+
ExpandRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.ExpandRequest").msgclass
|
97
|
+
ExpandResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.ExpandResponse").msgclass
|
98
|
+
LookupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.LookupRequest").msgclass
|
99
|
+
LookupResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.LookupResponse").msgclass
|
100
|
+
end
|
101
|
+
end
|
102
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# Source: authzed/api/v0/acl_service.proto for package 'authzed.api.v0'
|
3
|
+
|
4
|
+
require 'grpc'
|
5
|
+
require 'authzed/api/v0/acl_service_pb'
|
6
|
+
|
7
|
+
module Authzed
|
8
|
+
module Api
|
9
|
+
module V0
|
10
|
+
module ACLService
|
11
|
+
class Service
|
12
|
+
|
13
|
+
include ::GRPC::GenericService
|
14
|
+
|
15
|
+
self.marshal_class_method = :encode
|
16
|
+
self.unmarshal_class_method = :decode
|
17
|
+
self.service_name = 'authzed.api.v0.ACLService'
|
18
|
+
|
19
|
+
rpc :Read, ::Authzed::Api::V0::ReadRequest, ::Authzed::Api::V0::ReadResponse
|
20
|
+
rpc :Write, ::Authzed::Api::V0::WriteRequest, ::Authzed::Api::V0::WriteResponse
|
21
|
+
rpc :Check, ::Authzed::Api::V0::CheckRequest, ::Authzed::Api::V0::CheckResponse
|
22
|
+
rpc :ContentChangeCheck, ::Authzed::Api::V0::ContentChangeCheckRequest, ::Authzed::Api::V0::CheckResponse
|
23
|
+
rpc :Expand, ::Authzed::Api::V0::ExpandRequest, ::Authzed::Api::V0::ExpandResponse
|
24
|
+
rpc :Lookup, ::Authzed::Api::V0::LookupRequest, ::Authzed::Api::V0::LookupResponse
|
25
|
+
end
|
26
|
+
|
27
|
+
Stub = Service.rpc_stub_class
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,78 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: authzed/api/v0/core.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
7
|
+
add_file("authzed/api/v0/core.proto", :syntax => :proto3) do
|
8
|
+
add_message "authzed.api.v0.RelationTuple" do
|
9
|
+
optional :object_and_relation, :message, 1, "authzed.api.v0.ObjectAndRelation", json_name: "objectAndRelation"
|
10
|
+
optional :user, :message, 2, "authzed.api.v0.User", json_name: "user"
|
11
|
+
end
|
12
|
+
add_message "authzed.api.v0.ObjectAndRelation" do
|
13
|
+
optional :namespace, :string, 1, json_name: "namespace"
|
14
|
+
optional :object_id, :string, 2, json_name: "objectId"
|
15
|
+
optional :relation, :string, 3, json_name: "relation"
|
16
|
+
end
|
17
|
+
add_message "authzed.api.v0.RelationReference" do
|
18
|
+
optional :namespace, :string, 1, json_name: "namespace"
|
19
|
+
optional :relation, :string, 3, json_name: "relation"
|
20
|
+
end
|
21
|
+
add_message "authzed.api.v0.User" do
|
22
|
+
oneof :user_oneof do
|
23
|
+
optional :userset, :message, 2, "authzed.api.v0.ObjectAndRelation", json_name: "userset"
|
24
|
+
end
|
25
|
+
end
|
26
|
+
add_message "authzed.api.v0.Zookie" do
|
27
|
+
optional :token, :string, 1, json_name: "token"
|
28
|
+
end
|
29
|
+
add_message "authzed.api.v0.RelationTupleUpdate" do
|
30
|
+
optional :operation, :enum, 1, "authzed.api.v0.RelationTupleUpdate.Operation", json_name: "operation"
|
31
|
+
optional :tuple, :message, 2, "authzed.api.v0.RelationTuple", json_name: "tuple"
|
32
|
+
end
|
33
|
+
add_enum "authzed.api.v0.RelationTupleUpdate.Operation" do
|
34
|
+
value :UNKNOWN, 0
|
35
|
+
value :CREATE, 1
|
36
|
+
value :TOUCH, 2
|
37
|
+
value :DELETE, 3
|
38
|
+
end
|
39
|
+
add_message "authzed.api.v0.RelationTupleTreeNode" do
|
40
|
+
optional :expanded, :message, 3, "authzed.api.v0.ObjectAndRelation", json_name: "expanded"
|
41
|
+
oneof :node_type do
|
42
|
+
optional :intermediate_node, :message, 1, "authzed.api.v0.SetOperationUserset", json_name: "intermediateNode"
|
43
|
+
optional :leaf_node, :message, 2, "authzed.api.v0.DirectUserset", json_name: "leafNode"
|
44
|
+
end
|
45
|
+
end
|
46
|
+
add_message "authzed.api.v0.SetOperationUserset" do
|
47
|
+
optional :operation, :enum, 1, "authzed.api.v0.SetOperationUserset.Operation", json_name: "operation"
|
48
|
+
repeated :child_nodes, :message, 2, "authzed.api.v0.RelationTupleTreeNode", json_name: "childNodes"
|
49
|
+
end
|
50
|
+
add_enum "authzed.api.v0.SetOperationUserset.Operation" do
|
51
|
+
value :INVALID, 0
|
52
|
+
value :UNION, 1
|
53
|
+
value :INTERSECTION, 2
|
54
|
+
value :EXCLUSION, 3
|
55
|
+
end
|
56
|
+
add_message "authzed.api.v0.DirectUserset" do
|
57
|
+
repeated :users, :message, 1, "authzed.api.v0.User", json_name: "users"
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
module Authzed
|
63
|
+
module Api
|
64
|
+
module V0
|
65
|
+
RelationTuple = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.RelationTuple").msgclass
|
66
|
+
ObjectAndRelation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.ObjectAndRelation").msgclass
|
67
|
+
RelationReference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.RelationReference").msgclass
|
68
|
+
User = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.User").msgclass
|
69
|
+
Zookie = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.Zookie").msgclass
|
70
|
+
RelationTupleUpdate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.RelationTupleUpdate").msgclass
|
71
|
+
RelationTupleUpdate::Operation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.RelationTupleUpdate.Operation").enummodule
|
72
|
+
RelationTupleTreeNode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.RelationTupleTreeNode").msgclass
|
73
|
+
SetOperationUserset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.SetOperationUserset").msgclass
|
74
|
+
SetOperationUserset::Operation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.SetOperationUserset.Operation").enummodule
|
75
|
+
DirectUserset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.DirectUserset").msgclass
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
@@ -0,0 +1,123 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: authzed/api/v0/developer.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
require 'authzed/api/v0/core_pb'
|
7
|
+
require 'authzed/api/v0/namespace_pb'
|
8
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
9
|
+
add_file("authzed/api/v0/developer.proto", :syntax => :proto3) do
|
10
|
+
add_message "authzed.api.v0.UpgradeSchemaRequest" do
|
11
|
+
repeated :namespace_configs, :string, 1, json_name: "namespaceConfigs"
|
12
|
+
end
|
13
|
+
add_message "authzed.api.v0.UpgradeSchemaResponse" do
|
14
|
+
optional :error, :message, 1, "authzed.api.v0.DeveloperError", json_name: "error"
|
15
|
+
optional :upgraded_schema, :string, 2, json_name: "upgradedSchema"
|
16
|
+
end
|
17
|
+
add_message "authzed.api.v0.ShareRequest" do
|
18
|
+
optional :schema, :string, 1, json_name: "schema"
|
19
|
+
optional :relationships_yaml, :string, 2, json_name: "relationshipsYaml"
|
20
|
+
optional :validation_yaml, :string, 3, json_name: "validationYaml"
|
21
|
+
optional :assertions_yaml, :string, 4, json_name: "assertionsYaml"
|
22
|
+
end
|
23
|
+
add_message "authzed.api.v0.ShareResponse" do
|
24
|
+
optional :share_reference, :string, 1, json_name: "shareReference"
|
25
|
+
end
|
26
|
+
add_message "authzed.api.v0.LookupShareRequest" do
|
27
|
+
optional :share_reference, :string, 1, json_name: "shareReference"
|
28
|
+
end
|
29
|
+
add_message "authzed.api.v0.LookupShareResponse" do
|
30
|
+
optional :status, :enum, 1, "authzed.api.v0.LookupShareResponse.LookupStatus", json_name: "status"
|
31
|
+
optional :schema, :string, 2, json_name: "schema"
|
32
|
+
optional :relationships_yaml, :string, 3, json_name: "relationshipsYaml"
|
33
|
+
optional :validation_yaml, :string, 4, json_name: "validationYaml"
|
34
|
+
optional :assertions_yaml, :string, 5, json_name: "assertionsYaml"
|
35
|
+
end
|
36
|
+
add_enum "authzed.api.v0.LookupShareResponse.LookupStatus" do
|
37
|
+
value :UNKNOWN_REFERENCE, 0
|
38
|
+
value :FAILED_TO_LOOKUP, 1
|
39
|
+
value :VALID_REFERENCE, 2
|
40
|
+
value :UPGRADED_REFERENCE, 3
|
41
|
+
end
|
42
|
+
add_message "authzed.api.v0.RequestContext" do
|
43
|
+
optional :schema, :string, 1, json_name: "schema"
|
44
|
+
repeated :relationships, :message, 2, "authzed.api.v0.RelationTuple", json_name: "relationships"
|
45
|
+
end
|
46
|
+
add_message "authzed.api.v0.EditCheckRequest" do
|
47
|
+
optional :context, :message, 1, "authzed.api.v0.RequestContext", json_name: "context"
|
48
|
+
repeated :check_relationships, :message, 2, "authzed.api.v0.RelationTuple", json_name: "checkRelationships"
|
49
|
+
end
|
50
|
+
add_message "authzed.api.v0.EditCheckResult" do
|
51
|
+
optional :relationship, :message, 1, "authzed.api.v0.RelationTuple", json_name: "relationship"
|
52
|
+
optional :is_member, :bool, 2, json_name: "isMember"
|
53
|
+
optional :error, :message, 3, "authzed.api.v0.DeveloperError", json_name: "error"
|
54
|
+
end
|
55
|
+
add_message "authzed.api.v0.EditCheckResponse" do
|
56
|
+
repeated :request_errors, :message, 1, "authzed.api.v0.DeveloperError", json_name: "requestErrors"
|
57
|
+
repeated :check_results, :message, 2, "authzed.api.v0.EditCheckResult", json_name: "checkResults"
|
58
|
+
end
|
59
|
+
add_message "authzed.api.v0.ValidateRequest" do
|
60
|
+
optional :context, :message, 1, "authzed.api.v0.RequestContext", json_name: "context"
|
61
|
+
optional :validation_yaml, :string, 3, json_name: "validationYaml"
|
62
|
+
optional :update_validation_yaml, :bool, 4, json_name: "updateValidationYaml"
|
63
|
+
optional :assertions_yaml, :string, 5, json_name: "assertionsYaml"
|
64
|
+
end
|
65
|
+
add_message "authzed.api.v0.ValidateResponse" do
|
66
|
+
repeated :request_errors, :message, 1, "authzed.api.v0.DeveloperError", json_name: "requestErrors"
|
67
|
+
repeated :validation_errors, :message, 2, "authzed.api.v0.DeveloperError", json_name: "validationErrors"
|
68
|
+
optional :updated_validation_yaml, :string, 3, json_name: "updatedValidationYaml"
|
69
|
+
end
|
70
|
+
add_message "authzed.api.v0.DeveloperError" do
|
71
|
+
optional :message, :string, 1, json_name: "message"
|
72
|
+
optional :line, :uint32, 2, json_name: "line"
|
73
|
+
optional :column, :uint32, 3, json_name: "column"
|
74
|
+
optional :source, :enum, 4, "authzed.api.v0.DeveloperError.Source", json_name: "source"
|
75
|
+
optional :kind, :enum, 5, "authzed.api.v0.DeveloperError.ErrorKind", json_name: "kind"
|
76
|
+
repeated :path, :string, 6, json_name: "path"
|
77
|
+
optional :context, :string, 7, json_name: "context"
|
78
|
+
end
|
79
|
+
add_enum "authzed.api.v0.DeveloperError.Source" do
|
80
|
+
value :UNKNOWN_SOURCE, 0
|
81
|
+
value :SCHEMA, 1
|
82
|
+
value :RELATIONSHIP, 2
|
83
|
+
value :VALIDATION_YAML, 3
|
84
|
+
value :CHECK_WATCH, 4
|
85
|
+
value :ASSERTION, 5
|
86
|
+
end
|
87
|
+
add_enum "authzed.api.v0.DeveloperError.ErrorKind" do
|
88
|
+
value :UNKNOWN_KIND, 0
|
89
|
+
value :PARSE_ERROR, 1
|
90
|
+
value :SCHEMA_ISSUE, 2
|
91
|
+
value :DUPLICATE_RELATIONSHIP, 3
|
92
|
+
value :MISSING_EXPECTED_RELATIONSHIP, 4
|
93
|
+
value :EXTRA_RELATIONSHIP_FOUND, 5
|
94
|
+
value :UNKNOWN_OBJECT_TYPE, 6
|
95
|
+
value :UNKNOWN_RELATION, 7
|
96
|
+
value :MAXIMUM_RECURSION, 8
|
97
|
+
value :ASSERTION_FAILED, 9
|
98
|
+
end
|
99
|
+
end
|
100
|
+
end
|
101
|
+
|
102
|
+
module Authzed
|
103
|
+
module Api
|
104
|
+
module V0
|
105
|
+
UpgradeSchemaRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.UpgradeSchemaRequest").msgclass
|
106
|
+
UpgradeSchemaResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.UpgradeSchemaResponse").msgclass
|
107
|
+
ShareRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.ShareRequest").msgclass
|
108
|
+
ShareResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.ShareResponse").msgclass
|
109
|
+
LookupShareRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.LookupShareRequest").msgclass
|
110
|
+
LookupShareResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.LookupShareResponse").msgclass
|
111
|
+
LookupShareResponse::LookupStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.LookupShareResponse.LookupStatus").enummodule
|
112
|
+
RequestContext = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.RequestContext").msgclass
|
113
|
+
EditCheckRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.EditCheckRequest").msgclass
|
114
|
+
EditCheckResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.EditCheckResult").msgclass
|
115
|
+
EditCheckResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.EditCheckResponse").msgclass
|
116
|
+
ValidateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.ValidateRequest").msgclass
|
117
|
+
ValidateResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.ValidateResponse").msgclass
|
118
|
+
DeveloperError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.DeveloperError").msgclass
|
119
|
+
DeveloperError::Source = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.DeveloperError.Source").enummodule
|
120
|
+
DeveloperError::ErrorKind = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.DeveloperError.ErrorKind").enummodule
|
121
|
+
end
|
122
|
+
end
|
123
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# Source: authzed/api/v0/developer.proto for package 'authzed.api.v0'
|
3
|
+
|
4
|
+
require 'grpc'
|
5
|
+
require 'authzed/api/v0/developer_pb'
|
6
|
+
|
7
|
+
module Authzed
|
8
|
+
module Api
|
9
|
+
module V0
|
10
|
+
module DeveloperService
|
11
|
+
class Service
|
12
|
+
|
13
|
+
include ::GRPC::GenericService
|
14
|
+
|
15
|
+
self.marshal_class_method = :encode
|
16
|
+
self.unmarshal_class_method = :decode
|
17
|
+
self.service_name = 'authzed.api.v0.DeveloperService'
|
18
|
+
|
19
|
+
rpc :EditCheck, ::Authzed::Api::V0::EditCheckRequest, ::Authzed::Api::V0::EditCheckResponse
|
20
|
+
rpc :Validate, ::Authzed::Api::V0::ValidateRequest, ::Authzed::Api::V0::ValidateResponse
|
21
|
+
rpc :Share, ::Authzed::Api::V0::ShareRequest, ::Authzed::Api::V0::ShareResponse
|
22
|
+
rpc :LookupShared, ::Authzed::Api::V0::LookupShareRequest, ::Authzed::Api::V0::LookupShareResponse
|
23
|
+
rpc :UpgradeSchema, ::Authzed::Api::V0::UpgradeSchemaRequest, ::Authzed::Api::V0::UpgradeSchemaResponse
|
24
|
+
end
|
25
|
+
|
26
|
+
Stub = Service.rpc_stub_class
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,82 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: authzed/api/v0/namespace.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
require 'google/protobuf/any_pb'
|
7
|
+
require 'authzed/api/v0/core_pb'
|
8
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
9
|
+
add_file("authzed/api/v0/namespace.proto", :syntax => :proto3) do
|
10
|
+
add_message "authzed.api.v0.Metadata" do
|
11
|
+
repeated :metadata_message, :message, 1, "google.protobuf.Any", json_name: "metadataMessage"
|
12
|
+
end
|
13
|
+
add_message "authzed.api.v0.NamespaceDefinition" do
|
14
|
+
optional :name, :string, 1, json_name: "name"
|
15
|
+
repeated :relation, :message, 2, "authzed.api.v0.Relation", json_name: "relation"
|
16
|
+
optional :metadata, :message, 3, "authzed.api.v0.Metadata", json_name: "metadata"
|
17
|
+
end
|
18
|
+
add_message "authzed.api.v0.Relation" do
|
19
|
+
optional :name, :string, 1, json_name: "name"
|
20
|
+
optional :userset_rewrite, :message, 2, "authzed.api.v0.UsersetRewrite", json_name: "usersetRewrite"
|
21
|
+
optional :type_information, :message, 3, "authzed.api.v0.TypeInformation", json_name: "typeInformation"
|
22
|
+
optional :metadata, :message, 4, "authzed.api.v0.Metadata", json_name: "metadata"
|
23
|
+
end
|
24
|
+
add_message "authzed.api.v0.TypeInformation" do
|
25
|
+
repeated :allowed_direct_relations, :message, 1, "authzed.api.v0.RelationReference", json_name: "allowedDirectRelations"
|
26
|
+
end
|
27
|
+
add_message "authzed.api.v0.UsersetRewrite" do
|
28
|
+
oneof :rewrite_operation do
|
29
|
+
optional :union, :message, 1, "authzed.api.v0.SetOperation", json_name: "union"
|
30
|
+
optional :intersection, :message, 2, "authzed.api.v0.SetOperation", json_name: "intersection"
|
31
|
+
optional :exclusion, :message, 3, "authzed.api.v0.SetOperation", json_name: "exclusion"
|
32
|
+
end
|
33
|
+
end
|
34
|
+
add_message "authzed.api.v0.SetOperation" do
|
35
|
+
repeated :child, :message, 1, "authzed.api.v0.SetOperation.Child", json_name: "child"
|
36
|
+
end
|
37
|
+
add_message "authzed.api.v0.SetOperation.Child" do
|
38
|
+
oneof :child_type do
|
39
|
+
optional :_this, :message, 1, "authzed.api.v0.SetOperation.Child.This", json_name: "This"
|
40
|
+
optional :computed_userset, :message, 2, "authzed.api.v0.ComputedUserset", json_name: "computedUserset"
|
41
|
+
optional :tuple_to_userset, :message, 3, "authzed.api.v0.TupleToUserset", json_name: "tupleToUserset"
|
42
|
+
optional :userset_rewrite, :message, 4, "authzed.api.v0.UsersetRewrite", json_name: "usersetRewrite"
|
43
|
+
end
|
44
|
+
end
|
45
|
+
add_message "authzed.api.v0.SetOperation.Child.This" do
|
46
|
+
end
|
47
|
+
add_message "authzed.api.v0.TupleToUserset" do
|
48
|
+
optional :tupleset, :message, 1, "authzed.api.v0.TupleToUserset.Tupleset", json_name: "tupleset"
|
49
|
+
optional :computed_userset, :message, 2, "authzed.api.v0.ComputedUserset", json_name: "computedUserset"
|
50
|
+
end
|
51
|
+
add_message "authzed.api.v0.TupleToUserset.Tupleset" do
|
52
|
+
optional :relation, :string, 1, json_name: "relation"
|
53
|
+
end
|
54
|
+
add_message "authzed.api.v0.ComputedUserset" do
|
55
|
+
optional :object, :enum, 1, "authzed.api.v0.ComputedUserset.Object", json_name: "object"
|
56
|
+
optional :relation, :string, 2, json_name: "relation"
|
57
|
+
end
|
58
|
+
add_enum "authzed.api.v0.ComputedUserset.Object" do
|
59
|
+
value :TUPLE_OBJECT, 0
|
60
|
+
value :TUPLE_USERSET_OBJECT, 1
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
module Authzed
|
66
|
+
module Api
|
67
|
+
module V0
|
68
|
+
Metadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.Metadata").msgclass
|
69
|
+
NamespaceDefinition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.NamespaceDefinition").msgclass
|
70
|
+
Relation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.Relation").msgclass
|
71
|
+
TypeInformation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.TypeInformation").msgclass
|
72
|
+
UsersetRewrite = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.UsersetRewrite").msgclass
|
73
|
+
SetOperation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.SetOperation").msgclass
|
74
|
+
SetOperation::Child = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.SetOperation.Child").msgclass
|
75
|
+
SetOperation::Child::This = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.SetOperation.Child.This").msgclass
|
76
|
+
TupleToUserset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.TupleToUserset").msgclass
|
77
|
+
TupleToUserset::Tupleset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.TupleToUserset.Tupleset").msgclass
|
78
|
+
ComputedUserset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.ComputedUserset").msgclass
|
79
|
+
ComputedUserset::Object = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.ComputedUserset.Object").enummodule
|
80
|
+
end
|
81
|
+
end
|
82
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: authzed/api/v0/namespace_service.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
require 'authzed/api/v0/core_pb'
|
7
|
+
require 'authzed/api/v0/namespace_pb'
|
8
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
9
|
+
add_file("authzed/api/v0/namespace_service.proto", :syntax => :proto3) do
|
10
|
+
add_message "authzed.api.v0.ReadConfigRequest" do
|
11
|
+
optional :namespace, :string, 1, json_name: "namespace"
|
12
|
+
optional :at_revision, :message, 2, "authzed.api.v0.Zookie", json_name: "atRevision"
|
13
|
+
end
|
14
|
+
add_message "authzed.api.v0.ReadConfigResponse" do
|
15
|
+
optional :namespace, :string, 1, json_name: "namespace"
|
16
|
+
optional :config, :message, 2, "authzed.api.v0.NamespaceDefinition", json_name: "config"
|
17
|
+
optional :revision, :message, 4, "authzed.api.v0.Zookie", json_name: "revision"
|
18
|
+
end
|
19
|
+
add_message "authzed.api.v0.WriteConfigRequest" do
|
20
|
+
repeated :configs, :message, 2, "authzed.api.v0.NamespaceDefinition", json_name: "configs"
|
21
|
+
end
|
22
|
+
add_message "authzed.api.v0.WriteConfigResponse" do
|
23
|
+
optional :revision, :message, 1, "authzed.api.v0.Zookie", json_name: "revision"
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
module Authzed
|
29
|
+
module Api
|
30
|
+
module V0
|
31
|
+
ReadConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.ReadConfigRequest").msgclass
|
32
|
+
ReadConfigResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.ReadConfigResponse").msgclass
|
33
|
+
WriteConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.WriteConfigRequest").msgclass
|
34
|
+
WriteConfigResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.WriteConfigResponse").msgclass
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# Source: authzed/api/v0/namespace_service.proto for package 'authzed.api.v0'
|
3
|
+
|
4
|
+
require 'grpc'
|
5
|
+
require 'authzed/api/v0/namespace_service_pb'
|
6
|
+
|
7
|
+
module Authzed
|
8
|
+
module Api
|
9
|
+
module V0
|
10
|
+
module NamespaceService
|
11
|
+
class Service
|
12
|
+
|
13
|
+
include ::GRPC::GenericService
|
14
|
+
|
15
|
+
self.marshal_class_method = :encode
|
16
|
+
self.unmarshal_class_method = :decode
|
17
|
+
self.service_name = 'authzed.api.v0.NamespaceService'
|
18
|
+
|
19
|
+
rpc :ReadConfig, ::Authzed::Api::V0::ReadConfigRequest, ::Authzed::Api::V0::ReadConfigResponse
|
20
|
+
rpc :WriteConfig, ::Authzed::Api::V0::WriteConfigRequest, ::Authzed::Api::V0::WriteConfigResponse
|
21
|
+
end
|
22
|
+
|
23
|
+
Stub = Service.rpc_stub_class
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: authzed/api/v0/watch_service.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
require 'authzed/api/v0/core_pb'
|
7
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
8
|
+
add_file("authzed/api/v0/watch_service.proto", :syntax => :proto3) do
|
9
|
+
add_message "authzed.api.v0.WatchRequest" do
|
10
|
+
repeated :namespaces, :string, 1, json_name: "namespaces"
|
11
|
+
optional :start_revision, :message, 2, "authzed.api.v0.Zookie", json_name: "startRevision"
|
12
|
+
end
|
13
|
+
add_message "authzed.api.v0.WatchResponse" do
|
14
|
+
repeated :updates, :message, 1, "authzed.api.v0.RelationTupleUpdate", json_name: "updates"
|
15
|
+
optional :end_revision, :message, 2, "authzed.api.v0.Zookie", json_name: "endRevision"
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
module Authzed
|
21
|
+
module Api
|
22
|
+
module V0
|
23
|
+
WatchRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.WatchRequest").msgclass
|
24
|
+
WatchResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v0.WatchResponse").msgclass
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# Source: authzed/api/v0/watch_service.proto for package 'authzed.api.v0'
|
3
|
+
|
4
|
+
require 'grpc'
|
5
|
+
require 'authzed/api/v0/watch_service_pb'
|
6
|
+
|
7
|
+
module Authzed
|
8
|
+
module Api
|
9
|
+
module V0
|
10
|
+
module WatchService
|
11
|
+
class Service
|
12
|
+
|
13
|
+
include ::GRPC::GenericService
|
14
|
+
|
15
|
+
self.marshal_class_method = :encode
|
16
|
+
self.unmarshal_class_method = :decode
|
17
|
+
self.service_name = 'authzed.api.v0.WatchService'
|
18
|
+
|
19
|
+
rpc :Watch, ::Authzed::Api::V0::WatchRequest, stream(::Authzed::Api::V0::WatchResponse)
|
20
|
+
end
|
21
|
+
|
22
|
+
Stub = Service.rpc_stub_class
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: authzed/api/v1alpha1/schema.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
7
|
+
add_file("authzed/api/v1alpha1/schema.proto", :syntax => :proto3) do
|
8
|
+
add_message "authzed.api.v1alpha1.ReadSchemaRequest" do
|
9
|
+
repeated :object_definitions_names, :string, 1, json_name: "objectDefinitionsNames"
|
10
|
+
end
|
11
|
+
add_message "authzed.api.v1alpha1.ReadSchemaResponse" do
|
12
|
+
repeated :object_definitions, :string, 1, json_name: "objectDefinitions"
|
13
|
+
end
|
14
|
+
add_message "authzed.api.v1alpha1.WriteSchemaRequest" do
|
15
|
+
optional :schema, :string, 1, json_name: "schema"
|
16
|
+
end
|
17
|
+
add_message "authzed.api.v1alpha1.WriteSchemaResponse" do
|
18
|
+
repeated :object_definitions_names, :string, 1, json_name: "objectDefinitionsNames"
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
module Authzed
|
24
|
+
module Api
|
25
|
+
module V1alpha1
|
26
|
+
ReadSchemaRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v1alpha1.ReadSchemaRequest").msgclass
|
27
|
+
ReadSchemaResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v1alpha1.ReadSchemaResponse").msgclass
|
28
|
+
WriteSchemaRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v1alpha1.WriteSchemaRequest").msgclass
|
29
|
+
WriteSchemaResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("authzed.api.v1alpha1.WriteSchemaResponse").msgclass
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# Source: authzed/api/v1alpha1/schema.proto for package 'authzed.api.v1alpha1'
|
3
|
+
|
4
|
+
require 'grpc'
|
5
|
+
require 'authzed/api/v1alpha1/schema_pb'
|
6
|
+
|
7
|
+
module Authzed
|
8
|
+
module Api
|
9
|
+
module V1alpha1
|
10
|
+
module SchemaService
|
11
|
+
# SchemaService implements operations on a Permissions System's Schema.
|
12
|
+
class Service
|
13
|
+
|
14
|
+
include ::GRPC::GenericService
|
15
|
+
|
16
|
+
self.marshal_class_method = :encode
|
17
|
+
self.unmarshal_class_method = :decode
|
18
|
+
self.service_name = 'authzed.api.v1alpha1.SchemaService'
|
19
|
+
|
20
|
+
# Read returns the current Object Definitions for a Permissions System.
|
21
|
+
#
|
22
|
+
# Errors include:
|
23
|
+
# - INVALID_ARGUMENT: a provided value has failed to semantically validate
|
24
|
+
# - NOT_FOUND: one of the Object Definitions being requested does not exist
|
25
|
+
rpc :ReadSchema, ::Authzed::Api::V1alpha1::ReadSchemaRequest, ::Authzed::Api::V1alpha1::ReadSchemaResponse
|
26
|
+
# Write overwrites the current Object Definitions for a Permissions System.
|
27
|
+
#
|
28
|
+
# Any Object Definitions that exist, but are not included will be deleted.
|
29
|
+
rpc :WriteSchema, ::Authzed::Api::V1alpha1::WriteSchemaRequest, ::Authzed::Api::V1alpha1::WriteSchemaResponse
|
30
|
+
end
|
31
|
+
|
32
|
+
Stub = Service.rpc_stub_class
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
data/lib/authzed.rb
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
require 'authzed/api/v0/acl_service_pb'
|
2
|
+
require 'authzed/api/v0/acl_service_services_pb'
|
3
|
+
require 'authzed/api/v0/core_pb'
|
4
|
+
require 'authzed/api/v0/developer_pb'
|
5
|
+
require 'authzed/api/v0/developer_services_pb'
|
6
|
+
require 'authzed/api/v0/namespace_pb'
|
7
|
+
require 'authzed/api/v0/namespace_service_pb'
|
8
|
+
require 'authzed/api/v0/namespace_service_services_pb'
|
9
|
+
require 'authzed/api/v0/watch_service_pb'
|
10
|
+
require 'authzed/api/v0/watch_service_services_pb'
|
11
|
+
require 'authzed/api/v1alpha1/schema_pb'
|
12
|
+
|
13
|
+
module Authzed
|
14
|
+
end
|
metadata
ADDED
@@ -0,0 +1,62 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: authzed
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Authzed
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2021-08-24 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
13
|
+
description: Authzed is the best way to build robust and scalable permissions systems.
|
14
|
+
See https://authzed.com for more details.
|
15
|
+
email: support@authzed.com
|
16
|
+
executables: []
|
17
|
+
extensions: []
|
18
|
+
extra_rdoc_files: []
|
19
|
+
files:
|
20
|
+
- LICENSE
|
21
|
+
- README.md
|
22
|
+
- lib/authzed.rb
|
23
|
+
- lib/authzed/api/v0/acl_service_pb.rb
|
24
|
+
- lib/authzed/api/v0/acl_service_services_pb.rb
|
25
|
+
- lib/authzed/api/v0/core_pb.rb
|
26
|
+
- lib/authzed/api/v0/developer_pb.rb
|
27
|
+
- lib/authzed/api/v0/developer_services_pb.rb
|
28
|
+
- lib/authzed/api/v0/namespace_pb.rb
|
29
|
+
- lib/authzed/api/v0/namespace_service_pb.rb
|
30
|
+
- lib/authzed/api/v0/namespace_service_services_pb.rb
|
31
|
+
- lib/authzed/api/v0/watch_service_pb.rb
|
32
|
+
- lib/authzed/api/v0/watch_service_services_pb.rb
|
33
|
+
- lib/authzed/api/v1alpha1/schema_pb.rb
|
34
|
+
- lib/authzed/api/v1alpha1/schema_services_pb.rb
|
35
|
+
homepage: https://authzed.com
|
36
|
+
licenses:
|
37
|
+
- Apache-2.0
|
38
|
+
metadata:
|
39
|
+
bug_tracker_uri: https://github.com/authzed/authzed-rb/issues
|
40
|
+
github_repo: ssh://github.com/authzed/authzed-rb
|
41
|
+
homepage_uri: https://authzed.com
|
42
|
+
source_code_uri: https://github.com/authzed/authzed-rb
|
43
|
+
post_install_message:
|
44
|
+
rdoc_options: []
|
45
|
+
require_paths:
|
46
|
+
- lib
|
47
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
48
|
+
requirements:
|
49
|
+
- - ">="
|
50
|
+
- !ruby/object:Gem::Version
|
51
|
+
version: '0'
|
52
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
53
|
+
requirements:
|
54
|
+
- - ">="
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
version: '0'
|
57
|
+
requirements: []
|
58
|
+
rubygems_version: 3.0.1
|
59
|
+
signing_key:
|
60
|
+
specification_version: 4
|
61
|
+
summary: Ruby bindings for Authzed API
|
62
|
+
test_files: []
|