Skip to content

Commit

Permalink
Merge pull request #167 from whdalsrnt/master
Browse files Browse the repository at this point in the history
Change Identity v2 APIs
  • Loading branch information
whdalsrnt authored Nov 28, 2023
2 parents afc296f + 9789f2d commit 7faa8bb
Show file tree
Hide file tree
Showing 9 changed files with 248 additions and 112 deletions.
21 changes: 10 additions & 11 deletions proto/spaceone/api/identity/v2/api_key.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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) = {
Expand Down Expand Up @@ -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;
Expand Down
67 changes: 37 additions & 30 deletions proto/spaceone/api/identity/v2/app.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand All @@ -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 {
Expand All @@ -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;

}
32 changes: 11 additions & 21 deletions proto/spaceone/api/identity/v2/project.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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;
Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand Down
42 changes: 27 additions & 15 deletions proto/spaceone/api/identity/v2/provider.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand All @@ -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;
}

Expand All @@ -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 {
Expand Down
Loading

0 comments on commit 7faa8bb

Please sign in to comment.