Files
zitadel/proto/zitadel/settings.proto
T
d229da6af7 feat: SMTP Templates (#6932)
* feat: smtp templates poc

* feat: add isActive & ProviderType to SMTP backend

* feat: change providertype to uint32 and fix tests

* feat: minimal smtp provider component

* feat: woking on diiferent providers

* feat: keep working on providers

* feat: initial stepper for new provider

* fix: settings list and working on stepper

* feat: step 1 and 2 form inputs

* feat: starter for smtp test step

* fix: misspelled SMPT

* fix: remove tests for now

* feat: add tls toggle remove old google provider

* feat: working on add smtp and table

* fix: duplicated identifiers

* fix: settings list

* fix: add missing smtp config properties

* fix: add configID to smtp config table

* fix: working on listproviders

* feat: working in listSMTPConfigs

* fix: add count to listsmtpconfigs

* fix: getting empty results from listSMTPConfigs

* feat: table now shows real data

* fix: remaining styles for smtp-table

* fix: remove old notification-smtp-provider-component

* feat: delete smtp configuration

* feat: deactivate smtp config

* feat: replace isActive with state for smtp config

* feat: activate smtp config

* fix: remaining errors after main merge

* fix: list smtp providers panic and material mdc

* feat: refactor to only one provider component

* feat: current provider details view

* fix: refactor AddSMTPConfig and ChangeSMTPConfig

* fix: smtp config reduce issue

* fix: recover domain in NewIAMSMTPConfigWriteModel

* fix: add code needed by SetUpInstance

* fix: go tests and warn about passing context to InstanceAggregateFromWriteModel

* fix: i18n and add missing trans for fr, it, zh

* fix: add e2e tests

* docs: add smtp templates

* fix: remove provider_type, add description

* fix: remaining error from merge main

* fix: add @stebenz change for primary key

* fix: inactive placed after removed to prevent deleted configs to show as inactive

* fix: smtp provider id can be empty (migrated)

* feat: add mailchimp transactional template

* feat: add Brevo (Sendinblue) template

* feat: change brevo logo, add color to tls icon

* fix: queries use resourceowner, id must not be empty

* fix: deal with old smtp settings and tests

* fix: resourceOwner is the instanceID

* fix: remove aggregate_id, rename SMTPConfigByAggregateID with SMTPConfigActive

* fix: add tests for multiple configs with different IDs

* fix: conflict

* fix: remove notification-smtp-provider

* fix: add @peintnermax suggestions, rename module and fix e2e tests

* fix: remove material legacy modules

* fix: remove ctx as parameter for  InstanceAggregateFromWriteModel

* fix: add Id to SMTPConfigToPb

* fix:  change InstanceAggregateFromWriteModel to avoid linter errors

* fix import

* rm unused package-lock

* update yarn lock

---------

Co-authored-by: Elio Bischof <[email protected]>
Co-authored-by: Max Peintner <[email protected]>
Co-authored-by: Stefan Benz <[email protected]>
2024-04-11 09:16:10 +02:00

141 lines
3.7 KiB
Protocol Buffer

syntax = "proto3";
import "zitadel/object.proto";
import "validate/validate.proto";
import "google/protobuf/duration.proto";
import "protoc-gen-openapiv2/options/annotations.proto";
package zitadel.settings.v1;
option go_package ="github.com/zitadel/zitadel/pkg/grpc/settings";
message SecretGenerator {
SecretGeneratorType generator_type = 1;
zitadel.v1.ObjectDetails details = 2;
uint32 length = 3 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
example: "6";
}
];
google.protobuf.Duration expiry = 4 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
example: "\"3600s\"";
}
];
bool include_lower_letters = 5;
bool include_upper_letters = 6;
bool include_digits = 7;
bool include_symbols = 8;
}
message SecretGeneratorQuery {
oneof query {
option (validate.required) = true;
SecretGeneratorTypeQuery type_query = 1;
}
}
message SecretGeneratorTypeQuery {
SecretGeneratorType generator_type = 1;
}
enum SMTPConfigState {
SMTP_CONFIG_STATE_UNSPECIFIED = 0;
SMTP_CONFIG_ACTIVE = 1;
SMTP_CONFIG_INACTIVE = 2;
}
enum SecretGeneratorType {
SECRET_GENERATOR_TYPE_UNSPECIFIED = 0;
SECRET_GENERATOR_TYPE_INIT_CODE = 1;
SECRET_GENERATOR_TYPE_VERIFY_EMAIL_CODE = 2;
SECRET_GENERATOR_TYPE_VERIFY_PHONE_CODE = 3;
SECRET_GENERATOR_TYPE_PASSWORD_RESET_CODE = 4;
SECRET_GENERATOR_TYPE_PASSWORDLESS_INIT_CODE = 5;
SECRET_GENERATOR_TYPE_APP_SECRET = 6;
SECRET_GENERATOR_TYPE_OTP_SMS = 7;
SECRET_GENERATOR_TYPE_OTP_EMAIL = 8;
}
message SMTPConfig {
zitadel.v1.ObjectDetails details = 1;
string sender_address = 2 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
example: "\"noreply@m.zitadel.cloud\"";
}
];
string sender_name = 3 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
example: "\"ZITADEL\"";
}
];
bool tls = 4;
string host = 5 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
example: "\"smtp.postmarkapp.com:587\"";
}
];
string user = 6 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
example: "\"197f0117-529e-443d-bf6c-0292dd9a02b7\"";
}
];
string reply_to_address = 7 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
example: "\"replyto@m.zitadel.cloud\"";
}
];
SMTPConfigState state = 8;
string description = 9 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
example: "\"Mailjet\"";
}
];
string id = 10;
}
message SMSProvider {
zitadel.v1.ObjectDetails details = 1;
string id = 2;
SMSProviderConfigState state = 3;
oneof config {
TwilioConfig twilio = 4;
}
}
message TwilioConfig {
string sid = 1;
string sender_number = 2;
}
enum SMSProviderConfigState {
SMS_PROVIDER_CONFIG_STATE_UNSPECIFIED = 0;
SMS_PROVIDER_CONFIG_ACTIVE = 1;
SMS_PROVIDER_CONFIG_INACTIVE = 2;
}
message DebugNotificationProvider {
zitadel.v1.ObjectDetails details = 1;
bool compact = 2;
}
message OIDCSettings {
zitadel.v1.ObjectDetails details = 1;
google.protobuf.Duration access_token_lifetime = 2;
google.protobuf.Duration id_token_lifetime = 3;
google.protobuf.Duration refresh_token_idle_expiration = 4;
google.protobuf.Duration refresh_token_expiration = 5;
}
message SecurityPolicy {
zitadel.v1.ObjectDetails details = 1;
// states if iframe embedding is enabled or disabled
bool enable_iframe_embedding = 2;
// origins allowed loading ZITADEL in an iframe if enable_iframe_embedding is true
repeated string allowed_origins = 3;
// allows users to impersonate other users. The impersonator needs the appropriate `*_IMPERSONATOR` roles assigned as well"
bool enable_impersonation = 4;
}