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:
Fabienne Bühler
2025-04-02 16:53:06 +02:00
committed by GitHub
parent d14a23ae7e
commit 07ce3b6905
559 changed files with 14578 additions and 7622 deletions

View File

@@ -31,9 +31,8 @@ func TestCommands_AddTarget(t *testing.T) {
resourceOwner string
}
type res struct {
id string
details *domain.ObjectDetails
err func(error) bool
id string
err func(error) bool
}
tests := []struct {
name string
@@ -213,10 +212,6 @@ func TestCommands_AddTarget(t *testing.T) {
},
res{
id: "id1",
details: &domain.ObjectDetails{
ResourceOwner: "instance",
ID: "id1",
},
},
},
{
@@ -249,10 +244,6 @@ func TestCommands_AddTarget(t *testing.T) {
},
res{
id: "id1",
details: &domain.ObjectDetails{
ResourceOwner: "instance",
ID: "id1",
},
},
},
}
@@ -264,7 +255,7 @@ func TestCommands_AddTarget(t *testing.T) {
newEncryptedCodeWithDefault: tt.fields.newEncryptedCodeWithDefault,
defaultSecretGenerators: tt.fields.defaultSecretGenerators,
}
details, err := c.AddTarget(tt.args.ctx, tt.args.add, tt.args.resourceOwner)
_, err := c.AddTarget(tt.args.ctx, tt.args.add, tt.args.resourceOwner)
if tt.res.err == nil {
assert.NoError(t, err)
}
@@ -273,7 +264,6 @@ func TestCommands_AddTarget(t *testing.T) {
}
if tt.res.err == nil {
assert.Equal(t, tt.res.id, tt.args.add.AggregateID)
assertObjectDetails(t, tt.res.details, details)
}
})
}
@@ -291,8 +281,7 @@ func TestCommands_ChangeTarget(t *testing.T) {
resourceOwner string
}
type res struct {
details *domain.ObjectDetails
err func(error) bool
err func(error) bool
}
tests := []struct {
name string
@@ -434,12 +423,7 @@ func TestCommands_ChangeTarget(t *testing.T) {
},
resourceOwner: "instance",
},
res{
details: &domain.ObjectDetails{
ResourceOwner: "instance",
ID: "id1",
},
},
res{},
},
{
"unique constraint failed, error",
@@ -504,12 +488,7 @@ func TestCommands_ChangeTarget(t *testing.T) {
},
resourceOwner: "instance",
},
res{
details: &domain.ObjectDetails{
ResourceOwner: "instance",
ID: "id1",
},
},
res{},
},
{
"push full ok",
@@ -557,12 +536,7 @@ func TestCommands_ChangeTarget(t *testing.T) {
},
resourceOwner: "instance",
},
res{
details: &domain.ObjectDetails{
ResourceOwner: "instance",
ID: "id1",
},
},
res{},
},
}
for _, tt := range tests {
@@ -572,16 +546,13 @@ func TestCommands_ChangeTarget(t *testing.T) {
newEncryptedCodeWithDefault: tt.fields.newEncryptedCodeWithDefault,
defaultSecretGenerators: tt.fields.defaultSecretGenerators,
}
details, err := c.ChangeTarget(tt.args.ctx, tt.args.change, tt.args.resourceOwner)
_, err := c.ChangeTarget(tt.args.ctx, tt.args.change, tt.args.resourceOwner)
if tt.res.err == nil {
assert.NoError(t, err)
}
if tt.res.err != nil && !tt.res.err(err) {
t.Errorf("got wrong err: %v ", err)
}
if tt.res.err == nil {
assertObjectDetails(t, tt.res.details, details)
}
})
}
}
@@ -596,8 +567,7 @@ func TestCommands_DeleteTarget(t *testing.T) {
resourceOwner string
}
type res struct {
details *domain.ObjectDetails
err func(error) bool
err func(error) bool
}
tests := []struct {
name string
@@ -631,9 +601,7 @@ func TestCommands_DeleteTarget(t *testing.T) {
id: "id1",
resourceOwner: "instance",
},
res{
err: zerrors.IsNotFound,
},
res{},
},
{
"remove ok",
@@ -657,12 +625,31 @@ func TestCommands_DeleteTarget(t *testing.T) {
id: "id1",
resourceOwner: "instance",
},
res{
details: &domain.ObjectDetails{
ResourceOwner: "instance",
ID: "id1",
},
res{},
},
{
"already removed",
fields{
eventstore: expectEventstore(
expectFilter(
eventFromEventPusher(
targetAddEvent("id1", "instance"),
),
eventFromEventPusher(
target.NewRemovedEvent(context.Background(),
target.NewAggregate("id1", "instance"),
"name",
),
),
),
),
},
args{
ctx: context.Background(),
id: "id1",
resourceOwner: "instance",
},
res{},
},
}
for _, tt := range tests {
@@ -670,16 +657,13 @@ func TestCommands_DeleteTarget(t *testing.T) {
c := &Commands{
eventstore: tt.fields.eventstore(t),
}
details, err := c.DeleteTarget(tt.args.ctx, tt.args.id, tt.args.resourceOwner)
_, err := c.DeleteTarget(tt.args.ctx, tt.args.id, tt.args.resourceOwner)
if tt.res.err == nil {
assert.NoError(t, err)
}
if tt.res.err != nil && !tt.res.err(err) {
t.Errorf("got wrong err: %v ", err)
}
if tt.res.err == nil {
assertObjectDetails(t, tt.res.details, details)
}
})
}
}