Skip to content

Commit

Permalink
chore: decrease min server cert validity
Browse files Browse the repository at this point in the history
  • Loading branch information
jcosentino11 committed Sep 13, 2023
1 parent 1016cb5 commit c5d3bb7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public class CertificatesConfig {
private static final Logger LOGGER = LogManager.getLogger(CertificatesConfig.class);

static final int MAX_SERVER_CERT_EXPIRY_SECONDS = 60 * 60 * 24 * 10; // 10 days
static final int MIN_SERVER_CERT_EXPIRY_SECONDS = 60 * 60 * 24 * 2; // 2 days
static final int MIN_SERVER_CERT_EXPIRY_SECONDS = 60; // 1 minute
static final int DEFAULT_SERVER_CERT_EXPIRY_SECONDS = 60 * 60 * 24 * 7; // 7 days
static final int DEFAULT_CLIENT_CERT_EXPIRY_SECONDS = 60 * 60 * 24 * 7; // 7 days
static final boolean DEFAULT_DISABLE_CERTIFICATE_ROTATION = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public void GIVEN_largeServerCertValidity_WHEN_getServerCertValiditySeconds_THEN

@Test
public void GIVEN_smallServerCertValidity_WHEN_getServerCertValiditySeconds_THEN_returnsMinExpiry() {
configurationTopics.lookup(CertificatesConfig.PATH_SERVER_CERT_EXPIRY_SECONDS).withValue(60 * 60 * 24); // 1 day
configurationTopics.lookup(CertificatesConfig.PATH_SERVER_CERT_EXPIRY_SECONDS).withValue(30);
assertThat(certificatesConfig.getServerCertValiditySeconds(),
is(equalTo(CertificatesConfig.MIN_SERVER_CERT_EXPIRY_SECONDS)));
}
Expand Down

0 comments on commit c5d3bb7

Please sign in to comment.