feat: idps (#1188)

* add setup steps

* refactoring

* omitempty

* cleanup

* begin org

* create org

* setup org

* setup org

* merge

* fixes

* fixes

* fixes

* add project

* add oidc application

* fix app creation

* add resourceOwner to writemodels

* resource owner

* cleanup

* global org, iam project and iam member in setup

* logs

* logs

* logs

* cleanup

* Update internal/v2/command/project.go

Co-authored-by: Fabi <38692350+fgerschwiler@users.noreply.github.com>

* check project state

* add org domain commands

* add org status changes and member commands

* fixes

* policies

* login policy

* fix iam project event

* mapper

* label policy

* change to command

* fix

* fix

* handle change event differently and lot of fixes

* idps

* fixes

* fixes

* fixes

* changedEvent handling

* fix change events

* remove creation date

Co-authored-by: Fabi <38692350+fgerschwiler@users.noreply.github.com>
This commit is contained in:
Livio Amstutz
2021-01-20 11:06:52 +01:00
committed by GitHub
parent 3eb909c4b4
commit c2e6e782a8
42 changed files with 1070 additions and 348 deletions

View File

@@ -274,7 +274,7 @@ service AdminService {
};
}
rpc DeactivateIdpConfig(IdpID) returns (Idp) {
rpc DeactivateIdpConfig(IdpID) returns (google.protobuf.Empty) {
option (google.api.http) = {
put: "/idps/{id}/_deactivate"
body: "*"
@@ -285,7 +285,7 @@ service AdminService {
};
}
rpc ReactivateIdpConfig(IdpID) returns (Idp) {
rpc ReactivateIdpConfig(IdpID) returns (google.protobuf.Empty) {
option (google.api.http) = {
put: "/idps/{id}/_reactivate"
body: "*"
@@ -544,10 +544,9 @@ message UniqueOrgResponse {
message Org {
string id = 1;
OrgState state = 2;
google.protobuf.Timestamp creation_date = 3;
google.protobuf.Timestamp change_date = 4;
string name = 5;
string domain = 6;
google.protobuf.Timestamp change_date = 3;
string name = 4;
string domain = 5;
}
enum OrgState {
@@ -717,8 +716,7 @@ message OrgIamPolicy {
bool user_login_must_be_domain = 2;
bool default = 3;
uint64 sequence = 4;
google.protobuf.Timestamp creation_date = 5;
google.protobuf.Timestamp change_date = 6;
google.protobuf.Timestamp change_date = 5;
}
message OrgIamPolicyView {
@@ -748,8 +746,7 @@ message IamMember {
string user_id = 1;
repeated string roles = 2;
google.protobuf.Timestamp change_date = 3;
google.protobuf.Timestamp creation_date = 4;
uint64 sequence = 5;
uint64 sequence = 4;
}
message AddIamMemberRequest {
@@ -864,14 +861,13 @@ message IdpID {
message Idp {
string id = 1;
IdpState state = 2;
google.protobuf.Timestamp creation_date = 3;
google.protobuf.Timestamp change_date = 4;
string name = 5;
IdpStylingType styling_type = 6;
google.protobuf.Timestamp change_date = 3;
string name = 4;
IdpStylingType styling_type = 5;
oneof idp_config {
OidcIdpConfig oidc_config = 7;
OidcIdpConfig oidc_config = 6;
}
uint64 sequence = 8;
uint64 sequence = 7;
}
message IdpUpdate {
@@ -976,8 +972,7 @@ enum IdpSearchKey {
message DefaultLabelPolicy {
string primary_color = 1;
string secondary_color = 2;
google.protobuf.Timestamp creation_date = 3;
google.protobuf.Timestamp change_date = 4;
google.protobuf.Timestamp change_date = 3;
}
message DefaultLabelPolicyUpdate {
@@ -996,10 +991,9 @@ message DefaultLoginPolicy {
bool allow_username_password = 1;
bool allow_register = 2;
bool allow_external_idp = 3;
google.protobuf.Timestamp creation_date = 4;
google.protobuf.Timestamp change_date = 5;
bool force_mfa = 6;
PasswordlessType passwordless_type = 7;
google.protobuf.Timestamp change_date = 4;
bool force_mfa = 5;
PasswordlessType passwordless_type = 6;
}
message DefaultLoginPolicyRequest {
@@ -1088,8 +1082,7 @@ message DefaultPasswordComplexityPolicy {
bool has_lowercase = 3;
bool has_number = 4;
bool has_symbol = 5;
google.protobuf.Timestamp creation_date = 6;
google.protobuf.Timestamp change_date = 7;
google.protobuf.Timestamp change_date = 6;
}
message DefaultPasswordComplexityPolicyRequest {
@@ -1113,8 +1106,7 @@ message DefaultPasswordComplexityPolicyView {
message DefaultPasswordAgePolicy {
uint64 max_age_days = 1;
uint64 expire_warn_days = 2;
google.protobuf.Timestamp creation_date = 3;
google.protobuf.Timestamp change_date = 4;
google.protobuf.Timestamp change_date = 3;
}
message DefaultPasswordAgePolicyRequest {
@@ -1132,8 +1124,7 @@ message DefaultPasswordAgePolicyView {
message DefaultPasswordLockoutPolicy {
uint64 max_attempts = 1;
bool show_lockout_failure = 2;
google.protobuf.Timestamp creation_date = 3;
google.protobuf.Timestamp change_date = 4;
google.protobuf.Timestamp change_date = 3;
}
message DefaultPasswordLockoutPolicyRequest {

View File

@@ -1265,7 +1265,7 @@ service ManagementService {
};
}
rpc DeactivateIdpConfig(IdpID) returns (Idp) {
rpc DeactivateIdpConfig(IdpID) returns (google.protobuf.Empty) {
option (google.api.http) = {
put: "/orgs/me/idps/{id}/_deactivate"
body: "*"
@@ -1276,7 +1276,7 @@ service ManagementService {
};
}
rpc ReactivateIdpConfig(IdpID) returns (Idp) {
rpc ReactivateIdpConfig(IdpID) returns (google.protobuf.Empty) {
option (google.api.http) = {
put: "/orgs/me/idps/{id}/_reactivate"
body: "*"
@@ -2126,10 +2126,9 @@ message OrgCreateRequest {
message Org {
string id = 1;
OrgState state = 2;
google.protobuf.Timestamp creation_date = 3;
google.protobuf.Timestamp change_date = 4;
string name = 5;
uint64 sequence = 6;
google.protobuf.Timestamp change_date = 3;
string name = 4;
uint64 sequence = 5;
}
message OrgView {
@@ -2153,12 +2152,11 @@ message Domain {
message OrgDomain {
string org_id = 1;
google.protobuf.Timestamp creation_date = 2;
google.protobuf.Timestamp change_date = 3;
string domain = 4;
bool verified = 5;
bool primary = 6;
uint64 sequence = 7;
google.protobuf.Timestamp change_date = 2;
string domain = 3;
bool verified = 4;
bool primary = 5;
uint64 sequence = 6;
}
message OrgDomainView {
@@ -2238,8 +2236,7 @@ message OrgMember {
string user_id = 1;
repeated string roles = 2;
google.protobuf.Timestamp change_date = 3;
google.protobuf.Timestamp creation_date = 4;
uint64 sequence = 5;
uint64 sequence = 4;
}
message AddOrgMemberRequest {
@@ -2986,14 +2983,13 @@ message IdpID {
message Idp {
string id = 1;
IdpState state = 2;
google.protobuf.Timestamp creation_date = 3;
google.protobuf.Timestamp change_date = 4;
string name = 5;
IdpStylingType styling_type = 6;
google.protobuf.Timestamp change_date = 3;
string name = 4;
IdpStylingType styling_type = 5;
oneof idp_config {
OidcIdpConfig oidc_config = 7;
OidcIdpConfig oidc_config = 6;
}
uint64 sequence = 8;
uint64 sequence = 7;
}
message IdpUpdate {
@@ -3103,10 +3099,9 @@ message LoginPolicy {
bool allow_username_password = 1;
bool allow_register = 2;
bool allow_external_idp = 3;
google.protobuf.Timestamp creation_date = 4;
google.protobuf.Timestamp change_date = 5;
bool force_mfa = 6;
PasswordlessType passwordless_type = 7;
google.protobuf.Timestamp change_date = 4;
bool force_mfa = 5;
PasswordlessType passwordless_type = 6;
}
message LoginPolicyRequest {
@@ -3252,8 +3247,7 @@ message PasswordComplexityPolicy {
bool has_number = 4;
bool has_symbol = 5;
uint64 sequence = 6;
google.protobuf.Timestamp creation_date = 7;
google.protobuf.Timestamp change_date = 8;
google.protobuf.Timestamp change_date = 7;
}
message PasswordComplexityPolicyRequest {
@@ -3280,8 +3274,7 @@ message PasswordAgePolicy {
uint64 max_age_days = 1;
uint64 expire_warn_days = 2;
uint64 sequence = 3;
google.protobuf.Timestamp creation_date = 4;
google.protobuf.Timestamp change_date = 5;
google.protobuf.Timestamp change_date = 4;
}
message PasswordAgePolicyRequest {
@@ -3302,8 +3295,7 @@ message PasswordLockoutPolicy {
uint64 max_attempts = 1;
bool show_lockout_failure = 2;
uint64 sequence = 3;
google.protobuf.Timestamp creation_date = 4;
google.protobuf.Timestamp change_date = 5;
google.protobuf.Timestamp change_date = 4;
}
message PasswordLockoutPolicyRequest {