feat: allow managing invite code in secret generators (#12109)

# Which Problems Are Solved

Zitadel exposes the secrets generator configuration through its admin
api. This allows instance admins to manage them on their own and they
can create overwrite the system / runtime defaults (incl. expiration).
This very much needed in multi-instance scenarios such as zitadel.cloud.
Currently the invite code configuration was not manageable through the
API, but only runtime config.

# How the Problems Are Solved

- added the `invite_code` type to the API allowing it to be set and
retrieved.
- added the type to console's management list
- added the type to be stored on instance setup
- change the `GetSecretGenerator` endpoint to fall back to the runtime
config if no config is stored on the instance itself
- ensure the `length` and at least one charset is enabled, return an
error otherwise
- expiry is not enforced, so 0 allows codes with no expiry (current
state)

# Additional Changes

None

# Additional Context

- closes https://github.com/zitadel/zitadel/issues/10474
This commit is contained in:
Livio Spring
2026-07-01 04:53:16 +00:00
committed by GitHub
parent 782133dbc7
commit 1e0b810dca
44 changed files with 351 additions and 62 deletions
@@ -19,6 +19,7 @@ export class SecretGeneratorComponent {
SecretGeneratorType.SECRET_GENERATOR_TYPE_APP_SECRET,
SecretGeneratorType.SECRET_GENERATOR_TYPE_OTP_SMS,
SecretGeneratorType.SECRET_GENERATOR_TYPE_OTP_EMAIL,
SecretGeneratorType.SECRET_GENERATOR_TYPE_INVITE_CODE,
];
constructor() {}
+2 -1
View File
@@ -1608,7 +1608,8 @@
"5": "تهيئة بدون كلمة مرور",
"6": "سر التطبيق",
"7": "OTP - SMS",
"8": "OTP - بريد إلكتروني"
"8": "OTP - بريد إلكتروني",
"9": "رمز الدعوة"
},
"EXPIRY": "انتهاء الصلاحية (بالدقائق)",
"INCLUDEDIGITS": "تضمين أرقام",
+2 -1
View File
@@ -1615,7 +1615,8 @@
"5": "Инициализация на ключ за достъп",
"6": "Тайна на приложението",
"7": "OTP - SMS",
"8": "OTP – имейл"
"8": "OTP – имейл",
"9": "Код за покана"
},
"EXPIRY": "Изтичане (в минути)",
"INCLUDEDIGITS": "Включете числа",
+2 -1
View File
@@ -1613,7 +1613,8 @@
"5": "Inicializace Passkey",
"6": "Tajemství pomocí aplikace",
"7": "OTP - SMS",
"8": "OTP - E-mail"
"8": "OTP - E-mail",
"9": "Kód pozvánky"
},
"EXPIRY": "Expirace (v minutách)",
"INCLUDEDIGITS": "Zahrnout čísla",
+2 -1
View File
@@ -1613,7 +1613,8 @@
"5": "Passkey Initialisierungscode",
"6": "Anwendungsgeheimnis",
"7": "OTP - SMS",
"8": "OTP - Email"
"8": "OTP - Email",
"9": "Einladungscode"
},
"EXPIRY": "Ablauf (in Minuten)",
"INCLUDEDIGITS": "Enthält Zahlen",
+2 -1
View File
@@ -1618,7 +1618,8 @@
"5": "Passkey Initialization",
"6": "Application Secret",
"7": "OTP - SMS",
"8": "OTP - Email"
"8": "OTP - Email",
"9": "Invite Code"
},
"EXPIRY": "Expiration (in minutes)",
"INCLUDEDIGITS": "Include Numbers",
+2 -1
View File
@@ -1614,7 +1614,8 @@
"5": "Inicialización de llave de acceso",
"6": "Secreto de aplicación",
"7": "One Time Password (OTP) - SMS",
"8": "One Time Password (OTP) - email"
"8": "One Time Password (OTP) - email",
"9": "Código de invitación"
},
"EXPIRY": "Caducidad (en minutos)",
"INCLUDEDIGITS": "Incluir números",
+2 -1
View File
@@ -1613,7 +1613,8 @@
"5": "Initialisation de clé d'accès",
"6": "Secret de l'application",
"7": "OTP - SMS",
"8": "OTP - e-mail"
"8": "OTP - e-mail",
"9": "Code d'invitation"
},
"EXPIRY": "Expiration (en minutes)",
"INCLUDEDIGITS": "Inclure les chiffres",
+2 -1
View File
@@ -1611,7 +1611,8 @@
"5": "Passkey inicializálás",
"6": "Alkalmazás titok",
"7": "OTP - SMS",
"8": "OTP - Email"
"8": "OTP - Email",
"9": "Meghívókód"
},
"EXPIRY": "Lejárat (percben)",
"INCLUDEDIGITS": "Számok bevonása",
+2 -1
View File
@@ -1613,7 +1613,8 @@
"5": "Inisialisasi Passkey",
"6": "Rahasia Aplikasi",
"7": "OTP - SMS",
"8": "OTP - Email"
"8": "OTP - Email",
"9": "Kode Undangan"
},
"EXPIRY": "Kedaluwarsa (dalam menit)",
"INCLUDEDIGITS": "Sertakan Angka",
+2 -1
View File
@@ -1613,7 +1613,8 @@
"5": "Inizializzazione passkey",
"6": "Segreto dell'applicazione",
"7": "OTP - SMS",
"8": "OTP - Email"
"8": "OTP - Email",
"9": "Codice di invito"
},
"EXPIRY": "Scadenza (in minuti)",
"INCLUDEDIGITS": "Contiene numeri",
+2 -1
View File
@@ -1613,7 +1613,8 @@
"5": "パスキーの初期設定",
"6": "アプリケーションのシークレット",
"7": "OTP - SMS",
"8": "OTP - 電子メール"
"8": "OTP - 電子メール",
"9": "招待コード"
},
"EXPIRY": "有効期限 (分単位)",
"INCLUDEDIGITS": "数字を含める",
+2 -1
View File
@@ -1613,7 +1613,8 @@
"5": "패스키 초기화",
"6": "애플리케이션 시크릿",
"7": "OTP - SMS",
"8": "OTP - 이메일"
"8": "OTP - 이메일",
"9": "초대 코드"
},
"EXPIRY": "만료 시간 (분)",
"INCLUDEDIGITS": "숫자 포함",
+2 -1
View File
@@ -1614,7 +1614,8 @@
"5": "Иницијализација на Passkey",
"6": "Апликациска тајна",
"7": "OTP - СМС",
"8": "OTP - е-пошта"
"8": "OTP - е-пошта",
"9": "Код за покана"
},
"EXPIRY": "Истекување (во минути)",
"INCLUDEDIGITS": "Вклучи цифри",
+2 -1
View File
@@ -1613,7 +1613,8 @@
"5": "Passkey Initialisatie",
"6": "Applicatie Secret",
"7": "OTP - SMS",
"8": "OTP - Email"
"8": "OTP - Email",
"9": "Uitnodigingscode"
},
"EXPIRY": "Vervaldatum (in minuten)",
"INCLUDEDIGITS": "Inclusief Nummers",
+2 -1
View File
@@ -1612,7 +1612,8 @@
"5": "Inicjalizacja passkey",
"6": "Sekret aplikacji",
"7": "OTP - SMS",
"8": "OTP — e-mail"
"8": "OTP — e-mail",
"9": "Kod zaproszenia"
},
"EXPIRY": "Wygaśnięcie (w minutach)",
"INCLUDEDIGITS": "Dołącz cyfry",
+2 -1
View File
@@ -1614,7 +1614,8 @@
"5": "Inicialização passkey",
"6": "Segredo do aplicativo",
"7": "OTP - SMS",
"8": "OTP - e-mail"
"8": "OTP - e-mail",
"9": "Código de convite"
},
"EXPIRY": "Expiração (em minutos)",
"INCLUDEDIGITS": "Incluir números",
+2 -1
View File
@@ -1611,7 +1611,8 @@
"5": "Inițializarea Passkey",
"6": "Secretul aplicației",
"7": "OTP - SMS",
"8": "OTP - E-mail"
"8": "OTP - E-mail",
"9": "Cod de invitație"
},
"EXPIRY": "Expirare (în minute)",
"INCLUDEDIGITS": "Includeți numere",
+2 -1
View File
@@ -1672,7 +1672,8 @@
"5": "Инициализация ключа доступа",
"6": "Ключ приложения",
"7": "OTP — SMS",
"8": "OTP – электронная почта"
"8": "OTP – электронная почта",
"9": "Код приглашения"
},
"EXPIRY": "Срок действия (в минутах)",
"INCLUDEDIGITS": "Содержит цифры",
+2 -1
View File
@@ -1617,7 +1617,8 @@
"5": "Passkey-initiering",
"6": "Applikations-hemlighet",
"7": "OTP - SMS",
"8": "OTP - E-post"
"8": "OTP - E-post",
"9": "Inbjudningskod"
},
"EXPIRY": "Utgång (på minuter)",
"INCLUDEDIGITS": "Inkludera siffror",
+2 -1
View File
@@ -1616,7 +1616,8 @@
"5": "Passkey Başlatma",
"6": "Uygulama Gizli Anahtarı",
"7": "OTP - SMS",
"8": "OTP - E-posta"
"8": "OTP - E-posta",
"9": "Davet Kodu"
},
"EXPIRY": "Son kullanma (dakika cinsinden)",
"INCLUDEDIGITS": "Sayıları Dahil Et",
+2 -1
View File
@@ -1617,7 +1617,8 @@
"5": "Ініціалізація ключа доступу",
"6": "Секрет додатка",
"7": "OTP - SMS",
"8": "OTP - Email"
"8": "OTP - Email",
"9": "Код запрошення"
},
"EXPIRY": "Термін дії (у хвилинах)",
"INCLUDEDIGITS": "Включити цифри",
+2 -1
View File
@@ -1616,7 +1616,8 @@
"5": "Passkey 初始化",
"6": "应用密钥",
"7": "OTP - SMS",
"8": "OTP - 电子邮件"
"8": "OTP - 电子邮件",
"9": "邀请码"
},
"EXPIRY": "过期时间 (以分钟为单位)",
"INCLUDEDIGITS": "包含数字",