feat: policies on aggregates (#799)

* feat: move pw policy

* feat: default pw complexity policy

* fix: org password complexity policy

* fix: org password complexity policy

* fix: pw complexity policy with setup

* fix: age and lockout policies on aggregates

* fix: migration

* fix: org iam policy

* fix: org iam policy

* fix: org iam policy

* fix: tests

* fix: policy request

* fix: merge master

* fix(console): policies frontend (#817)

* fix policy build

* fix: age, complexity, lockout policies

* fix: ready return err of setup not done

* fix: fix remove policies in spoolers

* fix: fix remove policies in spoolers

* feat(console): policy settings for iam and org (#824)

* fix policy build

* fix: age, complexity, lockout policies

* fix pwd complexity

* policy remove action

* add imports

* fix accounts card, enable mgmt login policy

* lint

* add iam policy to admin

* toasts, i18n, show default

* routing, i18n

* reset policy, toast i18n, cleanup, routing

* policy delete permission

* lint style

* delete iam policy

* delete non project from grid list, i18n

* lint ts, style

* fix: remove instead delete

* feat(console): delete external idp from user (#835)

* dialog i18n, delete column and function

* dialog i18n

* fix rm button

* Update console/src/assets/i18n/de.json

Co-authored-by: Fabi <[email protected]>

* Update console/src/assets/i18n/de.json

Co-authored-by: Fabi <[email protected]>

* fix: revert env, rename policy, remove comments

* fix: lowercase sich

* fix: pr requests

* Update internal/iam/repository/eventsourcing/eventstore_test.go

Co-authored-by: Silvan <[email protected]>

* fix: tests

* fix: tests

* fix(console): policies (#839)

* fix: nil pointer on get userdata (#815)

* fix: external login (#818)

* fix: external login

* fix: external login

* feat(console): delete user (#819)

* add action col to user table, i18n

* delete user from detail component

* lint

* fix(console): cleanup user detail and member components, user/me redirect, permission guards, filter, org policy guard, user table, scss cleanup (#808)

* fix: remove user.write guard for filtering

* border color

* fix user routing from member tables

* idp detail layout

* generic contact component

* fix redirect to auth user, user grant disable

* disable policy action without permission, i18n

* user-create flex fix, contact ng-content

* rm unused styles

* sidenav divider

* lint

* chore(deps-dev): bump @angular/cli from 10.1.3 to 10.1.4 in /console (#806)

* fix: user session with external login (#797)

* fix: user session with external login

* fix: tests

* fix: tests

* fix: change idp config name

* fix(container): stop copying / and instead only copy zitadel (#691)

* chore: stop copying / and instead only copy zitadel

* Update Dockerfile

* Update release.yml

* enable anchors debug

* fix(container): don't copy alpine content into scratch execpt pwd

* chore: remove need step

* merge master

* chore(deps-dev): bump @angular/cli from 10.1.3 to 10.1.4 in /console

Bumps [@angular/cli](https://github.com/angular/angular-cli) from 10.1.3 to 10.1.4.
- [Release notes](https://github.com/angular/angular-cli/releases)
- [Commits](https://github.com/angular/angular-cli/compare/v10.1.3...v10.1.4)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: Fabi <[email protected]>
Co-authored-by: Florian Forster <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump @angular/language-service from 10.1.3 to 10.1.4 in /console (#805)

* fix: user session with external login (#797)

* fix: user session with external login

* fix: tests

* fix: tests

* fix: change idp config name

* fix(container): stop copying / and instead only copy zitadel (#691)

* chore: stop copying / and instead only copy zitadel

* Update Dockerfile

* Update release.yml

* enable anchors debug

* fix(container): don't copy alpine content into scratch execpt pwd

* chore: remove need step

* merge master

* chore(deps-dev): bump @angular/language-service in /console

Bumps [@angular/language-service](https://github.com/angular/angular/tree/HEAD/packages/language-service) from 10.1.3 to 10.1.4.
- [Release notes](https://github.com/angular/angular/releases)
- [Changelog](https://github.com/angular/angular/blob/master/CHANGELOG.md)
- [Commits](https://github.com/angular/angular/commits/10.1.4/packages/language-service)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: Fabi <[email protected]>
Co-authored-by: Florian Forster <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump codelyzer from 6.0.0 to 6.0.1 in /console (#804)

* fix: user session with external login (#797)

* fix: user session with external login

* fix: tests

* fix: tests

* fix: change idp config name

* fix(container): stop copying / and instead only copy zitadel (#691)

* chore: stop copying / and instead only copy zitadel

* Update Dockerfile

* Update release.yml

* enable anchors debug

* fix(container): don't copy alpine content into scratch execpt pwd

* chore: remove need step

* merge master

* chore(deps-dev): bump codelyzer from 6.0.0 to 6.0.1 in /console

Bumps [codelyzer](https://github.com/mgechev/codelyzer) from 6.0.0 to 6.0.1.
- [Release notes](https://github.com/mgechev/codelyzer/releases)
- [Changelog](https://github.com/mgechev/codelyzer/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mgechev/codelyzer/commits/6.0.1)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: Fabi <[email protected]>
Co-authored-by: Florian Forster <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump @angular-devkit/build-angular from 0.1000.8 to 0.1001.4 in /console (#803)

* fix: user session with external login (#797)

* fix: user session with external login

* fix: tests

* fix: tests

* fix: change idp config name

* fix(container): stop copying / and instead only copy zitadel (#691)

* chore: stop copying / and instead only copy zitadel

* Update Dockerfile

* Update release.yml

* enable anchors debug

* fix(container): don't copy alpine content into scratch execpt pwd

* chore: remove need step

* merge master

* chore(deps-dev): bump @angular-devkit/build-angular in /console

Bumps [@angular-devkit/build-angular](https://github.com/angular/angular-cli) from 0.1000.8 to 0.1001.4.
- [Release notes](https://github.com/angular/angular-cli/releases)
- [Commits](https://github.com/angular/angular-cli/commits)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: Fabi <[email protected]>
Co-authored-by: Florian Forster <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Max Peintner <[email protected]>

* chore(deps): bump uuid from 8.3.0 to 8.3.1 in /console (#802)

* fix: user session with external login (#797)

* fix: user session with external login

* fix: tests

* fix: tests

* fix: change idp config name

* fix(container): stop copying / and instead only copy zitadel (#691)

* chore: stop copying / and instead only copy zitadel

* Update Dockerfile

* Update release.yml

* enable anchors debug

* fix(container): don't copy alpine content into scratch execpt pwd

* chore: remove need step

* merge master

* chore(deps): bump uuid from 8.3.0 to 8.3.1 in /console

Bumps [uuid](https://github.com/uuidjs/uuid) from 8.3.0 to 8.3.1.
- [Release notes](https://github.com/uuidjs/uuid/releases)
- [Changelog](https://github.com/uuidjs/uuid/blob/master/CHANGELOG.md)
- [Commits](https://github.com/uuidjs/uuid/compare/v8.3.0...v8.3.1)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: Fabi <[email protected]>
Co-authored-by: Florian Forster <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* create memberstable as common component

* iam member cleanup

* iam + org m table, user table service user avatar

* toast config

* fix selection emitter

* fix project grant table width

* project grant members refactor

* theme optimizations

* member table col delete

* lint

* fix table row color

* refactor grey color

* lint scss

* org list redirect on click, fix user table undef

* refresh table after grant add

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Fabi <[email protected]>
Co-authored-by: Florian Forster <[email protected]>

* fix(console): intercept navigator.language, set browser lang as default for user without explicit setting, user table outline, member create dialog import (#820)

* i18n interceptor, set language to browser lang

* nullcheck

* rm external idp log

* fix module imports, rm user displayname from i18n

* Update console/src/assets/i18n/de.json

Co-authored-by: Fabi <[email protected]>

* fix: delete external idps from users (#822)

* fix(console): permission regex, account switcher null check, restrict app and member create access (#821)

* fix member table disable, gerneal regexp

* fix user session card, app disable

* memberships max count

* fix policy permissions

* permission check for member add dialog

* lint

* rm accounts log

* rm id regex

* fix: handle usermemberships on project and project grant delete (#825)

* fix: go handler

Co-authored-by: Fabi <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Florian Forster <[email protected]>

* fix: tests

* fix: not needed error handling

Co-authored-by: Max Peintner <[email protected]>
Co-authored-by: Silvan <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Florian Forster <[email protected]>
This commit is contained in:
Fabi
2020-10-15 10:27:13 +02:00
committed by GitHub
co-authored by Florian Forster dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Max Peintner Silvan dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
parent adb24a52fc
commit fbb30840f1
248 changed files with 23960 additions and 13843 deletions
+117 -38
View File
@@ -9,6 +9,14 @@ import {
CreateUserRequest,
DefaultLoginPolicy,
DefaultLoginPolicyView,
DefaultPasswordAgePolicyRequest,
DefaultPasswordAgePolicyView,
DefaultPasswordComplexityPolicy,
DefaultPasswordComplexityPolicyRequest,
DefaultPasswordComplexityPolicyView,
DefaultPasswordLockoutPolicy,
DefaultPasswordLockoutPolicyRequest,
DefaultPasswordLockoutPolicyView,
FailedEventID,
FailedEvents,
IamMember,
@@ -31,6 +39,7 @@ import {
OrgIamPolicy,
OrgIamPolicyID,
OrgIamPolicyRequest,
OrgIamPolicyView,
OrgSetUpRequest,
OrgSetUpResponse,
RemoveIamMemberRequest,
@@ -91,6 +100,70 @@ export class AdminService {
return this.grpcService.admin.removeFailedEvent(req);
}
/* Policies */
/* complexity */
public GetDefaultPasswordComplexityPolicy(): Promise<DefaultPasswordComplexityPolicyView> {
const req = new Empty();
return this.grpcService.admin.getDefaultPasswordComplexityPolicy(req);
}
public UpdateDefaultPasswordComplexityPolicy(
hasLowerCase: boolean,
hasUpperCase: boolean,
hasNumber: boolean,
hasSymbol: boolean,
minLength: number,
): Promise<DefaultPasswordComplexityPolicy> {
const req = new DefaultPasswordComplexityPolicyRequest();
req.setHasLowercase(hasLowerCase);
req.setHasUppercase(hasUpperCase);
req.setHasNumber(hasNumber);
req.setHasSymbol(hasSymbol);
req.setMinLength(minLength);
return this.grpcService.admin.updateDefaultPasswordComplexityPolicy(req);
}
/* age */
public GetDefaultPasswordAgePolicy(): Promise<DefaultPasswordAgePolicyView> {
const req = new Empty();
return this.grpcService.admin.getDefaultPasswordAgePolicy(req);
}
public UpdateDefaultPasswordAgePolicy(
maxAgeDays: number,
expireWarnDays: number,
): Promise<DefaultPasswordAgePolicyView> {
const req = new DefaultPasswordAgePolicyRequest();
req.setMaxAgeDays(maxAgeDays);
req.setExpireWarnDays(expireWarnDays);
return this.grpcService.admin.updateDefaultPasswordAgePolicy(req);
}
/* lockout */
public GetDefaultPasswordLockoutPolicy(): Promise<DefaultPasswordLockoutPolicyView> {
const req = new Empty();
return this.grpcService.admin.getDefaultPasswordLockoutPolicy(req);
}
public UpdateDefaultPasswordLockoutPolicy(
maxAttempts: number,
showLockoutFailures: boolean,
): Promise<DefaultPasswordLockoutPolicy> {
const req = new DefaultPasswordLockoutPolicyRequest();
req.setMaxAttempts(maxAttempts);
req.setShowLockoutFailure(showLockoutFailures);
return this.grpcService.admin.updateDefaultPasswordLockoutPolicy(req);
}
/* login */
public GetDefaultLoginPolicy(
): Promise<DefaultLoginPolicyView> {
const req = new Empty();
@@ -101,6 +174,50 @@ export class AdminService {
return this.grpcService.admin.updateDefaultLoginPolicy(req);
}
/* org iam */
public GetOrgIamPolicy(orgId: string): Promise<OrgIamPolicyView> {
const req = new OrgIamPolicyID();
req.setOrgId(orgId);
return this.grpcService.admin.getOrgIamPolicy(req);
}
public CreateOrgIamPolicy(
orgId: string,
userLoginMustBeDomain: boolean): Promise<OrgIamPolicy> {
const req = new OrgIamPolicyRequest();
req.setOrgId(orgId);
req.setUserLoginMustBeDomain(userLoginMustBeDomain);
return this.grpcService.admin.createOrgIamPolicy(req);
}
public UpdateOrgIamPolicy(
orgId: string,
userLoginMustBeDomain: boolean): Promise<OrgIamPolicy> {
const req = new OrgIamPolicyRequest();
req.setOrgId(orgId);
req.setUserLoginMustBeDomain(userLoginMustBeDomain);
return this.grpcService.admin.updateOrgIamPolicy(req);
}
public RemoveOrgIamPolicy(
orgId: string,
): Promise<Empty> {
const req = new OrgIamPolicyID();
req.setOrgId(orgId);
return this.grpcService.admin.removeOrgIamPolicy(req);
}
/* admin iam */
public GetDefaultOrgIamPolicy(): Promise<OrgIamPolicyView> {
const req = new Empty();
return this.grpcService.admin.getDefaultOrgIamPolicy(req);
}
/* policies end */
public AddIdpProviderToDefaultLoginPolicy(configId: string): Promise<IdpProviderID> {
const req = new IdpProviderID();
req.setIdpConfigId(configId);
@@ -236,42 +353,4 @@ export class AdminService {
return this.grpcService.admin.changeIamMember(req);
}
public GetOrgIamPolicy(orgId: string): Promise<OrgIamPolicy> {
const req = new OrgIamPolicyID();
req.setOrgId(orgId);
return this.grpcService.admin.getOrgIamPolicy(req);
}
public CreateOrgIamPolicy(
orgId: string,
description: string,
userLoginMustBeDomain: boolean): Promise<OrgIamPolicy> {
const req = new OrgIamPolicyRequest();
req.setOrgId(orgId);
req.setDescription(description);
req.setUserLoginMustBeDomain(userLoginMustBeDomain);
return this.grpcService.admin.createOrgIamPolicy(req);
}
public UpdateOrgIamPolicy(
orgId: string,
description: string,
userLoginMustBeDomain: boolean): Promise<OrgIamPolicy> {
const req = new OrgIamPolicyRequest();
req.setOrgId(orgId);
req.setDescription(description);
req.setUserLoginMustBeDomain(userLoginMustBeDomain);
return this.grpcService.admin.updateOrgIamPolicy(req);
}
public deleteOrgIamPolicy(
orgId: string,
): Promise<Empty> {
const req = new OrgIamPolicyID();
req.setOrgId(orgId);
return this.grpcService.admin.deleteOrgIamPolicy(req);
}
}
+32 -47
View File
@@ -41,6 +41,7 @@ import {
IdpView,
LoginName,
LoginPolicy,
LoginPolicyRequest,
LoginPolicyView,
MachineKeyIDRequest,
MachineKeySearchRequest,
@@ -64,24 +65,20 @@ import {
OrgDomainValidationRequest,
OrgDomainValidationResponse,
OrgDomainValidationType,
OrgIamPolicy,
OrgIamPolicyView,
OrgMember,
OrgMemberRoles,
OrgMemberSearchRequest,
OrgMemberSearchResponse,
OrgView,
PasswordAgePolicy,
PasswordAgePolicyCreate,
PasswordAgePolicyID,
PasswordAgePolicyUpdate,
PasswordAgePolicyRequest,
PasswordAgePolicyView,
PasswordComplexityPolicy,
PasswordComplexityPolicyCreate,
PasswordComplexityPolicyID,
PasswordComplexityPolicyUpdate,
PasswordComplexityPolicyRequest,
PasswordComplexityPolicyView,
PasswordLockoutPolicy,
PasswordLockoutPolicyCreate,
PasswordLockoutPolicyID,
PasswordLockoutPolicyUpdate,
PasswordLockoutPolicyRequest,
PasswordRequest,
PrimaryOrgDomainRequest,
Project,
@@ -188,10 +185,14 @@ export class ManagementService {
return this.grpcService.mgmt.getLoginPolicy(req);
}
public UpdateLoginPolicy(req: LoginPolicy): Promise<LoginPolicy> {
public UpdateLoginPolicy(req: LoginPolicyRequest): Promise<LoginPolicy> {
return this.grpcService.mgmt.updateLoginPolicy(req);
}
public CreateLoginPolicy(req: LoginPolicyRequest): Promise<LoginPolicy> {
return this.grpcService.mgmt.createLoginPolicy(req);
}
public RemoveLoginPolicy(): Promise<Empty> {
return this.grpcService.mgmt.removeLoginPolicy(new Empty());
}
@@ -498,63 +499,56 @@ export class ManagementService {
// Policy
public GetMyOrgIamPolicy(): Promise<OrgIamPolicy> {
public GetMyOrgIamPolicy(): Promise<OrgIamPolicyView> {
const req = new Empty();
return this.grpcService.mgmt.getMyOrgIamPolicy(req);
}
public GetPasswordAgePolicy(): Promise<PasswordAgePolicy> {
public GetPasswordAgePolicy(): Promise<PasswordAgePolicyView> {
const req = new Empty();
return this.grpcService.mgmt.getPasswordAgePolicy(req);
}
public CreatePasswordAgePolicy(
description: string,
maxAgeDays: number,
expireWarnDays: number,
): Promise<PasswordAgePolicy> {
const req = new PasswordAgePolicyCreate();
req.setDescription(description);
const req = new PasswordAgePolicyRequest();
req.setMaxAgeDays(maxAgeDays);
req.setExpireWarnDays(expireWarnDays);
return this.grpcService.mgmt.createPasswordAgePolicy(req);
}
public DeletePasswordAgePolicy(id: string): Promise<Empty> {
const req = new PasswordAgePolicyID();
req.setId(id);
return this.grpcService.mgmt.deletePasswordAgePolicy(req);
public RemovePasswordAgePolicy(): Promise<Empty> {
const req = new Empty();
return this.grpcService.mgmt.removePasswordAgePolicy(req);
}
public UpdatePasswordAgePolicy(
description: string,
maxAgeDays: number,
expireWarnDays: number,
): Promise<PasswordAgePolicy> {
const req = new PasswordAgePolicyUpdate();
req.setDescription(description);
const req = new PasswordAgePolicyRequest();
req.setMaxAgeDays(maxAgeDays);
req.setExpireWarnDays(expireWarnDays);
return this.grpcService.mgmt.updatePasswordAgePolicy(req);
}
public GetPasswordComplexityPolicy(): Promise<PasswordComplexityPolicy> {
public GetPasswordComplexityPolicy(): Promise<PasswordComplexityPolicyView> {
const req = new Empty();
return this.grpcService.mgmt.getPasswordComplexityPolicy(req);
}
public CreatePasswordComplexityPolicy(
description: string,
hasLowerCase: boolean,
hasUpperCase: boolean,
hasNumber: boolean,
hasSymbol: boolean,
minLength: number,
): Promise<PasswordComplexityPolicy> {
const req = new PasswordComplexityPolicyCreate();
req.setDescription(description);
const req = new PasswordComplexityPolicyRequest();
req.setHasLowercase(hasLowerCase);
req.setHasUppercase(hasUpperCase);
req.setHasNumber(hasNumber);
@@ -563,22 +557,19 @@ export class ManagementService {
return this.grpcService.mgmt.createPasswordComplexityPolicy(req);
}
public DeletePasswordComplexityPolicy(id: string): Promise<Empty> {
const req = new PasswordComplexityPolicyID();
req.setId(id);
return this.grpcService.mgmt.deletePasswordComplexityPolicy(req);
public removePasswordComplexityPolicy(): Promise<Empty> {
const req = new Empty();
return this.grpcService.mgmt.removePasswordComplexityPolicy(req);
}
public UpdatePasswordComplexityPolicy(
description: string,
hasLowerCase: boolean,
hasUpperCase: boolean,
hasNumber: boolean,
hasSymbol: boolean,
minLength: number,
): Promise<PasswordComplexityPolicy> {
const req = new PasswordComplexityPolicyUpdate();
req.setDescription(description);
const req = new PasswordComplexityPolicy();
req.setHasLowercase(hasLowerCase);
req.setHasUppercase(hasUpperCase);
req.setHasNumber(hasNumber);
@@ -594,34 +585,28 @@ export class ManagementService {
}
public CreatePasswordLockoutPolicy(
description: string,
maxAttempts: number,
showLockoutFailures: boolean,
): Promise<PasswordLockoutPolicy> {
const req = new PasswordLockoutPolicyCreate();
req.setDescription(description);
const req = new PasswordLockoutPolicyRequest();
req.setMaxAttempts(maxAttempts);
req.setShowLockOutFailures(showLockoutFailures);
req.setShowLockoutFailure(showLockoutFailures);
return this.grpcService.mgmt.createPasswordLockoutPolicy(req);
}
public DeletePasswordLockoutPolicy(id: string): Promise<Empty> {
const req = new PasswordLockoutPolicyID();
req.setId(id);
return this.grpcService.mgmt.deletePasswordLockoutPolicy(req);
public RemovePasswordLockoutPolicy(): Promise<Empty> {
const req = new Empty();
return this.grpcService.mgmt.removePasswordLockoutPolicy(req);
}
public UpdatePasswordLockoutPolicy(
description: string,
maxAttempts: number,
showLockoutFailures: boolean,
): Promise<PasswordLockoutPolicy> {
const req = new PasswordLockoutPolicyUpdate();
req.setDescription(description);
const req = new PasswordLockoutPolicy();
req.setMaxAttempts(maxAttempts);
req.setShowLockOutFailures(showLockoutFailures);
req.setShowLockoutFailure(showLockoutFailures);
return this.grpcService.mgmt.updatePasswordLockoutPolicy(req);
}