mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-12 13:48:23 +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 <livio.a@gmail.com> Co-authored-by: Stefan Benz <46600784+stebenz@users.noreply.github.com> Co-authored-by: Silvan <27845747+adlerhurst@users.noreply.github.com> Co-authored-by: Ramon <mail@conblem.me> Co-authored-by: Elio Bischof <elio@zitadel.com> Co-authored-by: Kenta Yamaguchi <56732734+KEY60228@users.noreply.github.com> Co-authored-by: Harsha Reddy <harsha.reddy@klaviyo.com> Co-authored-by: Livio Spring <livio@zitadel.com> Co-authored-by: Max Peintner <max@caos.ch> Co-authored-by: Iraq <66622793+kkrime@users.noreply.github.com> Co-authored-by: Florian Forster <florian@zitadel.com> Co-authored-by: Tim Möhlmann <tim+github@zitadel.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Max Peintner <peintnerm@gmail.com>
This commit is contained in:
@@ -19,6 +19,7 @@ import (
|
||||
|
||||
"github.com/zitadel/zitadel/internal/domain"
|
||||
"github.com/zitadel/zitadel/internal/integration/scim"
|
||||
action "github.com/zitadel/zitadel/pkg/grpc/action/v2beta"
|
||||
"github.com/zitadel/zitadel/pkg/grpc/admin"
|
||||
"github.com/zitadel/zitadel/pkg/grpc/auth"
|
||||
"github.com/zitadel/zitadel/pkg/grpc/feature/v2"
|
||||
@@ -32,10 +33,8 @@ import (
|
||||
oidc_pb_v2beta "github.com/zitadel/zitadel/pkg/grpc/oidc/v2beta"
|
||||
"github.com/zitadel/zitadel/pkg/grpc/org/v2"
|
||||
org_v2beta "github.com/zitadel/zitadel/pkg/grpc/org/v2beta"
|
||||
action "github.com/zitadel/zitadel/pkg/grpc/resources/action/v3alpha"
|
||||
user_v3alpha "github.com/zitadel/zitadel/pkg/grpc/resources/user/v3alpha"
|
||||
userschema_v3alpha "github.com/zitadel/zitadel/pkg/grpc/resources/userschema/v3alpha"
|
||||
webkey_v3alpha "github.com/zitadel/zitadel/pkg/grpc/resources/webkey/v3alpha"
|
||||
saml_pb "github.com/zitadel/zitadel/pkg/grpc/saml/v2"
|
||||
"github.com/zitadel/zitadel/pkg/grpc/session/v2"
|
||||
session_v2beta "github.com/zitadel/zitadel/pkg/grpc/session/v2beta"
|
||||
@@ -44,6 +43,7 @@ import (
|
||||
user_pb "github.com/zitadel/zitadel/pkg/grpc/user"
|
||||
user_v2 "github.com/zitadel/zitadel/pkg/grpc/user/v2"
|
||||
user_v2beta "github.com/zitadel/zitadel/pkg/grpc/user/v2beta"
|
||||
webkey_v2beta "github.com/zitadel/zitadel/pkg/grpc/webkey/v2beta"
|
||||
)
|
||||
|
||||
type Client struct {
|
||||
@@ -61,11 +61,11 @@ type Client struct {
|
||||
OIDCv2 oidc_pb.OIDCServiceClient
|
||||
OrgV2beta org_v2beta.OrganizationServiceClient
|
||||
OrgV2 org.OrganizationServiceClient
|
||||
ActionV3Alpha action.ZITADELActionsClient
|
||||
ActionV2beta action.ActionServiceClient
|
||||
FeatureV2beta feature_v2beta.FeatureServiceClient
|
||||
FeatureV2 feature.FeatureServiceClient
|
||||
UserSchemaV3 userschema_v3alpha.ZITADELUserSchemasClient
|
||||
WebKeyV3Alpha webkey_v3alpha.ZITADELWebKeysClient
|
||||
WebKeyV2Beta webkey_v2beta.WebKeyServiceClient
|
||||
IDPv2 idp_pb.IdentityProviderServiceClient
|
||||
UserV3Alpha user_v3alpha.ZITADELUsersClient
|
||||
SAMLv2 saml_pb.SAMLServiceClient
|
||||
@@ -94,11 +94,11 @@ func newClient(ctx context.Context, target string) (*Client, error) {
|
||||
OIDCv2: oidc_pb.NewOIDCServiceClient(cc),
|
||||
OrgV2beta: org_v2beta.NewOrganizationServiceClient(cc),
|
||||
OrgV2: org.NewOrganizationServiceClient(cc),
|
||||
ActionV3Alpha: action.NewZITADELActionsClient(cc),
|
||||
ActionV2beta: action.NewActionServiceClient(cc),
|
||||
FeatureV2beta: feature_v2beta.NewFeatureServiceClient(cc),
|
||||
FeatureV2: feature.NewFeatureServiceClient(cc),
|
||||
UserSchemaV3: userschema_v3alpha.NewZITADELUserSchemasClient(cc),
|
||||
WebKeyV3Alpha: webkey_v3alpha.NewZITADELWebKeysClient(cc),
|
||||
WebKeyV2Beta: webkey_v2beta.NewWebKeyServiceClient(cc),
|
||||
IDPv2: idp_pb.NewIdentityProviderServiceClient(cc),
|
||||
UserV3Alpha: user_v3alpha.NewZITADELUsersClient(cc),
|
||||
SAMLv2: saml_pb.NewSAMLServiceClient(cc),
|
||||
@@ -721,47 +721,52 @@ func (i *Instance) CreateTarget(ctx context.Context, t *testing.T, name, endpoin
|
||||
if name == "" {
|
||||
name = gofakeit.Name()
|
||||
}
|
||||
reqTarget := &action.Target{
|
||||
req := &action.CreateTargetRequest{
|
||||
Name: name,
|
||||
Endpoint: endpoint,
|
||||
Timeout: durationpb.New(10 * time.Second),
|
||||
Timeout: durationpb.New(5 * time.Second),
|
||||
}
|
||||
switch ty {
|
||||
case domain.TargetTypeWebhook:
|
||||
reqTarget.TargetType = &action.Target_RestWebhook{
|
||||
RestWebhook: &action.SetRESTWebhook{
|
||||
req.TargetType = &action.CreateTargetRequest_RestWebhook{
|
||||
RestWebhook: &action.RESTWebhook{
|
||||
InterruptOnError: interrupt,
|
||||
},
|
||||
}
|
||||
case domain.TargetTypeCall:
|
||||
reqTarget.TargetType = &action.Target_RestCall{
|
||||
RestCall: &action.SetRESTCall{
|
||||
req.TargetType = &action.CreateTargetRequest_RestCall{
|
||||
RestCall: &action.RESTCall{
|
||||
InterruptOnError: interrupt,
|
||||
},
|
||||
}
|
||||
case domain.TargetTypeAsync:
|
||||
reqTarget.TargetType = &action.Target_RestAsync{
|
||||
RestAsync: &action.SetRESTAsync{},
|
||||
req.TargetType = &action.CreateTargetRequest_RestAsync{
|
||||
RestAsync: &action.RESTAsync{},
|
||||
}
|
||||
}
|
||||
target, err := i.Client.ActionV3Alpha.CreateTarget(ctx, &action.CreateTargetRequest{Target: reqTarget})
|
||||
target, err := i.Client.ActionV2beta.CreateTarget(ctx, req)
|
||||
require.NoError(t, err)
|
||||
return target
|
||||
}
|
||||
|
||||
func (i *Instance) DeleteTarget(ctx context.Context, t *testing.T, id string) {
|
||||
_, err := i.Client.ActionV2beta.DeleteTarget(ctx, &action.DeleteTargetRequest{
|
||||
Id: id,
|
||||
})
|
||||
require.NoError(t, err)
|
||||
}
|
||||
|
||||
func (i *Instance) DeleteExecution(ctx context.Context, t *testing.T, cond *action.Condition) {
|
||||
_, err := i.Client.ActionV3Alpha.SetExecution(ctx, &action.SetExecutionRequest{
|
||||
_, err := i.Client.ActionV2beta.SetExecution(ctx, &action.SetExecutionRequest{
|
||||
Condition: cond,
|
||||
})
|
||||
require.NoError(t, err)
|
||||
}
|
||||
|
||||
func (i *Instance) SetExecution(ctx context.Context, t *testing.T, cond *action.Condition, targets []*action.ExecutionTargetType) *action.SetExecutionResponse {
|
||||
target, err := i.Client.ActionV3Alpha.SetExecution(ctx, &action.SetExecutionRequest{
|
||||
target, err := i.Client.ActionV2beta.SetExecution(ctx, &action.SetExecutionRequest{
|
||||
Condition: cond,
|
||||
Execution: &action.Execution{
|
||||
Targets: targets,
|
||||
},
|
||||
Targets: targets,
|
||||
})
|
||||
require.NoError(t, err)
|
||||
return target
|
||||
|
Reference in New Issue
Block a user