Skip to content

Commit

Permalink
Merge pull request educates#300 from jorgemoralespou/embeddedcerts
Browse files Browse the repository at this point in the history
Fixes issue with embedded TLS wildcard certificates in data values file.
  • Loading branch information
GrahamDumpleton authored Feb 16, 2024
2 parents 5fcae49 + 4b93ad9 commit c2795c6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
8 changes: 8 additions & 0 deletions project-docs/release-notes/version-2.7.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,14 @@ Bugs Fixed
`disallow-ingress-nginx-custom-snippets`, `restrict-annotations`
`restrict-ingress-paths` and `prevent-cr8escape`.

* Including TLS wildcard certificates embedded in the data values file was not
working as there was a typo when looking up the data value. This meant that
a secret was not created for the TLS wildcard certificate when embedded in
data values file and Educates was only configured for plain HTTP and not HTTPS.
This issue was inadvertantly added when support was added for supplying the
TLS wildcard certificate and CA secrets as actual secrets rather than
embedded in the data values file.

* The generated CA secret was incorrectly setting the secret type to
`kubernetes.io/tls` which resulted in Kubernetes rejecting it as it didn't
contain `tls.crt` and `tls.key` data attributes as required by Kubernetes
Expand Down
4 changes: 2 additions & 2 deletions session-manager/handlers/operator_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
INGRESS_SECRET = xget(config_values, "clusterIngress.tlsCertificateRef.name")

if not INGRESS_SECRET:
tls_certficate = xget(config_values, "clusterIngres.tlsCertificate", {})
tls_certficate = xget(config_values, "clusterIngress.tlsCertificate", {})
if (
tls_certficate
and tls_certficate.get("tls.crt")
Expand All @@ -61,7 +61,7 @@
INGRESS_CA_SECRET = xget(config_values, "clusterIngress.caCertificateRef.name")

if not INGRESS_CA_SECRET:
ca_certficate = xget(config_values, "clusterIngres.caCertificate", {})
ca_certficate = xget(config_values, "clusterIngress.caCertificate", {})
if ca_certficate and ca_certficate.get("ca.crt"):
INGRESS_CA_SECRET = f"{INGRESS_DOMAIN}-ca"

Expand Down

0 comments on commit c2795c6

Please sign in to comment.