mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-19 19:48:45 +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
@@ -190,8 +190,7 @@ var (
|
||||
` projections.user_auth_methods5.state,` +
|
||||
` projections.user_auth_methods5.method_type,` +
|
||||
` COUNT(*) OVER ()` +
|
||||
` FROM projections.user_auth_methods5` +
|
||||
` AS OF SYSTEM TIME '-1 ms'`
|
||||
` FROM projections.user_auth_methods5`
|
||||
prepareUserAuthMethodsCols = []string{
|
||||
"token_id",
|
||||
"creation_date",
|
||||
@@ -214,8 +213,7 @@ var (
|
||||
` ON auth_method_types.user_id = projections.users14.id AND auth_method_types.instance_id = projections.users14.instance_id` +
|
||||
` LEFT JOIN (SELECT user_idps_count.user_id, user_idps_count.instance_id, COUNT(user_idps_count.user_id) AS count FROM projections.idp_user_links3 AS user_idps_count` +
|
||||
` GROUP BY user_idps_count.user_id, user_idps_count.instance_id) AS user_idps_count` +
|
||||
` ON user_idps_count.user_id = projections.users14.id AND user_idps_count.instance_id = projections.users14.instance_id` +
|
||||
` AS OF SYSTEM TIME '-1 ms`
|
||||
` ON user_idps_count.user_id = projections.users14.id AND user_idps_count.instance_id = projections.users14.instance_id`
|
||||
prepareActiveAuthMethodTypesCols = []string{
|
||||
"password_set",
|
||||
"method_type",
|
||||
@@ -231,8 +229,7 @@ var (
|
||||
` ON auth_method_types.user_id = projections.users14.id AND auth_method_types.instance_id = projections.users14.instance_id` +
|
||||
` LEFT JOIN (SELECT user_idps_count.user_id, user_idps_count.instance_id, COUNT(user_idps_count.user_id) AS count FROM projections.idp_user_links3 AS user_idps_count` +
|
||||
` GROUP BY user_idps_count.user_id, user_idps_count.instance_id) AS user_idps_count` +
|
||||
` ON user_idps_count.user_id = projections.users14.id AND user_idps_count.instance_id = projections.users14.instance_id` +
|
||||
` AS OF SYSTEM TIME '-1 ms`
|
||||
` ON user_idps_count.user_id = projections.users14.id AND user_idps_count.instance_id = projections.users14.instance_id`
|
||||
prepareActiveAuthMethodTypesDomainCols = []string{
|
||||
"password_set",
|
||||
"method_type",
|
||||
@@ -248,8 +245,7 @@ var (
|
||||
` ON auth_method_types.user_id = projections.users14.id AND auth_method_types.instance_id = projections.users14.instance_id` +
|
||||
` LEFT JOIN (SELECT user_idps_count.user_id, user_idps_count.instance_id, COUNT(user_idps_count.user_id) AS count FROM projections.idp_user_links3 AS user_idps_count` +
|
||||
` GROUP BY user_idps_count.user_id, user_idps_count.instance_id) AS user_idps_count` +
|
||||
` ON user_idps_count.user_id = projections.users14.id AND user_idps_count.instance_id = projections.users14.instance_id` +
|
||||
` AS OF SYSTEM TIME '-1 ms`
|
||||
` ON user_idps_count.user_id = projections.users14.id AND user_idps_count.instance_id = projections.users14.instance_id`
|
||||
prepareActiveAuthMethodTypesDomainExternalCols = []string{
|
||||
"password_set",
|
||||
"method_type",
|
||||
@@ -416,8 +412,8 @@ func Test_UserAuthMethodPrepares(t *testing.T) {
|
||||
},
|
||||
{
|
||||
name: "prepareUserAuthMethodTypesQuery no result",
|
||||
prepare: func(ctx context.Context, db prepareDatabase) (sq.SelectBuilder, func(*sql.Rows) (*AuthMethodTypes, error)) {
|
||||
builder, scan := prepareUserAuthMethodTypesQuery(ctx, db, true, true, "")
|
||||
prepare: func() (sq.SelectBuilder, func(*sql.Rows) (*AuthMethodTypes, error)) {
|
||||
builder, scan := prepareUserAuthMethodTypesQuery(true, true, "")
|
||||
return builder, func(rows *sql.Rows) (*AuthMethodTypes, error) {
|
||||
return scan(rows)
|
||||
}
|
||||
@@ -433,8 +429,8 @@ func Test_UserAuthMethodPrepares(t *testing.T) {
|
||||
},
|
||||
{
|
||||
name: "prepareUserAuthMethodTypesQuery one second factor",
|
||||
prepare: func(ctx context.Context, db prepareDatabase) (sq.SelectBuilder, func(*sql.Rows) (*AuthMethodTypes, error)) {
|
||||
builder, scan := prepareUserAuthMethodTypesQuery(ctx, db, true, true, "")
|
||||
prepare: func() (sq.SelectBuilder, func(*sql.Rows) (*AuthMethodTypes, error)) {
|
||||
builder, scan := prepareUserAuthMethodTypesQuery(true, true, "")
|
||||
return builder, func(rows *sql.Rows) (*AuthMethodTypes, error) {
|
||||
return scan(rows)
|
||||
}
|
||||
@@ -465,8 +461,8 @@ func Test_UserAuthMethodPrepares(t *testing.T) {
|
||||
},
|
||||
{
|
||||
name: "prepareUserAuthMethodTypesQuery one second factor with domain",
|
||||
prepare: func(ctx context.Context, db prepareDatabase) (sq.SelectBuilder, func(*sql.Rows) (*AuthMethodTypes, error)) {
|
||||
builder, scan := prepareUserAuthMethodTypesQuery(ctx, db, true, true, "example.com")
|
||||
prepare: func() (sq.SelectBuilder, func(*sql.Rows) (*AuthMethodTypes, error)) {
|
||||
builder, scan := prepareUserAuthMethodTypesQuery(true, true, "example.com")
|
||||
return builder, func(rows *sql.Rows) (*AuthMethodTypes, error) {
|
||||
return scan(rows)
|
||||
}
|
||||
@@ -497,8 +493,8 @@ func Test_UserAuthMethodPrepares(t *testing.T) {
|
||||
},
|
||||
{
|
||||
name: "prepareUserAuthMethodTypesQuery one second factor with domain external",
|
||||
prepare: func(ctx context.Context, db prepareDatabase) (sq.SelectBuilder, func(*sql.Rows) (*AuthMethodTypes, error)) {
|
||||
builder, scan := prepareUserAuthMethodTypesQuery(ctx, db, true, false, "example.com")
|
||||
prepare: func() (sq.SelectBuilder, func(*sql.Rows) (*AuthMethodTypes, error)) {
|
||||
builder, scan := prepareUserAuthMethodTypesQuery(true, false, "example.com")
|
||||
return builder, func(rows *sql.Rows) (*AuthMethodTypes, error) {
|
||||
return scan(rows)
|
||||
}
|
||||
@@ -529,8 +525,8 @@ func Test_UserAuthMethodPrepares(t *testing.T) {
|
||||
},
|
||||
{
|
||||
name: "prepareUserAuthMethodTypesQuery multiple second factors",
|
||||
prepare: func(ctx context.Context, db prepareDatabase) (sq.SelectBuilder, func(*sql.Rows) (*AuthMethodTypes, error)) {
|
||||
builder, scan := prepareUserAuthMethodTypesQuery(ctx, db, true, true, "")
|
||||
prepare: func() (sq.SelectBuilder, func(*sql.Rows) (*AuthMethodTypes, error)) {
|
||||
builder, scan := prepareUserAuthMethodTypesQuery(true, true, "")
|
||||
return builder, func(rows *sql.Rows) (*AuthMethodTypes, error) {
|
||||
return scan(rows)
|
||||
}
|
||||
@@ -567,8 +563,8 @@ func Test_UserAuthMethodPrepares(t *testing.T) {
|
||||
},
|
||||
{
|
||||
name: "prepareUserAuthMethodTypesQuery multiple second factors domain",
|
||||
prepare: func(ctx context.Context, db prepareDatabase) (sq.SelectBuilder, func(*sql.Rows) (*AuthMethodTypes, error)) {
|
||||
builder, scan := prepareUserAuthMethodTypesQuery(ctx, db, true, true, "example.com")
|
||||
prepare: func() (sq.SelectBuilder, func(*sql.Rows) (*AuthMethodTypes, error)) {
|
||||
builder, scan := prepareUserAuthMethodTypesQuery(true, true, "example.com")
|
||||
return builder, func(rows *sql.Rows) (*AuthMethodTypes, error) {
|
||||
return scan(rows)
|
||||
}
|
||||
@@ -605,8 +601,8 @@ func Test_UserAuthMethodPrepares(t *testing.T) {
|
||||
},
|
||||
{
|
||||
name: "prepareUserAuthMethodTypesQuery multiple second factors domain external",
|
||||
prepare: func(ctx context.Context, db prepareDatabase) (sq.SelectBuilder, func(*sql.Rows) (*AuthMethodTypes, error)) {
|
||||
builder, scan := prepareUserAuthMethodTypesQuery(ctx, db, true, false, "example.com")
|
||||
prepare: func() (sq.SelectBuilder, func(*sql.Rows) (*AuthMethodTypes, error)) {
|
||||
builder, scan := prepareUserAuthMethodTypesQuery(true, false, "example.com")
|
||||
return builder, func(rows *sql.Rows) (*AuthMethodTypes, error) {
|
||||
return scan(rows)
|
||||
}
|
||||
@@ -643,8 +639,8 @@ func Test_UserAuthMethodPrepares(t *testing.T) {
|
||||
},
|
||||
{
|
||||
name: "prepareUserAuthMethodTypesQuery sql err",
|
||||
prepare: func(ctx context.Context, db prepareDatabase) (sq.SelectBuilder, func(*sql.Rows) (*AuthMethodTypes, error)) {
|
||||
builder, scan := prepareUserAuthMethodTypesQuery(ctx, db, true, true, "")
|
||||
prepare: func() (sq.SelectBuilder, func(*sql.Rows) (*AuthMethodTypes, error)) {
|
||||
builder, scan := prepareUserAuthMethodTypesQuery(true, true, "")
|
||||
return builder, func(rows *sql.Rows) (*AuthMethodTypes, error) {
|
||||
return scan(rows)
|
||||
}
|
||||
@@ -666,7 +662,7 @@ func Test_UserAuthMethodPrepares(t *testing.T) {
|
||||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
assertPrepare(t, tt.prepare, tt.object, tt.want.sqlExpectations, tt.want.err, defaultPrepareArgs...)
|
||||
assertPrepare(t, tt.prepare, tt.object, tt.want.sqlExpectations, tt.want.err)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user