Skip to content

Commit

Permalink
chore: decrease min server cert validity (#402)
Browse files Browse the repository at this point in the history
  • Loading branch information
jcosentino11 authored Sep 13, 2023
1 parent 7128217 commit a2aab68
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 MAX_CLIENT_CERT_EXPIRY_SECONDS = 60 * 60 * 24 * 10; // 10 days
static final int MIN_CLIENT_CERT_EXPIRY_SECONDS = 60; // 1 minute
static final int DEFAULT_SERVER_CERT_EXPIRY_SECONDS = 60 * 60 * 24 * 7; // 7 days
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 a2aab68

Please sign in to comment.