feat: add SMTP auth & TLS support (#13902)

This commit is contained in:
Danny Kopping
2024-07-19 09:22:15 +02:00
committed by GitHub
parent 8d4bccc612
commit 943ea7c52a
29 changed files with 1949 additions and 117 deletions

70
coderd/apidoc/docs.go generated
View File

@ -10179,9 +10179,42 @@ const docTemplate = `{
}
}
},
"codersdk.NotificationsEmailAuthConfig": {
"type": "object",
"properties": {
"identity": {
"description": "Identity for PLAIN auth.",
"type": "string"
},
"password": {
"description": "Password for LOGIN/PLAIN auth.",
"type": "string"
},
"password_file": {
"description": "File from which to load the password for LOGIN/PLAIN auth.",
"type": "string"
},
"username": {
"description": "Username for LOGIN/PLAIN auth.",
"type": "string"
}
}
},
"codersdk.NotificationsEmailConfig": {
"type": "object",
"properties": {
"auth": {
"description": "Authentication details.",
"allOf": [
{
"$ref": "#/definitions/codersdk.NotificationsEmailAuthConfig"
}
]
},
"force_tls": {
"description": "ForceTLS causes a TLS connection to be attempted.",
"type": "boolean"
},
"from": {
"description": "The sender's address.",
"type": "string"
@ -10197,6 +10230,43 @@ const docTemplate = `{
"$ref": "#/definitions/serpent.HostPort"
}
]
},
"tls": {
"description": "TLS details.",
"allOf": [
{
"$ref": "#/definitions/codersdk.NotificationsEmailTLSConfig"
}
]
}
}
},
"codersdk.NotificationsEmailTLSConfig": {
"type": "object",
"properties": {
"ca_file": {
"description": "CAFile specifies the location of the CA certificate to use.",
"type": "string"
},
"cert_file": {
"description": "CertFile specifies the location of the certificate to use.",
"type": "string"
},
"insecure_skip_verify": {
"description": "InsecureSkipVerify skips target certificate validation.",
"type": "boolean"
},
"key_file": {
"description": "KeyFile specifies the location of the key to use.",
"type": "string"
},
"server_name": {
"description": "ServerName to verify the hostname for the targets.",
"type": "string"
},
"start_tls": {
"description": "StartTLS attempts to upgrade plain connections to TLS.",
"type": "boolean"
}
}
},