fix: Merge master (#1373)

* feat(console): app infos, api apps, fix redirects on create, fix role update, redesign idps, policy, prettier history  (#1310)

* idp fixes

* idp cleanup and rehaul, complexity policy preview

* policy fixes, orthodox redirect

* link component, add links to policies

* redirect pipe, state labels

* Cnsl map changes (#1315)

* map changes to different format

* fix changes layout, cursor

* set asc values

* fix user appearance in changes, index

* changes

* app create with api

* api app create

* auth method for api config

* authmethods, app card for api, authmethod in dev create

* move machine keys to own module

* jwt method for oidc

* fix app edit

* save toast

* fix changes, change det in app detail

* regenerate secret

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

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

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix policy backlink

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
(cherry picked from commit 40a7e958d7)

* fix: i18n refs, unnecessary logs (#1343)

(cherry picked from commit 2e04c977eb)

* fix: tos link (#1345)

(cherry picked from commit 5333ef10c1)

* fix: reactivate/deactivate idp, remove idp provider (#1348)

* fix: reactivate/deactivate idp, remove idp provider

* fix build

* fix(console): add jwt to selection, idp deactivate reactivate (#1347)

* fix: log error on idp change

* add jwt to method selection

Co-authored-by: Max Peintner <max@caos.ch>

(cherry picked from commit c8b9888427)

* fix: reactivate/deactivate idp (#1351)

(cherry picked from commit 54f395e2e0)

Co-authored-by: Max Peintner <max@caos.ch>
This commit is contained in:
Fabi
2021-03-01 09:01:34 +01:00
committed by GitHub
parent 3c07a186fc
commit 9f417f3957
113 changed files with 2976 additions and 1327 deletions

View File

@@ -5,10 +5,16 @@ import { BehaviorSubject } from 'rxjs';
import { MultiFactorsResult } from '../proto/generated/admin_pb';
import {
AddClientKeyRequest,
AddClientKeyResponse,
AddMachineKeyRequest,
AddMachineKeyResponse,
AddOrgDomainRequest,
AddOrgMemberRequest,
APIApplicationCreate,
APIAuthMethodType,
APIConfig,
APIConfigUpdate,
Application,
ApplicationID,
ApplicationSearchQuery,
@@ -16,9 +22,14 @@ import {
ApplicationSearchResponse,
ApplicationUpdate,
ApplicationView,
AuthNKeyType,
ChangeOrgMemberRequest,
ChangeRequest,
Changes,
ClientKeyIDRequest,
ClientKeySearchRequest,
ClientKeySearchResponse,
ClientSecret,
CreateHumanRequest,
CreateMachineRequest,
CreateUserRequest,
@@ -365,6 +376,23 @@ export class ManagementService {
return this.grpcService.mgmt.addMachineKey(req);
}
public addClientKey(
projectId: string,
appId: string,
type: AuthNKeyType,
date?: Timestamp,
): Promise<AddClientKeyResponse> {
const req = new AddClientKeyRequest();
req.setType(type);
req.setProjectId(projectId);
req.setApplicationId(appId);
if (date) {
req.setExpirationDate(date);
}
return this.grpcService.mgmt.addClientKey(req);
}
public DeleteMachineKey(
keyId: string,
userId: string,
@@ -376,6 +404,20 @@ export class ManagementService {
return this.grpcService.mgmt.deleteMachineKey(req);
}
public DeleteClientKey(
keyId: string,
projectId: string,
appId: string,
): Promise<Empty> {
const req = new ClientKeyIDRequest();
req.setKeyId(keyId);
req.setProjectId(projectId);
req.setApplicationId(appId);
console.log(keyId, projectId, appId);
return this.grpcService.mgmt.deleteClientKey(req);
}
public SearchMachineKeys(
userId: string,
limit: number,
@@ -392,6 +434,24 @@ export class ManagementService {
return this.grpcService.mgmt.searchMachineKeys(req);
}
public SearchClientKeys(
projectId: string,
appId: string,
limit: number,
offset: number,
asc?: boolean,
): Promise<ClientKeySearchResponse> {
const req = new ClientKeySearchRequest();
req.setProjectId(projectId);
req.setApplicationId(appId);
req.setLimit(limit);
req.setOffset(offset);
if (asc) {
req.setAsc(asc);
}
return this.grpcService.mgmt.searchClientKeys(req);
}
public RemoveExternalIDP(
externalUserId: string,
idpConfigId: string,
@@ -974,6 +1034,7 @@ export class ManagementService {
req.setId(id);
req.setSecId(secId);
req.setLimit(limit);
req.setAsc(false);
req.setSequenceOffset(offset);
return this.grpcService.mgmt.applicationChanges(req);
}
@@ -982,6 +1043,7 @@ export class ManagementService {
const req = new ChangeRequest();
req.setId(id);
req.setLimit(limit);
req.setAsc(false);
req.setSequenceOffset(offset);
return this.grpcService.mgmt.orgChanges(req);
}
@@ -990,6 +1052,7 @@ export class ManagementService {
const req = new ChangeRequest();
req.setId(id);
req.setLimit(limit);
req.setAsc(false);
req.setSequenceOffset(offset);
return this.grpcService.mgmt.projectChanges(req);
}
@@ -998,6 +1061,7 @@ export class ManagementService {
const req = new ChangeRequest();
req.setId(id);
req.setLimit(limit);
req.setAsc(false);
req.setSequenceOffset(sequenceoffset);
return this.grpcService.mgmt.userChanges(req);
}
@@ -1208,13 +1272,20 @@ export class ManagementService {
return this.grpcService.mgmt.deactivateApplication(req);
}
public RegenerateOIDCClientSecret(id: string, projectId: string): Promise<any> {
public RegenerateOIDCClientSecret(id: string, projectId: string): Promise<ClientSecret> {
const req = new ApplicationID();
req.setId(id);
req.setProjectId(projectId);
return this.grpcService.mgmt.regenerateOIDCClientSecret(req);
}
public RegenerateAPIClientSecret(id: string, projectId: string): Promise<ClientSecret> {
const req = new ApplicationID();
req.setId(id);
req.setProjectId(projectId);
return this.grpcService.mgmt.regenerateAPIClientSecret(req);
}
public SearchProjectRoles(
projectId: string,
limit: number,
@@ -1351,6 +1422,15 @@ export class ManagementService {
return this.grpcService.mgmt.createOIDCApplication(req);
}
public CreateAPIApplication(app: APIApplicationCreate.AsObject): Promise<Application> {
const req = new APIApplicationCreate();
req.setProjectId(app.projectId);
req.setName(app.name);
req.setAuthMethodType(app.authMethodType);
return this.grpcService.mgmt.createAPIApplication(req);
}
public UpdateApplication(projectId: string, appId: string, name: string): Promise<Application> {
const req = new ApplicationUpdate();
req.setId(appId);
@@ -1363,6 +1443,10 @@ export class ManagementService {
return this.grpcService.mgmt.updateApplicationOIDCConfig(req);
}
public UpdateAPIAppConfig(req: APIConfigUpdate): Promise<APIConfig> {
return this.grpcService.mgmt.updateApplicationAPIConfig(req);
}
public RemoveApplication(projectId: string, appId: string): Promise<Empty> {
const req = new ApplicationID();
req.setId(appId);