mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-25 22:08:46 +00:00
chore!: Introduce ZITADEL v3 (#9645)
This PR summarizes multiple changes specifically only available with ZITADEL v3: - feat: Web Keys management (https://github.com/zitadel/zitadel/pull/9526) - fix(cmd): ensure proper working of mirror (https://github.com/zitadel/zitadel/pull/9509) - feat(Authz): system user support for permission check v2 (https://github.com/zitadel/zitadel/pull/9640) - chore(license): change from Apache to AGPL (https://github.com/zitadel/zitadel/pull/9597) - feat(console): list v2 sessions (https://github.com/zitadel/zitadel/pull/9539) - fix(console): add loginV2 feature flag (https://github.com/zitadel/zitadel/pull/9682) - fix(feature flags): allow reading "own" flags (https://github.com/zitadel/zitadel/pull/9649) - feat(console): add Actions V2 UI (https://github.com/zitadel/zitadel/pull/9591) BREAKING CHANGE - feat(webkey): migrate to v2beta API (https://github.com/zitadel/zitadel/pull/9445) - chore!: remove CockroachDB Support (https://github.com/zitadel/zitadel/pull/9444) - feat(actions): migrate to v2beta API (https://github.com/zitadel/zitadel/pull/9489) --------- Co-authored-by: Livio Spring <[email protected]> Co-authored-by: Stefan Benz <[email protected]> Co-authored-by: Silvan <[email protected]> Co-authored-by: Ramon <[email protected]> Co-authored-by: Elio Bischof <[email protected]> Co-authored-by: Kenta Yamaguchi <[email protected]> Co-authored-by: Harsha Reddy <[email protected]> Co-authored-by: Livio Spring <[email protected]> Co-authored-by: Max Peintner <[email protected]> Co-authored-by: Iraq <[email protected]> Co-authored-by: Florian Forster <[email protected]> Co-authored-by: Tim Möhlmann <[email protected]> Co-authored-by: Copilot <[email protected]> Co-authored-by: Max Peintner <[email protected]>
This commit is contained in:
co-authored by
Livio Spring
Stefan Benz
Silvan
Ramon
Elio Bischof
Kenta Yamaguchi
Harsha Reddy
Livio Spring
Max Peintner
Iraq
Florian Forster
Tim Möhlmann
Copilot
Max Peintner
parent
d14a23ae7e
commit
07ce3b6905
@@ -0,0 +1,77 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { GrpcService } from './grpc.service';
|
||||
import { MessageInitShape } from '@bufbuild/protobuf';
|
||||
import {
|
||||
CreateTargetRequestSchema,
|
||||
CreateTargetResponse,
|
||||
DeleteTargetRequestSchema,
|
||||
GetTargetRequestSchema,
|
||||
GetTargetResponse,
|
||||
ListExecutionFunctionsRequestSchema,
|
||||
ListExecutionFunctionsResponse,
|
||||
ListExecutionMethodsRequestSchema,
|
||||
ListExecutionMethodsResponse,
|
||||
ListExecutionServicesRequestSchema,
|
||||
ListExecutionServicesResponse,
|
||||
ListExecutionsRequestSchema,
|
||||
ListExecutionsResponse,
|
||||
ListTargetsRequestSchema,
|
||||
ListTargetsResponse,
|
||||
SetExecutionRequestSchema,
|
||||
SetExecutionResponse,
|
||||
UpdateTargetRequestSchema,
|
||||
UpdateTargetResponse,
|
||||
} from '@zitadel/proto/zitadel/action/v2beta/action_service_pb';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class ActionService {
|
||||
constructor(private readonly grpcService: GrpcService) {}
|
||||
|
||||
public listTargets(req: MessageInitShape<typeof ListTargetsRequestSchema>): Promise<ListTargetsResponse> {
|
||||
return this.grpcService.actionNew.listTargets(req);
|
||||
}
|
||||
|
||||
public createTarget(req: MessageInitShape<typeof CreateTargetRequestSchema>): Promise<CreateTargetResponse> {
|
||||
return this.grpcService.actionNew.createTarget(req);
|
||||
}
|
||||
|
||||
public deleteTarget(req: MessageInitShape<typeof DeleteTargetRequestSchema>): Promise<CreateTargetResponse> {
|
||||
return this.grpcService.actionNew.deleteTarget(req);
|
||||
}
|
||||
|
||||
public getTarget(req: MessageInitShape<typeof GetTargetRequestSchema>): Promise<GetTargetResponse> {
|
||||
return this.grpcService.actionNew.getTarget(req);
|
||||
}
|
||||
|
||||
public updateTarget(req: MessageInitShape<typeof UpdateTargetRequestSchema>): Promise<UpdateTargetResponse> {
|
||||
return this.grpcService.actionNew.updateTarget(req);
|
||||
}
|
||||
|
||||
public listExecutionFunctions(
|
||||
req: MessageInitShape<typeof ListExecutionFunctionsRequestSchema>,
|
||||
): Promise<ListExecutionFunctionsResponse> {
|
||||
return this.grpcService.actionNew.listExecutionFunctions(req);
|
||||
}
|
||||
|
||||
public listExecutionMethods(
|
||||
req: MessageInitShape<typeof ListExecutionMethodsRequestSchema>,
|
||||
): Promise<ListExecutionMethodsResponse> {
|
||||
return this.grpcService.actionNew.listExecutionMethods(req);
|
||||
}
|
||||
|
||||
public listExecutionServices(
|
||||
req: MessageInitShape<typeof ListExecutionServicesRequestSchema>,
|
||||
): Promise<ListExecutionServicesResponse> {
|
||||
return this.grpcService.actionNew.listExecutionServices(req);
|
||||
}
|
||||
|
||||
public listExecutions(req: MessageInitShape<typeof ListExecutionsRequestSchema>): Promise<ListExecutionsResponse> {
|
||||
return this.grpcService.actionNew.listExecutions(req);
|
||||
}
|
||||
|
||||
public setExecution(req: MessageInitShape<typeof SetExecutionRequestSchema>): Promise<SetExecutionResponse> {
|
||||
return this.grpcService.actionNew.setExecution(req);
|
||||
}
|
||||
}
|
||||
@@ -18,10 +18,22 @@ import { NewConnectWebOrgInterceptor, OrgInterceptor, OrgInterceptorProvider } f
|
||||
import { StorageService } from './storage.service';
|
||||
import { UserServiceClient } from '../proto/generated/zitadel/user/v2/User_serviceServiceClientPb';
|
||||
//@ts-ignore
|
||||
import { createFeatureServiceClient, createUserServiceClient } from '@zitadel/client/v2';
|
||||
import { createFeatureServiceClient, createUserServiceClient, createSessionServiceClient } from '@zitadel/client/v2';
|
||||
//@ts-ignore
|
||||
import { createAuthServiceClient, createManagementServiceClient } from '@zitadel/client/v1';
|
||||
import { createGrpcWebTransport } from '@connectrpc/connect-web';
|
||||
// @ts-ignore
|
||||
import { createClientFor } from '@zitadel/client';
|
||||
import { Client, Transport } from '@connectrpc/connect';
|
||||
|
||||
import { WebKeyService } from '@zitadel/proto/zitadel/webkey/v2beta/webkey_service_pb';
|
||||
import { ActionService } from '@zitadel/proto/zitadel/action/v2beta/action_service_pb';
|
||||
|
||||
// @ts-ignore
|
||||
import { createClientFor } from '@zitadel/client';
|
||||
|
||||
const createWebKeyServiceClient = createClientFor(WebKeyService);
|
||||
const createActionServiceClient = createClientFor(ActionService);
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
@@ -32,15 +44,17 @@ export class GrpcService {
|
||||
public admin!: AdminServiceClient;
|
||||
public user!: UserServiceClient;
|
||||
public userNew!: ReturnType<typeof createUserServiceClient>;
|
||||
public session!: ReturnType<typeof createSessionServiceClient>;
|
||||
public mgmtNew!: ReturnType<typeof createManagementServiceClient>;
|
||||
public authNew!: ReturnType<typeof createAuthServiceClient>;
|
||||
public featureNew!: ReturnType<typeof createFeatureServiceClient>;
|
||||
public actionNew!: ReturnType<typeof createActionServiceClient>;
|
||||
public webKey!: ReturnType<typeof createWebKeyServiceClient>;
|
||||
|
||||
constructor(
|
||||
private readonly envService: EnvironmentService,
|
||||
private readonly platformLocation: PlatformLocation,
|
||||
private readonly authenticationService: AuthenticationService,
|
||||
private readonly storageService: StorageService,
|
||||
private readonly translate: TranslateService,
|
||||
private readonly exhaustedService: ExhaustedService,
|
||||
private readonly authInterceptor: AuthInterceptor,
|
||||
@@ -105,9 +119,12 @@ export class GrpcService {
|
||||
],
|
||||
});
|
||||
this.userNew = createUserServiceClient(transport);
|
||||
this.session = createSessionServiceClient(transport);
|
||||
this.mgmtNew = createManagementServiceClient(transportOldAPIs);
|
||||
this.authNew = createAuthServiceClient(transport);
|
||||
this.featureNew = createFeatureServiceClient(transport);
|
||||
this.actionNew = createActionServiceClient(transport);
|
||||
this.webKey = createWebKeyServiceClient(transport);
|
||||
|
||||
const authConfig: AuthConfig = {
|
||||
scope: 'openid profile email',
|
||||
|
||||
@@ -3,7 +3,6 @@ import { GrpcService } from './grpc.service';
|
||||
import {
|
||||
GetInstanceFeaturesResponse,
|
||||
ResetInstanceFeaturesResponse,
|
||||
SetInstanceFeaturesRequest,
|
||||
SetInstanceFeaturesRequestSchema,
|
||||
SetInstanceFeaturesResponse,
|
||||
} from '@zitadel/proto/zitadel/feature/v2/instance_pb';
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { GrpcService } from './grpc.service';
|
||||
import type { MessageInitShape } from '@bufbuild/protobuf';
|
||||
import { ListSessionsRequestSchema, ListSessionsResponse } from '@zitadel/proto/zitadel/session/v2/session_service_pb';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class SessionService {
|
||||
constructor(private readonly grpcService: GrpcService) {}
|
||||
|
||||
public listSessions(req: MessageInitShape<typeof ListSessionsRequestSchema>): Promise<ListSessionsResponse> {
|
||||
return this.grpcService.session.listSessions(req);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { GrpcService } from './grpc.service';
|
||||
import type { MessageInitShape } from '@bufbuild/protobuf';
|
||||
import {
|
||||
DeleteWebKeyResponse,
|
||||
ListWebKeysResponse,
|
||||
CreateWebKeyRequestSchema,
|
||||
CreateWebKeyResponse,
|
||||
ActivateWebKeyResponse,
|
||||
} from '@zitadel/proto/zitadel/webkey/v2beta/webkey_service_pb';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class WebKeysService {
|
||||
constructor(private readonly grpcService: GrpcService) {}
|
||||
|
||||
public ListWebKeys(): Promise<ListWebKeysResponse> {
|
||||
return this.grpcService.webKey.listWebKeys({});
|
||||
}
|
||||
|
||||
public DeleteWebKey(id: string): Promise<DeleteWebKeyResponse> {
|
||||
return this.grpcService.webKey.deleteWebKey({ id });
|
||||
}
|
||||
|
||||
public CreateWebKey(req: MessageInitShape<typeof CreateWebKeyRequestSchema>): Promise<CreateWebKeyResponse> {
|
||||
return this.grpcService.webKey.createWebKey(req);
|
||||
}
|
||||
|
||||
public ActivateWebKey(id: string): Promise<ActivateWebKeyResponse> {
|
||||
return this.grpcService.webKey.activateWebKey({ id });
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user