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; }