Skip to content

Commit

Permalink
feat: change identity v2 messages
Browse files Browse the repository at this point in the history
  • Loading branch information
whdalsrnt committed Nov 28, 2023
1 parent c83ed24 commit 9789f2d
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 49 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;

}
9 changes: 3 additions & 6 deletions proto/spaceone/api/identity/v2/user.proto
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,7 @@ enum UserRequiredAction {


message MFA {
enum State
{
enum State {
NONE = 0;
ENABLED = 1;
DISABLED = 2;
Expand All @@ -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;
}
Expand Down Expand Up @@ -198,7 +196,6 @@ message UpdateUserRequest {
// +optional
string email = 4;
// +optional
// +optional
string language = 5;
// +optional
string timezone = 6;
Expand Down Expand Up @@ -291,8 +288,8 @@ message UserSearchQuery {
string email = 5;
// +optional
AuthType auth_type = 6;
// +optional
string domain_id = 21;
// +optional
string workspace_id = 22;
}

Expand Down
2 changes: 0 additions & 2 deletions proto/spaceone/api/identity/v2/user_group.proto
Original file line number Diff line number Diff line change
@@ -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;
Expand Down

0 comments on commit 9789f2d

Please sign in to comment.