fix: revert feature key for configs back to ConsoleUseV2UserApi (#11928)

# Which Problems Are Solved

https://github.com/zitadel/zitadel/pull/11390 renamed "Console" to
"Management Console". While
https://github.com/zitadel/zitadel/pull/11706 already reverted an
unintended rename of the feature key to enable the management console to
use the V2 API for user creation. It was now also discovered that the
rename of the feature itself also broke existing (default)
configurations.

# How the Problems Are Solved

Added a `mapstructure` tag on the instance feature to handle existing
configs.

# Additional Changes

Removed unused `TokenExchange` from the default configuration.

# Additional Context

- relates to #11390 
- relates to #11706
- requires backport to v4.x

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Marco A. <marco@zitadel.com>
This commit is contained in:
Livio Spring
2026-03-30 15:59:57 +00:00
committed by GitHub
co-authored by Copilot Marco A.
parent 0390e324e4
commit 21b28b56ac
4 changed files with 9 additions and 6 deletions
-1
View File
@@ -1320,7 +1320,6 @@ DefaultInstance:
Features:
LoginDefaultOrg: true # ZITADEL_DEFAULTINSTANCE_FEATURES_LOGINDEFAULTORG
UserSchema: # ZITADEL_DEFAULTINSTANCE_FEATURES_USERSCHEMA
TokenExchange: # ZITADEL_DEFAULTINSTANCE_FEATURES_TOKENEXCHANGE
ImprovedPerformance: # ZITADEL_DEFAULTINSTANCE_FEATURES_IMPROVEDPERFORMANCE
# https://github.com/zitadel/zitadel/blob/main/internal/feature/feature.go#L64-L68
# - 1 # OrgByID
+4 -2
View File
@@ -40,6 +40,7 @@ DefaultInstance:
Features:
LoginDefaultOrg: true
UserSchema: true
ConsoleUseV2UserApi: true
LoginV2:
Required: true
BaseURI: 'http://zitadel:8080'
@@ -51,8 +52,9 @@ Actions:
`},
want: func(t *testing.T, config *Config) {
assert.Equal(t, config.DefaultInstance.Features, &command.InstanceFeatures{
LoginDefaultOrg: gu.Ptr(true),
UserSchema: gu.Ptr(true),
LoginDefaultOrg: gu.Ptr(true),
UserSchema: gu.Ptr(true),
ManagementConsoleUseV2UserApi: gu.Ptr(true),
LoginV2: &feature.LoginV2{
Required: true,
BaseURI: &url.URL{Scheme: "http", Host: "zitadel:8080"},
+4 -2
View File
@@ -76,6 +76,7 @@ DefaultInstance:
Features:
LoginDefaultOrg: true
UserSchema: true
ConsoleUseV2UserApi: true
LoginV2:
Required: true
BaseURI: 'http://zitadel:8080'
@@ -87,8 +88,9 @@ Actions:
`},
want: func(t *testing.T, config *Config) {
assert.Equal(t, config.DefaultInstance.Features, &command.InstanceFeatures{
LoginDefaultOrg: gu.Ptr(true),
UserSchema: gu.Ptr(true),
LoginDefaultOrg: gu.Ptr(true),
UserSchema: gu.Ptr(true),
ManagementConsoleUseV2UserApi: gu.Ptr(true),
LoginV2: &feature.LoginV2{
Required: true,
BaseURI: &url.URL{Scheme: "http", Host: "zitadel:8080"},
+1 -1
View File
@@ -20,7 +20,7 @@ type InstanceFeatures struct {
OIDCSingleV1SessionTermination *bool
LoginV2 *feature.LoginV2
PermissionCheckV2 *bool
ManagementConsoleUseV2UserApi *bool
ManagementConsoleUseV2UserApi *bool `mapstructure:"ConsoleUseV2UserApi"` // for backwards compatibility we need to change this back to the old config name
EnableRelationalTables *bool
}