feat: Policy (#79)

* policy added

* Make it executable

* Make it executable, corrections

* password age policy added

* password lockout policy added

* corrections

* policy added

* Make it executable

* Make it executable, corrections

* password age policy added

* password lockout policy added

* corrections

* fix(repository): remove second policy

* complaints corrected

* Init tests

* add some tests

* more tests added

* systemfefaults added

* default values load added

* check for default value added

* fixes

* fixed

* create policy if not exists

* eventstore tests added

Co-authored-by: adlerhurst <silvan.reusser@gmail.com>
This commit is contained in:
Michael Waeger
2020-05-14 11:48:57 +02:00
committed by GitHub
parent 767bc5ce6c
commit b9c938594c
46 changed files with 3529 additions and 851 deletions

View File

@@ -368,7 +368,7 @@ service ManagementService {
rpc UpdatePasswordComplexityPolicy(PasswordComplexityPolicyUpdate) returns (PasswordComplexityPolicy) {
option (google.api.http) = {
put: "/policies/passwords/complexity/{id}"
put: "/policies/passwords/complexity"
body: "*"
};
@@ -379,7 +379,7 @@ service ManagementService {
rpc DeletePasswordComplexityPolicy(PasswordComplexityPolicyID) returns (google.protobuf.Empty) {
option (google.api.http) = {
delete: "/policies/passwords/complexity/{id}"
delete: "/policies/passwords/complexity"
};
option (caos.zitadel.utils.v1.auth_option) = {
@@ -411,7 +411,7 @@ service ManagementService {
rpc UpdatePasswordAgePolicy(PasswordAgePolicyUpdate) returns (PasswordAgePolicy) {
option (google.api.http) = {
put: "/policies/passwords/age/{id}"
put: "/policies/passwords/age"
body: "*"
};
@@ -422,7 +422,7 @@ service ManagementService {
rpc DeletePasswordAgePolicy(PasswordAgePolicyID) returns (google.protobuf.Empty) {
option (google.api.http) = {
delete: "/policies/passwords/age/{id}"
delete: "/policies/passwords/age"
};
option (caos.zitadel.utils.v1.auth_option) = {
@@ -454,7 +454,7 @@ service ManagementService {
rpc UpdatePasswordLockoutPolicy(PasswordLockoutPolicyUpdate) returns (PasswordLockoutPolicy) {
option (google.api.http) = {
put: "/policies/passwords/lockout/{id}"
put: "/policies/passwords/lockout"
body: "*"
};
@@ -465,7 +465,7 @@ service ManagementService {
rpc DeletePasswordLockoutPolicy(PasswordLockoutPolicyID) returns (google.protobuf.Empty) {
option (google.api.http) = {
delete: "/policies/passwords/lockout/{id}"
delete: "/policies/passwords/lockout"
};
option (caos.zitadel.utils.v1.auth_option) = {
@@ -1532,6 +1532,7 @@ message PasswordComplexityPolicy {
bool has_number = 9;
bool has_symbol = 10;
uint64 sequence = 11;
bool is_default = 12;
}
message PasswordComplexityPolicyCreate {
@@ -1566,6 +1567,7 @@ message PasswordAgePolicy {
uint64 max_age_days = 6;
uint64 expire_warn_days = 7;
uint64 sequence = 8;
bool is_default = 9;
}
message PasswordAgePolicyCreate {
@@ -1594,6 +1596,8 @@ message PasswordLockoutPolicy {
uint64 max_attempts = 6;
bool show_lock_out_failures = 7;
uint64 sequence = 8;
bool is_default = 9
;
}
message PasswordLockoutPolicyCreate {