mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 15:57:32 +00:00
feat: add http as smtp provider (#8545)
# Which Problems Are Solved Send Email messages as a HTTP call to a relay, for own logic on handling different Email providers # How the Problems Are Solved Create endpoints under Email provider to manage SMTP and HTTP in the notification handlers. # Additional Changes Clean up old logic in command and query side to handle the general Email providers with deactivate, activate and remove. # Additional Context Partially closes #8270 --------- Co-authored-by: Livio Spring <livio.a@gmail.com>
This commit is contained in:
@@ -143,32 +143,32 @@ option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
|
||||
}
|
||||
|
||||
security_definitions: {
|
||||
security: {
|
||||
key: "BasicAuth";
|
||||
value: {
|
||||
type: TYPE_BASIC;
|
||||
}
|
||||
}
|
||||
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: {
|
||||
key: "BasicAuth";
|
||||
value: {
|
||||
type: TYPE_BASIC;
|
||||
}
|
||||
}
|
||||
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";
|
||||
@@ -422,6 +422,11 @@ service AdminService {
|
||||
};
|
||||
}
|
||||
|
||||
// Deprecated: Get active SMTP Configuration
|
||||
//
|
||||
// Returns the active SMTP configuration from the system. This is used to send E-Mails to the users.
|
||||
//
|
||||
// Deprecated: please move to the new endpoint GetEmailProvider.
|
||||
rpc GetSMTPConfig(GetSMTPConfigRequest) returns (GetSMTPConfigResponse) {
|
||||
option (google.api.http) = {
|
||||
get: "/smtp";
|
||||
@@ -433,11 +438,15 @@ service AdminService {
|
||||
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
||||
tags: "SMTP";
|
||||
summary: "Get active SMTP Configuration";
|
||||
description: "Returns the active SMTP configuration from the system. This is used to send E-Mails to the users."
|
||||
deprecated: true;
|
||||
};
|
||||
}
|
||||
|
||||
// Deprecated: Get SMTP provider configuration by its id
|
||||
//
|
||||
// Get a specific SMTP provider configuration by its ID.
|
||||
//
|
||||
// Deprecated: please move to the new endpoint GetEmailProviderById.
|
||||
rpc GetSMTPConfigById(GetSMTPConfigByIdRequest) returns (GetSMTPConfigByIdResponse) {
|
||||
option (google.api.http) = {
|
||||
get: "/smtp/{id}";
|
||||
@@ -449,11 +458,15 @@ service AdminService {
|
||||
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
||||
tags: "SMTP";
|
||||
summary: "Get SMTP provider configuration by its id";
|
||||
description: "Get a specific SMTP provider configuration by its ID.";
|
||||
deprecated: true;
|
||||
};
|
||||
}
|
||||
|
||||
// Deprecated: Add SMTP Configuration
|
||||
//
|
||||
// Add a new SMTP configuration if nothing is set yet.
|
||||
//
|
||||
// Deprecated: please move to the new endpoint AddEmailProviderSMTP.
|
||||
rpc AddSMTPConfig(AddSMTPConfigRequest) returns (AddSMTPConfigResponse) {
|
||||
option (google.api.http) = {
|
||||
post: "/smtp";
|
||||
@@ -466,11 +479,15 @@ service AdminService {
|
||||
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
||||
tags: "SMTP";
|
||||
summary: "Add SMTP Configuration";
|
||||
description: "Add a new SMTP configuration if nothing is set yet."
|
||||
deprecated: true;
|
||||
};
|
||||
}
|
||||
|
||||
// Deprecated: Update SMTP Configuration
|
||||
//
|
||||
// Update the SMTP configuration, be aware that this will be activated as soon as it is saved. So the users will get notifications from the newly configured SMTP.
|
||||
//
|
||||
// Deprecated: please move to the new endpoint UpdateEmailProviderSMTP.
|
||||
rpc UpdateSMTPConfig(UpdateSMTPConfigRequest) returns (UpdateSMTPConfigResponse) {
|
||||
option (google.api.http) = {
|
||||
put: "/smtp/{id}";
|
||||
@@ -483,11 +500,15 @@ service AdminService {
|
||||
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
||||
tags: "SMTP";
|
||||
summary: "Update SMTP Configuration";
|
||||
description: "Update the SMTP configuration, be aware that this will be activated as soon as it is saved. So the users will get notifications from the newly configured SMTP."
|
||||
deprecated: true;
|
||||
};
|
||||
}
|
||||
|
||||
// Deprecated: Update SMTP Password
|
||||
//
|
||||
// Update the SMTP password that is used for the host, be aware that this will be activated as soon as it is saved. So the users will get notifications from the newly configured SMTP.
|
||||
//
|
||||
// Deprecated: please move to the new endpoint UpdateEmailProviderSMTPPassword.
|
||||
rpc UpdateSMTPConfigPassword(UpdateSMTPConfigPasswordRequest) returns (UpdateSMTPConfigPasswordResponse) {
|
||||
option (google.api.http) = {
|
||||
put: "/smtp/{id}/password";
|
||||
@@ -500,11 +521,15 @@ service AdminService {
|
||||
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
||||
tags: "SMTP";
|
||||
summary: "Update SMTP Password";
|
||||
description: "Update the SMTP password that is used for the host, be aware that this will be activated as soon as it is saved. So the users will get notifications from the newly configured SMTP."
|
||||
deprecated: true;
|
||||
};
|
||||
}
|
||||
|
||||
// Deprecated: Activate SMTP Provider
|
||||
//
|
||||
// Activate an SMTP provider.
|
||||
//
|
||||
// Deprecated: please move to the new endpoint ActivateEmailProvider.
|
||||
rpc ActivateSMTPConfig(ActivateSMTPConfigRequest) returns (ActivateSMTPConfigResponse) {
|
||||
option (google.api.http) = {
|
||||
post: "/smtp/{id}/_activate";
|
||||
@@ -519,9 +544,15 @@ service AdminService {
|
||||
tags: "SMTP Provider";
|
||||
summary: "Activate SMTP Provider";
|
||||
description: "Activate an SMTP provider."
|
||||
deprecated: true;
|
||||
};
|
||||
}
|
||||
|
||||
// Deprecated: Deactivate SMTP Provider
|
||||
//
|
||||
// Deactivate an SMTP provider. After deactivating the provider, the users will not be able to receive SMTP notifications from that provider anymore.
|
||||
//
|
||||
// Deprecated: please move to the new endpoint DeactivateEmailProvider.
|
||||
rpc DeactivateSMTPConfig(DeactivateSMTPConfigRequest) returns (DeactivateSMTPConfigResponse) {
|
||||
option (google.api.http) = {
|
||||
post: "/smtp/{id}/_deactivate";
|
||||
@@ -534,11 +565,15 @@ service AdminService {
|
||||
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
||||
tags: "SMTP Provider";
|
||||
summary: "Deactivate SMTP Provider";
|
||||
description: "Deactivate an SMTP provider. After deactivating the provider, the users will not be able to receive SMTP notifications from that provider anymore."
|
||||
deprecated: true;
|
||||
};
|
||||
}
|
||||
|
||||
// Deprecated: Remove SMTP Configuration
|
||||
//
|
||||
// Remove the SMTP configuration, be aware that the users will not get an E-Mail if no SMTP is set.
|
||||
//
|
||||
// Deprecated: please move to the new endpoint RemoveEmailProvider.
|
||||
rpc RemoveSMTPConfig(RemoveSMTPConfigRequest) returns (RemoveSMTPConfigResponse) {
|
||||
option (google.api.http) = {
|
||||
delete: "/smtp/{id}";
|
||||
@@ -550,11 +585,15 @@ service AdminService {
|
||||
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
||||
tags: "SMTP";
|
||||
summary: "Remove SMTP Configuration";
|
||||
description: "Remove the SMTP configuration, be aware that the users will not get an E-Mail if no SMTP is set."
|
||||
deprecated: true;
|
||||
};
|
||||
}
|
||||
|
||||
// Deprecated: Test SMTP Provider
|
||||
//
|
||||
// Test an SMTP provider identified by its ID. After testing the provider, the users will receive information about the test results.
|
||||
//
|
||||
// Deprecated: please move to the new endpoint TestEmailProviderSMTPById.
|
||||
rpc TestSMTPConfigById(TestSMTPConfigByIdRequest) returns (TestSMTPConfigByIdResponse) {
|
||||
option (google.api.http) = {
|
||||
post: "/smtp/{id}/_test";
|
||||
@@ -567,11 +606,15 @@ service AdminService {
|
||||
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
||||
tags: "SMTP Provider";
|
||||
summary: "Test SMTP Provider ";
|
||||
description: "Test an SMTP provider identified by its ID. After testing the provider, the users will receive information about the test results."
|
||||
deprecated: true;
|
||||
};
|
||||
}
|
||||
|
||||
// Deprecated: Test SMTP Provider
|
||||
//
|
||||
// Test an SMTP provider. After testing the provider, the users will receive information about the test results.
|
||||
//
|
||||
// Deprecated: please move to the new endpoint TestEmailProviderSMTP.
|
||||
rpc TestSMTPConfig(TestSMTPConfigRequest) returns (TestSMTPConfigResponse) {
|
||||
option (google.api.http) = {
|
||||
post: "/smtp/_test";
|
||||
@@ -584,11 +627,15 @@ service AdminService {
|
||||
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
||||
tags: "SMTP Provider";
|
||||
summary: "Test SMTP Provider";
|
||||
description: "Test an SMTP provider. After testing the provider, the users will receive information about the test results."
|
||||
deprecated: true;
|
||||
};
|
||||
}
|
||||
|
||||
// Deprecated: List SMTP Configs
|
||||
//
|
||||
// Returns a list of SMTP configurations.
|
||||
//
|
||||
// Deprecated: please move to the new endpoint ListEmailProviders.
|
||||
rpc ListSMTPConfigs(ListSMTPConfigsRequest) returns (ListSMTPConfigsResponse) {
|
||||
option (google.api.http) = {
|
||||
post: "/smtp/_search"
|
||||
@@ -601,8 +648,225 @@ service AdminService {
|
||||
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
||||
tags: "SMTP Configs";
|
||||
summary: "List SMTP Configs";
|
||||
description: "Returns a list of SMTP configurations."
|
||||
deprecated: true;
|
||||
};
|
||||
}
|
||||
|
||||
rpc ListEmailProviders(ListEmailProvidersRequest) returns (ListEmailProvidersResponse) {
|
||||
option (google.api.http) = {
|
||||
post: "/email/_search"
|
||||
body: "*"
|
||||
};
|
||||
|
||||
option (zitadel.v1.auth_option) = {
|
||||
permission: "iam.read";
|
||||
};
|
||||
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
||||
tags: "Email providers";
|
||||
summary: "List Email providers";
|
||||
description: "Returns a list of Email providers."
|
||||
};
|
||||
}
|
||||
|
||||
rpc GetEmailProvider(GetEmailProviderRequest) returns (GetEmailProviderResponse) {
|
||||
option (google.api.http) = {
|
||||
get: "/email";
|
||||
};
|
||||
|
||||
option (zitadel.v1.auth_option) = {
|
||||
permission: "iam.read";
|
||||
};
|
||||
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
||||
tags: "Email";
|
||||
summary: "Get active Email provider";
|
||||
description: "Returns the active Email provider from the system. This is used to send E-Mails to the users."
|
||||
};
|
||||
}
|
||||
|
||||
rpc GetEmailProviderById(GetEmailProviderByIdRequest) returns (GetEmailProviderByIdResponse) {
|
||||
option (google.api.http) = {
|
||||
get: "/email/{id}";
|
||||
};
|
||||
|
||||
option (zitadel.v1.auth_option) = {
|
||||
permission: "iam.read";
|
||||
};
|
||||
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
||||
tags: "Email";
|
||||
summary: "Get Email provider by its id";
|
||||
description: "Get a specific Email provider by its ID.";
|
||||
};
|
||||
}
|
||||
|
||||
rpc AddEmailProviderSMTP(AddEmailProviderSMTPRequest) returns (AddEmailProviderSMTPResponse) {
|
||||
option (google.api.http) = {
|
||||
post: "/email/smtp";
|
||||
body: "*"
|
||||
};
|
||||
|
||||
option (zitadel.v1.auth_option) = {
|
||||
permission: "iam.write";
|
||||
};
|
||||
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
||||
tags: "Email";
|
||||
summary: "Add SMTP Email provider";
|
||||
description: "Add a new SMTP Email provider if nothing is set yet."
|
||||
};
|
||||
}
|
||||
|
||||
rpc UpdateEmailProviderSMTP(UpdateEmailProviderSMTPRequest) returns (UpdateEmailProviderSMTPResponse) {
|
||||
option (google.api.http) = {
|
||||
put: "/email/smtp/{id}";
|
||||
body: "*"
|
||||
};
|
||||
|
||||
option (zitadel.v1.auth_option) = {
|
||||
permission: "iam.write";
|
||||
};
|
||||
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
||||
tags: "Email";
|
||||
summary: "Update SMTP Email provider";
|
||||
description: "Update the SMTP Email provider, be aware that this will be activated as soon as it is saved. So the users will get notifications from the newly configured SMTP."
|
||||
};
|
||||
}
|
||||
|
||||
rpc AddEmailProviderHTTP(AddEmailProviderHTTPRequest) returns (AddEmailProviderHTTPResponse) {
|
||||
option (google.api.http) = {
|
||||
post: "/email/http";
|
||||
body: "*"
|
||||
};
|
||||
|
||||
option (zitadel.v1.auth_option) = {
|
||||
permission: "iam.write";
|
||||
};
|
||||
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
||||
tags: "Email";
|
||||
summary: "Add HTTP Email provider";
|
||||
description: "Add a new HTTP Email provider if nothing is set yet."
|
||||
};
|
||||
}
|
||||
|
||||
rpc UpdateEmailProviderHTTP(UpdateEmailProviderHTTPRequest) returns (UpdateEmailProviderHTTPResponse) {
|
||||
option (google.api.http) = {
|
||||
put: "/email/http/{id}";
|
||||
body: "*"
|
||||
};
|
||||
|
||||
option (zitadel.v1.auth_option) = {
|
||||
permission: "iam.write";
|
||||
};
|
||||
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
||||
tags: "Email";
|
||||
summary: "Update HTTP Email provider";
|
||||
description: "Update the HTTP Email provider, be aware that this will be activated as soon as it is saved. So the users will get notifications from the newly configured HTTP."
|
||||
};
|
||||
}
|
||||
|
||||
rpc UpdateEmailProviderSMTPPassword(UpdateEmailProviderSMTPPasswordRequest) returns (UpdateEmailProviderSMTPPasswordResponse) {
|
||||
option (google.api.http) = {
|
||||
put: "/email/smtp/{id}/password";
|
||||
body: "*"
|
||||
};
|
||||
|
||||
option (zitadel.v1.auth_option) = {
|
||||
permission: "iam.write";
|
||||
};
|
||||
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
||||
tags: "SMTP";
|
||||
summary: "Update SMTP Password";
|
||||
description: "Update the SMTP password that is used for the host, be aware that this will be activated as soon as it is saved. So the users will get notifications from the newly configured SMTP."
|
||||
};
|
||||
}
|
||||
|
||||
rpc ActivateEmailProvider(ActivateEmailProviderRequest) returns (ActivateEmailProviderResponse) {
|
||||
option (google.api.http) = {
|
||||
post: "/email/{id}/_activate";
|
||||
body: "*"
|
||||
};
|
||||
|
||||
option (zitadel.v1.auth_option) = {
|
||||
permission: "iam.write";
|
||||
};
|
||||
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
||||
tags: "Email Provider";
|
||||
summary: "Activate Email Provider";
|
||||
description: "Activate an Email provider."
|
||||
};
|
||||
}
|
||||
|
||||
rpc DeactivateEmailProvider(DeactivateEmailProviderRequest) returns (DeactivateEmailProviderResponse) {
|
||||
option (google.api.http) = {
|
||||
post: "/email/{id}/_deactivate";
|
||||
body: "*"
|
||||
};
|
||||
|
||||
option (zitadel.v1.auth_option) = {
|
||||
permission: "iam.write";
|
||||
};
|
||||
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
||||
tags: "Email Provider";
|
||||
summary: "Deactivate Email Provider";
|
||||
description: "Deactivate an Email provider. After deactivating the provider, the users will not be able to receive Email notifications from that provider anymore."
|
||||
};
|
||||
}
|
||||
|
||||
rpc RemoveEmailProvider(RemoveEmailProviderRequest) returns (RemoveEmailProviderResponse) {
|
||||
option (google.api.http) = {
|
||||
delete: "/email/{id}";
|
||||
};
|
||||
|
||||
option (zitadel.v1.auth_option) = {
|
||||
permission: "iam.write";
|
||||
};
|
||||
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
||||
tags: "Email";
|
||||
summary: "Remove Email provider";
|
||||
description: "Remove the Email provider, be aware that the users will not get an E-Mail if no provider is set."
|
||||
};
|
||||
}
|
||||
|
||||
rpc TestEmailProviderSMTPById(TestEmailProviderSMTPByIdRequest) returns (TestEmailProviderSMTPByIdResponse) {
|
||||
option (google.api.http) = {
|
||||
post: "/email/smtp/{id}/_test";
|
||||
body: "*"
|
||||
};
|
||||
|
||||
option (zitadel.v1.auth_option) = {
|
||||
permission: "iam.write";
|
||||
};
|
||||
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
||||
tags: "SMTP Email Provider";
|
||||
summary: "Test SMTP Email Provider";
|
||||
description: "Test an SMTP Email provider identified by its ID. After testing the provider, the users will receive information about the test results."
|
||||
};
|
||||
}
|
||||
|
||||
rpc TestEmailProviderSMTP(TestEmailProviderSMTPRequest) returns (TestEmailProviderSMTPResponse) {
|
||||
option (google.api.http) = {
|
||||
post: "/email/smtp/_test";
|
||||
body: "*"
|
||||
};
|
||||
|
||||
option (zitadel.v1.auth_option) = {
|
||||
permission: "iam.write";
|
||||
};
|
||||
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
||||
tags: "SMTP EMailProvider";
|
||||
summary: "Test SMTP Email Provider";
|
||||
description: "Test an SMTP Email provider. After testing the provider, the users will receive information about the test results."
|
||||
};
|
||||
}
|
||||
|
||||
@@ -690,39 +954,39 @@ service AdminService {
|
||||
};
|
||||
}
|
||||
|
||||
rpc AddSMSProviderHTTP(AddSMSProviderHTTPRequest) returns (AddSMSProviderHTTPResponse) {
|
||||
option (google.api.http) = {
|
||||
post: "/sms/http";
|
||||
body: "*"
|
||||
};
|
||||
rpc AddSMSProviderHTTP(AddSMSProviderHTTPRequest) returns (AddSMSProviderHTTPResponse) {
|
||||
option (google.api.http) = {
|
||||
post: "/sms/http";
|
||||
body: "*"
|
||||
};
|
||||
|
||||
option (zitadel.v1.auth_option) = {
|
||||
permission: "iam.write";
|
||||
};
|
||||
option (zitadel.v1.auth_option) = {
|
||||
permission: "iam.write";
|
||||
};
|
||||
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
||||
tags: "SMS Provider";
|
||||
summary: "Add HTTP SMS Provider";
|
||||
description: "Configure a new SMS provider of the type HTTP. A provider has to be activated to be able to send notifications."
|
||||
};
|
||||
}
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
||||
tags: "SMS Provider";
|
||||
summary: "Add HTTP SMS Provider";
|
||||
description: "Configure a new SMS provider of the type HTTP. A provider has to be activated to be able to send notifications."
|
||||
};
|
||||
}
|
||||
|
||||
rpc UpdateSMSProviderHTTP(UpdateSMSProviderHTTPRequest) returns (UpdateSMSProviderHTTPResponse) {
|
||||
option (google.api.http) = {
|
||||
put: "/sms/http/{id}";
|
||||
body: "*"
|
||||
};
|
||||
rpc UpdateSMSProviderHTTP(UpdateSMSProviderHTTPRequest) returns (UpdateSMSProviderHTTPResponse) {
|
||||
option (google.api.http) = {
|
||||
put: "/sms/http/{id}";
|
||||
body: "*"
|
||||
};
|
||||
|
||||
option (zitadel.v1.auth_option) = {
|
||||
permission: "iam.write";
|
||||
};
|
||||
option (zitadel.v1.auth_option) = {
|
||||
permission: "iam.write";
|
||||
};
|
||||
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
||||
tags: "SMS Provider";
|
||||
summary: "Update HTTP SMS Provider";
|
||||
description: "Change the configuration of an SMS provider of the type HTTP. A provider has to be activated to be able to send notifications."
|
||||
};
|
||||
}
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
||||
tags: "SMS Provider";
|
||||
summary: "Update HTTP SMS Provider";
|
||||
description: "Change the configuration of an SMS provider of the type HTTP. A provider has to be activated to be able to send notifications."
|
||||
};
|
||||
}
|
||||
|
||||
rpc ActivateSMSProvider(ActivateSMSProviderRequest) returns (ActivateSMSProviderResponse) {
|
||||
option (google.api.http) = {
|
||||
@@ -4561,6 +4825,320 @@ message TestSMTPConfigRequest {
|
||||
// This is an empty response
|
||||
message TestSMTPConfigResponse {}
|
||||
|
||||
//This is an empty request
|
||||
message GetEmailProviderRequest {}
|
||||
|
||||
message GetEmailProviderResponse {
|
||||
zitadel.settings.v1.EmailProvider config = 1;
|
||||
}
|
||||
|
||||
message GetEmailProviderByIdRequest {
|
||||
string id = 1 [(validate.rules).string = {min_len: 1, max_len: 100}];
|
||||
}
|
||||
|
||||
message GetEmailProviderByIdResponse {
|
||||
zitadel.settings.v1.EmailProvider config = 1;
|
||||
}
|
||||
|
||||
message ListEmailProvidersRequest {
|
||||
zitadel.v1.ListQuery query = 1;
|
||||
}
|
||||
|
||||
message ListEmailProvidersResponse {
|
||||
zitadel.v1.ListDetails details = 1;
|
||||
repeated zitadel.settings.v1.EmailProvider result = 2;
|
||||
}
|
||||
|
||||
message AddEmailProviderSMTPRequest {
|
||||
string sender_address = 1 [
|
||||
(validate.rules).string = {min_len: 1, max_len: 200},
|
||||
(google.api.field_behavior) = REQUIRED,
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "\"noreply@m.zitadel.cloud\"";
|
||||
min_length: 1;
|
||||
max_length: 200;
|
||||
}
|
||||
];
|
||||
string sender_name = 2 [
|
||||
(validate.rules).string = {min_len: 1, max_len: 200},
|
||||
(google.api.field_behavior) = REQUIRED,
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "\"ZITADEL\"";
|
||||
min_length: 1;
|
||||
max_length: 200;
|
||||
}
|
||||
];
|
||||
bool tls = 3;
|
||||
string host = 4 [
|
||||
(validate.rules).string = {min_len: 1, max_len: 500},
|
||||
(google.api.field_behavior) = REQUIRED,
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "\"smtp.postmarkapp.com:587\"";
|
||||
description: "Make sure to include the port.";
|
||||
min_length: 1;
|
||||
max_length: 500;
|
||||
}
|
||||
];
|
||||
string user = 5 [
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "\"197f0117-529e-443d-bf6c-0292dd9a02b7\"";
|
||||
}
|
||||
];
|
||||
string password = 6 [
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "\"this-is-my-password\"";
|
||||
}
|
||||
];
|
||||
string reply_to_address = 7 [
|
||||
(validate.rules).string = {min_len: 0, max_len: 200},
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "\"replyto@m.zitadel.cloud\"";
|
||||
min_length: 0;
|
||||
max_length: 200;
|
||||
}
|
||||
];
|
||||
string description = 8 [
|
||||
(validate.rules).string = {min_len: 0, max_len: 200},
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "\"provider description\"";
|
||||
min_length: 0;
|
||||
max_length: 200;
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
message AddEmailProviderSMTPResponse {
|
||||
zitadel.v1.ObjectDetails details = 1;
|
||||
string id = 2;
|
||||
}
|
||||
|
||||
message UpdateEmailProviderSMTPRequest {
|
||||
string sender_address = 1 [
|
||||
(validate.rules).string = {min_len: 1, max_len: 200},
|
||||
(google.api.field_behavior) = REQUIRED,
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "\"noreply@m.zitadel.cloud\"";
|
||||
min_length: 1;
|
||||
max_length: 200;
|
||||
}
|
||||
];
|
||||
string sender_name = 2 [
|
||||
(validate.rules).string = {min_len: 1, max_len: 200},
|
||||
(google.api.field_behavior) = REQUIRED,
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "\"ZITADEL\"";
|
||||
min_length: 1;
|
||||
max_length: 200;
|
||||
}
|
||||
];
|
||||
bool tls = 3;
|
||||
string host = 4 [
|
||||
(validate.rules).string = {min_len: 1, max_len: 500},
|
||||
(google.api.field_behavior) = REQUIRED,
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "\"smtp.postmarkapp.com:587\"";
|
||||
description: "Make sure to include the port.";
|
||||
min_length: 1;
|
||||
max_length: 500;
|
||||
}
|
||||
];
|
||||
string user = 5 [
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "\"197f0117-529e-443d-bf6c-0292dd9a02b7\"";
|
||||
}
|
||||
];
|
||||
string reply_to_address = 6 [
|
||||
(validate.rules).string = {min_len: 0, max_len: 200},
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "\"replyto@m.zitadel.cloud\"";
|
||||
min_length: 0;
|
||||
max_length: 200;
|
||||
}
|
||||
];
|
||||
string password = 7 [
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "\"this-is-my-password\"";
|
||||
}
|
||||
];
|
||||
string description = 8 [
|
||||
(validate.rules).string = {min_len: 0, max_len: 200},
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "\"provider description\"";
|
||||
min_length: 0;
|
||||
max_length: 200;
|
||||
}
|
||||
];
|
||||
string id = 9 [(validate.rules).string = {min_len: 1, max_len: 100}];
|
||||
}
|
||||
|
||||
message UpdateEmailProviderSMTPResponse {
|
||||
zitadel.v1.ObjectDetails details = 1;
|
||||
}
|
||||
|
||||
message UpdateEmailProviderSMTPPasswordRequest {
|
||||
string password = 1 [
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "\"this-is-my-updated-password\"";
|
||||
}
|
||||
];
|
||||
string id = 2 [(validate.rules).string = {min_len: 1, max_len: 100}];
|
||||
}
|
||||
|
||||
message UpdateEmailProviderSMTPPasswordResponse {
|
||||
zitadel.v1.ObjectDetails details = 1;
|
||||
}
|
||||
|
||||
|
||||
message AddEmailProviderHTTPRequest {
|
||||
string endpoint = 1 [
|
||||
(validate.rules).string = {min_len: 1, max_len: 2048},
|
||||
(google.api.field_behavior) = REQUIRED,
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "\"http://relay.example.com/provider\"";
|
||||
min_length: 1;
|
||||
max_length: 2048;
|
||||
}
|
||||
];
|
||||
string description = 2 [
|
||||
(validate.rules).string = {min_len: 0, max_len: 200},
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "\"provider description\"";
|
||||
min_length: 0;
|
||||
max_length: 200;
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
message AddEmailProviderHTTPResponse {
|
||||
zitadel.v1.ObjectDetails details = 1;
|
||||
string id = 2;
|
||||
}
|
||||
|
||||
message UpdateEmailProviderHTTPRequest {
|
||||
string id = 1 [(validate.rules).string = {min_len: 1, max_len: 100}];
|
||||
string endpoint = 2 [
|
||||
(validate.rules).string = {min_len: 1, max_len: 2048},
|
||||
(google.api.field_behavior) = REQUIRED,
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "\"http://relay.example.com/provider\"";
|
||||
min_length: 1;
|
||||
max_length: 2048;
|
||||
}
|
||||
];
|
||||
string description = 3 [
|
||||
(validate.rules).string = {min_len: 0, max_len: 200},
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "\"provider description\"";
|
||||
min_length: 0;
|
||||
max_length: 200;
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
message UpdateEmailProviderHTTPResponse {
|
||||
zitadel.v1.ObjectDetails details = 1;
|
||||
}
|
||||
|
||||
message ActivateEmailProviderRequest {
|
||||
string id = 1 [(validate.rules).string = {min_len: 1, max_len: 200}];
|
||||
}
|
||||
|
||||
message ActivateEmailProviderResponse {
|
||||
zitadel.v1.ObjectDetails details = 1;
|
||||
}
|
||||
|
||||
message DeactivateEmailProviderRequest {
|
||||
string id = 1 [(validate.rules).string = {min_len: 1, max_len: 200}];
|
||||
}
|
||||
|
||||
message DeactivateEmailProviderResponse {
|
||||
zitadel.v1.ObjectDetails details = 1;
|
||||
}
|
||||
|
||||
message RemoveEmailProviderRequest {
|
||||
string id = 1 [(validate.rules).string = {min_len: 1, max_len: 100}];
|
||||
}
|
||||
|
||||
message RemoveEmailProviderResponse {
|
||||
zitadel.v1.ObjectDetails details = 1;
|
||||
}
|
||||
|
||||
message TestEmailProviderSMTPByIdRequest {
|
||||
string id = 1 [(validate.rules).string = {min_len: 1, max_len: 100}];
|
||||
string receiver_address = 2 [
|
||||
(validate.rules).string = {min_len: 1, max_len: 200, email: true},
|
||||
(google.api.field_behavior) = REQUIRED,
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "\"noreply@m.zitadel.cloud\"";
|
||||
min_length: 1;
|
||||
max_length: 200;
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
// This is an empty response
|
||||
message TestEmailProviderSMTPByIdResponse {}
|
||||
|
||||
message TestEmailProviderSMTPRequest {
|
||||
string sender_address = 1 [
|
||||
(validate.rules).string = {min_len: 1, max_len: 200},
|
||||
(google.api.field_behavior) = REQUIRED,
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "\"noreply@m.zitadel.cloud\"";
|
||||
min_length: 1;
|
||||
max_length: 200;
|
||||
}
|
||||
];
|
||||
string sender_name = 2 [
|
||||
(validate.rules).string = {min_len: 1, max_len: 200},
|
||||
(google.api.field_behavior) = REQUIRED,
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "\"ZITADEL\"";
|
||||
min_length: 1;
|
||||
max_length: 200;
|
||||
}
|
||||
];
|
||||
bool tls = 3;
|
||||
string host = 4 [
|
||||
(validate.rules).string = {min_len: 1, max_len: 500},
|
||||
(google.api.field_behavior) = REQUIRED,
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "\"smtp.postmarkapp.com:587\"";
|
||||
description: "Make sure to include the port.";
|
||||
min_length: 1;
|
||||
max_length: 500;
|
||||
}
|
||||
];
|
||||
string user = 5 [
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "\"197f0117-529e-443d-bf6c-0292dd9a02b7\"";
|
||||
}
|
||||
];
|
||||
string password = 6 [
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "\"this-is-my-password\"";
|
||||
}
|
||||
];
|
||||
string receiver_address = 7 [
|
||||
(validate.rules).string = {min_len: 1, max_len: 200, email: true},
|
||||
(google.api.field_behavior) = REQUIRED,
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "\"noreply@m.zitadel.cloud\"";
|
||||
min_length: 1;
|
||||
max_length: 200;
|
||||
}
|
||||
];
|
||||
string id = 8 [
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
description: "Zitadel SMTP provider id in case you are not sending the password and want to reuse the stored password";
|
||||
example: "\"267191369515139464\"";
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
// This is an empty response
|
||||
message TestEmailProviderSMTPResponse {}
|
||||
|
||||
message ListSMSProvidersRequest {
|
||||
//list limitations and ordering
|
||||
zitadel.v1.ListQuery query = 1;
|
||||
|
@@ -95,6 +95,57 @@ message SMTPConfig {
|
||||
string id = 10;
|
||||
}
|
||||
|
||||
message EmailProvider {
|
||||
zitadel.v1.ObjectDetails details = 1;
|
||||
string id = 2;
|
||||
EmailProviderState state = 3;
|
||||
string description = 6;
|
||||
|
||||
oneof config {
|
||||
EmailProviderSMTP smtp = 4;
|
||||
EmailProviderHTTP http = 5;
|
||||
}
|
||||
}
|
||||
|
||||
enum EmailProviderState {
|
||||
EMAIL_PROVIDER_STATE_UNSPECIFIED = 0;
|
||||
EMAIL_PROVIDER_ACTIVE = 1;
|
||||
EMAIL_PROVIDER_INACTIVE = 2;
|
||||
}
|
||||
|
||||
message EmailProviderSMTP {
|
||||
string sender_address = 1 [
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "\"noreply@m.zitadel.cloud\"";
|
||||
}
|
||||
];
|
||||
string sender_name = 2 [
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "\"ZITADEL\"";
|
||||
}
|
||||
];
|
||||
bool tls = 3;
|
||||
string host = 4 [
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "\"smtp.postmarkapp.com:587\"";
|
||||
}
|
||||
];
|
||||
string user = 5 [
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "\"197f0117-529e-443d-bf6c-0292dd9a02b7\"";
|
||||
}
|
||||
];
|
||||
string reply_to_address = 6 [
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "\"replyto@m.zitadel.cloud\"";
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
message EmailProviderHTTP {
|
||||
string endpoint = 1;
|
||||
}
|
||||
|
||||
message SMSProvider {
|
||||
zitadel.v1.ObjectDetails details = 1;
|
||||
string id = 2;
|
||||
|
Reference in New Issue
Block a user