Pathing updated to support new and old styles (#323)

This commit is contained in:
Todd Knight authored and GitHub committed 2020-09-02 19:43:41 -07:00
1 parent 2a98432143
commit 37e56ab46b
85 files changed
+11689 -4462

No files matched your search

@@ -14,41 +14,44 @@ import "controller/custom_options/v1/options.proto";
message AuthMethod {
// The ID of the AuthMethod
// Output only.
string id = 1;
string id = 10;
// The id of the scope this resource is a part of
string scope_id = 20 [json_name="scope_id"];
// Scope information for this resource
// Output only.
resources.scopes.v1.ScopeInfo scope = 2;
resources.scopes.v1.ScopeInfo scope = 30;
// Optional name for identification purposes
google.protobuf.StringValue name = 3 [(custom_options.v1.generate_sdk_option) = true, (custom_options.v1.mask_mapping) = {this:"name" that: "name"}];
google.protobuf.StringValue name = 40 [(custom_options.v1.generate_sdk_option) = true, (custom_options.v1.mask_mapping) = {this:"name" that: "name"}];
// Optional user-set description for identification purposes
google.protobuf.StringValue description = 4 [(custom_options.v1.generate_sdk_option) = true, (custom_options.v1.mask_mapping) = {this:"description" that: "description"}];
google.protobuf.StringValue description = 50 [(custom_options.v1.generate_sdk_option) = true, (custom_options.v1.mask_mapping) = {this:"description" that: "description"}];
// The time this resource was created
// Output only.
google.protobuf.Timestamp created_time = 5 [json_name="created_time"];
google.protobuf.Timestamp created_time = 60 [json_name="created_time"];
// The time this resource was last updated.
// Output only.
google.protobuf.Timestamp updated_time = 6 [json_name="updated_time"];
google.protobuf.Timestamp updated_time = 70 [json_name="updated_time"];
// The version can be used in subsequent write requests to ensure this resource
// has not changed and to fail the write if it has.
uint32 version = 7;
uint32 version = 80;
// The auth method type. This can be "password" or "oidc".
string type = 8;
string type = 90;
// The attributes that are applied for the specific Auth Method type.
google.protobuf.Struct attributes = 9 [(custom_options.v1.generate_sdk_option) = true];
google.protobuf.Struct attributes = 100 [(custom_options.v1.generate_sdk_option) = true];
}
message PasswordAuthMethodAttributes {
// The minimum length allowed for user names for accounts in this auth method.
uint32 min_login_name_length = 1 [(custom_options.v1.generate_sdk_option) = true, (custom_options.v1.mask_mapping) = {this:"attributes.min_login_name_length" that: "MinLoginNameLength"}];
uint32 min_login_name_length = 10 [(custom_options.v1.generate_sdk_option) = true, (custom_options.v1.mask_mapping) = {this:"attributes.min_login_name_length" that: "MinLoginNameLength"}];
// The minimum length allowed for passwords for accounts in this auth method.
uint32 min_password_length = 2 [(custom_options.v1.generate_sdk_option) = true, (custom_options.v1.mask_mapping) = {this:"attributes.min_password_length" that: "MinPasswordLength"}];
uint32 min_password_length = 20 [(custom_options.v1.generate_sdk_option) = true, (custom_options.v1.mask_mapping) = {this:"attributes.min_password_length" that: "MinPasswordLength"}];
}
@@ -12,39 +12,42 @@ import "controller/api/resources/scopes/v1/scope.proto";
message AuthToken {
// The ID of the AuthToken
// Output only.
string id = 1;
string id = 10;
// The scope this auth token is in.
string scope_id = 20 [json_name="scope_id"];
// Scope information for this resource
// Output only.
resources.scopes.v1.ScopeInfo scope = 2;
resources.scopes.v1.ScopeInfo scope = 30;
// The token value, which will only be populated after authentication and is
// only ever visible to the end user whose login request resulted in this
// auth token being created.
// Output only.
string token = 3;
string token = 40;
// The id of the user of this AuthToken.
// Output only.
string user_id = 4 [json_name="user_id"];
string user_id = 50 [json_name="user_id"];
// The id of the user of this AuthToken.
// Output only.
string auth_method_id = 5 [json_name="auth_method_id"];
string auth_method_id = 60 [json_name="auth_method_id"];
// The time this resource was created
// Output only.
google.protobuf.Timestamp created_time = 6 [json_name="created_time"];
google.protobuf.Timestamp created_time = 70 [json_name="created_time"];
// The time this resource was last updated.
// Output only.
google.protobuf.Timestamp updated_time = 7 [json_name="updated_time"];
google.protobuf.Timestamp updated_time = 80 [json_name="updated_time"];
// The approximate time this AuthToken was last used.
// Output only.
google.protobuf.Timestamp approximate_last_used_time = 8 [json_name = "approximate_last_used_time"];
google.protobuf.Timestamp approximate_last_used_time = 90 [json_name = "approximate_last_used_time"];
// The time this AuthToken expires.
// Output only.
google.protobuf.Timestamp expiration_time = 9 [json_name="expiration_time"];
google.protobuf.Timestamp expiration_time = 100 [json_name="expiration_time"];
}
@@ -25,33 +25,36 @@ message Group {
// Output only.
string id = 10;
// The id of the scope this resource is a part of.
string scope_id = 20 [json_name="scope_id"];
// Scope information for this resource
// Output only.
resources.scopes.v1.ScopeInfo scope = 20;
resources.scopes.v1.ScopeInfo scope = 30;
// Optional name for identification purposes
google.protobuf.StringValue name = 30 [(custom_options.v1.generate_sdk_option) = true, (custom_options.v1.mask_mapping) = {this:"name" that: "name"}];
google.protobuf.StringValue name = 40 [(custom_options.v1.generate_sdk_option) = true, (custom_options.v1.mask_mapping) = {this:"name" that: "name"}];
// Optional user-set descripton for identification purposes
google.protobuf.StringValue description = 40 [(custom_options.v1.generate_sdk_option) = true, (custom_options.v1.mask_mapping) = {this:"description" that: "description"}];
google.protobuf.StringValue description = 50 [(custom_options.v1.generate_sdk_option) = true, (custom_options.v1.mask_mapping) = {this:"description" that: "description"}];
// The time this resource was created
// Output only.
google.protobuf.Timestamp created_time = 50 [json_name="created_time"];
google.protobuf.Timestamp created_time = 60 [json_name="created_time"];
// The time this resource was last updated.
// Output only.
google.protobuf.Timestamp updated_time = 60 [json_name="updated_time"];
google.protobuf.Timestamp updated_time = 70 [json_name="updated_time"];
// The version can be used in subsequent write requests to ensure this resource
// has not changed and to fail the write if it has.
uint32 version = 70;
uint32 version = 80;
// Contains the list of member ids in this group.
// Output only.
repeated string member_ids = 80;
repeated string member_ids = 90;
// The members of this group.
// Output only.
repeated Member members = 90;
repeated Member members = 100;
}
@@ -16,31 +16,34 @@ message HostCatalog {
// Output only.
string id = 10;
// The id of the scope this resource belongs to.
string scope_id = 20 [json_name="scope_id"];
// Scope information for this resource
// Output only.
resources.scopes.v1.ScopeInfo scope = 20;
resources.scopes.v1.ScopeInfo scope = 30;
// Optional name for identification purposes
google.protobuf.StringValue name = 30 [(custom_options.v1.generate_sdk_option) = true, (custom_options.v1.mask_mapping) = {this:"name" that: "name"}];
google.protobuf.StringValue name = 40 [(custom_options.v1.generate_sdk_option) = true, (custom_options.v1.mask_mapping) = {this:"name" that: "name"}];
// Optional user-set description for identification purposes
google.protobuf.StringValue description = 40 [(custom_options.v1.generate_sdk_option) = true, (custom_options.v1.mask_mapping) = {this:"description" that: "description"}];
google.protobuf.StringValue description = 50 [(custom_options.v1.generate_sdk_option) = true, (custom_options.v1.mask_mapping) = {this:"description" that: "description"}];
// The time this resource was created
// Output only.
google.protobuf.Timestamp created_time = 50 [json_name="created_time"];
google.protobuf.Timestamp created_time = 60 [json_name="created_time"];
// The time this resource was last updated
// Output only.
google.protobuf.Timestamp updated_time = 60 [json_name="updated_time"];
google.protobuf.Timestamp updated_time = 70 [json_name="updated_time"];
// The version can be used in subsequent write requests to ensure this resource
// has not changed and to fail the write if it has.
uint32 version = 70;
uint32 version = 80;
// The type of the resource, to help differentiate schemas
string type = 80;
string type = 90;
// Attributes specific to the catalog type
google.protobuf.Struct attributes = 90 [(custom_options.v1.generate_sdk_option) = true];
google.protobuf.Struct attributes = 100 [(custom_options.v1.generate_sdk_option) = true];
}
@@ -16,34 +16,34 @@ message Host {
// Output only.
string id = 10;
// The host catalog this host set is a part of
// Output only
string host_catalog_id = 20 [json_name="host_catalog_id"];
// Scope information for this resource
// Output only.
resources.scopes.v1.ScopeInfo scope = 20;
resources.scopes.v1.ScopeInfo scope = 30;
// Optional name for identification purposes
google.protobuf.StringValue name = 30 [(custom_options.v1.generate_sdk_option) = true, (custom_options.v1.mask_mapping) = {this:"name" that: "name"}];
google.protobuf.StringValue name = 40 [(custom_options.v1.generate_sdk_option) = true, (custom_options.v1.mask_mapping) = {this:"name" that: "name"}];
// Optional user-set description for identification purposes
google.protobuf.StringValue description = 40 [(custom_options.v1.generate_sdk_option) = true, (custom_options.v1.mask_mapping) = {this:"description" that: "description"}];
google.protobuf.StringValue description = 50 [(custom_options.v1.generate_sdk_option) = true, (custom_options.v1.mask_mapping) = {this:"description" that: "description"}];
// The time this resource was created
// Output only.
google.protobuf.Timestamp created_time = 50 [json_name="created_time"];
google.protobuf.Timestamp created_time = 60 [json_name="created_time"];
// The time this resource was last updated
// Output only.
google.protobuf.Timestamp updated_time = 60 [json_name="updated_time"];
google.protobuf.Timestamp updated_time = 70 [json_name="updated_time"];
// The version can be used in subsequent write requests to ensure this resource
// has not changed and to fail the write if it has.
uint32 version = 70;
uint32 version = 80;
// The type of the resource, to help differentiate schemas
string type = 80;
// The host catalog this host set is a part of
// Output only
string host_catalog_id = 90 [json_name="host_catalog_id"];
string type = 90;
// A list of host sets this host is in
// Output only.
@@ -57,48 +57,51 @@ message Role {
// Output only.
string id = 10;
// The id of the scope this resource is in.
string scope_id = 20 [json_name="scope_id"];
// Scope information for this resource
// Output only.
resources.scopes.v1.ScopeInfo scope = 20;
resources.scopes.v1.ScopeInfo scope = 30;
// Optional name for identification purposes
google.protobuf.StringValue name = 30 [(custom_options.v1.generate_sdk_option) = true, (custom_options.v1.mask_mapping) = {this:"name" that: "name"}];
google.protobuf.StringValue name = 40 [(custom_options.v1.generate_sdk_option) = true, (custom_options.v1.mask_mapping) = {this:"name" that: "name"}];
// Optional user-set description for identification purposes
google.protobuf.StringValue description = 40 [(custom_options.v1.generate_sdk_option) = true, (custom_options.v1.mask_mapping) = {this:"description" that: "description"}];
google.protobuf.StringValue description = 50 [(custom_options.v1.generate_sdk_option) = true, (custom_options.v1.mask_mapping) = {this:"description" that: "description"}];
// The time this resource was created
// Output only.
google.protobuf.Timestamp created_time = 50 [json_name="created_time"];
google.protobuf.Timestamp created_time = 60 [json_name="created_time"];
// The time this resource was last updated.
// Output only.
google.protobuf.Timestamp updated_time = 60 [json_name="updated_time"];
google.protobuf.Timestamp updated_time = 70 [json_name="updated_time"];
// The version can be used in subsequent write requests to ensure this resource
// has not changed and to fail the write if it has.
uint32 version = 70;
uint32 version = 80;
// The scope the grants will apply to. If the role is at the global scope,
// this can be an org or project. If the role is at an org
// scope, this can be a project within the org. It is invalid for
// this to be anything other than the role's scope when the role's scope is
// a project.
google.protobuf.StringValue grant_scope_id = 80 [json_name="grant_scope_id", (custom_options.v1.generate_sdk_option) = true, (custom_options.v1.mask_mapping) = {this:"grant_scope_id" that: "GrantScopeId"}];
google.protobuf.StringValue grant_scope_id = 90 [json_name="grant_scope_id", (custom_options.v1.generate_sdk_option) = true, (custom_options.v1.mask_mapping) = {this:"grant_scope_id" that: "GrantScopeId"}];
// The IDs (only) of principals that are assigned to this role.
// Output only.
repeated string principal_ids = 90 [json_name="principal_ids"];
repeated string principal_ids = 100 [json_name="principal_ids"];
// The principals that are assigned to this role.
// Output only.
repeated Principal principals = 100;
repeated Principal principals = 110;
// The grants that this role provides for its principals.
// Output only.
repeated string grant_strings = 110 [json_name="grant_strings"];
repeated string grant_strings = 120 [json_name="grant_strings"];
// The parsed grant information.
// Output only.
repeated Grant grants = 120;
repeated Grant grants = 130;
}
@@ -36,26 +36,29 @@ message Scope {
// Output only.
string id = 10;
// The id of the scope this resource is in.
string scope_id = 20 [json_name="scope_id"];
// Scope information for this resource
// Output only.
ScopeInfo scope = 20;
ScopeInfo scope = 30;
// Optional name for identification purposes
google.protobuf.StringValue name = 30 [(custom_options.v1.generate_sdk_option) = true, (custom_options.v1.mask_mapping) = {this: "name" that: "name"}];
google.protobuf.StringValue name = 40 [(custom_options.v1.generate_sdk_option) = true, (custom_options.v1.mask_mapping) = {this: "name" that: "name"}];
// Optional user-set descripton for identification purposes
google.protobuf.StringValue description = 40 [(custom_options.v1.generate_sdk_option) = true, (custom_options.v1.mask_mapping) = {this: "description" that: "description"}];
google.protobuf.StringValue description = 50 [(custom_options.v1.generate_sdk_option) = true, (custom_options.v1.mask_mapping) = {this: "description" that: "description"}];
// The time this resource was created
// Output only.
google.protobuf.Timestamp created_time = 50 [json_name="created_time"];
google.protobuf.Timestamp created_time = 60 [json_name="created_time"];
// The time this resource was last updated.
// Output only.
google.protobuf.Timestamp updated_time = 60 [json_name="updated_time"];
google.protobuf.Timestamp updated_time = 70 [json_name="updated_time"];
// The version can be used in subsequent write requests to ensure this
// resource has not changed and to fail the write if it has.
// Output only.
uint32 version = 70;
uint32 version = 80;
}
@@ -23,7 +23,7 @@ message Target {
// The id of the parent of this resource. This must be defined for creation of this resource, but is otherwise
// read only.
string scope_id = 20;
string scope_id = 20 [json_name="scope_id"];
// Scope information for this resource
// Output only.
@@ -15,25 +15,28 @@ message User {
// Output only.
string id = 10;
// The id of the scope this resource is in.
string scope_id = 20 [json_name="scope_id"];
// Scope information for this resource
// Output only.
resources.scopes.v1.ScopeInfo scope = 20;
resources.scopes.v1.ScopeInfo scope = 30;
// Optional name for identification purposes
google.protobuf.StringValue name = 30 [(custom_options.v1.generate_sdk_option) = true, (custom_options.v1.mask_mapping) = {this:"name" that: "name"}];
google.protobuf.StringValue name = 40 [(custom_options.v1.generate_sdk_option) = true, (custom_options.v1.mask_mapping) = {this:"name" that: "name"}];
// Optional user-set description for identification purposes
google.protobuf.StringValue description = 40 [(custom_options.v1.generate_sdk_option) = true, (custom_options.v1.mask_mapping) = {this:"description" that: "description"}];
google.protobuf.StringValue description = 50 [(custom_options.v1.generate_sdk_option) = true, (custom_options.v1.mask_mapping) = {this:"description" that: "description"}];
// The time this resource was created
// Output only.
google.protobuf.Timestamp created_time = 50 [json_name="created_time"];
google.protobuf.Timestamp created_time = 60 [json_name="created_time"];
// The time this resource was last updated.
// Output only.
google.protobuf.Timestamp updated_time = 60 [json_name="updated_time"];
google.protobuf.Timestamp updated_time = 70 [json_name="updated_time"];
// The version can be used in subsequent write requests to ensure this
// resource has not changed and to fail the write if it has.
uint32 version = 70;
uint32 version = 80;
}
@@ -18,8 +18,12 @@ service AccountService {
// returned.
rpc GetAccount(GetAccountRequest) returns (GetAccountResponse) {
option (google.api.http) = {
get: "/v1/scopes/*/auth-methods/{auth_method_id}/accounts/{id}"
response_body: "item"
get: "/v1/accounts/{id}"
response_body: "item"
additional_bindings: {
get: "/v1/scopes/*/auth-methods/*/accounts/{id}"
response_body: "item"
}
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
summary: "Gets a single Account"
@@ -32,7 +36,10 @@ service AccountService {
// malformed, or references a non-existing auth method, an error is returned.
rpc ListAccounts(ListAccountsRequest) returns (ListAccountsResponse) {
option (google.api.http) = {
get: "/v1/scopes/*/auth-methods/{auth_method_id}/accounts"
get: "/v1/accounts"
additional_bindings: {
get: "/v1/scopes/*/auth-methods/{auth_method_id}/accounts"
}
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
summary: "Lists all accounts in a specific auth method."
@@ -46,9 +53,14 @@ service AccountService {
// use in another account in the same auth method, an error is returned.
rpc CreateAccount(CreateAccountRequest) returns (CreateAccountResponse) {
option (google.api.http) = {
post: "/v1/scopes/*/auth-methods/{auth_method_id}/accounts"
post: "/v1/accounts"
body: "item"
response_body: "item"
additional_bindings: {
post: "/v1/scopes/*/auth-methods/{item.auth_method_id}/accounts"
body: "item"
response_body: "item"
}
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
summary: "Creates a single account in the provided auth method."
@@ -65,9 +77,14 @@ service AccountService {
// auth method.
rpc UpdateAccount(UpdateAccountRequest) returns (UpdateAccountResponse) {
option (google.api.http) = {
patch: "/v1/scopes/*/auth-methods/{auth_method_id}/accounts/{id}"
patch: "/v1/accounts/{id}"
body: "item"
response_body: "item"
additional_bindings: {
patch: "/v1/scopes/*/auth-methods/*/accounts/{id}"
body: "item"
response_body: "item"
}
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
summary: "Updates an account."
@@ -81,7 +98,10 @@ service AccountService {
// request was received.
rpc DeleteAccount(DeleteAccountRequest) returns (DeleteAccountResponse) {
option (google.api.http) = {
delete: "/v1/scopes/*/auth-methods/{auth_method_id}/accounts/{id}"
delete: "/v1/accounts/{id}"
additional_bindings: {
delete: "/v1/scopes/*/auth-methods/*/accounts/{id}"
}
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
summary: "Deletes an account."
@@ -93,9 +113,14 @@ service AccountService {
// does not require the old password.
rpc SetPassword(SetPasswordRequest) returns (SetPasswordResponse) {
option (google.api.http) = {
post: "/v1/scopes/*/auth-methods/{auth_method_id}/accounts/{id}:set-password"
post: "/v1/accounts/{id}:set-password"
body: "*"
response_body: "item"
additional_bindings: {
post: "/v1/scopes/*/auth-methods/*/accounts/{id}:set-password"
body: "*"
response_body: "item"
}
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
summary: "Sets the password for the provided account."
@@ -107,9 +132,14 @@ service AccountService {
// password to be provided for authentication purposes.
rpc ChangePassword(ChangePasswordRequest) returns (ChangePasswordResponse) {
option (google.api.http) = {
post: "/v1/scopes/*/auth-methods/{auth_method_id}/accounts/{id}:change-password"
post: "/v1/accounts/{id}:change-password"
body: "*"
response_body: "item"
additional_bindings: {
post: "/v1/scopes/*/auth-methods/*/accounts/{id}:change-password"
body: "*"
response_body: "item"
}
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
summary: "Sets the password for the provided account."
@@ -118,9 +148,8 @@ service AccountService {
}
message GetAccountRequest {
string auth_method_id = 1;
string id = 2;
string view = 3;
string id = 1;
string view = 2;
}
message GetAccountResponse {
@@ -137,7 +166,6 @@ message ListAccountsResponse {
}
message CreateAccountRequest {
string auth_method_id = 1;
resources.accounts.v1.Account item = 2;
}
@@ -147,10 +175,9 @@ message CreateAccountResponse {
}
message UpdateAccountRequest {
string auth_method_id = 1;
string id = 2;
resources.accounts.v1.Account item = 3;
google.protobuf.FieldMask update_mask = 4;
string id = 1;
resources.accounts.v1.Account item = 2;
google.protobuf.FieldMask update_mask = 3;
}
message UpdateAccountResponse {
@@ -158,8 +185,7 @@ message UpdateAccountResponse {
}
message DeleteAccountRequest {
string auth_method_id = 1;
string id = 2;
string id = 1;
}
message DeleteAccountResponse {
@@ -167,10 +193,9 @@ message DeleteAccountResponse {
}
message SetPasswordRequest {
string auth_method_id = 1;
string id = 2;
uint32 version = 3;
string password = 4;
string id = 1;
uint32 version = 2;
string password = 3;
}
message SetPasswordResponse {
@@ -178,11 +203,10 @@ message SetPasswordResponse {
}
message ChangePasswordRequest {
string auth_method_id = 1;
string id = 2;
uint32 version = 3;
string old_password = 4 [json_name="old_password"];
string new_password = 5 [json_name="new_password"];
string id = 1;
uint32 version = 2;
string old_password = 3 [json_name="old_password"];
string new_password = 4 [json_name="new_password"];
}
message ChangePasswordResponse {
@@ -16,8 +16,12 @@ service AuthMethodService {
// resource an error is returned.
rpc GetAuthMethod(GetAuthMethodRequest) returns (GetAuthMethodResponse) {
option (google.api.http) = {
get: "/v1/scopes/*/auth-methods/{id}"
get: "/v1/auth-methods/{id}"
response_body: "item"
additional_bindings: {
get: "/v1/scopes/*/auth-methods/{id}"
response_body: "item"
}
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
summary: "Gets a single AuthMethod"
@@ -30,7 +34,10 @@ service AuthMethodService {
// reference a non existing organization, an error is returned.
rpc ListAuthMethods(ListAuthMethodsRequest) returns (ListAuthMethodsResponse) {
option (google.api.http) = {
get: "/v1/scopes/*/auth-methods"
get: "/v1/auth-methods"
additional_bindings: {
get: "/v1/scopes/{scope_id}/auth-methods"
}
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
summary: "Lists all AuthMethods"
@@ -44,9 +51,14 @@ service AuthMethodService {
// use in another user in the same org, an error is returned.
rpc CreateAuthMethod(CreateAuthMethodRequest) returns (CreateAuthMethodResponse) {
option (google.api.http) = {
post: "/v1/scopes/*/auth-methods"
post: "/v1/auth-methods"
body: "item"
response_body: "item"
additional_bindings: {
post: "/v1/scopes/{item.scope_id}/auth-methods"
body: "item"
response_body: "item"
}
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
summary: "Creates a single AuthMethod"
@@ -63,9 +75,14 @@ service AuthMethodService {
// already in use in this org.
rpc UpdateAuthMethod(UpdateAuthMethodRequest) returns (UpdateAuthMethodResponse) {
option (google.api.http) = {
patch: "/v1/scopes/*/auth-methods/{id}"
patch: "/v1/auth-methods/{id}"
body: "item"
response_body: "item"
additional_bindings: {
patch: "/v1/scopes/*/auth-methods/{id}"
body: "item"
response_body: "item"
}
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
summary: "Updates an AuthMethod"
@@ -79,7 +96,10 @@ service AuthMethodService {
// received.
rpc DeleteAuthMethod(DeleteAuthMethodRequest) returns (DeleteAuthMethodResponse) {
option (google.api.http) = {
delete: "/v1/scopes/*/auth-methods/{id}"
delete: "/v1/auth-methods/{id}"
additional_bindings: {
delete: "/v1/scopes/*/auth-methods/{id}"
}
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
summary: "Deletes an AuthMethod"
@@ -97,7 +117,8 @@ message GetAuthMethodResponse {
}
message ListAuthMethodsRequest {
string view = 1;
string scope_id = 1 [json_name="scope_id"];
string view = 2;
}
message ListAuthMethodsResponse {
@@ -16,8 +16,12 @@ service AuthTokenService {
// resource an error is returned.
rpc GetAuthToken(GetAuthTokenRequest) returns (GetAuthTokenResponse) {
option (google.api.http) = {
get: "/v1/scopes/*/auth-tokens/{id}"
get: "/v1/auth-tokens/{id}"
response_body: "item"
additional_bindings: {
get: "/v1/scopes/*/auth-tokens/{id}"
response_body: "item"
}
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
summary: "Gets a single AuthToken"
@@ -30,7 +34,10 @@ service AuthTokenService {
// reference a non existing organization, an error is returned.
rpc ListAuthTokens(ListAuthTokensRequest) returns (ListAuthTokensResponse) {
option (google.api.http) = {
get: "/v1/scopes/*/auth-tokens"
get: "/v1/auth-tokens"
additional_bindings: {
get: "/v1/scopes/{scope_id}/auth-tokens"
}
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
summary: "Lists all AuthTokens"
@@ -44,7 +51,10 @@ service AuthTokenService {
// received.
rpc DeleteAuthToken(DeleteAuthTokenRequest) returns (DeleteAuthTokenResponse) {
option (google.api.http) = {
delete: "/v1/scopes/*/auth-tokens/{id}"
delete: "/v1/auth-tokens/{id}"
additional_bindings: {
delete: "/v1/scopes/*/auth-tokens/{id}"
}
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
summary: "Deletes an AuthTokens"
@@ -62,7 +72,8 @@ message GetAuthTokenResponse {
}
message ListAuthTokensRequest {
string view = 1;
string scope_id = 1 [json_name="scope_id"];
string view = 2;
}
message ListAuthTokensResponse {
@@ -19,8 +19,12 @@ service GroupService {
// returned.
rpc GetGroup(GetGroupRequest) returns (GetGroupResponse) {
option (google.api.http) = {
get: "/v1/scopes/*/groups/{id}"
get: "/v1/groups/{id}"
response_body: "item"
additional_bindings: {
get: "/v1/scopes/*/groups/{id}"
response_body: "item"
}
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
summary: "Gets a single Group"
@@ -33,7 +37,10 @@ service GroupService {
// references a non-existing scope, an error is returned.
rpc ListGroups(ListGroupsRequest) returns (ListGroupsResponse) {
option (google.api.http) = {
get: "/v1/scopes/*/groups"
get: "/v1/groups"
additional_bindings: {
get: "/v1/scopes/{scope_id}/groups"
}
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
summary: "Lists all Groups"
@@ -47,9 +54,14 @@ service GroupService {
// use in another group in the same scope, an error is returned.
rpc CreateGroup(CreateGroupRequest) returns (CreateGroupResponse) {
option (google.api.http) = {
post: "/v1/scopes/*/groups"
post: "/v1/groups"
body: "item"
response_body: "item"
additional_bindings: {
post: "/v1/scopes/{item.scope_id}/groups"
body: "item"
response_body: "item"
}
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
summary: "Creates a single Group"
@@ -66,9 +78,14 @@ service GroupService {
// scope.
rpc UpdateGroup(UpdateGroupRequest) returns (UpdateGroupResponse) {
option (google.api.http) = {
patch: "/v1/scopes/*/groups/{id}"
patch: "/v1/groups/{id}"
body: "item"
response_body: "item"
additional_bindings: {
patch: "/v1/scopes/*/groups/{id}"
body: "item"
response_body: "item"
}
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
summary: "Updates a Group"
@@ -82,7 +99,10 @@ service GroupService {
// request was received.
rpc DeleteGroup(DeleteGroupRequest) returns (DeleteGroupResponse) {
option (google.api.http) = {
delete: "/v1/scopes/*/groups/{id}"
delete: "/v1/groups/{id}"
additional_bindings: {
delete: "/v1/scopes/*/groups/{id}"
}
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
summary: "Deletes a Group"
@@ -95,9 +115,14 @@ service GroupService {
// existing resource, an error is returned.
rpc AddGroupMembers(AddGroupMembersRequest) returns (AddGroupMembersResponse) {
option (google.api.http) = {
post: "/v1/scopes/*/groups/{id}:add-members"
post: "/v1/groups/{id}:add-members"
body: "*"
response_body: "item"
additional_bindings: {
post: "/v1/scopes/*/groups/{id}:add-members"
body: "*"
response_body: "item"
}
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
summary: "Adds Users as members to a Group"
@@ -111,9 +136,14 @@ service GroupService {
// existing resource, an error is returned.
rpc SetGroupMembers(SetGroupMembersRequest) returns (SetGroupMembersResponse) {
option (google.api.http) = {
post: "/v1/scopes/*/groups/{id}:set-members"
post: "/v1/groups/{id}:set-members"
body: "*"
response_body: "item"
additional_bindings: {
post: "/v1/scopes/*/groups/{id}:set-members"
body: "*"
response_body: "item"
}
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
summary: "Set a Group's members to exactly the list of provided in the request, removing any members that are not specified."
@@ -126,9 +156,14 @@ service GroupService {
// existing resource, an error is returned.
rpc RemoveGroupMembers(RemoveGroupMembersRequest) returns (RemoveGroupMembersResponse) {
option (google.api.http) = {
post: "/v1/scopes/*/groups/{id}:remove-members"
post: "/v1/groups/{id}:remove-members"
body: "*"
response_body: "item"
additional_bindings: {
post: "/v1/scopes/*/groups/{id}:remove-members"
body: "*"
response_body: "item"
}
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
summary: "Removes the specified members from a Group."
@@ -146,7 +181,8 @@ message GetGroupResponse {
}
message ListGroupsRequest {
string view = 1;
string scope_id = 1;
string view = 2;
}
message ListGroupsResponse {
@@ -21,8 +21,12 @@ service HostCatalogService {
rpc GetHostCatalog(GetHostCatalogRequest) returns (GetHostCatalogResponse) {
// Gets the host as specified in the url.
option (google.api.http) = {
get: "/v1/scopes/*/host-catalogs/{id}"
get: "/v1/host-catalogs/{id}"
response_body: "item"
additional_bindings: {
get: "/v1/scopes/*/host-catalogs/{id}"
response_body: "item"
}
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
summary: "Gets a single HostCatalog"
@@ -37,7 +41,10 @@ service HostCatalogService {
// returned.
rpc ListHostCatalogs(ListHostCatalogsRequest) returns (ListHostCatalogsResponse) {
option (google.api.http) = {
get: "/v1/scopes/*/host-catalogs"
get: "/v1/host-catalogs"
additional_bindings: {
get: "/v1/scopes/{scope_id}/host-catalogs"
}
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
summary: "Gets a list of HostCatalogs"
@@ -51,9 +58,14 @@ service HostCatalogService {
// error is returned.
rpc CreateHostCatalog(CreateHostCatalogRequest) returns (CreateHostCatalogResponse) {
option (google.api.http) = {
post: "/v1/scopes/*/host-catalogs"
post: "/v1/host-catalogs"
body: "item"
response_body: "item"
additional_bindings: {
post: "/v1/scopes/{item.scope_id}/host-catalogs"
body: "item"
response_body: "item"
}
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
summary: "Creates a HostCatalog"
@@ -68,9 +80,14 @@ service HostCatalogService {
// field in the HostCatalog.
rpc UpdateHostCatalog(UpdateHostCatalogRequest) returns (UpdateHostCatalogResponse) {
option (google.api.http) = {
patch: "/v1/scopes/*/host-catalogs/{id}"
patch: "/v1/host-catalogs/{id}"
body: "item"
response_body: "item"
additional_bindings: {
patch: "/v1/scopes/*/host-catalogs/{id}"
body: "item"
response_body: "item"
}
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
summary: "Updates a HostCatalog"
@@ -84,7 +101,10 @@ service HostCatalogService {
// exist as the response indicates if it existed or not.
rpc DeleteHostCatalog(DeleteHostCatalogRequest) returns (DeleteHostCatalogResponse) {
option (google.api.http) = {
delete: "/v1/scopes/*/host-catalogs/{id}"
delete: "/v1/host-catalogs/{id}"
additional_bindings: {
delete: "/v1/scopes/*/host-catalogs/{id}"
}
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
summary: "Deletes a HostCatalog"
@@ -102,7 +122,8 @@ message GetHostCatalogResponse {
}
message ListHostCatalogsRequest {
string view = 1;
string scope_id = 1 [json_name="scope_id"];
string view = 2;
}
message ListHostCatalogsResponse {
@@ -16,8 +16,12 @@ service HostService {
// non existing resource an error is returned.
rpc GetHost(GetHostRequest) returns (GetHostResponse) {
option (google.api.http) = {
get: "/v1/scopes/*/host-catalogs/{host_catalog_id}/hosts/{id}"
get: "/v1/hosts/{id}"
response_body: "item"
additional_bindings: {
get: "/v1/scopes/*/host-catalogs/*/hosts/{id}"
response_body: "item"
}
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
summary: "Gets a single Host"
@@ -31,7 +35,10 @@ service HostService {
// returned.
rpc ListHosts(ListHostsRequest) returns (ListHostsResponse) {
option (google.api.http) = {
get: "/v1/scopes/*/host-catalogs/{host_catalog_id}/hosts"
get: "/v1/hosts"
additional_bindings: {
get: "/v1/scopes/*/host-catalogs/{host_catalog_id}/hosts"
}
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
summary: "List all Hosts for the specified catalog"
@@ -45,9 +52,14 @@ service HostService {
// is in use by another host in the same host catalog, an error is returned.
rpc CreateHost(CreateHostRequest) returns (CreateHostResponse) {
option (google.api.http) = {
post: "/v1/scopes/*/host-catalogs/{host_catalog_id}/hosts"
post: "/v1/hosts"
body: "item"
response_body: "item"
additional_bindings: {
post: "/v1/scopes/*/host-catalogs/{item.host_catalog_id}/hosts"
body: "item"
response_body: "item"
}
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
summary: "Create a single Host"
@@ -64,9 +76,14 @@ service HostService {
// name to one that is already in use in this host catalog.
rpc UpdateHost(UpdateHostRequest) returns (UpdateHostResponse) {
option (google.api.http) = {
patch: "/v1/scopes/*/host-catalogs/{host_catalog_id}/hosts/{id}"
patch: "/v1/hosts/{id}"
body: "item"
response_body: "item"
additional_bindings: {
patch: "/v1/scopes/*/host-catalogs/*/hosts/{id}"
body: "item"
response_body: "item"
}
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
summary: "Update a Host"
@@ -80,7 +97,10 @@ service HostService {
// before the DeleteHost request was received.
rpc DeleteHost(DeleteHostRequest) returns (DeleteHostResponse) {
option (google.api.http) = {
delete: "/v1/scopes/*/host-catalogs/{host_catalog_id}/hosts/{id}"
delete: "/v1/hosts/{id}"
additional_bindings: {
delete: "/v1/scopes/*/host-catalogs/*/hosts/{id}"
}
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
summary: "Delete a Host"
@@ -89,9 +109,8 @@ service HostService {
}
message GetHostRequest {
string host_catalog_id = 1 [json_name="host_catalog_id"];
string id = 2;
string view = 3;
string id = 1;
string view = 2;
}
message GetHostResponse {
@@ -108,8 +127,7 @@ message ListHostsResponse {
}
message CreateHostRequest {
string host_catalog_id = 1 [json_name="host_catalog_id"];
api.resources.hosts.v1.Host item = 2;
api.resources.hosts.v1.Host item = 1;
}
message CreateHostResponse {
@@ -118,10 +136,9 @@ message CreateHostResponse {
}
message UpdateHostRequest {
string host_catalog_id = 1 [json_name="host_catalog_id"];
string id = 2;
api.resources.hosts.v1.Host item = 3;
google.protobuf.FieldMask update_mask = 4;
string id = 1;
api.resources.hosts.v1.Host item = 2;
google.protobuf.FieldMask update_mask = 3;
}
message UpdateHostResponse {
@@ -129,8 +146,7 @@ message UpdateHostResponse {
}
message DeleteHostRequest {
string host_catalog_id = 1 [json_name="host_catalog_id"];
string id = 2;
string id = 1;
}
message DeleteHostResponse {
@@ -29,7 +29,7 @@ service HostSetService {
get: "/v1/host-sets/{id}"
response_body: "item"
additional_bindings {
get: "/v1/scopes/*/host-catalogs/{host_catalog_id}/host-sets/{id}"
get: "/v1/scopes/*/host-catalogs/*/host-sets/{id}"
response_body: "item"
}
};
@@ -67,7 +67,7 @@ service HostSetService {
body: "item"
response_body: "item"
additional_bindings {
post: "/v1/scopes/*/host-catalogs/{host_catalog_id}/host-sets"
post: "/v1/scopes/*/host-catalogs/{item.host_catalog_id}/host-sets"
body: "item"
response_body: "item"
}
@@ -91,7 +91,7 @@ service HostSetService {
body: "item"
response_body: "item"
additional_bindings: {
patch: "/v1/scopes/*/host-catalogs/{host_catalog_id}/host-sets/{id}"
patch: "/v1/scopes/*/host-catalogs/*/host-sets/{id}"
body: "item"
response_body: "item"
}
@@ -110,7 +110,7 @@ service HostSetService {
option (google.api.http) = {
delete: "/v1/host-sets/{id}"
additional_bindings: {
delete: "/v1/scopes/*/host-catalogs/{host_catalog_id}/host-sets/{id}"
delete: "/v1/scopes/*/host-catalogs/*/host-sets/{id}"
}
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
@@ -130,7 +130,7 @@ service HostSetService {
body: "*"
response_body: "item"
additional_bindings: {
post: "/v1/scopes/*/host-catalogs/{host_catalog_id}/host-sets/{id}:add-hosts"
post: "/v1/scopes/*/host-catalogs/*/host-sets/{id}:add-hosts"
body: "*"
response_body: "item"
}
@@ -153,7 +153,7 @@ service HostSetService {
body: "*"
response_body: "item"
additional_bindings: {
post: "/v1/scopes/*/host-catalogs/{host_catalog_id}/host-sets/{id}:set-hosts"
post: "/v1/scopes/*/host-catalogs/*/host-sets/{id}:set-hosts"
body: "*"
response_body: "item"
}
@@ -174,7 +174,7 @@ service HostSetService {
body: "*"
response_body: "item"
additional_bindings: {
post: "/v1/scopes/*/host-catalogs/{host_catalog_id}/host-sets/{id}:remove-hosts"
post: "/v1/scopes/*/host-catalogs/*/host-sets/{id}:remove-hosts"
body: "*"
response_body: "item"
}
@@ -186,9 +186,8 @@ service HostSetService {
}
message GetHostSetRequest {
string host_catalog_id = 1 [json_name="host_catalog_id"];
string id = 2;
string view = 3;
string id = 1;
string view = 2;
}
message GetHostSetResponse {
@@ -205,8 +204,7 @@ message ListHostSetsResponse {
}
message CreateHostSetRequest {
string host_catalog_id = 1 [json_name="host_catalog_id"];
api.resources.hostsets.v1.HostSet item = 2;
api.resources.hostsets.v1.HostSet item = 1;
}
message CreateHostSetResponse {
@@ -215,10 +213,9 @@ message CreateHostSetResponse {
}
message UpdateHostSetRequest {
string host_catalog_id = 1 [json_name="host_catalog_id"];
string id = 2;
api.resources.hostsets.v1.HostSet item = 3;
google.protobuf.FieldMask update_mask = 4;
string id = 1;
api.resources.hostsets.v1.HostSet item = 2;
google.protobuf.FieldMask update_mask = 3;
}
message UpdateHostSetResponse {
@@ -226,8 +223,7 @@ message UpdateHostSetResponse {
}
message DeleteHostSetRequest {
string host_catalog_id = 1 [json_name="host_catalog_id"];
string id = 2;
string id = 1;
}
message DeleteHostSetResponse {
@@ -235,14 +231,13 @@ message DeleteHostSetResponse {
}
message AddHostSetHostsRequest {
string host_catalog_id = 1 [json_name="host_catalog_id"];
string id = 2;
uint32 version = 3;
string id = 1;
uint32 version = 2;
// A list of host IDs which will be added to this host set. Each host
// referenced here must be a child of the same host catalog that this host
// set is a child of.
repeated string host_ids = 4;
repeated string host_ids = 3;
}
message AddHostSetHostsResponse {
@@ -250,14 +245,13 @@ message AddHostSetHostsResponse {
}
message SetHostSetHostsRequest {
string host_catalog_id = 1 [json_name="host_catalog_id"];
string id = 2;
uint32 version = 3;
string id = 1;
uint32 version = 2;
// A list of host IDs which will be set on this host set. Each host
// referenced here must be a child of the same host catalog that this host
// set is a child of.
repeated string host_ids = 4;
repeated string host_ids = 3;
}
message SetHostSetHostsResponse {
@@ -265,14 +259,13 @@ message SetHostSetHostsResponse {
}
message RemoveHostSetHostsRequest {
string host_catalog_id = 1 [json_name="host_catalog_id"];
// This host set's id.
string id = 2;
uint32 version = 3;
string id = 1;
uint32 version = 2;
// A list of host IDs which should not be in the host set when this request
// returns.
repeated string host_ids = 4;
repeated string host_ids = 3;
}
message RemoveHostSetHostsResponse {
@@ -17,8 +17,12 @@ service RoleService {
// or reference a non-existing resource an error is returned.
rpc GetRole(GetRoleRequest) returns (GetRoleResponse) {
option (google.api.http) = {
get: "/v1/scopes/*/roles/{id}"
get: "/v1/roles/{id}"
response_body: "item"
additional_bindings {
get: "/v1/scopes/*/roles/{id}"
response_body: "item"
}
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
summary: "Gets a single Role"
@@ -31,7 +35,10 @@ service RoleService {
// reference a non-existing scope, an error is returned.
rpc ListRoles(ListRolesRequest) returns (ListRolesResponse) {
option (google.api.http) = {
get: "/v1/scopes/*/roles"
get: "/v1/roles"
additional_bindings {
get: "/v1/scopes/{scope_id}/roles"
}
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
summary: "Lists all Roles"
@@ -45,9 +52,14 @@ service RoleService {
// is returned.
rpc CreateRole(CreateRoleRequest) returns (CreateRoleResponse) {
option (google.api.http) = {
post: "/v1/scopes/*/roles"
post: "/v1/roles"
body: "item"
response_body: "item"
additional_bindings {
post: "/v1/scopes/{item.scope_id}/roles"
body: "item"
response_body: "item"
}
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
summary: "Creates a single Role"
@@ -64,9 +76,14 @@ service RoleService {
// already in use in this org.
rpc UpdateRole(UpdateRoleRequest) returns (UpdateRoleResponse) {
option (google.api.http) = {
patch: "/v1/scopes/*/roles/{id}"
patch: "/v1/roles/{id}"
body: "item"
response_body: "item"
additional_bindings {
patch: "/v1/scopes/*/roles/{id}"
body: "item"
response_body: "item"
}
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
summary: "Updates a Role"
@@ -80,7 +97,10 @@ service RoleService {
// received.
rpc DeleteRole(DeleteRoleRequest) returns (DeleteRoleResponse) {
option (google.api.http) = {
delete: "/v1/scopes/*/roles/{id}"
delete: "/v1/roles/{id}"
additional_bindings {
delete: "/v1/scopes/*/roles/{id}"
}
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
summary: "Deletes a Role"
@@ -93,9 +113,14 @@ service RoleService {
// non-existing resources, an error is returned.
rpc AddRolePrincipals(AddRolePrincipalsRequest) returns (AddRolePrincipalsResponse) {
option (google.api.http) = {
post: "/v1/scopes/*/roles/{role_id}:add-principals"
post: "/v1/roles/{role_id}:add-principals"
body: "*"
response_body: "item"
additional_bindings {
post: "/v1/scopes/*/roles/{role_id}:add-principals"
body: "*"
response_body: "item"
}
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
summary: "Adds Users and/or Groups to a Role"
@@ -110,9 +135,14 @@ service RoleService {
// returned.
rpc SetRolePrincipals(SetRolePrincipalsRequest) returns (SetRolePrincipalsResponse) {
option (google.api.http) = {
post: "/v1/scopes/*/roles/{role_id}:set-principals"
post: "/v1/roles/{role_id}:set-principals"
body: "*"
response_body: "item"
additional_bindings {
post: "/v1/scopes/*/roles/{role_id}:set-principals"
body: "*"
response_body: "item"
}
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
summary: "Set Users and/or Groups to a Role, removing any principals that are not specified in the request."
@@ -126,9 +156,14 @@ service RoleService {
// is not an error to have duplicate user/group ids.
rpc RemoveRolePrincipals(RemoveRolePrincipalsRequest) returns (RemoveRolePrincipalsResponse) {
option (google.api.http) = {
post: "/v1/scopes/*/roles/{role_id}:remove-principals"
post: "/v1/roles/{role_id}:remove-principals"
body: "*"
response_body: "item"
additional_bindings {
post: "/v1/scopes/*/roles/{role_id}:remove-principals"
body: "*"
response_body: "item"
}
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
summary: "Removes the specified Users and/or Groups from a Role."
@@ -141,9 +176,14 @@ service RoleService {
// an error is returned. It is not an error to have duplicate grants.
rpc AddRoleGrants(AddRoleGrantsRequest) returns (AddRoleGrantsResponse) {
option (google.api.http) = {
post: "/v1/scopes/*/roles/{role_id}:add-grants"
post: "/v1/roles/{role_id}:add-grants"
body: "*"
response_body: "item"
additional_bindings {
post: "/v1/scopes/*/roles/{role_id}:add-grants"
body: "*"
response_body: "item"
}
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
summary: "Adds grants to a role"
@@ -157,9 +197,14 @@ service RoleService {
// error is returned. It is not an error to have duplicate grants.
rpc SetRoleGrants(SetRoleGrantsRequest) returns (SetRoleGrantsResponse) {
option (google.api.http) = {
post: "/v1/scopes/*/roles/{role_id}:set-grants"
post: "/v1/roles/{role_id}:set-grants"
body: "*"
response_body: "item"
additional_bindings {
post: "/v1/scopes/*/roles/{role_id}:set-grants"
body: "*"
response_body: "item"
}
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
summary: "Set grants for a role, removing any grants that are not specified in the request."
@@ -173,9 +218,14 @@ service RoleService {
// have duplicate grants.
rpc RemoveRoleGrants(RemoveRoleGrantsRequest) returns (RemoveRoleGrantsResponse) {
option (google.api.http) = {
post: "/v1/scopes/*/roles/{role_id}:remove-grants"
post: "/v1/roles/{role_id}:remove-grants"
body: "*"
response_body: "item"
additional_bindings {
post: "/v1/scopes/*/roles/{role_id}:remove-grants"
body: "*"
response_body: "item"
}
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
summary: "Removes grants from a role."
@@ -194,7 +244,8 @@ message GetRoleResponse {
}
message ListRolesRequest {
string view = 1;
string scope_id = 1 [json_name="scope_id"];
string view = 2;
}
message ListRolesResponse {
@@ -105,9 +105,8 @@ message ListScopesResponse {
}
message CreateScopeRequest {
string scope_id = 1;
bool skip_role_creation = 2;
resources.scopes.v1.Scope item = 3;
bool skip_role_creation = 1;
resources.scopes.v1.Scope item = 2;
}
message CreateScopeResponse {
@@ -17,8 +17,12 @@ service UserService {
// resource an error is returned.
rpc GetUser(GetUserRequest) returns (GetUserResponse) {
option (google.api.http) = {
get: "/v1/scopes/*/users/{id}"
get: "/v1/users/{id}"
response_body: "item"
additional_bindings: {
get: "/v1/scopes/*/users/{id}"
response_body: "item"
}
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
summary: "Gets a single User"
@@ -31,7 +35,10 @@ service UserService {
// reference a non existing scope, an error is returned.
rpc ListUsers(ListUsersRequest) returns (ListUsersResponse) {
option (google.api.http) = {
get: "/v1/scopes/*/users"
get: "/v1/users"
additional_bindings: {
get: "/v1/scopes/{scope_id}/users"
}
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
summary: "Lists all Users"
@@ -45,9 +52,14 @@ service UserService {
// use in another user in the same scope, an error is returned.
rpc CreateUser(CreateUserRequest) returns (CreateUserResponse) {
option (google.api.http) = {
post: "/v1/scopes/*/users"
post: "/v1/users"
body: "item"
response_body: "item"
additional_bindings: {
post: "/v1/scopes/{item.scope_id}/users"
body: "item"
response_body: "item"
}
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
summary: "Creates a single User"
@@ -64,9 +76,14 @@ service UserService {
// already in use in this scope.
rpc UpdateUser(UpdateUserRequest) returns (UpdateUserResponse) {
option (google.api.http) = {
patch: "/v1/scopes/*/users/{id}"
patch: "/v1/users/{id}"
body: "item"
response_body: "item"
additional_bindings: {
patch: "/v1/scopes/*/users/{id}"
body: "item"
response_body: "item"
}
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
summary: "Updates a User"
@@ -80,7 +97,10 @@ service UserService {
// received.
rpc DeleteUser(DeleteUserRequest) returns (DeleteUserResponse) {
option (google.api.http) = {
delete: "/v1/scopes/*/users/{id}"
delete: "/v1/users/{id}"
additional_bindings: {
delete: "/v1/scopes/*/users/{id}"
}
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
summary: "Deletes a User"
@@ -98,7 +118,8 @@ message GetUserResponse {
}
message ListUsersRequest {
string view = 1;
string scope_id = 1;
string view = 2;
}
message ListUsersResponse {