@@ -527,19 +527,18 @@ func (c *NotificationsEmailAuthConfig) Empty() bool {
527
527
return reflect .ValueOf (* c ).IsZero ()
528
528
}
529
529
530
- // TODO: wire up to flags.
531
530
type NotificationsEmailTLSConfig struct {
532
- StartTLS bool `json:"start_tls" typescript:",notnull"`
531
+ StartTLS serpent. Bool `json:"start_tls" typescript:",notnull"`
533
532
// ServerName to verify the hostname for the targets.
534
- ServerName string `json:"server_name" typescript:",notnull"`
533
+ ServerName serpent. String `json:"server_name" typescript:",notnull"`
535
534
// InsecureSkipVerify skips target certificate validation.
536
- InsecureSkipVerify bool `json:"insecure_skip_verify" typescript:",notnull"`
535
+ InsecureSkipVerify serpent. Bool `json:"insecure_skip_verify" typescript:",notnull"`
537
536
// CAFile specifies the location of the CA certificate to use.
538
- CAFile string `json:"ca_file"`
537
+ CAFile serpent. String `json:"ca_file" typescript:",notnull "`
539
538
// CertFile specifies the location of the certificate to use.
540
- CertFile string `json:"cert_file"`
539
+ CertFile serpent. String `json:"cert_file" typescript:",notnull "`
541
540
// KeyFile specifies the location of the key to use.
542
- KeyFile string `json:"key_file"`
541
+ KeyFile serpent. String `json:"key_file" typescript:",notnull "`
543
542
}
544
543
545
544
func (c * NotificationsEmailTLSConfig ) Empty () bool {
@@ -697,18 +696,27 @@ when required by your organization's security policy.`,
697
696
Description : `Use a YAML configuration file when your server launch become unwieldy.` ,
698
697
}
699
698
deploymentGroupNotifications = serpent.Group {
700
- Name : "Notifications" ,
701
- YAML : "notifications" ,
699
+ Name : "Notifications" ,
700
+ YAML : "notifications" ,
701
+ Description : "Configure how notifications are processed and delivered." ,
702
702
}
703
703
deploymentGroupNotificationsEmail = serpent.Group {
704
- Name : "Email" ,
705
- Parent : & deploymentGroupNotifications ,
706
- YAML : "email" ,
704
+ Name : "Email" ,
705
+ Parent : & deploymentGroupNotifications ,
706
+ Description : "Configure how email notifications are sent." ,
707
+ YAML : "email" ,
707
708
}
708
709
deploymentGroupNotificationsEmailAuth = serpent.Group {
709
- Name : "Email Authentication" ,
710
- Parent : & deploymentGroupNotificationsEmail ,
711
- YAML : "email_auth" ,
710
+ Name : "Email Authentication" ,
711
+ Parent : & deploymentGroupNotificationsEmail ,
712
+ Description : "Configure SMTP authentication options." ,
713
+ YAML : "email_auth" ,
714
+ }
715
+ deploymentGroupNotificationsEmailTLS = serpent.Group {
716
+ Name : "Email TLS" ,
717
+ Parent : & deploymentGroupNotificationsEmail ,
718
+ Description : "Configure TLS for your SMTP server target." ,
719
+ YAML : "email_tls" ,
712
720
}
713
721
deploymentGroupNotificationsWebhook = serpent.Group {
714
722
Name : "Webhook" ,
@@ -2150,7 +2158,7 @@ Write out the current server config as YAML to stdout.`,
2150
2158
Value : & c .Notifications .DispatchTimeout ,
2151
2159
Default : time .Minute .String (),
2152
2160
Group : & deploymentGroupNotifications ,
2153
- YAML : "dispatch-timeout " ,
2161
+ YAML : "dispatchTimeout " ,
2154
2162
Annotations : serpent.Annotations {}.Mark (annotationFormatDuration , "true" ),
2155
2163
},
2156
2164
{
@@ -2190,14 +2198,13 @@ Write out the current server config as YAML to stdout.`,
2190
2198
Default : "false" ,
2191
2199
Value : & c .Notifications .SMTP .ForceTLS ,
2192
2200
Group : & deploymentGroupNotificationsEmail ,
2193
- YAML : "force_tls " ,
2201
+ YAML : "forceTLS " ,
2194
2202
},
2195
2203
{
2196
2204
Name : "Notifications: Email Auth: Identity" ,
2197
2205
Description : "Identity to use with PLAIN authentication." ,
2198
2206
Flag : "notifications-email-auth-identity" ,
2199
2207
Env : "CODER_NOTIFICATIONS_EMAIL_AUTH_IDENTITY" ,
2200
- Default : "" ,
2201
2208
Value : & c .Notifications .SMTP .Auth .Identity ,
2202
2209
Group : & deploymentGroupNotificationsEmailAuth ,
2203
2210
YAML : "identity" ,
@@ -2207,7 +2214,6 @@ Write out the current server config as YAML to stdout.`,
2207
2214
Description : "Username to use with PLAIN/LOGIN authentication." ,
2208
2215
Flag : "notifications-email-auth-username" ,
2209
2216
Env : "CODER_NOTIFICATIONS_EMAIL_AUTH_USERNAME" ,
2210
- Default : "" ,
2211
2217
Value : & c .Notifications .SMTP .Auth .Username ,
2212
2218
Group : & deploymentGroupNotificationsEmailAuth ,
2213
2219
YAML : "username" ,
@@ -2217,7 +2223,6 @@ Write out the current server config as YAML to stdout.`,
2217
2223
Description : "Password to use with PLAIN/LOGIN authentication." ,
2218
2224
Flag : "notifications-email-auth-password" ,
2219
2225
Env : "CODER_NOTIFICATIONS_EMAIL_AUTH_PASSWORD" ,
2220
- Default : "" ,
2221
2226
Value : & c .Notifications .SMTP .Auth .Password ,
2222
2227
Group : & deploymentGroupNotificationsEmailAuth ,
2223
2228
YAML : "password" ,
@@ -2227,10 +2232,63 @@ Write out the current server config as YAML to stdout.`,
2227
2232
Description : "File from which to load password for use with PLAIN/LOGIN authentication." ,
2228
2233
Flag : "notifications-email-auth-password-file" ,
2229
2234
Env : "CODER_NOTIFICATIONS_EMAIL_AUTH_PASSWORD_FILE" ,
2230
- Default : "" ,
2231
2235
Value : & c .Notifications .SMTP .Auth .PasswordFile ,
2232
2236
Group : & deploymentGroupNotificationsEmailAuth ,
2233
- YAML : "password_file" ,
2237
+ YAML : "passwordFile" ,
2238
+ },
2239
+ {
2240
+ Name : "Notifications: Email TLS: StartTLS" ,
2241
+ Description : "Enable STARTTLS to upgrade insecure SMTP connections using TLS." ,
2242
+ Flag : "notifications-email-tls-starttls" ,
2243
+ Env : "CODER_NOTIFICATIONS_EMAIL_TLS_STARTTLS" ,
2244
+ Value : & c .Notifications .SMTP .TLS .StartTLS ,
2245
+ Group : & deploymentGroupNotificationsEmailTLS ,
2246
+ YAML : "startTLS" ,
2247
+ },
2248
+ {
2249
+ Name : "Notifications: Email TLS: Server Name" ,
2250
+ Description : "Server name to verify against the target certificate." ,
2251
+ Flag : "notifications-email-tls-server-name" ,
2252
+ Env : "CODER_NOTIFICATIONS_EMAIL_TLS_SERVERNAME" ,
2253
+ Value : & c .Notifications .SMTP .TLS .ServerName ,
2254
+ Group : & deploymentGroupNotificationsEmailTLS ,
2255
+ YAML : "serverName" ,
2256
+ },
2257
+ {
2258
+ Name : "Notifications: Email TLS: Skip Certificate Verification (Insecure)" ,
2259
+ Description : "Skip verification of the target server's certificate (insecure)." ,
2260
+ Flag : "notifications-email-tls-skip-verify" ,
2261
+ Env : "CODER_NOTIFICATIONS_EMAIL_TLS_SKIPVERIFY" ,
2262
+ Value : & c .Notifications .SMTP .TLS .InsecureSkipVerify ,
2263
+ Group : & deploymentGroupNotificationsEmailTLS ,
2264
+ YAML : "insecureSkipVerify" ,
2265
+ },
2266
+ {
2267
+ Name : "Notifications: Email TLS: Certificate Authority File" ,
2268
+ Description : "CA certificate file to use." ,
2269
+ Flag : "notifications-email-tls-ca-cert-file" ,
2270
+ Env : "CODER_NOTIFICATIONS_EMAIL_TLS_CACERTFILE" ,
2271
+ Value : & c .Notifications .SMTP .TLS .CAFile ,
2272
+ Group : & deploymentGroupNotificationsEmailTLS ,
2273
+ YAML : "caCertFile" ,
2274
+ },
2275
+ {
2276
+ Name : "Notifications: Email TLS: Certificate File" ,
2277
+ Description : "Certificate file to use." ,
2278
+ Flag : "notifications-email-tls-cert-file" ,
2279
+ Env : "CODER_NOTIFICATIONS_EMAIL_TLS_CERTFILE" ,
2280
+ Value : & c .Notifications .SMTP .TLS .CertFile ,
2281
+ Group : & deploymentGroupNotificationsEmailTLS ,
2282
+ YAML : "certFile" ,
2283
+ },
2284
+ {
2285
+ Name : "Notifications: Email TLS: Certificate Key File" ,
2286
+ Description : "Certificate key file to use." ,
2287
+ Flag : "notifications-email-tls-cert-key-file" ,
2288
+ Env : "CODER_NOTIFICATIONS_EMAIL_TLS_CERTKEYFILE" ,
2289
+ Value : & c .Notifications .SMTP .TLS .KeyFile ,
2290
+ Group : & deploymentGroupNotificationsEmailTLS ,
2291
+ YAML : "certKeyFile" ,
2234
2292
},
2235
2293
{
2236
2294
Name : "Notifications: Webhook: Endpoint" ,
@@ -2249,7 +2307,7 @@ Write out the current server config as YAML to stdout.`,
2249
2307
Value : & c .Notifications .MaxSendAttempts ,
2250
2308
Default : "5" ,
2251
2309
Group : & deploymentGroupNotifications ,
2252
- YAML : "max-send-attempts " ,
2310
+ YAML : "maxSendAttempts " ,
2253
2311
},
2254
2312
{
2255
2313
Name : "Notifications: Retry Interval" ,
@@ -2259,7 +2317,7 @@ Write out the current server config as YAML to stdout.`,
2259
2317
Value : & c .Notifications .RetryInterval ,
2260
2318
Default : (time .Minute * 5 ).String (),
2261
2319
Group : & deploymentGroupNotifications ,
2262
- YAML : "retry-interval " ,
2320
+ YAML : "retryInterval " ,
2263
2321
Annotations : serpent.Annotations {}.Mark (annotationFormatDuration , "true" ),
2264
2322
Hidden : true , // Hidden because most operators should not need to modify this.
2265
2323
},
0 commit comments