diff --git a/proto/spaceone/api/identity/v2/api_key.proto b/proto/spaceone/api/identity/v2/api_key.proto index e8d50dac5..a9cd3a6e5 100644 --- a/proto/spaceone/api/identity/v2/api_key.proto +++ b/proto/spaceone/api/identity/v2/api_key.proto @@ -46,12 +46,7 @@ service APIKey { }; } - rpc verify (VerifyAPIKeyRequest) returns (APIKeyInfo) { - option (google.api.http) = { - post: "/identity/v2/api-key/verify" - body: "*" - }; - } + rpc verify (VerifyAPIKeyRequest) returns (APIKeyInfo) {} rpc get (APIKeyRequest) returns (APIKeyInfo) { option (google.api.http) = { @@ -93,15 +88,19 @@ message UpdateAPIKeyRequest { message VerifyAPIKeyRequest { enum API_KEY_TYPE { - NONE_API_KEY_TYPE = 0; - ACCESS_KEY = 1; - SECRET_KEY = 2; + NONE = 0; + APP = 1; + USER = 2; } + string api_key_id = 1; API_KEY_TYPE api_key_type = 2; string domain_id = 21; - string app_id = 22; - string user_id = 23; + + oneof api_key_info { + string app_id = 22; + string user_id = 23; + } } message APIKeyRequest { string api_key_id = 1; diff --git a/proto/spaceone/api/identity/v2/app.proto b/proto/spaceone/api/identity/v2/app.proto index 2a0243f3c..94f636a2b 100644 --- a/proto/spaceone/api/identity/v2/app.proto +++ b/proto/spaceone/api/identity/v2/app.proto @@ -84,11 +84,11 @@ message CreateAppRequest { string name = 1; string role_id = 2; - Scope scope = 3; // +optional - google.protobuf.Struct tags = 4; + google.protobuf.Struct tags = 3; // +optional - string expired_at = 5; + string expired_at = 4; + Scope scope = 5; string domain_id = 21; // +optional string workspace_id = 22; @@ -119,12 +119,29 @@ message AppInfo { DISABLED = 2; } + enum RoleType { + ROLE_TYPE_NONE = 0; + SYSTEM_ADMIN = 1; + DOMAIN_ADMIN = 2; + WORKSPACE_OWNER = 3; + WORKSPACE_MEMBER = 4; + NO_ROLE = 5; + } + + enum Scope { + NONE_SCOPE = 0; + DOMAIN = 1; + WORKSPACE = 2; + } + string app_id = 1; string api_key = 2; string name = 3; State state = 4; + RoleType role_type = 5; + Scope scope = 6; string domain_id = 21; - string user_id = 22; + string workspace_id = 22; string role_id = 23; string api_key_id = 24; string created_at = 31; @@ -139,6 +156,15 @@ message AppSearchQuery { DISABLED = 2; } + enum RoleType { + ROLE_TYPE_NONE = 0; + SYSTEM_ADMIN = 1; + DOMAIN_ADMIN = 2; + WORKSPACE_OWNER = 3; + WORKSPACE_MEMBER = 4; + NO_ROLE = 5; + } + enum Scope { NONE_SCOPE = 0; DOMAIN = 1; @@ -150,20 +176,20 @@ message AppSearchQuery { // +optional string app_id = 2; // +optional - string app_key = 3; - // +optional - string name = 4; + string name = 3; // +optional - State state = 5; + State state = 4; // +optional - Scope scope = 6; + Scope scope = 5; // +optional - string role_type = 7; + RoleType role_type = 6; string domain_id = 21; // +optional string workspace_id = 22; // +optional string role_id = 23; + // +optional + string api_key_id = 24; } message AppsInfo { @@ -172,27 +198,8 @@ message AppsInfo { } message AppStatQuery { - enum State { - NONE_STATE = 0; - ENABLED = 1; - DISABLED = 2; - } - - enum Scope { - NONE_SCOPE = 0; - DOMAIN = 1; - WORKSPACE = 2; - } - spaceone.api.core.v1.StatisticsQuery query = 1; - string app_key = 2; - string name = 3; - State state = 4; - Scope scope = 5; - string role_type = 6; string domain_id = 21; + // +optional string workspace_id = 22; - string app_id = 23; - string role_id = 24; - } \ No newline at end of file diff --git a/proto/spaceone/api/identity/v2/project.proto b/proto/spaceone/api/identity/v2/project.proto index b31e2d396..e1cb6330c 100644 --- a/proto/spaceone/api/identity/v2/project.proto +++ b/proto/spaceone/api/identity/v2/project.proto @@ -95,21 +95,21 @@ service Project { } } -message CreateProjectRequest { - enum ProjectType { - None = 0; - PRIVATE = 1; - PUBLIC = 2; - } +enum ProjectType { + PROJECT_TYPE_NONE = 0; + PRIVATE = 1; + PUBLIC = 2; +} +message CreateProjectRequest { string name = 1; ProjectType project_type = 2; // +optional - google.protobuf.Struct tags = 4; + google.protobuf.Struct tags = 3; + // +optional + string project_group_id = 4; string domain_id = 21; string workspace_id = 22; - // +optional - string project_group_id = 23; } message UpdateProjectRequest { @@ -123,18 +123,12 @@ message UpdateProjectRequest { } message UpdateProjectTypeRequest { - enum ProjectType { - None = 0; - PRIVATE = 1; - PUBLIC = 2; - } string project_id = 1; ProjectType project_type = 2; string domain_id = 21; string workspace_id = 22; } - message ChangeProjectGroupRequest { string project_id = 1; string project_group_id = 2; @@ -169,6 +163,8 @@ message ProjectSearchQuery { string project_id = 2; // +optional string name = 3; + // +optional + ProjectType project_type = 4; string domain_id = 21; // +optional string workspace_id = 22; @@ -181,12 +177,6 @@ message ProjectSearchQuery { } message ProjectInfo { - enum ProjectType { - None = 0; - PRIVATE = 1; - PUBLIC = 2; - } - string project_id = 1; string name = 2; ProjectType project_type = 3; diff --git a/proto/spaceone/api/identity/v2/provider.proto b/proto/spaceone/api/identity/v2/provider.proto index 00dbd3007..cf3002a6f 100644 --- a/proto/spaceone/api/identity/v2/provider.proto +++ b/proto/spaceone/api/identity/v2/provider.proto @@ -52,14 +52,17 @@ message CreateProviderRequest { string provider = 1; string name = 2; // +optional - int32 order = 3; - google.protobuf.Struct template = 4; + string alias = 3; // +optional - google.protobuf.Struct metadata = 5; + string color = 4; // +optional - google.protobuf.Struct capability = 6; + string icon = 5; // +optional - google.protobuf.Struct tags = 7; + int32 order = 6; + // +optional + google.protobuf.Struct options = 7; + // +optional + google.protobuf.Struct tags = 8; string domain_id = 21; } @@ -68,15 +71,17 @@ message UpdateProviderRequest { // +optional string name = 2; // +optional - int32 order = 3; + string alias = 3; + // +optional + string color = 4; // +optional - google.protobuf.Struct template = 4; + string icon = 5; // +optional - google.protobuf.Struct metadata = 5; + int32 order = 6; // +optional - google.protobuf.Struct capability = 6; + google.protobuf.Struct options = 7; // +optional - google.protobuf.Struct tags = 7; + google.protobuf.Struct tags = 8; string domain_id = 21; } @@ -92,19 +97,26 @@ message ProviderSearchQuery { string provider = 2; // +optional string name = 3; + // +optional + string alias = 4; + // +optional + bool is_managed = 5; string domain_id = 21; } message ProviderInfo { string provider = 1; string name = 2; - int32 order = 3; - google.protobuf.Struct template = 4; - google.protobuf.Struct metadata = 5; - google.protobuf.Struct capability = 6; - google.protobuf.Struct tags = 7; + string alias = 3; + string color = 4; + string icon = 5; + int32 order = 6; + google.protobuf.Struct options = 7; + google.protobuf.Struct tags = 8; + bool is_managed = 9; string domain_id = 21; string created_at = 31; + string updated_at = 32; } message ProvidersInfo { diff --git a/proto/spaceone/api/identity/v2/schema.proto b/proto/spaceone/api/identity/v2/schema.proto new file mode 100644 index 000000000..2d852b24d --- /dev/null +++ b/proto/spaceone/api/identity/v2/schema.proto @@ -0,0 +1,133 @@ +syntax = "proto3"; + +package spaceone.api.identity.v2; + +option go_package = "github.com/cloudforet-io/api/dist/go/spaceone/api/identity/v2"; + +import "google/protobuf/empty.proto"; +import "google/protobuf/struct.proto"; +import "google/api/annotations.proto"; +import "spaceone/api/core/v1/query.proto"; + +service Schema { + rpc create (CreateSchemaRequest) returns (SchemaInfo) { + option (google.api.http) = { + post: "/identity/v2/schema/create" + body: "*" + }; + } + rpc update (UpdateSchemaRequest) returns (SchemaInfo) { + option (google.api.http) = { + post: "/identity/v2/schema/update" + body: "*" + }; + } + rpc delete (SchemaRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/identity/v2/schema/delete" + body: "*" + }; + } + rpc get (SchemaRequest) returns (SchemaInfo) { + option (google.api.http) = { + post: "/identity/v2/schema/get" + body: "*" + }; + } + rpc list (SchemaSearchQuery) returns (SchemasInfo) { + option (google.api.http) = { + post: "/identity/v2/schema/list" + body: "*" + }; + } + rpc stat (SchemaStatQuery) returns (google.protobuf.Struct) { + option (google.api.http) = { + post: "/identity/v2/schema/stat" + body: "*" + }; + } +} + +enum SchemaType { + SCHEMA_TYPE_NONE = 0; + SERVICE_ACCOUNT = 1; + TRUSTED_ACCOUNT = 2; + SECRET = 3; + TRUSTING_SECRET = 4; +} + +message CreateSchemaRequest { + string schema_id = 1; + string name = 2; + SchemaType schema_type = 3; + google.protobuf.Struct schema = 4; + string provider = 5; + // +optional + repeated string related_schemas = 6; + // +optional + google.protobuf.Struct options = 7; + // +optional + google.protobuf.Struct tags = 8; + string domain_id = 21; +} + +message UpdateSchemaRequest { + string schema_id = 1; + // +optional + string name = 2; + // +optional + google.protobuf.Struct schema = 3; + // +optional + google.protobuf.Struct options = 4; + // +optional + google.protobuf.Struct tags = 5; + string domain_id = 21; +} + +message SchemaRequest { + string schema_id = 1; + string domain_id = 21; +} + +message SchemaSearchQuery { + // +optional + spaceone.api.core.v1.Query query = 1; + // +optional + string schema_id = 2; + // +optional + string name = 3; + // +optional + SchemaType schema_type = 4; + // +optional + string provider = 5; + // +optional + string related_schema_id = 6; + // +optional + bool is_managed = 7; + string domain_id = 21; +} + +message SchemaInfo { + string schema_id = 1; + string name = 2; + SchemaType schema_type = 3; + google.protobuf.Struct schema = 4; + string provider = 5; + repeated string related_schemas = 6; + google.protobuf.Struct options = 7; + google.protobuf.Struct tags = 8; + bool is_managed = 9; + string domain_id = 21; + string created_at = 31; + string updated_at = 32; +} + +message SchemasInfo { + repeated SchemaInfo results = 1; + int32 total_count = 2; +} + +message SchemaStatQuery { + spaceone.api.core.v1.StatisticsQuery query = 1; + string domain_id = 21; +} \ No newline at end of file diff --git a/proto/spaceone/api/identity/v2/service_account.proto b/proto/spaceone/api/identity/v2/service_account.proto index 820cca6d4..3e9103647 100644 --- a/proto/spaceone/api/identity/v2/service_account.proto +++ b/proto/spaceone/api/identity/v2/service_account.proto @@ -24,9 +24,9 @@ service ServiceAccount { }; } - rpc change_trusted_service_account (ChangeTrustedAccountRequest) returns (ServiceAccountInfo) { + rpc change_trusted_account (ChangeTrustedAccountRequest) returns (ServiceAccountInfo) { option (google.api.http) = { - post: "/identity/v2/service-account/change-trusted-service-account" + post: "/identity/v2/service-account/change-trusted-account" body: "*" }; } @@ -35,7 +35,7 @@ service ServiceAccount { option (google.api.http) = { post: "/identity/v2/service-account/delete" body: "*" - }; + };` } rpc get (ServiceAccountRequest) returns (ServiceAccountInfo) { @@ -68,8 +68,8 @@ message CreateServiceAccountRequest { string domain_id = 21; string workspace_id = 22; string project_id = 23; - // +optional - string trusted_service_account_id = 24; + // +optional` + string trusted_account_id = 24; } message UpdateServiceAccountRequest { @@ -88,7 +88,7 @@ message UpdateServiceAccountRequest { message ChangeTrustedAccountRequest { string service_account_id = 1; - string trusted_service_account_id = 2; + string trusted_account_id = 2; string domain_id = 21; string workspace_id = 22; } @@ -116,7 +116,7 @@ message ServiceAccountSearchQuery { // +optional string project_id = 23; // +optional - string trusted_service_account_id = 24; + string trusted_account_id = 24; } message ServiceAccountInfo { @@ -128,7 +128,7 @@ message ServiceAccountInfo { string domain_id = 21; string workspace_id = 22; string project_id = 23; - string trusted_service_account_id = 24; + string trusted_account_id = 24; string created_at = 31; } diff --git a/proto/spaceone/api/identity/v2/trusted_service_account.proto b/proto/spaceone/api/identity/v2/trusted_account.proto similarity index 71% rename from proto/spaceone/api/identity/v2/trusted_service_account.proto rename to proto/spaceone/api/identity/v2/trusted_account.proto index f5d015783..76c26cbb3 100644 --- a/proto/spaceone/api/identity/v2/trusted_service_account.proto +++ b/proto/spaceone/api/identity/v2/trusted_account.proto @@ -9,38 +9,38 @@ import "google/protobuf/struct.proto"; import "google/api/annotations.proto"; import "spaceone/api/core/v1/query.proto"; -service TrustedServiceAccount { - rpc create (CreateTrustedServiceAccountRequest) returns (TrustedServiceAccountInfo) { +service TrustedAccount { + rpc create (CreateTrustedAccountRequest) returns (TrustedAccountInfo) { option (google.api.http) = { post: "/identity/v2/trusted-account/create" body: "*" }; } - rpc update (UpdateTrustedServiceAccountRequest) returns (TrustedServiceAccountInfo) { + rpc update (UpdateTrustedAccountRequest) returns (TrustedAccountInfo) { option (google.api.http) = { post: "/identity/v2/trusted-account/update" body: "*" }; } - rpc delete (TrustedServiceAccountRequest) returns (google.protobuf.Empty) { + rpc delete (TrustedAccountRequest) returns (google.protobuf.Empty) { option (google.api.http) = { post: "/identity/v2/trusted-account/delete" body: "*" }; } - rpc get (TrustedServiceAccountRequest) returns (TrustedServiceAccountInfo) { + rpc get (TrustedAccountRequest) returns (TrustedAccountInfo) { option (google.api.http) = { post: "/identity/v2/trusted-account/get" body: "*" }; } - rpc list (TrustedServiceAccountSearchQuery) returns (TrustedServiceAccountsInfo) { + rpc list (TrustedAccountSearchQuery) returns (TrustedAccountsInfo) { option (google.api.http) = { post: "/identity/v2/trusted-account/list" body: "*" }; } - rpc stat (TrustedServiceAccountStatQuery) returns (google.protobuf.Struct) { + rpc stat (TrustedAccountStatQuery) returns (google.protobuf.Struct) { option (google.api.http) = { post: "/identity/v2/trusted-account/stat" body: "*" @@ -48,7 +48,7 @@ service TrustedServiceAccount { } } -message CreateTrustedServiceAccountRequest { +message CreateTrustedAccountRequest { enum Scope { NONE = 0; DOMAIN = 1; @@ -66,8 +66,8 @@ message CreateTrustedServiceAccountRequest { string workspace_id = 22; } -message UpdateTrustedServiceAccountRequest { - string trusted_service_account_id = 1; +message UpdateTrustedAccountRequest { + string trusted_account_id = 1; // +optional string name = 2; // +optional @@ -79,14 +79,14 @@ message UpdateTrustedServiceAccountRequest { string workspace_id = 22; } -message TrustedServiceAccountRequest { - string trusted_service_account_id = 1; +message TrustedAccountRequest { + string trusted_account_id = 1; string domain_id = 21; // +optional string workspace_id = 22; } -message TrustedServiceAccountSearchQuery { +message TrustedAccountSearchQuery { enum Scope { NONE = 0; DOMAIN = 1; @@ -96,7 +96,7 @@ message TrustedServiceAccountSearchQuery { // +optional spaceone.api.core.v1.Query query = 1; // +optional - string trusted_service_account_id = 2; + string trusted_account_id = 2; // +optional string name = 3; // +optional @@ -108,14 +108,14 @@ message TrustedServiceAccountSearchQuery { string workspace_id = 22; } -message TrustedServiceAccountInfo { +message TrustedAccountInfo { enum Scope { NONE = 0; DOMAIN = 1; WORKSPACE = 2; } - string trusted_service_account_id = 1; + string trusted_account_id = 1; string name = 2; google.protobuf.Struct data = 3; string provider = 4; @@ -126,12 +126,12 @@ message TrustedServiceAccountInfo { string created_at = 31; } -message TrustedServiceAccountsInfo { - repeated TrustedServiceAccountInfo results = 1; +message TrustedAccountsInfo { + repeated TrustedAccountInfo results = 1; int32 total_count = 2; } -message TrustedServiceAccountStatQuery { +message TrustedAccountStatQuery { spaceone.api.core.v1.StatisticsQuery query = 1; string domain_id = 21; // +optional diff --git a/proto/spaceone/api/identity/v2/user.proto b/proto/spaceone/api/identity/v2/user.proto index b67efaa4e..049ce84ae 100644 --- a/proto/spaceone/api/identity/v2/user.proto +++ b/proto/spaceone/api/identity/v2/user.proto @@ -135,8 +135,7 @@ enum UserRequiredAction { message MFA { - enum State - { + enum State { NONE = 0; ENABLED = 1; DISABLED = 2; @@ -158,8 +157,7 @@ message UserRoleBinding { string user_id = 1; string role_id = 2; - bool is_managed_role = 3; - Scope scope = 4; + Scope scope = 3; // +optional string workspace_id = 22; } @@ -198,7 +196,6 @@ message UpdateUserRequest { // +optional string email = 4; // +optional - // +optional string language = 5; // +optional string timezone = 6; @@ -291,8 +288,8 @@ message UserSearchQuery { string email = 5; // +optional AuthType auth_type = 6; - // +optional string domain_id = 21; + // +optional string workspace_id = 22; } diff --git a/proto/spaceone/api/identity/v2/user_group.proto b/proto/spaceone/api/identity/v2/user_group.proto index 5d5f3641e..9d1a4f3af 100644 --- a/proto/spaceone/api/identity/v2/user_group.proto +++ b/proto/spaceone/api/identity/v2/user_group.proto @@ -1,5 +1,3 @@ -// User API which allows member management within project, company, and domain -// note: Administrator must register User first. syntax = "proto3"; package spaceone.api.identity.v2;