feat: import upstream ZITADEL Login V2 v4.20.4 source workspace

This commit is contained in:
Vib Tools committed 2026-11-22 04:15:54 -08:00
1 parent eadd0e558b
commit 4404849fc4
644 files changed
+153201 -10

No files matched your search

@@ -0,0 +1,38 @@
syntax = "proto3";
package zitadel.settings.object.v3alpha;
option go_package = "github.com/zitadel/zitadel/pkg/grpc/settings/object/v3alpha;object";
import "google/protobuf/timestamp.proto";
import "protoc-gen-openapiv2/options/annotations.proto";
import "validate/validate.proto";
import "google/protobuf/duration.proto";
import "zitadel/object/v3alpha/object.proto";
message Details {
//sequence represents the order of events. It's always counting
//
// on read: the sequence of the last event reduced by the projection
//
// on manipulation: the timestamp of the event(s) added by the manipulation
uint64 sequence = 1 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
example: "\"2\"";
}
];
//change_date is the timestamp when the object was changed
//
// on read: the timestamp of the last event reduced by the projection
//
// on manipulation: the timestamp of the event(s) added by the manipulation
google.protobuf.Timestamp change_date = 2;
//resource_owner represents the context an object belongs to
zitadel.object.v3alpha.Owner owner = 3 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
example: "\"69629023906488334\"";
}
];
}
@@ -0,0 +1,88 @@
syntax = "proto3";
package zitadel.settings.v2;
option go_package = "github.com/zitadel/zitadel/pkg/grpc/settings/v2;settings";
import "protoc-gen-openapiv2/options/annotations.proto";
import "zitadel/settings/v2/settings.proto";
message BrandingSettings {
// Theme used for light mode.
Theme light_theme = 1;
// Theme used for dark mode.
Theme dark_theme = 2;
// The url where the font is served.
string font_url = 3 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
example: "\"https://acme.com/assets/v1/165617850692654601/policy/label/font-180950243237405441\"";
}
];
// If enabled, the organization suffix will be hidden on the login form if the scope \"urn:zitadel:iam:org:domain:primary:{domainname}\" is used.
bool hide_login_name_suffix = 4;
// If enabled, the Zitadel logo will not be displayed on the login screen.
bool disable_watermark = 5;
// ResourceOwnerType returns if the setting is managed on the organization explicitly or
// fell back on the instance settings.
ResourceOwnerType resource_owner_type = 6;
// States which themes will be used. If auto is selected, the theme will be changed based on the users system preferences.
// You can also choose to only allow dark or light theme.
ThemeMode theme_mode = 7;
}
message Theme {
// The hex value for primary color.
string primary_color = 1 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
example: "\"#5469d4\"";
}
];
// The hex value for background color.
string background_color = 2 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
example: "\"#FAFAFA\"";
}
];
// The hex value for warning color.
string warn_color = 3 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
example: "\"#CD3D56\"";
}
];
// The value for font color.
string font_color = 4 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
example: "\"#000000\"";
}
];
// The URL where the logo is served.
string logo_url = 5 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
example: "\"https://acme.com/assets/v1/165617850692654601/policy/label/logo-180950416321494657\"";
}
];
// The URL where the icon is served.
string icon_url = 6 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
example: "\"https://acme.com/assets/v1/165617850692654601/policy/label/icon-180950498874178817\"";
}
];
}
enum ThemeMode {
THEME_MODE_UNSPECIFIED = 0;
THEME_MODE_AUTO = 1;
THEME_MODE_LIGHT = 2;
THEME_MODE_DARK = 3;
}
@@ -0,0 +1,26 @@
syntax = "proto3";
package zitadel.settings.v2;
option go_package = "github.com/zitadel/zitadel/pkg/grpc/settings/v2;settings";
import "protoc-gen-openapiv2/options/annotations.proto";
import "zitadel/settings/v2/settings.proto";
message DomainSettings {
// If enabled, the login name will automatically be suffixed with the domain of the organization.
// This ensures that the login name is unique across the instance.
bool login_name_includes_domain = 1;
// If enabled, Organization Domains must be verified (through an DNS or HTTP challenge) upon creation.
// If disabled, Organization Domains will be created as already verified automatically.
bool require_org_domain_verification = 2;
// If enabled, the SMTP sender address domain must match Custom Domain on the instance.
bool smtp_sender_address_matches_instance_domain = 3;
// ResourceOwnerType returns if the setting is managed on the organization explicitly or
// fell back on the instance settings.
ResourceOwnerType resource_owner_type = 6;
}
@@ -0,0 +1,65 @@
syntax = "proto3";
package zitadel.settings.v2;
option go_package = "github.com/zitadel/zitadel/pkg/grpc/settings/v2;settings";
import "protoc-gen-openapiv2/options/annotations.proto";
import "zitadel/settings/v2/settings.proto";
import "validate/validate.proto";
message LegalAndSupportSettings {
// Link to the Terms of Service. Can be a relative or absolute URL.
string tos_link = 1 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
example: "\"https://zitadel.com/docs/manage/legal/terms-of-service\"";
}
];
// Link to the Privacy Policy. Can be a relative or absolute URL.
string privacy_policy_link = 2 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
example: "\"https://zitadel.com/docs/manage/legal/policies/privacy-policy\"";
}
];
// Link to a help page. Can be a relative or absolute URL.
string help_link = 3 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
example: "\"https://zitadel.com/docs/manage/console-overview\"";
}
];
// Email address for support issues.
string support_email = 4 [
(validate.rules).string = {ignore_empty: true, max_len: 320, email: true},
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
example: "\"support-email@test.com\"";
}
];
// ResourceOwnerType returns if the setting is managed on the organization explicitly or
// fell back on the instance settings.
ResourceOwnerType resource_owner_type = 5;
// Link to documentation to be shown in the management console.
string docs_link = 6 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
example: "\"https://zitadel.com/docs\"";
}
];
// Link to an external resource that will be available to users in the management console.
string custom_link = 7 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
example: "\"https://external.link\"";
}
];
// The button text that would be shown in the management console pointing to custom link.
string custom_link_text = 8 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
example: "\"External\"";
}
];
}
@@ -0,0 +1,32 @@
syntax = "proto3";
package zitadel.settings.v2;
option go_package = "github.com/zitadel/zitadel/pkg/grpc/settings/v2;settings";
import "protoc-gen-openapiv2/options/annotations.proto";
import "zitadel/settings/v2/settings.proto";
message LockoutSettings {
// The amount of failed password attempts before the account gets locked.
// Attempts are reset as soon as the password is entered correctly or the password is reset.
// If set to 0 the account will never be locked.
uint64 max_password_attempts = 1 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
example: "\"10\""
}
];
// ResourceOwnerType returns if the settings is managed on the organization explicitly or
// fell back on the instance settings.
ResourceOwnerType resource_owner_type = 2;
// THe amount of failed OTP (TOTP, SMS, Email) attempts before the account gets locked.
// Attempts are reset as soon as the OTP is entered correctly.
// If set to 0 the account will never be locked.
uint64 max_otp_attempts = 3 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
example: "\"10\""
}
];
}
@@ -0,0 +1,189 @@
syntax = "proto3";
package zitadel.settings.v2;
option go_package = "github.com/zitadel/zitadel/pkg/grpc/settings/v2;settings";
import "protoc-gen-openapiv2/options/annotations.proto";
import "zitadel/settings/v2/settings.proto";
import "zitadel/idp/v2/idp.proto";
import "google/protobuf/duration.proto";
message LoginSettings {
// If enabled, users can log in locally with their username and passkeys or password.
// Disabling this option will require users to log in with an external identity provider.
// Be sure to allow at least one external identity provider if this option is disabled.
// Deprecated: check allow_local_authentication instead.
bool allow_username_password = 1 [
deprecated = true
];
// If enabled, users can log in locally with their username and passkeys or password.
// Disabling this option will require users to log in with an external identity provider.
// Be sure to allow at least one external identity provider if this option is disabled.
bool allow_local_authentication = 20;
// If enabled, users can register a local account by themself.
// This option does not effect external identity providers.
// Each identity provider can be configured to allow or disallow registration.
bool allow_register = 2;
// If enabled, users will generally be allowed to use an external identity provider to log in.
// Be sure to allow at least one external identity provider if this option is enabled.
bool allow_external_idp = 3;
// If enabled, users will be forced to use a multi-factor to log in.
// This also applies to federated logins through an external identity provider.
// Users will be required to set up a second factor if they have not done so already.
bool force_mfa = 4;
// Defines the usage of passkeys for users.
// PASSKEYS_TYPE_NOT_ALLOWED: Users are not allowed to use passkeys.
// PASSKEYS_TYPE_ALLOWED: Users are allowed to use passkeys.
// There will be additional options in the future.
// If passkeys are allowed, users can choose to use passkeys or password for local authentication.
// A verified passkey authentication will not require a second factor, if force_mfa is enabled.
PasskeysType passkeys_type = 5;
// If enabled, the password reset link will be hidden on the login screen.
bool hide_password_reset = 6;
// If enabled, an unknown username on the login screen will not return an error directly,
// but will always display the password screen.
// This prevents user enumeration attacks.
bool ignore_unknown_usernames = 7;
// Defines where the user will be redirected to if the login is started without app context (e.g. from mail).
string default_redirect_uri = 8 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
example: "\"https://acme.com/ui/console\"";
}
];
// The duration a password check is valid.
// After this time has passed, the user will be required to re-validate their
// password on the next action that requires authentication.
// Note that this does not enforce a logout or session expiration.
google.protobuf.Duration password_check_lifetime = 9 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
example: "\"864000s\"";
}
];
// The duration a login through an external identity provider is valid.
// After this time has passed, the user will be required to re-authenticate with the
// external identity provider on the next action that requires authentication.
// Note that this does not enforce a logout or session expiration.
google.protobuf.Duration external_login_check_lifetime = 10 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
example: "\"864000s\"";
}
];
// Defines after how much time the mfa prompt will be shown again.
google.protobuf.Duration mfa_init_skip_lifetime = 11 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
example: "\"2592000s\"";
}
];
// The duration a second factor check is valid.
// After this time has passed, the user will be required to re-validate their
// second factor on the next action that requires authentication.
// Note that this does not enforce a logout or session expiration.
google.protobuf.Duration second_factor_check_lifetime = 12 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
example: "\"64800s\"";
}
];
// The duration a multi-factor check is valid.
// After this time has passed, the user will be required to re-validate their
// multi-factor on the next action that requires authentication.
// Note that this does not enforce a logout or session expiration.
google.protobuf.Duration multi_factor_check_lifetime = 13 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
example: "\"43200s\"";
}
];
// The list of allowed second factors.
repeated SecondFactorType second_factors = 14;
// The list of allowed multi factors.
repeated MultiFactorType multi_factors = 15;
// Allow discovery of the organization and its authentication option by domain.
// If set to true, the suffix (@domain.com) of an unknown username input on the login screen
// will be matched against the Organization Domains and will redirect to the registration of that organization on success.
// The registration can either be locally (requires allow_register to be true) or through an external identity provider.
// In case only one identity provider is configured for the organization, the user will be redirected directly to the identity provider.
bool allow_domain_discovery = 16;
// By default, users can login with their verified email address additionally to their login name.
// Setting this to true disables the email login.
// Note: If the email is set as the login name, this setting has no effect.
bool disable_login_with_email = 17 ;
// By default, users can login with their verified phone number additionally to their login name.
// Setting this to true disables the phone number login.
// Note: If the phone number is set as the login name, this setting has no effect.
bool disable_login_with_phone = 18;
// ResourceOwnerType returns if the settings is managed on the organization explicitly or
// fell back on the instance settings.
ResourceOwnerType resource_owner_type = 19;
// If enabled, users will be forced to use a multi-factor to log in if they authenticated locally.
// This does not apply to federated logins through an external identity provider.
// Users will be required to set up a second factor if they have not done so already.
// If both force_mfa and force_mfa_local_only are enabled, force_mfa takes precedence and
// all logins will require a second factor.
bool force_mfa_local_only = 22;
}
enum SecondFactorType {
option allow_alias = true;
SECOND_FACTOR_TYPE_UNSPECIFIED = 0;
// Deprecated: use SECOND_FACTOR_TYPE_TOTP instead.
SECOND_FACTOR_TYPE_OTP = 1;
SECOND_FACTOR_TYPE_TOTP = 1;
SECOND_FACTOR_TYPE_U2F = 2;
SECOND_FACTOR_TYPE_OTP_EMAIL = 3;
SECOND_FACTOR_TYPE_OTP_SMS = 4;
SECOND_FACTOR_TYPE_RECOVERY_CODES = 5;
}
enum MultiFactorType {
MULTI_FACTOR_TYPE_UNSPECIFIED = 0;
MULTI_FACTOR_TYPE_U2F_WITH_VERIFICATION = 1;
}
enum PasskeysType {
PASSKEYS_TYPE_NOT_ALLOWED = 0;
PASSKEYS_TYPE_ALLOWED = 1;
}
message IdentityProvider {
string id = 1;
string name = 2;
IdentityProviderType type = 3;
zitadel.idp.v2.Options options = 4;
}
enum IdentityProviderType {
IDENTITY_PROVIDER_TYPE_UNSPECIFIED = 0;
IDENTITY_PROVIDER_TYPE_OIDC = 1;
IDENTITY_PROVIDER_TYPE_JWT = 2;
IDENTITY_PROVIDER_TYPE_LDAP = 3;
IDENTITY_PROVIDER_TYPE_OAUTH = 4;
IDENTITY_PROVIDER_TYPE_AZURE_AD = 5;
IDENTITY_PROVIDER_TYPE_GITHUB = 6;
IDENTITY_PROVIDER_TYPE_GITHUB_ES = 7;
IDENTITY_PROVIDER_TYPE_GITLAB = 8;
IDENTITY_PROVIDER_TYPE_GITLAB_SELF_HOSTED = 9;
IDENTITY_PROVIDER_TYPE_GOOGLE = 10;
IDENTITY_PROVIDER_TYPE_SAML = 11;
IDENTITY_PROVIDER_TYPE_APPLE = 12;
IDENTITY_PROVIDER_TYPE_ZITADEL = 13;
}
@@ -0,0 +1,53 @@
syntax = "proto3";
package zitadel.settings.v2;
option go_package = "github.com/zitadel/zitadel/pkg/grpc/settings/v2;settings";
import "protoc-gen-openapiv2/options/annotations.proto";
import "zitadel/settings/v2/settings.proto";
message PasswordComplexitySettings {
// The minimum length a password must have.
uint64 min_length = 1 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
example: "\"8\""
}
];
// Defines if the password MUST contain an upper case letter.
bool requires_uppercase = 2;
// Defines if the password MUST contain a lowercase letter.
bool requires_lowercase = 3;
// Defines if the password MUST contain a number.
bool requires_number = 4;
// Defines if the password MUST contain a symbol or special character. E.g. "$"
bool requires_symbol = 5;
// ResourceOwnerType returns if the settings is managed on the organization explicitly or
// fell back on the instance settings.
ResourceOwnerType resource_owner_type = 6;
}
message PasswordExpirySettings {
// Amount of days after which a password will expire. The user will be forced to change the password on the following authentication.
uint64 max_age_days = 1 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
example: "\"365\""
}
];
// Amount of days after which the user should be notified of the upcoming expiry. Zitadel will not notify the user.
uint64 expire_warn_days = 2 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
example: "\"10\""
}
];
// ResourceOwnerType returns if the settings is managed on the organization explicitly or
// fail back on the instance settings.
ResourceOwnerType resource_owner_type = 3;
}
@@ -0,0 +1,45 @@
syntax = "proto3";
package zitadel.settings.v2;
option go_package = "github.com/zitadel/zitadel/pkg/grpc/settings/v2;settings";
import "protoc-gen-openapiv2/options/annotations.proto";
message SecuritySettings {
// EmbeddedIframeSettings defines if the login UI can be embedded in an iframe
// and which origins are allowed to do so.
EmbeddedIframeSettings embedded_iframe = 1;
// If enabled, users are allowed to impersonate other users.
// The impersonator needs the appropriate `*_IMPERSONATOR` roles assigned as well".
bool enable_impersonation = 2;
// DynamicClientRegistrationSettings defines if OAuth 2.0 clients may register
// themselves at runtime (RFC 7591) and whether they may do so without a token.
DynamicClientRegistrationSettings dynamic_client_registration = 3;
}
message DynamicClientRegistrationSettings {
// Enabled states if the OAuth 2.0 Dynamic Client Registration endpoint (RFC 7591) is
// served and advertised as `registration_endpoint` in the discovery document.
// When disabled, the endpoint responds with 404 and is absent from discovery.
bool enabled = 1;
// AllowUnauthenticated states if clients may register without a bearer token, as
// required by the Model Context Protocol (MCP) flow. Such clients are homed in the
// instance's default organization. It only has an effect if enabled is true.
//
// When false, registration requires an access token whose user holds the
// `project.app.register_dynamic` permission in the token's organization, and the
// client is homed in that organization.
bool allow_unauthenticated = 2;
}
message EmbeddedIframeSettings{
// Enabled states if iframe embedding is enabled or disabled.
bool enabled = 1;
// AllowedOrigins defines which origins are allowed to embed Zitadel in an iframe.
repeated string allowed_origins = 2;
}
@@ -0,0 +1,13 @@
syntax = "proto3";
package zitadel.settings.v2;
option go_package = "github.com/zitadel/zitadel/pkg/grpc/settings/v2;settings";
import "protoc-gen-openapiv2/options/annotations.proto";
enum ResourceOwnerType {
RESOURCE_OWNER_TYPE_UNSPECIFIED = 0;
RESOURCE_OWNER_TYPE_INSTANCE = 1;
RESOURCE_OWNER_TYPE_ORG = 2;
}
@@ -0,0 +1,745 @@
syntax = "proto3";
package zitadel.settings.v2;
import "zitadel/protoc_gen_zitadel/v2/options.proto";
import "zitadel/object/v2/object.proto";
import "zitadel/settings/v2/branding_settings.proto";
import "zitadel/settings/v2/domain_settings.proto";
import "zitadel/settings/v2/legal_settings.proto";
import "zitadel/settings/v2/lockout_settings.proto";
import "zitadel/settings/v2/login_settings.proto";
import "zitadel/settings/v2/password_settings.proto";
import "zitadel/settings/v2/security_settings.proto";
import "google/api/annotations.proto";
import "google/api/field_behavior.proto";
import "protoc-gen-openapiv2/options/annotations.proto";
import "validate/validate.proto";
import "google/protobuf/struct.proto";
import "zitadel/settings/v2/settings.proto";
import "google/protobuf/timestamp.proto";
import "zitadel/filter/v2/filter.proto";
option go_package = "github.com/zitadel/zitadel/pkg/grpc/settings/v2;settings";
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
info: {
title: "Settings Service";
version: "2.0";
description: "This API is intended to manage settings in a Zitadel instance.";
contact:{
name: "ZITADEL"
url: "https://zitadel.com"
email: "hi@zitadel.com"
}
license: {
name: "Apache 2.0",
url: "https://github.com/zitadel/zitadel/blob/main/LICENSING.md";
};
};
schemes: HTTPS;
schemes: HTTP;
consumes: "application/json";
consumes: "application/grpc";
produces: "application/json";
produces: "application/grpc";
consumes: "application/grpc-web+proto";
produces: "application/grpc-web+proto";
host: "$CUSTOM_DOMAIN";
base_path: "/";
external_docs: {
description: "Detailed information about ZITADEL",
url: "https://zitadel.com/docs"
}
security_definitions: {
security: {
key: "OAuth2";
value: {
type: TYPE_OAUTH2;
flow: FLOW_ACCESS_CODE;
authorization_url: "$CUSTOM_DOMAIN/oauth/v2/authorize";
token_url: "$CUSTOM_DOMAIN/oauth/v2/token";
scopes: {
scope: {
key: "openid";
value: "openid";
}
scope: {
key: "urn:zitadel:iam:org:project:id:zitadel:aud";
value: "urn:zitadel:iam:org:project:id:zitadel:aud";
}
}
}
}
}
security: {
security_requirement: {
key: "OAuth2";
value: {
scope: "openid";
scope: "urn:zitadel:iam:org:project:id:zitadel:aud";
}
}
}
responses: {
key: "403";
value: {
description: "Returned when the user does not have permission to access the resource.";
schema: {
json_schema: {
ref: "#/definitions/rpcStatus";
}
}
}
}
responses: {
key: "404";
value: {
description: "Returned when the resource does not exist.";
schema: {
json_schema: {
ref: "#/definitions/rpcStatus";
}
}
}
}
};
service SettingsService {
// Get General Settings
//
// Get basic information of the instance like the default organization, default language and supported languages.
//
// Required permissions:
// - `policy.read`
rpc GetGeneralSettings (GetGeneralSettingsRequest) returns (GetGeneralSettingsResponse) {
option (google.api.http) = {
get: "/v2/settings"
};
option (zitadel.protoc_gen_zitadel.v2.options) = {
auth_option: {
permission: "policy.read"
}
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
responses: {
key: "200"
value: {
description: "OK";
}
};
};
}
// Get Login Settings
//
// Get the login settings for the requested context.
// This can be the instance or an organization. In case of an organization,
// the returned settings will fall back to the instance settings if not explicitly set on the organization.
//
// Required permissions:
// - `policy.read`
rpc GetLoginSettings (GetLoginSettingsRequest) returns (GetLoginSettingsResponse) {
option (google.api.http) = {
get: "/v2/settings/login"
};
option (zitadel.protoc_gen_zitadel.v2.options) = {
auth_option: {
permission: "policy.read"
}
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
responses: {
key: "200"
value: {
description: "OK";
}
};
};
}
// Get Active Identity Providers
//
// Get the current active identity providers for the requested context.
// This can be the instance or an organization. In case of an organization,
// the returned identity providers will fall back to the active instance identity providers
// if not explicitly set on the organization.
//
// Optionally, filter the identity providers by their allowed actions:
// - creation_allowed: only return identity providers that are allowed for user creation
// - linking_allowed: only return identity providers that are allowed for linking to existing users
// - auto_creation: only return identity providers that are allowed for automatic user creation
// - auto_linking: only return identity providers that are allowed for automatic linking to existing users
//
// Required permissions:
// - `policy.read`
rpc GetActiveIdentityProviders (GetActiveIdentityProvidersRequest) returns (GetActiveIdentityProvidersResponse) {
option (google.api.http) = {
get: "/v2/settings/login/idps"
};
option (zitadel.protoc_gen_zitadel.v2.options) = {
auth_option: {
permission: "policy.read"
}
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
responses: {
key: "200"
value: {
description: "OK";
}
};
};
}
// Get Password Complexity Settings
//
// Get the password complexity settings for the requested context.
// This can be the instance or an organization. In case of an organization,
// the returned settings will fall back to the instance settings if not explicitly set on the organization.
//
// Required permissions:
// - `policy.read`
rpc GetPasswordComplexitySettings (GetPasswordComplexitySettingsRequest) returns (GetPasswordComplexitySettingsResponse) {
option (google.api.http) = {
get: "/v2/settings/password/complexity"
};
option (zitadel.protoc_gen_zitadel.v2.options) = {
auth_option: {
permission: "policy.read"
}
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
responses: {
key: "200"
value: {
description: "OK";
}
};
};
}
// Get Password Expiry Settings
//
// Get the password expiry settings for the requested context.
// This can be the instance or an organization. In case of an organization,
// the returned settings will fall back to the instance settings if not explicitly set on the organization.
//
// Required permissions:
// - `policy.read`
rpc GetPasswordExpirySettings (GetPasswordExpirySettingsRequest) returns (GetPasswordExpirySettingsResponse) {
option (google.api.http) = {
get: "/v2/settings/password/expiry"
};
option (zitadel.protoc_gen_zitadel.v2.options) = {
auth_option: {
permission: "policy.read"
}
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
responses: {
key: "200"
value: {
description: "OK";
}
};
};
}
// Get Branding Settings
//
// Get the current active branding settings for the requested context.
// This can be the instance or an organization. In case of an organization,
// the returned settings will fall back to the instance settings if not explicitly set on the organization.
//
// Required permissions:
// - `policy.read`
rpc GetBrandingSettings (GetBrandingSettingsRequest) returns (GetBrandingSettingsResponse) {
option (google.api.http) = {
get: "/v2/settings/branding"
};
option (zitadel.protoc_gen_zitadel.v2.options) = {
auth_option: {
permission: "policy.read"
}
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
responses: {
key: "200"
value: {
description: "OK";
}
};
};
}
// Get Domain Settings
//
// Get the domain settings for the requested context.
// This can be the instance or an organization. In case of an organization,
// the returned settings will fall back to the instance settings if not explicitly set on the organization.
//
// Required permissions:
// - `policy.read`
rpc GetDomainSettings (GetDomainSettingsRequest) returns (GetDomainSettingsResponse) {
option (google.api.http) = {
get: "/v2/settings/domain"
};
option (zitadel.protoc_gen_zitadel.v2.options) = {
auth_option: {
permission: "policy.read"
}
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
responses: {
key: "200"
value: {
description: "OK";
}
};
};
}
// Get Legal and Support Settings
//
// Get the legal and support settings for the requested context.
// This can be the instance or an organization. In case of an organization,
// the returned settings will fall back to the instance settings if not explicitly set on the organization.
//
// Required permissions:
// - `policy.read`
rpc GetLegalAndSupportSettings (GetLegalAndSupportSettingsRequest) returns (GetLegalAndSupportSettingsResponse) {
option (google.api.http) = {
get: "/v2/settings/legal_support"
};
option (zitadel.protoc_gen_zitadel.v2.options) = {
auth_option: {
permission: "policy.read"
}
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
responses: {
key: "200"
value: {
description: "OK";
}
};
};
}
// Get Lockout Settings
//
// Get the lockout settings for the requested context.
// This can be the instance or an organization. In case of an organization,
// the returned settings will fall back to the instance settings if not explicitly set on the organization.
//
// Lockout settings define how many failed attempts are allowed before a user is locked out.
//
// Required permissions:
// - `policy.read`
rpc GetLockoutSettings (GetLockoutSettingsRequest) returns (GetLockoutSettingsResponse) {
option (google.api.http) = {
get: "/v2/settings/lockout"
};
option (zitadel.protoc_gen_zitadel.v2.options) = {
auth_option: {
permission: "policy.read"
}
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
responses: {
key: "200"
value: {
description: "OK";
}
};
};
}
// Get Security Settings
//
// Get the security settings of the Zitadel instance.
// Security settings include settings like enabling impersonation and embedded iframe settings.
//
// Required permissions:
// - `iam.policy.read`
rpc GetSecuritySettings(GetSecuritySettingsRequest) returns (GetSecuritySettingsResponse) {
option (google.api.http) = {
get: "/v2/settings/security";
};
option (zitadel.protoc_gen_zitadel.v2.options) = {
auth_option: {
permission: "iam.policy.read"
}
};
}
// Set Security Settings
//
// Set the security settings of the instance.
//
// Required permissions:
// - `iam.policy.write`
rpc SetSecuritySettings(SetSecuritySettingsRequest) returns (SetSecuritySettingsResponse) {
option (google.api.http) = {
put: "/v2/settings/security";
body: "*";
additional_bindings {
put: "/v2/policies/security";
body: "*";
}
};
option (zitadel.protoc_gen_zitadel.v2.options) = {
auth_option: {
permission: "iam.policy.write"
}
};
}
// Get Hosted Login Translation
//
// Returns the translations in the requested locale for the hosted login.
// The translations returned are based on the input level specified (system, instance or organization).
//
// If the requested level doesn't contain all translations, and ignore_inheritance is set to false,
// a merging process fallbacks onto the higher levels ensuring all keys in the file have a translation,
// which could be in the default language if the one of the locale is missing on all levels.
//
// The etag returned in the response represents the hash of the translations as they are stored on DB
// and its reliable only if ignore_inheritance = true.
//
// Required permissions:
// - `iam.policy.read`
rpc GetHostedLoginTranslation(GetHostedLoginTranslationRequest) returns (GetHostedLoginTranslationResponse) {
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
responses: {
key: "200";
value: {
description: "The localized translations.";
}
};
};
option (google.api.http) = {
get: "/v2/settings/hosted_login_translation"
};
option (zitadel.protoc_gen_zitadel.v2.options) = {
auth_option: {
permission: "iam.policy.read"
}
};
}
// Set Hosted Login Translation
//
// Sets the input translations at the specified level (instance or organization) for the input language.
//
// Required permissions:
// - `iam.policy.write`
rpc SetHostedLoginTranslation(SetHostedLoginTranslationRequest) returns (SetHostedLoginTranslationResponse) {
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
responses: {
key: "200";
value: {
description: "The translations was successfully set.";
}
};
};
option (google.api.http) = {
put: "/v2/settings/hosted_login_translation";
body: "*"
};
option (zitadel.protoc_gen_zitadel.v2.options) = {
auth_option: {
permission: "iam.policy.write"
}
};
}
}
message GetLoginSettingsRequest {
// Specify the context for which the login settings should be returned.
// This can be the instance or an organization.
// In case of an organization, the returned settings will fall back to the instance settings
// if not explicitly set on the organization.
zitadel.object.v2.RequestContext ctx = 1;
}
message GetLoginSettingsResponse {
zitadel.object.v2.Details details = 1;
zitadel.settings.v2.LoginSettings settings = 2;
}
message GetPasswordComplexitySettingsRequest {
// Specify the context for which the password complexity settings should be returned.
// This can be the instance or an organization.
// In case of an organization, the returned settings will fall back to the instance settings
// if not explicitly set on the organization.
zitadel.object.v2.RequestContext ctx = 1;
}
message GetPasswordComplexitySettingsResponse {
zitadel.object.v2.Details details = 1;
zitadel.settings.v2.PasswordComplexitySettings settings = 2;
}
message GetPasswordExpirySettingsRequest {
// Specify the context for which the password expiry settings should be returned.
// This can be the instance or an organization.
// In case of an organization, the returned settings will fall back to the instance settings
// if not explicitly set on the organization.
zitadel.object.v2.RequestContext ctx = 1;
}
message GetPasswordExpirySettingsResponse {
zitadel.object.v2.Details details = 1;
zitadel.settings.v2.PasswordExpirySettings settings = 2;
}
message GetBrandingSettingsRequest {
// Specify the context for which the branding settings should be returned.
// This can be the instance or an organization.
// In case of an organization, the returned settings will fall back to the instance settings
// if not explicitly set on the organization.
zitadel.object.v2.RequestContext ctx = 1;
}
message GetBrandingSettingsResponse {
zitadel.object.v2.Details details = 1;
zitadel.settings.v2.BrandingSettings settings = 2;
}
message GetDomainSettingsRequest {
// Specify the context for which the domain settings should be returned.
// This can be the instance or an organization.
// In case of an organization, the returned settings will fall back to the instance settings
// if not explicitly set on the organization.
zitadel.object.v2.RequestContext ctx = 1;
}
message GetDomainSettingsResponse {
zitadel.object.v2.Details details = 1;
zitadel.settings.v2.DomainSettings settings = 2;
}
message GetLegalAndSupportSettingsRequest {
// Specify the context for which the legal and support settings should be returned.
// This can be the instance or an organization.
// In case of an organization, the returned settings will fall back to the instance settings
// if not explicitly set on the organization.
zitadel.object.v2.RequestContext ctx = 1;
}
message GetLegalAndSupportSettingsResponse {
zitadel.object.v2.Details details = 1;
zitadel.settings.v2.LegalAndSupportSettings settings = 2;
}
message GetLockoutSettingsRequest {
// Specify the context for which the lockout settings should be returned.
// This can be the instance or an organization.
// In case of an organization, the returned settings will fall back to the instance settings
// if not explicitly set on the organization.
zitadel.object.v2.RequestContext ctx = 1;
}
message GetLockoutSettingsResponse {
zitadel.object.v2.Details details = 1;
zitadel.settings.v2.LockoutSettings settings = 2;
}
message GetActiveIdentityProvidersRequest {
// Specify the context for which the active identity providers should be returned.
// This can be the instance or an organization.
// In case of an organization, the returned providers will fall back to the instance providers
// if not explicitly set on the organization.
zitadel.object.v2.RequestContext ctx = 1;
optional bool creation_allowed = 2;
optional bool linking_allowed = 3;
optional bool auto_creation = 4;
optional bool auto_linking = 5;
}
message GetActiveIdentityProvidersResponse {
zitadel.object.v2.ListDetails details = 1;
repeated zitadel.settings.v2.IdentityProvider identity_providers = 2;
}
message GetGeneralSettingsRequest {}
message GetGeneralSettingsResponse {
// The unique identifier of the default organization.
// The default organization is used to assign new users to an organization if no other organization is specified.
// Deprecated: use default_organization_id instead.
string default_org_id = 1;
// The default language is use if no other language is specified or detected.
// The format is a BCP 47 language tag (e.g. "en", "de", "fr-CH").
string default_language = 2 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
example: "\"en\""
}
];
// The list of supported languages.
// Note that the instance might restrict the languages further
// only allowing a subset of these languages to be used.
// The format is a BCP 47 language tag (e.g. "en", "de", "fr-CH").
repeated string supported_languages = 3 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
example: "[\"en\", \"de\", \"it\"]"
}
];
// The unique identifier of the default organization.
// The default organization is used to assign new users to an organization if no other organization is specified.
string default_organization_id = 4;
// The list of allowed languages for the instance.
// This is a subset of the supported languages to be used in the instance
// e.g. for user selection during registration or language detection in the UI.
// The format is a BCP 47 language tag (e.g. "en", "de", "fr-CH").
repeated string allowed_languages = 5 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
example: "[\"en\", \"de\", \"it\"]"
}
];
}
message GetSecuritySettingsRequest{}
message GetSecuritySettingsResponse{
zitadel.object.v2.Details details = 1;
SecuritySettings settings = 2;
}
message SetSecuritySettingsRequest{
// EmbeddedIframeSettings defines if the login UI can be embedded in an iframe
// and which origins are allowed to do so.
EmbeddedIframeSettings embedded_iframe = 1;
// If enabled, users are allowed to impersonate other users.
// The impersonator needs the appropriate `*_IMPERSONATOR` roles assigned as well".
bool enable_impersonation = 2;
// DynamicClientRegistrationSettings defines if OAuth 2.0 clients may register
// themselves at runtime (RFC 7591) and whether they may do so without a token.
DynamicClientRegistrationSettings dynamic_client_registration = 3;
}
message SetSecuritySettingsResponse{
zitadel.object.v2.Details details = 1;
}
message GetHostedLoginTranslationRequest {
// Specify the level from which the translation should be returned.
// If the requested level doesn't contain all translations, and ignore_inheritance is set to false
// a merging process fallbacks onto the higher levels ensuring all keys in the file have a translation.
oneof level {
bool system = 1 [(validate.rules).bool = {const: true}];
bool instance = 2 [(validate.rules).bool = {const: true}];
string organization_id = 3;
}
// The locale of the translations to be returned.
// Needs to be a BCP 47 language tag (e.g. "en", "de", "fr-CH").
string locale = 4 [
(validate.rules).string = {min_len: 2},
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
min_length: 2;
example: "\"fr-FR\"";
}
];
// if set to true, higher levels are ignored, if false higher levels are merged into the file
bool ignore_inheritance = 5;
}
message GetHostedLoginTranslationResponse {
// hash of the payload
string etag = 1 [
(validate.rules).string = {min_len: 32, max_len: 32},
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
min_length: 32;
max_length: 32;
example: "\"42a1ba123e6ea6f0c93e286ed97c7018\"";
}
];
// Translations contains the translations in the requested language.
google.protobuf.Struct translations = 2 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
example: "{\"common\":{\"back\":\"Indietro\"},\"accounts\":{\"title\":\"Account\",\"description\":\"Seleziona l'account che desideri utilizzare.\",\"addAnother\":\"Aggiungi un altro account\",\"noResults\":\"Nessun account trovato\"}}";
}
];
}
message SetHostedLoginTranslationRequest {
// Specify the level on which the translation should be set.
// Only instance or organization level is allowed.
// System level translations can't be modified.
// In case of organization level, the organization_id needs to be set.
// If a translation already exists on the specified level, it will be overwritten.
oneof level {
bool instance = 1 [(validate.rules).bool = {const: true}];
string organization_id = 2;
}
// The locale of the translations to be set.
// Needs to be a BCP 47 language tag (e.g. "en", "de", "fr-CH").
string locale = 3 [
(validate.rules).string = {min_len: 2},
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
min_length: 2;
example: "\"fr-FR\"";
}
];
// Translations should contain the translations in the specified locale.
google.protobuf.Struct translations = 4 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
example: "{\"common\":{\"back\":\"Indietro\"},\"accounts\":{\"title\":\"Account\",\"description\":\"Seleziona l'account che desideri utilizzare.\",\"addAnother\":\"Aggiungi un altro account\",\"noResults\":\"Nessun account trovato\"}}";
}
];
}
message SetHostedLoginTranslationResponse {
// hash of the saved translation. Valid only when ignore_inheritance = true
string etag = 1 [
(validate.rules).string = {min_len: 32, max_len: 32},
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
min_length: 32;
max_length: 32;
example: "\"42a1ba123e6ea6f0c93e286ed97c7018\"";
}
];
}
@@ -0,0 +1,93 @@
syntax = "proto3";
package zitadel.settings.v2beta;
option go_package = "github.com/zitadel/zitadel/pkg/grpc/settings/v2beta;settings";
import "protoc-gen-openapiv2/options/annotations.proto";
import "zitadel/settings/v2beta/settings.proto";
message BrandingSettings {
Theme light_theme = 1;
Theme dark_theme = 2;
string font_url = 3 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "url to the font used";
example: "\"https://acme.com/assets/v1/165617850692654601/policy/label/font-180950243237405441\"";
}
];
// hides the org suffix on the login form if the scope \"urn:zitadel:iam:org:domain:primary:{domainname}\" is set
bool hide_login_name_suffix = 4 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "hides the org suffix on the login form if the scope \"urn:zitadel:iam:org:domain:primary:{domainname}\" is set";
}
];
bool disable_watermark = 5 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "boolean to disable the watermark";
}
];
// resource_owner_type returns if the setting is managed on the organization or on the instance
ResourceOwnerType resource_owner_type = 6 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "resource_owner_type returns if the setting is managed on the organization or on the instance";
}
];
ThemeMode theme_mode = 7 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "states whether both or only dark or light theme will be used";
}
];
}
message Theme {
// hex value for primary color
string primary_color = 1 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "hex value for primary color";
example: "\"#5469d4\"";
}
];
// hex value for background color
string background_color = 2 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "hex value for background color";
example: "\"#FAFAFA\"";
}
];
// hex value for warning color
string warn_color = 3 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "hex value for warn color";
example: "\"#CD3D56\"";
}
];
// hex value for font color
string font_color = 4 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "hex value for font color";
example: "\"#000000\"";
}
];
// url where the logo is served
string logo_url = 5 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "url to the logo";
example: "\"https://acme.com/assets/v1/165617850692654601/policy/label/logo-180950416321494657\"";
}
];
// url where the icon is served
string icon_url = 6 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "url to the icon";
example: "\"https://acme.com/assets/v1/165617850692654601/policy/label/icon-180950498874178817\"";
}
];
}
enum ThemeMode {
THEME_MODE_UNSPECIFIED = 0;
THEME_MODE_AUTO = 1;
THEME_MODE_LIGHT = 2;
THEME_MODE_DARK = 3;
}
@@ -0,0 +1,33 @@
syntax = "proto3";
package zitadel.settings.v2beta;
option go_package = "github.com/zitadel/zitadel/pkg/grpc/settings/v2beta;settings";
import "protoc-gen-openapiv2/options/annotations.proto";
import "zitadel/settings/v2beta/settings.proto";
message DomainSettings {
bool login_name_includes_domain = 1 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "the username has to end with the domain of its organization"
}
];
bool require_org_domain_verification = 2 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "defines if Organization Domains should be verified upon creation, otherwise will be created already verified"
}
];
bool smtp_sender_address_matches_instance_domain = 3 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "defines if the SMTP sender address domain should match an existing domain on the instance"
}
];
// resource_owner_type returns if the setting is managed on the organization or on the instance
ResourceOwnerType resource_owner_type = 6 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "resource_owner_type returns if the setting is managed on the organization or on the instance";
}
];
}
@@ -0,0 +1,58 @@
syntax = "proto3";
package zitadel.settings.v2beta;
option go_package = "github.com/zitadel/zitadel/pkg/grpc/settings/v2beta;settings";
import "protoc-gen-openapiv2/options/annotations.proto";
import "zitadel/settings/v2beta/settings.proto";
import "validate/validate.proto";
message LegalAndSupportSettings {
string tos_link = 1 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
example: "\"https://zitadel.com/docs/manage/legal/terms-of-service\"";
}
];
string privacy_policy_link = 2 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
example: "\"https://zitadel.com/docs/manage/legal/policies/privacy-policy\"";
}
];
string help_link = 3 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
example: "\"https://zitadel.com/docs/manage/console-overview\"";
}
];
string support_email = 4 [
(validate.rules).string = {ignore_empty: true, max_len: 320, email: true},
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
example: "\"support-email@test.com\"";
description: "help / support email address."
}
];
// resource_owner_type returns if the setting is managed on the organization or on the instance
ResourceOwnerType resource_owner_type = 5 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "resource_owner_type returns if the setting is managed on the organization or on the instance";
}
];
string docs_link = 6 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "Link to documentation to be shown in the management console.";
example: "\"https://zitadel.com/docs\"";
}
];
string custom_link = 7 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "Link to an external resource that will be available to users in the management console.";
example: "\"https://external.link\"";
}
];
string custom_link_text = 8 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "The button text that would be shown in the management console pointing to custom link.";
example: "\"External\"";
}
];
}
@@ -0,0 +1,29 @@
syntax = "proto3";
package zitadel.settings.v2beta;
option go_package = "github.com/zitadel/zitadel/pkg/grpc/settings/v2beta;settings";
import "protoc-gen-openapiv2/options/annotations.proto";
import "zitadel/settings/v2beta/settings.proto";
message LockoutSettings {
uint64 max_password_attempts = 1 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "Maximum password check attempts before the account gets locked. Attempts are reset as soon as the password is entered correctly or the password is reset. If set to 0 the account will never be locked."
example: "\"10\""
}
];
// resource_owner_type returns if the settings is managed on the organization or on the instance
ResourceOwnerType resource_owner_type = 2 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "resource_owner_type returns if the settings is managed on the organization or on the instance";
}
];
uint64 max_otp_attempts = 3 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "Maximum failed attempts for a single OTP type (TOTP, SMS, Email) before the account gets locked. Attempts are reset as soon as the OTP is entered correctly. If set to 0 the account will never be locked."
example: "\"10\""
}
];
}
@@ -0,0 +1,154 @@
syntax = "proto3";
package zitadel.settings.v2beta;
option go_package = "github.com/zitadel/zitadel/pkg/grpc/settings/v2beta;settings";
import "protoc-gen-openapiv2/options/annotations.proto";
import "zitadel/settings/v2beta/settings.proto";
import "google/protobuf/duration.proto";
message LoginSettings {
bool allow_username_password = 1 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "defines if a user is allowed to log in with username and password";
}
];
bool allow_register = 2 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "defines if a person is allowed to register a user on this organization";
}
];
bool allow_external_idp = 3 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "defines if a user is allowed to add a defined identity provider. E.g. Google auth";
}
];
bool force_mfa = 4 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "defines if a user MUST use a multi-factor to log in";
}
];
PasskeysType passkeys_type = 5 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "defines if passkeys are allowed for users"
}
];
bool hide_password_reset = 6 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "defines if password reset link should be shown in the login screen"
}
];
bool ignore_unknown_usernames = 7 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "defines if unknown username on login screen directly returns an error or always displays the password screen"
}
];
string default_redirect_uri = 8 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "defines where the user will be redirected to if the login is started without app context (e.g. from mail)";
example: "\"https://acme.com/ui/console\"";
}
];
google.protobuf.Duration password_check_lifetime = 9 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "Defines after how much time the user has to re-authenticate with the password.";
example: "\"864000s\"";
}
];
google.protobuf.Duration external_login_check_lifetime = 10 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "Defines after how much time the user has to re-authenticate with an external provider.";
example: "\"864000s\"";
}
];
google.protobuf.Duration mfa_init_skip_lifetime = 11 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "Defines after how much time the mfa prompt will be shown again.";
example: "\"2592000s\"";
}
];
google.protobuf.Duration second_factor_check_lifetime = 12 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "Defines after how long the second factor check is valid.";
example: "\"64800s\"";
}
];
google.protobuf.Duration multi_factor_check_lifetime = 13 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "Defines how long the multi-factor check is valid.";
example: "\"43200s\"";
}
];
repeated SecondFactorType second_factors = 14;
repeated MultiFactorType multi_factors = 15;
// If set to true, the suffix (@domain.com) of an unknown username input on the login screen will be matched against the org domains and will redirect to the registration of that organization on success.
bool allow_domain_discovery = 16 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "If set to true, the suffix (@domain.com) of an unknown username input on the login screen will be matched against the org domains and will redirect to the registration of that organization on success."
}
];
bool disable_login_with_email = 17 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "defines if the user can additionally (to the login name) be identified by their verified email address"
}
];
bool disable_login_with_phone = 18 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "defines if the user can additionally (to the login name) be identified by their verified phone number"
}
];
// resource_owner_type returns if the settings is managed on the organization or on the instance
ResourceOwnerType resource_owner_type = 19 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "resource_owner_type returns if the settings is managed on the organization or on the instance";
}
];
bool force_mfa_local_only = 22 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "if activated, only local authenticated users are forced to use MFA. Authentication through IDPs won't prompt a MFA step in the login."
}
];
}
enum SecondFactorType {
SECOND_FACTOR_TYPE_UNSPECIFIED = 0;
// This is the type for TOTP
SECOND_FACTOR_TYPE_OTP = 1;
SECOND_FACTOR_TYPE_U2F = 2;
SECOND_FACTOR_TYPE_OTP_EMAIL = 3;
SECOND_FACTOR_TYPE_OTP_SMS = 4;
}
enum MultiFactorType {
MULTI_FACTOR_TYPE_UNSPECIFIED = 0;
MULTI_FACTOR_TYPE_U2F_WITH_VERIFICATION = 1;
}
enum PasskeysType {
PASSKEYS_TYPE_NOT_ALLOWED = 0;
PASSKEYS_TYPE_ALLOWED = 1;
}
message IdentityProvider {
string id = 1;
string name = 2;
IdentityProviderType type = 3;
}
enum IdentityProviderType {
IDENTITY_PROVIDER_TYPE_UNSPECIFIED = 0;
IDENTITY_PROVIDER_TYPE_OIDC = 1;
IDENTITY_PROVIDER_TYPE_JWT = 2;
IDENTITY_PROVIDER_TYPE_LDAP = 3;
IDENTITY_PROVIDER_TYPE_OAUTH = 4;
IDENTITY_PROVIDER_TYPE_AZURE_AD = 5;
IDENTITY_PROVIDER_TYPE_GITHUB = 6;
IDENTITY_PROVIDER_TYPE_GITHUB_ES = 7;
IDENTITY_PROVIDER_TYPE_GITLAB = 8;
IDENTITY_PROVIDER_TYPE_GITLAB_SELF_HOSTED = 9;
IDENTITY_PROVIDER_TYPE_GOOGLE = 10;
IDENTITY_PROVIDER_TYPE_SAML = 11;
IDENTITY_PROVIDER_TYPE_APPLE = 12;
IDENTITY_PROVIDER_TYPE_ZITADEL = 13;
}
@@ -0,0 +1,60 @@
syntax = "proto3";
package zitadel.settings.v2beta;
option go_package = "github.com/zitadel/zitadel/pkg/grpc/settings/v2beta;settings";
import "protoc-gen-openapiv2/options/annotations.proto";
import "zitadel/settings/v2beta/settings.proto";
message PasswordComplexitySettings {
uint64 min_length = 1 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "Defines the minimum length of a password.";
example: "\"8\""
}
];
bool requires_uppercase = 2 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "defines if the password MUST contain an upper case letter"
}
];
bool requires_lowercase = 3 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "defines if the password MUST contain a lowercase letter"
}
];
bool requires_number = 4 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "defines if the password MUST contain a number"
}
];
bool requires_symbol = 5 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "defines if the password MUST contain a symbol. E.g. \"$\""
}
];
// resource_owner_type returns if the settings is managed on the organization or on the instance
ResourceOwnerType resource_owner_type = 6 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "resource_owner_type returns if the settings is managed on the organization or on the instance";
}
];
}
message PasswordExpirySettings {
// Amount of days after which a password will expire. The user will be forced to change the password on the following authentication.
uint64 max_age_days = 1 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
example: "\"365\""
}
];
// Amount of days after which the user should be notified of the upcoming expiry. Zitadel will not notify the user.
uint64 expire_warn_days = 2 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
example: "\"10\""
}
];
// resource_owner_type returns if the settings is managed on the organization or on the instance
ResourceOwnerType resource_owner_type = 3;
}
@@ -0,0 +1,31 @@
syntax = "proto3";
package zitadel.settings.v2beta;
option go_package = "github.com/zitadel/zitadel/pkg/grpc/settings/v2beta;settings";
import "protoc-gen-openapiv2/options/annotations.proto";
message SecuritySettings {
EmbeddedIframeSettings embedded_iframe = 1;
bool enable_impersonation = 2 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "default language for the current context"
example: "\"en\""
}
];
}
message EmbeddedIframeSettings{
bool enabled = 1 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "states if iframe embedding is enabled or disabled"
}
];
repeated string allowed_origins = 2 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "origins allowed loading Zitadel in an iframe if enabled."
example: "[\"foo.bar.com\", \"localhost:8080\"]"
}
];
}
@@ -0,0 +1,13 @@
syntax = "proto3";
package zitadel.settings.v2beta;
option go_package = "github.com/zitadel/zitadel/pkg/grpc/settings/v2beta;settings";
import "protoc-gen-openapiv2/options/annotations.proto";
enum ResourceOwnerType {
RESOURCE_OWNER_TYPE_UNSPECIFIED = 0;
RESOURCE_OWNER_TYPE_INSTANCE = 1;
RESOURCE_OWNER_TYPE_ORG = 2;
}
@@ -0,0 +1,511 @@
syntax = "proto3";
package zitadel.settings.v2beta;
import "zitadel/protoc_gen_zitadel/v2/options.proto";
import "zitadel/object/v2beta/object.proto";
import "zitadel/settings/v2beta/branding_settings.proto";
import "zitadel/settings/v2beta/domain_settings.proto";
import "zitadel/settings/v2beta/legal_settings.proto";
import "zitadel/settings/v2beta/lockout_settings.proto";
import "zitadel/settings/v2beta/login_settings.proto";
import "zitadel/settings/v2beta/password_settings.proto";
import "zitadel/settings/v2beta/security_settings.proto";
import "google/api/annotations.proto";
import "google/api/field_behavior.proto";
import "protoc-gen-openapiv2/options/annotations.proto";
import "validate/validate.proto";
option go_package = "github.com/zitadel/zitadel/pkg/grpc/settings/v2beta;settings";
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
info: {
title: "Settings Service";
version: "2.0-beta";
description: "This API is intended to manage settings in a Zitadel instance. This project is in beta state. It can AND will continue breaking until the services provide the same functionality as the current login.";
contact:{
name: "ZITADEL"
url: "https://zitadel.com"
email: "hi@zitadel.com"
}
license: {
name: "Apache 2.0",
url: "https://github.com/zitadel/zitadel/blob/main/LICENSING.md";
};
};
schemes: HTTPS;
schemes: HTTP;
consumes: "application/json";
consumes: "application/grpc";
produces: "application/json";
produces: "application/grpc";
consumes: "application/grpc-web+proto";
produces: "application/grpc-web+proto";
host: "$CUSTOM_DOMAIN";
base_path: "/";
external_docs: {
description: "Detailed information about ZITADEL",
url: "https://zitadel.com/docs"
}
security_definitions: {
security: {
key: "OAuth2";
value: {
type: TYPE_OAUTH2;
flow: FLOW_ACCESS_CODE;
authorization_url: "$CUSTOM_DOMAIN/oauth/v2/authorize";
token_url: "$CUSTOM_DOMAIN/oauth/v2/token";
scopes: {
scope: {
key: "openid";
value: "openid";
}
scope: {
key: "urn:zitadel:iam:org:project:id:zitadel:aud";
value: "urn:zitadel:iam:org:project:id:zitadel:aud";
}
}
}
}
}
security: {
security_requirement: {
key: "OAuth2";
value: {
scope: "openid";
scope: "urn:zitadel:iam:org:project:id:zitadel:aud";
}
}
}
responses: {
key: "403";
value: {
description: "Returned when the user does not have permission to access the resource.";
schema: {
json_schema: {
ref: "#/definitions/rpcStatus";
}
}
}
}
responses: {
key: "404";
value: {
description: "Returned when the resource does not exist.";
schema: {
json_schema: {
ref: "#/definitions/rpcStatus";
}
}
}
}
};
// Deprecated: use settings service v2 instead. This service will be removed in the next major version of ZITADEL.
service SettingsService {
// Get basic information over the instance
//
// Deprecated: please move to the corresponding endpoint under settings service v2. This endpoint will be removed with the next major version of ZITADEL.
rpc GetGeneralSettings (GetGeneralSettingsRequest) returns (GetGeneralSettingsResponse) {
option (google.api.http) = {
get: "/v2beta/settings"
};
option (zitadel.protoc_gen_zitadel.v2.options) = {
auth_option: {
permission: "policy.read"
}
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
deprecated: true;
summary: "Get basic information over the instance";
description: "Return the basic information of the instance for the requested context"
responses: {
key: "200"
value: {
description: "OK";
}
};
};
}
// Get the login settings
//
// Deprecated: please move to the corresponding endpoint under settings service v2. This endpoint will be removed with the next major version of ZITADEL.
rpc GetLoginSettings (GetLoginSettingsRequest) returns (GetLoginSettingsResponse) {
option (google.api.http) = {
get: "/v2beta/settings/login"
};
option (zitadel.protoc_gen_zitadel.v2.options) = {
auth_option: {
permission: "policy.read"
}
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
deprecated: true;
summary: "Get the login settings";
description: "Return the settings for the requested context"
responses: {
key: "200"
value: {
description: "OK";
}
};
};
}
// Get the current active identity providers
//
// Deprecated: please move to the corresponding endpoint under settings service v2. This endpoint will be removed with the next major version of ZITADEL.
rpc GetActiveIdentityProviders (GetActiveIdentityProvidersRequest) returns (GetActiveIdentityProvidersResponse) {
option (google.api.http) = {
get: "/v2beta/settings/login/idps"
};
option (zitadel.protoc_gen_zitadel.v2.options) = {
auth_option: {
permission: "policy.read"
}
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
deprecated: true;
summary: "Get the current active identity providers";
description: "Return the current active identity providers for the requested context"
responses: {
key: "200"
value: {
description: "OK";
}
};
};
}
// Get the password complexity settings
//
// Deprecated: please move to the corresponding endpoint under settings service v2. This endpoint will be removed with the next major version of ZITADEL.
rpc GetPasswordComplexitySettings (GetPasswordComplexitySettingsRequest) returns (GetPasswordComplexitySettingsResponse) {
option (google.api.http) = {
get: "/v2beta/settings/password/complexity"
};
option (zitadel.protoc_gen_zitadel.v2.options) = {
auth_option: {
permission: "policy.read"
}
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
deprecated: true;
summary: "Get the password complexity settings";
description: "Return the password complexity settings for the requested context"
responses: {
key: "200"
value: {
description: "OK";
}
};
};
}
// Get the password expiry settings
//
// Deprecated: please move to the corresponding endpoint under settings service v2. This endpoint will be removed with the next major version of ZITADEL.
rpc GetPasswordExpirySettings (GetPasswordExpirySettingsRequest) returns (GetPasswordExpirySettingsResponse) {
option (google.api.http) = {
get: "/v2beta/settings/password/expiry"
};
option (zitadel.protoc_gen_zitadel.v2.options) = {
auth_option: {
permission: "policy.read"
}
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
deprecated: true;
summary: "Get the password expiry settings";
description: "Return the password expiry settings for the requested context"
responses: {
key: "200"
value: {
description: "OK";
}
};
};
}
// Get the current active branding settings
//
// Deprecated: please move to the corresponding endpoint under settings service v2. This endpoint will be removed with the next major version of ZITADEL.
rpc GetBrandingSettings (GetBrandingSettingsRequest) returns (GetBrandingSettingsResponse) {
option (google.api.http) = {
get: "/v2beta/settings/branding"
};
option (zitadel.protoc_gen_zitadel.v2.options) = {
auth_option: {
permission: "policy.read"
}
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
deprecated: true;
summary: "Get the current active branding settings";
description: "Return the current active branding settings for the requested context"
responses: {
key: "200"
value: {
description: "OK";
}
};
};
}
// Get the domain settings
//
// Deprecated: please move to the corresponding endpoint under settings service v2. This endpoint will be removed with the next major version of ZITADEL.
rpc GetDomainSettings (GetDomainSettingsRequest) returns (GetDomainSettingsResponse) {
option (google.api.http) = {
get: "/v2beta/settings/domain"
};
option (zitadel.protoc_gen_zitadel.v2.options) = {
auth_option: {
permission: "policy.read"
}
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
deprecated: true;
summary: "Get the domain settings";
description: "Return the domain settings for the requested context"
responses: {
key: "200"
value: {
description: "OK";
}
};
};
}
// Get the legal and support settings
//
// Deprecated: please move to the corresponding endpoint under settings service v2. This endpoint will be removed with the next major version of ZITADEL.
rpc GetLegalAndSupportSettings (GetLegalAndSupportSettingsRequest) returns (GetLegalAndSupportSettingsResponse) {
option (google.api.http) = {
get: "/v2beta/settings/legal_support"
};
option (zitadel.protoc_gen_zitadel.v2.options) = {
auth_option: {
permission: "policy.read"
}
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
deprecated: true;
summary: "Get the legal and support settings";
description: "Return the legal settings for the requested context"
responses: {
key: "200"
value: {
description: "OK";
}
};
};
}
// Get the lockout settings
//
// Deprecated: please move to the corresponding endpoint under settings service v2. This endpoint will be removed with the next major version of ZITADEL.
rpc GetLockoutSettings (GetLockoutSettingsRequest) returns (GetLockoutSettingsResponse) {
option (google.api.http) = {
get: "/v2beta/settings/lockout"
};
option (zitadel.protoc_gen_zitadel.v2.options) = {
auth_option: {
permission: "policy.read"
}
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
deprecated: true;
summary: "Get the lockout settings";
description: "Return the lockout settings for the requested context, which define when a user will be locked"
responses: {
key: "200"
value: {
description: "OK";
}
};
};
}
// Get the security settings
//
// Deprecated: please move to the corresponding endpoint under settings service v2. This endpoint will be removed with the next major version of ZITADEL.
rpc GetSecuritySettings(GetSecuritySettingsRequest) returns (GetSecuritySettingsResponse) {
option (google.api.http) = {
get: "/v2beta/settings/security";
};
option (zitadel.protoc_gen_zitadel.v2.options) = {
auth_option: {
permission: "iam.policy.read"
}
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
deprecated: true;
summary: "Get Security Settings";
description: "Returns the security settings of the Zitadel instance."
};
}
// Set the security settings
//
// Deprecated: please move to the corresponding endpoint under settings service v2. This endpoint will be removed with the next major version of ZITADEL.
rpc SetSecuritySettings(SetSecuritySettingsRequest) returns (SetSecuritySettingsResponse) {
option (google.api.http) = {
put: "/v2beta/policies/security";
body: "*"
};
option (zitadel.protoc_gen_zitadel.v2.options) = {
auth_option: {
permission: "iam.policy.write"
}
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
deprecated: true;
summary: "Set Security Settings";
description: "Set the security settings of the Zitadel instance."
};
}
}
message GetLoginSettingsRequest {
zitadel.object.v2beta.RequestContext ctx = 1;
}
message GetLoginSettingsResponse {
zitadel.object.v2beta.Details details = 1;
zitadel.settings.v2beta.LoginSettings settings = 2;
}
message GetPasswordComplexitySettingsRequest {
zitadel.object.v2beta.RequestContext ctx = 1;
}
message GetPasswordComplexitySettingsResponse {
zitadel.object.v2beta.Details details = 1;
zitadel.settings.v2beta.PasswordComplexitySettings settings = 2;
}
message GetPasswordExpirySettingsRequest {
zitadel.object.v2beta.RequestContext ctx = 1;
}
message GetPasswordExpirySettingsResponse {
zitadel.object.v2beta.Details details = 1;
zitadel.settings.v2beta.PasswordExpirySettings settings = 2;
}
message GetBrandingSettingsRequest {
zitadel.object.v2beta.RequestContext ctx = 1;
}
message GetBrandingSettingsResponse {
zitadel.object.v2beta.Details details = 1;
zitadel.settings.v2beta.BrandingSettings settings = 2;
}
message GetDomainSettingsRequest {
zitadel.object.v2beta.RequestContext ctx = 1;
}
message GetDomainSettingsResponse {
zitadel.object.v2beta.Details details = 1;
zitadel.settings.v2beta.DomainSettings settings = 2;
}
message GetLegalAndSupportSettingsRequest {
zitadel.object.v2beta.RequestContext ctx = 1;
}
message GetLegalAndSupportSettingsResponse {
zitadel.object.v2beta.Details details = 1;
zitadel.settings.v2beta.LegalAndSupportSettings settings = 2;
}
message GetLockoutSettingsRequest {
zitadel.object.v2beta.RequestContext ctx = 1;
}
message GetLockoutSettingsResponse {
zitadel.object.v2beta.Details details = 1;
zitadel.settings.v2beta.LockoutSettings settings = 2;
}
message GetActiveIdentityProvidersRequest {
zitadel.object.v2beta.RequestContext ctx = 1;
}
message GetActiveIdentityProvidersResponse {
zitadel.object.v2beta.ListDetails details = 1;
repeated zitadel.settings.v2beta.IdentityProvider identity_providers = 2;
}
message GetGeneralSettingsRequest {}
message GetGeneralSettingsResponse {
string default_org_id = 1 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "default organization for the current context"
}
];
string default_language = 2 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "default language for the current context"
example: "\"en\""
}
];
repeated string supported_languages = 3 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
example: "[\"en\", \"de\", \"it\"]"
}
];
}
// This is an empty request
message GetSecuritySettingsRequest{}
message GetSecuritySettingsResponse{
zitadel.object.v2beta.Details details = 1;
SecuritySettings settings = 2;
}
message SetSecuritySettingsRequest{
EmbeddedIframeSettings embedded_iframe = 1;
bool enable_impersonation = 2 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "allows users to impersonate other users. The impersonator needs the appropriate `*_IMPERSONATOR` roles assigned as well"
}
];
}
message SetSecuritySettingsResponse{
zitadel.object.v2beta.Details details = 1;
}