mirror of
https://github.com/google/nomulus.git
synced 2025-06-16 17:34:46 +02:00
Add email set up for sending expiring certificate notification emails (#1248)
* Add email set up for sending expiring certificate notification emails
This commit is contained in:
parent
65e3a74944
commit
0f2d3c2048
3 changed files with 21 additions and 0 deletions
|
@ -1277,6 +1277,18 @@ public final class RegistryConfig {
|
||||||
return config.sslCertificateValidation.minimumRsaKeyLength;
|
return config.sslCertificateValidation.minimumRsaKeyLength;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Provides
|
||||||
|
@Config("expirationWarningEmailBodyText")
|
||||||
|
public static String provideExpirationWarningEmailBodyText(RegistryConfigSettings config) {
|
||||||
|
return config.sslCertificateValidation.expirationWarningEmailBodyText;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Provides
|
||||||
|
@Config("expirationWarningEmailSubjectText")
|
||||||
|
public static String provideExpirationWarningEmailSubjectText(RegistryConfigSettings config) {
|
||||||
|
return config.sslCertificateValidation.expirationWarningEmailSubjectText;
|
||||||
|
}
|
||||||
|
|
||||||
@Provides
|
@Provides
|
||||||
@Config("allowedEcdsaCurves")
|
@Config("allowedEcdsaCurves")
|
||||||
public static ImmutableSet<String> provideAllowedEcdsaCurves(RegistryConfigSettings config) {
|
public static ImmutableSet<String> provideAllowedEcdsaCurves(RegistryConfigSettings config) {
|
||||||
|
|
|
@ -230,5 +230,7 @@ public class RegistryConfigSettings {
|
||||||
public int expirationWarningDays;
|
public int expirationWarningDays;
|
||||||
public int minimumRsaKeyLength;
|
public int minimumRsaKeyLength;
|
||||||
public Set<String> allowedEcdsaCurves;
|
public Set<String> allowedEcdsaCurves;
|
||||||
|
public String expirationWarningEmailBodyText;
|
||||||
|
public String expirationWarningEmailSubjectText;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -452,6 +452,13 @@ sslCertificateValidation:
|
||||||
# The number of days before a certificate expires that indicates the
|
# The number of days before a certificate expires that indicates the
|
||||||
# certificate is nearing expiration and warnings should be sent.
|
# certificate is nearing expiration and warnings should be sent.
|
||||||
expirationWarningDays: 30
|
expirationWarningDays: 30
|
||||||
|
# Text for expiring certificate notification email subject.
|
||||||
|
expirationWarningEmailSubjectText: Certificate Expring Within 30 Days.
|
||||||
|
# Text for expiring certificate notification email body that accepts 3 parameters:
|
||||||
|
# registrar name, certificate type, and expiration date, respectively.
|
||||||
|
expirationWarningEmailBodyText: |
|
||||||
|
Hello Registrar %s,
|
||||||
|
The %s certificate is expiring on %s.
|
||||||
# The minimum number of bits an RSA key must contain.
|
# The minimum number of bits an RSA key must contain.
|
||||||
minimumRsaKeyLength: 2048
|
minimumRsaKeyLength: 2048
|
||||||
# The ECDSA curves that are allowed for public keys.
|
# The ECDSA curves that are allowed for public keys.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue