Sanitize protos (#471)
This commit is contained in:
1 parent
63224d094e
commit
b1fc9fd547
69 files changed
+2793
-3847
No files matched your search
@@ -119,7 +119,6 @@ service AccountService {
|
||||
|
||||
message GetAccountRequest {
|
||||
string id = 1;
|
||||
string view = 2;
|
||||
}
|
||||
|
||||
message GetAccountResponse {
|
||||
@@ -127,8 +126,7 @@ message GetAccountResponse {
|
||||
}
|
||||
|
||||
message ListAccountsRequest {
|
||||
string auth_method_id = 1;
|
||||
string view = 2;
|
||||
string auth_method_id = 1 [json_name="auth_method_id"];
|
||||
}
|
||||
|
||||
message ListAccountsResponse {
|
||||
@@ -147,7 +145,7 @@ message CreateAccountResponse {
|
||||
message UpdateAccountRequest {
|
||||
string id = 1;
|
||||
resources.accounts.v1.Account item = 2;
|
||||
google.protobuf.FieldMask update_mask = 3;
|
||||
google.protobuf.FieldMask update_mask = 3 [json_name="update_mask"];
|
||||
}
|
||||
|
||||
message UpdateAccountResponse {
|
||||
|
||||
@@ -89,7 +89,6 @@ service AuthMethodService {
|
||||
|
||||
message GetAuthMethodRequest {
|
||||
string id = 1;
|
||||
string view = 2;
|
||||
}
|
||||
|
||||
message GetAuthMethodResponse {
|
||||
@@ -98,7 +97,6 @@ message GetAuthMethodResponse {
|
||||
|
||||
message ListAuthMethodsRequest {
|
||||
string scope_id = 1 [json_name="scope_id"];
|
||||
string view = 2;
|
||||
}
|
||||
|
||||
message ListAuthMethodsResponse {
|
||||
@@ -117,7 +115,7 @@ message CreateAuthMethodResponse {
|
||||
message UpdateAuthMethodRequest {
|
||||
string id = 1;
|
||||
resources.authmethods.v1.AuthMethod item = 2;
|
||||
google.protobuf.FieldMask update_mask = 3;
|
||||
google.protobuf.FieldMask update_mask = 3 [json_name="update_mask"];
|
||||
}
|
||||
|
||||
message UpdateAuthMethodResponse {
|
||||
|
||||
@@ -10,7 +10,7 @@ import "google/protobuf/struct.proto";
|
||||
import "controller/api/resources/authtokens/v1/authtoken.proto";
|
||||
|
||||
service AuthenticationService {
|
||||
// Authenticate validates credentials provided and returns an auth token.
|
||||
// Authenticate validates credentials provided and returns an Auth Token.
|
||||
rpc Authenticate(AuthenticateRequest) returns (AuthenticateResponse) {
|
||||
option (google.api.http) = {
|
||||
post: "/v1/auth-methods/{auth_method_id}:authenticate"
|
||||
@@ -21,46 +21,24 @@ service AuthenticationService {
|
||||
summary: "Authenticate a user to an scope and retrieve an authentication token."
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
// Logout terminates a user's current session.
|
||||
// TODO: Ideally it'd live here but grpc-gateway chokes on it. But deauth should really be scopeless.
|
||||
/*
|
||||
rpc Deauthenticate(DeauthenticateRequest) returns (DeauthenticateResponse) {
|
||||
option (google.api.http) = {
|
||||
post: "/v1/:deauthenticate"
|
||||
};
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
||||
summary: "Deauthenticate an authentication token."
|
||||
};
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
// The layout of the struct for "credentials" field in AuthenticateRequest. This message isn't
|
||||
// directly referenced anywhere but is used here to define the expected field names and types.
|
||||
// The layout of the struct for "credentials" field in AuthenticateRequest. This message isn't directly referenced anywhere but is used here to define the expected field names and types.
|
||||
message PasswordCredentials {
|
||||
string login_name = 1;
|
||||
string login_name = 1 [json_name="login_name"];
|
||||
string password = 2;
|
||||
}
|
||||
|
||||
message AuthenticateRequest {
|
||||
// The id to the authmethod in the system being used for authentication. The auth method must be in the scope
|
||||
// being logged in to.
|
||||
string auth_method_id = 1;
|
||||
// This can be "cookie" or "token". If not provided, "token" will be used.
|
||||
string token_type = 2;
|
||||
|
||||
// credentials are the different possible credential names depending on what type of auth method is used.
|
||||
// For password auth method: should include only "name" and "password".
|
||||
// The ID of the Auth Method in the system that should be used for authentication.
|
||||
string auth_method_id = 1 [json_name="auth_method_id"];
|
||||
// This can be "cookie" or "token". If not provided, "token" will be used. "cookie" activates a split-cookie method where the token is split partially between http-only and regular cookies in order to keep it safe from rogue JS in the browser.
|
||||
string token_type = 2 [json_name="token_type"];
|
||||
// Credentials are passed to the Auth Method; the valid keys and values depend on the type of Auth Method.
|
||||
google.protobuf.Struct credentials = 3;
|
||||
}
|
||||
|
||||
message AuthenticateResponse {
|
||||
resources.authtokens.v1.AuthToken item = 1;
|
||||
// This can be "cookie" or "token". If not present, "token" should be assumed.
|
||||
string token_type = 2;
|
||||
}
|
||||
|
||||
message DeauthenticateRequest {}
|
||||
message DeauthenticateResponse {}
|
||||
string token_type = 2 [json_name="token_type"];
|
||||
}
|
||||
@@ -54,7 +54,6 @@ service AuthTokenService {
|
||||
|
||||
message GetAuthTokenRequest {
|
||||
string id = 1;
|
||||
string view = 2;
|
||||
}
|
||||
|
||||
message GetAuthTokenResponse {
|
||||
@@ -63,7 +62,6 @@ message GetAuthTokenResponse {
|
||||
|
||||
message ListAuthTokensRequest {
|
||||
string scope_id = 1 [json_name="scope_id"];
|
||||
string view = 2;
|
||||
}
|
||||
|
||||
message ListAuthTokensResponse {
|
||||
|
||||
@@ -138,7 +138,6 @@ service GroupService {
|
||||
|
||||
message GetGroupRequest {
|
||||
string id = 1;
|
||||
string view = 2;
|
||||
}
|
||||
|
||||
message GetGroupResponse {
|
||||
@@ -146,8 +145,7 @@ message GetGroupResponse {
|
||||
}
|
||||
|
||||
message ListGroupsRequest {
|
||||
string scope_id = 1;
|
||||
string view = 2;
|
||||
string scope_id = 1 [json_name="scope_id"];
|
||||
}
|
||||
|
||||
message ListGroupsResponse {
|
||||
@@ -166,7 +164,7 @@ message CreateGroupResponse {
|
||||
message UpdateGroupRequest {
|
||||
string id = 1;
|
||||
resources.groups.v1.Group item = 2;
|
||||
google.protobuf.FieldMask update_mask = 3;
|
||||
google.protobuf.FieldMask update_mask = 3 [json_name="update_mask"];
|
||||
}
|
||||
|
||||
message UpdateGroupResponse {
|
||||
@@ -181,8 +179,7 @@ message DeleteGroupResponse {}
|
||||
|
||||
message AddGroupMembersRequest {
|
||||
string id = 1;
|
||||
// The version ensures the group hasn't changed since it was last retrieved and if
|
||||
// it has the request will fail.
|
||||
// The version ensures the group hasn't changed since it was last retrieved and if it has the request will fail.
|
||||
uint32 version = 2;
|
||||
repeated string member_ids = 3 [json_name="member_ids"];
|
||||
}
|
||||
@@ -193,8 +190,7 @@ message AddGroupMembersResponse {
|
||||
|
||||
message SetGroupMembersRequest {
|
||||
string id = 1;
|
||||
// The version ensures the group hasn't changed since it was last retrieved and if
|
||||
// it has the request will fail.
|
||||
// The version ensures the group hasn't changed since it was last retrieved and if it has the request will fail.
|
||||
uint32 version = 2;
|
||||
repeated string member_ids = 3 [json_name="member_ids"];
|
||||
}
|
||||
@@ -205,8 +201,7 @@ message SetGroupMembersResponse {
|
||||
|
||||
message RemoveGroupMembersRequest {
|
||||
string id = 1;
|
||||
// The version ensures the group hasn't changed since it was last retrieved and if
|
||||
// it has the request will fail.
|
||||
// The version ensures the group hasn't changed since it was last retrieved and if it has the request will fail.
|
||||
uint32 version = 2;
|
||||
repeated string member_ids = 3 [json_name="member_ids"];
|
||||
}
|
||||
|
||||
@@ -94,7 +94,6 @@ service HostCatalogService {
|
||||
|
||||
message GetHostCatalogRequest {
|
||||
string id = 1;
|
||||
string view = 2;
|
||||
}
|
||||
|
||||
message GetHostCatalogResponse {
|
||||
@@ -103,7 +102,6 @@ message GetHostCatalogResponse {
|
||||
|
||||
message ListHostCatalogsRequest {
|
||||
string scope_id = 1 [json_name="scope_id"];
|
||||
string view = 2;
|
||||
}
|
||||
|
||||
message ListHostCatalogsResponse {
|
||||
|
||||
@@ -90,7 +90,6 @@ service HostService {
|
||||
|
||||
message GetHostRequest {
|
||||
string id = 1;
|
||||
string view = 2;
|
||||
}
|
||||
|
||||
message GetHostResponse {
|
||||
@@ -99,7 +98,6 @@ message GetHostResponse {
|
||||
|
||||
message ListHostsRequest {
|
||||
string host_catalog_id = 1 [json_name="host_catalog_id"];
|
||||
string view = 2;
|
||||
}
|
||||
|
||||
message ListHostsResponse {
|
||||
@@ -118,7 +116,7 @@ message CreateHostResponse {
|
||||
message UpdateHostRequest {
|
||||
string id = 1;
|
||||
api.resources.hosts.v1.Host item = 2;
|
||||
google.protobuf.FieldMask update_mask = 3;
|
||||
google.protobuf.FieldMask update_mask = 3 [json_name="update_mask"];
|
||||
}
|
||||
|
||||
message UpdateHostResponse {
|
||||
|
||||
@@ -152,7 +152,6 @@ service HostSetService {
|
||||
|
||||
message GetHostSetRequest {
|
||||
string id = 1;
|
||||
string view = 2;
|
||||
}
|
||||
|
||||
message GetHostSetResponse {
|
||||
@@ -161,7 +160,6 @@ message GetHostSetResponse {
|
||||
|
||||
message ListHostSetsRequest {
|
||||
string host_catalog_id = 1 [json_name="host_catalog_id"];
|
||||
string view = 2;
|
||||
}
|
||||
|
||||
message ListHostSetsResponse {
|
||||
@@ -180,7 +178,7 @@ message CreateHostSetResponse {
|
||||
message UpdateHostSetRequest {
|
||||
string id = 1;
|
||||
api.resources.hostsets.v1.HostSet item = 2;
|
||||
google.protobuf.FieldMask update_mask = 3;
|
||||
google.protobuf.FieldMask update_mask = 3 [json_name="update_mask"];
|
||||
}
|
||||
|
||||
message UpdateHostSetResponse {
|
||||
@@ -197,10 +195,8 @@ message AddHostSetHostsRequest {
|
||||
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 = 3;
|
||||
// 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 of which this Host Set is a child.
|
||||
repeated string host_ids = 3 [json_name="host_ids"];
|
||||
}
|
||||
|
||||
message AddHostSetHostsResponse {
|
||||
@@ -211,10 +207,8 @@ message SetHostSetHostsRequest {
|
||||
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 = 3;
|
||||
// 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 of which this Host Set is a child.
|
||||
repeated string host_ids = 3 [json_name="host_ids"];
|
||||
}
|
||||
|
||||
message SetHostSetHostsResponse {
|
||||
@@ -222,13 +216,11 @@ message SetHostSetHostsResponse {
|
||||
}
|
||||
|
||||
message RemoveHostSetHostsRequest {
|
||||
// This host set's id.
|
||||
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 = 3;
|
||||
// A list of Host IDs which will be removed from this Host Set.
|
||||
repeated string host_ids = 3 [json_name="host_ids"];
|
||||
}
|
||||
|
||||
message RemoveHostSetHostsResponse {
|
||||
|
||||
@@ -186,7 +186,6 @@ service RoleService {
|
||||
|
||||
message GetRoleRequest {
|
||||
string id = 1;
|
||||
string view = 2;
|
||||
}
|
||||
|
||||
message GetRoleResponse {
|
||||
@@ -195,7 +194,6 @@ message GetRoleResponse {
|
||||
|
||||
message ListRolesRequest {
|
||||
string scope_id = 1 [json_name="scope_id"];
|
||||
string view = 2;
|
||||
}
|
||||
|
||||
message ListRolesResponse {
|
||||
@@ -211,11 +209,10 @@ message CreateRoleResponse {
|
||||
resources.roles.v1.Role item = 2;
|
||||
}
|
||||
|
||||
// TODO: Add versions to Update and Delete role requests.
|
||||
message UpdateRoleRequest {
|
||||
string id = 1;
|
||||
resources.roles.v1.Role item = 2;
|
||||
google.protobuf.FieldMask update_mask = 3;
|
||||
google.protobuf.FieldMask update_mask = 3 [json_name="update_mask"];
|
||||
}
|
||||
|
||||
message UpdateRoleResponse {
|
||||
@@ -230,8 +227,7 @@ message DeleteRoleResponse {}
|
||||
|
||||
message AddRolePrincipalsRequest {
|
||||
string id = 1;
|
||||
// The version ensures the role hasn't changed since it was last retrieved and if
|
||||
// it has the request will fail.
|
||||
// The version ensures the role hasn't changed since it was last retrieved and if it has the request will fail.
|
||||
uint32 version = 2;
|
||||
repeated string principal_ids = 3 [json_name="principal_ids"];
|
||||
}
|
||||
@@ -242,8 +238,7 @@ message AddRolePrincipalsResponse {
|
||||
|
||||
message SetRolePrincipalsRequest {
|
||||
string id = 1;
|
||||
// The version ensures the role hasn't changed since it was last retrieved and if
|
||||
// it has the request will fail.
|
||||
// The version ensures the role hasn't changed since it was last retrieved and if it has the request will fail.
|
||||
uint32 version = 2;
|
||||
repeated string principal_ids = 3 [json_name="principal_ids"];
|
||||
}
|
||||
@@ -254,8 +249,7 @@ message SetRolePrincipalsResponse {
|
||||
|
||||
message RemoveRolePrincipalsRequest {
|
||||
string id = 1;
|
||||
// The version ensures the role hasn't changed since it was last retrieved and if
|
||||
// it has the request will fail.
|
||||
// The version ensures the role hasn't changed since it was last retrieved and if it has the request will fail.
|
||||
uint32 version = 2;
|
||||
repeated string principal_ids = 3 [json_name="principal_ids"];
|
||||
}
|
||||
@@ -266,8 +260,7 @@ message RemoveRolePrincipalsResponse {
|
||||
|
||||
message AddRoleGrantsRequest {
|
||||
string id = 1;
|
||||
// The version ensures the role hasn't changed since it was last retrieved and if
|
||||
// it has the request will fail.
|
||||
// The version ensures the role hasn't changed since it was last retrieved and if it has the request will fail.
|
||||
uint32 version = 2;
|
||||
repeated string grant_strings = 3 [json_name="grant_strings"];
|
||||
}
|
||||
@@ -278,8 +271,7 @@ message AddRoleGrantsResponse {
|
||||
|
||||
message SetRoleGrantsRequest {
|
||||
string id = 1;
|
||||
// The version ensures the role hasn't changed since it was last retrieved and if
|
||||
// it has the request will fail.
|
||||
// The version ensures the role hasn't changed since it was last retrieved and if it has the request will fail.
|
||||
uint32 version = 2;
|
||||
repeated string grant_strings = 3 [json_name="grant_strings"];
|
||||
}
|
||||
@@ -290,8 +282,7 @@ message SetRoleGrantsResponse {
|
||||
|
||||
message RemoveRoleGrantsRequest {
|
||||
string id = 1;
|
||||
// The version ensures the role hasn't changed since it was last retrieved and if
|
||||
// it has the request will fail.
|
||||
// The version ensures the role hasn't changed since it was last retrieved and if it has the request will fail.
|
||||
uint32 version = 2;
|
||||
repeated string grant_strings = 3 [json_name="grant_strings"];
|
||||
}
|
||||
|
||||
@@ -88,7 +88,6 @@ service ScopeService {
|
||||
|
||||
message GetScopeRequest {
|
||||
string id = 1;
|
||||
string view = 2;
|
||||
}
|
||||
|
||||
message GetScopeResponse {
|
||||
@@ -97,7 +96,6 @@ message GetScopeResponse {
|
||||
|
||||
message ListScopesRequest {
|
||||
string scope_id = 1;
|
||||
string view = 2;
|
||||
}
|
||||
|
||||
message ListScopesResponse {
|
||||
@@ -117,7 +115,7 @@ message CreateScopeResponse {
|
||||
message UpdateScopeRequest {
|
||||
string id = 1;
|
||||
resources.scopes.v1.Scope item = 2;
|
||||
google.protobuf.FieldMask update_mask = 3;
|
||||
google.protobuf.FieldMask update_mask = 3 [json_name="update_mask"];
|
||||
}
|
||||
|
||||
message UpdateScopeResponse {
|
||||
|
||||
@@ -54,7 +54,6 @@ service SessionService {
|
||||
|
||||
message GetSessionRequest {
|
||||
string id = 1;
|
||||
string view = 2;
|
||||
}
|
||||
|
||||
message GetSessionResponse {
|
||||
@@ -63,7 +62,6 @@ message GetSessionResponse {
|
||||
|
||||
message ListSessionsRequest {
|
||||
string scope_id = 1;
|
||||
string view = 2;
|
||||
}
|
||||
|
||||
message ListSessionsResponse {
|
||||
|
||||
@@ -154,7 +154,6 @@ service TargetService {
|
||||
|
||||
message GetTargetRequest {
|
||||
string id = 1;
|
||||
string view = 2;
|
||||
}
|
||||
|
||||
message GetTargetResponse {
|
||||
@@ -163,7 +162,6 @@ message GetTargetResponse {
|
||||
|
||||
message ListTargetsRequest {
|
||||
string scope_id = 1;
|
||||
string view = 2;
|
||||
}
|
||||
|
||||
message ListTargetsResponse {
|
||||
@@ -182,7 +180,7 @@ message CreateTargetResponse {
|
||||
message UpdateTargetRequest {
|
||||
string id = 1;
|
||||
resources.targets.v1.Target item = 2;
|
||||
google.protobuf.FieldMask update_mask = 3;
|
||||
google.protobuf.FieldMask update_mask = 3 [json_name="update_mask"];
|
||||
}
|
||||
|
||||
message UpdateTargetResponse {
|
||||
@@ -199,10 +197,8 @@ message AddTargetHostSetsRequest {
|
||||
string id = 1;
|
||||
uint32 version = 2;
|
||||
|
||||
// A list of host set IDs which will be added to this target. Each host set
|
||||
// referenced here must be a child of a host catalog in the same scope as this
|
||||
// target
|
||||
repeated string host_set_ids = 3;
|
||||
// A list of Host Set IDs which will be added to this target. Each Host Set referenced here must be a child of a Host Catalog in the same Scope as this Target.
|
||||
repeated string host_set_ids = 3 [json_name="host_set_ids"];
|
||||
}
|
||||
|
||||
message AddTargetHostSetsResponse {
|
||||
@@ -213,10 +209,8 @@ message SetTargetHostSetsRequest {
|
||||
string id = 1;
|
||||
uint32 version = 2;
|
||||
|
||||
// A list of host set IDs which will be set on this target. Each host set
|
||||
// referenced here must be a child of a host catalog in the same scope as this
|
||||
// target.
|
||||
repeated string host_set_ids = 3;
|
||||
// A list of Host Set IDs which will be set on this target. Each Host Set referenced here must be a child of a Host Catalog in the same Scope as this Target.
|
||||
repeated string host_set_ids = 3 [json_name="host_set_ids"];
|
||||
}
|
||||
|
||||
message SetTargetHostSetsResponse {
|
||||
@@ -227,9 +221,8 @@ message RemoveTargetHostSetsRequest {
|
||||
string id = 1;
|
||||
uint32 version = 2;
|
||||
|
||||
// A list of host set IDs which should not be in the target when this request
|
||||
// returns.
|
||||
repeated string host_set_ids = 3;
|
||||
// A list of Host Set IDs which will be removed from this target.
|
||||
repeated string host_set_ids = 3 [json_name="host_set_ids"];
|
||||
}
|
||||
|
||||
message RemoveTargetHostSetsResponse {
|
||||
@@ -239,9 +232,8 @@ message RemoveTargetHostSetsResponse {
|
||||
message AuthorizeSessionRequest {
|
||||
string id = 1;
|
||||
|
||||
// An optional parameter allowing specification of the particular host within
|
||||
// the target's host sets to connect to during this session.
|
||||
string host_id = 2;
|
||||
// An optional parameter allowing specification of the particular Host within the Target's configured Host Sets to connect to during this Session.
|
||||
string host_id = 2 [json_name="host_id"];
|
||||
}
|
||||
|
||||
message AuthorizeSessionResponse {
|
||||
|
||||
@@ -138,7 +138,6 @@ service UserService {
|
||||
|
||||
message GetUserRequest {
|
||||
string id = 1;
|
||||
string view = 2;
|
||||
}
|
||||
|
||||
message GetUserResponse {
|
||||
@@ -147,7 +146,6 @@ message GetUserResponse {
|
||||
|
||||
message ListUsersRequest {
|
||||
string scope_id = 1;
|
||||
string view = 2;
|
||||
}
|
||||
|
||||
message ListUsersResponse {
|
||||
@@ -166,7 +164,7 @@ message CreateUserResponse {
|
||||
message UpdateUserRequest {
|
||||
string id = 1;
|
||||
resources.users.v1.User item = 2;
|
||||
google.protobuf.FieldMask update_mask = 3;
|
||||
google.protobuf.FieldMask update_mask = 3 [json_name="update_mask"];
|
||||
}
|
||||
|
||||
message UpdateUserResponse {
|
||||
@@ -181,8 +179,7 @@ message DeleteUserResponse {}
|
||||
|
||||
message AddUserAccountsRequest {
|
||||
string id = 1;
|
||||
// The version ensures the user hasn't changed since it was last retrieved and if
|
||||
// it has the request will fail.
|
||||
// The version ensures the user hasn't changed since it was last retrieved and if it has the request will fail.
|
||||
uint32 version = 2;
|
||||
repeated string account_ids = 3 [json_name="account_ids"];
|
||||
}
|
||||
@@ -193,8 +190,7 @@ message AddUserAccountsResponse {
|
||||
|
||||
message SetUserAccountsRequest {
|
||||
string id = 1;
|
||||
// The version ensures the user hasn't changed since it was last retrieved and if
|
||||
// it has the request will fail.
|
||||
// The version ensures the user hasn't changed since it was last retrieved and if it has the request will fail.
|
||||
uint32 version = 2;
|
||||
repeated string account_ids = 3 [json_name="account_ids"];
|
||||
}
|
||||
@@ -205,8 +201,7 @@ message SetUserAccountsResponse {
|
||||
|
||||
message RemoveUserAccountsRequest {
|
||||
string id = 1;
|
||||
// The version ensures the user hasn't changed since it was last retrieved and if
|
||||
// it has the request will fail.
|
||||
// The version ensures the user hasn't changed since it was last retrieved and if it has the request will fail.
|
||||
uint32 version = 2;
|
||||
repeated string account_ids = 3 [json_name="account_ids"];
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user