Skip to content

Commit fdf51b0

Browse files
committed
fix(traefik): keep bootstrap certificate CN short
1 parent b368d82 commit fdf51b0

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

ansible/roles/traefik/templates/bootstrap-cert-openssl.cnf.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ x509_extensions = v3_req
44
prompt = no
55

66
[dn]
7-
CN = {{ terrarium_bootstrap_tls_domains[0] }}
7+
CN = terrarium-bootstrap
88

99
[v3_req]
1010
basicConstraints = critical, CA:true, pathlen:0

tests/ansible-bootstrap-cert.test.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,12 @@ describe("Traefik bootstrap certificate template", () => {
1414
test("marks the self-signed bootstrap certificate as a CA trusted for server auth", () => {
1515
const template = readFileSync(join(repoRoot, "ansible/roles/traefik/templates/bootstrap-cert-openssl.cnf.j2"), "utf8");
1616

17+
expect(template).toContain("CN = terrarium-bootstrap");
18+
expect(template).not.toContain("CN = {{ terrarium_bootstrap_tls_domains[0] }}");
1719
expect(template).toContain("basicConstraints = critical, CA:true");
1820
expect(template).toContain("keyCertSign");
1921
expect(template).toContain("extendedKeyUsage = serverAuth");
22+
expect(template).toContain("subjectAltName = @alt_names");
2023
});
2124

2225
test("limits bootstrap TLS to local-IDP auth and removes it when unused", () => {

0 commit comments

Comments
 (0)