-
-
Notifications
You must be signed in to change notification settings - Fork 347
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: first API draft and generation #315
Changes from 7 commits
31589cf
a2176cc
2289c30
0f0879e
4aed11f
c8b04c3
4b104d1
94c1347
ae750db
2e756f4
d2cd210
4d2c847
393a639
db6c6f6
3f45059
5425b72
456adfd
db1c755
e7440c9
4219c6a
63eec13
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
// Copyright 2020 Google LLC | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What is the purpose of this file? I could not find any documentation in GAPIC that would explain the need for this. Also, the Copyright Google is probably a copy/paste error? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, I'll remove and put it back for gapic PR then. |
||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
syntax = "proto3"; | ||
|
||
package google.api; | ||
|
||
import "google/protobuf/descriptor.proto"; | ||
|
||
option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations"; | ||
option java_multiple_files = true; | ||
option java_outer_classname = "ClientProto"; | ||
option java_package = "com.google.api"; | ||
option objc_class_prefix = "GAPI"; | ||
|
||
extend google.protobuf.MethodOptions { | ||
// A definition of a client library method signature. | ||
// | ||
// In client libraries, each proto RPC corresponds to one or more methods | ||
// which the end user is able to call, and calls the underlying RPC. | ||
// Normally, this method receives a single argument (a struct or instance | ||
// corresponding to the RPC request object). Defining this field will | ||
// add one or more overloads providing flattened or simpler method signatures | ||
// in some languages. | ||
// | ||
// The fields on the method signature are provided as a comma-separated | ||
// string. | ||
// | ||
// For example, the proto RPC and annotation: | ||
// | ||
// rpc CreateSubscription(CreateSubscriptionRequest) | ||
// returns (Subscription) { | ||
// option (google.api.method_signature) = "name,topic"; | ||
// } | ||
// | ||
// Would add the following Java overload (in addition to the method accepting | ||
// the request object): | ||
// | ||
// public final Subscription createSubscription(String name, String topic) | ||
// | ||
// The following backwards-compatibility guidelines apply: | ||
// | ||
// * Adding this annotation to an unannotated method is backwards | ||
// compatible. | ||
// * Adding this annotation to a method which already has existing | ||
// method signature annotations is backwards compatible if and only if | ||
// the new method signature annotation is last in the sequence. | ||
// * Modifying or removing an existing method signature annotation is | ||
// a breaking change. | ||
// * Re-ordering existing method signature annotations is a breaking | ||
// change. | ||
repeated string method_signature = 1051; | ||
} | ||
|
||
extend google.protobuf.ServiceOptions { | ||
// The hostname for this service. | ||
// This should be specified with no prefix or protocol. | ||
// | ||
// Example: | ||
// | ||
// service Foo { | ||
// option (google.api.default_host) = "foo.googleapi.com"; | ||
// ... | ||
// } | ||
string default_host = 1049; | ||
|
||
// OAuth scopes needed for the client. | ||
// | ||
// Example: | ||
// | ||
// service Foo { | ||
// option (google.api.oauth_scopes) = \ | ||
// "https://www.googleapis.com/auth/cloud-platform"; | ||
// ... | ||
// } | ||
// | ||
// If there is more than one scope, use a comma-separated string: | ||
// | ||
// Example: | ||
// | ||
// service Foo { | ||
// option (google.api.oauth_scopes) = \ | ||
// "https://www.googleapis.com/auth/cloud-platform," | ||
// "https://www.googleapis.com/auth/monitoring"; | ||
// ... | ||
// } | ||
string oauth_scopes = 1050; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Notes | ||
|
||
> ORY Keto is still a `sandbox` project. | ||
This makes the included api version `v1` subject | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we maybe make this There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Okay, I wasn't sure whether we release next gen keto with a stable v1 directly, but this is not how it goes, since users will be using the service very early I guess. In protobuf we can use If we go that path we will always need to write version mappings of the messages versions on server side (map Sure, we can do this! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Wouldn't it be possible to go with There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would remove support for old versions immediately and guarantee compatibility only at a point where we are confident that not much will change. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It depends on how long we have the alpha/beta versions public and how many clients are using an older version before we should remove them. Generally the goal is to reach v1 as soon as possible. This is how versioning is usually seen for ProtoBuf APIs:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Right, that's what I think as well. So we just start with |
||
to have breaking changes until the `v1.0.0` release of Keto! | ||
|
||
This directory contains the ProtoBuf & gRPC definitions | ||
for the Access Control APIs. | ||
|
||
This includes: | ||
- ACL | ||
- Soon: | ||
- RBAC | ||
- ABAC | ||
|
||
**ACL is the flexible and scalable "base system" | ||
where all other access control schemes built upon.** | ||
|
||
## Directory layout | ||
|
||
```shell script | ||
keto | ||
└── acl / rbac / abac | ||
├── node | ||
│ └── v1 - Intercommunication API (cluster internal) | ||
├── admin | ||
│ └── v1 - Admin API definitions | ||
└── v1 - "Base" API definitions | ||
``` | ||
|
||
- `admin` - API for critical administrative tasks | ||
- namespace config management | ||
- retrieval of cluster system statistics / analysis | ||
- etc. | ||
- `base/v1` - Base APIs / models | ||
- read/write/watch/... services | ||
- `node` - Intercommunication of cluster nodes |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# coming soon | ||
Built upon [ACL](../acl). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please always add the newlines in the end of files 😉