Skip to content

Commit

Permalink
fix(certificate): properly throw errors when parsing certificate from…
Browse files Browse the repository at this point in the history
… the vault (#14212)

get_certificate was not handling certificate parsing errors after a vault update. This fixes it.

FTI-6392
  • Loading branch information
ms2008 authored Feb 5, 2025
1 parent 6617d58 commit cb90115
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions changelog/unreleased/kong/fix-error-handle-certificate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
message: "Fixed an issue where the error was not thrown when parsing the certificate from vault."
type: bugfix
scope: Core
2 changes: 1 addition & 1 deletion kong/runloop/certificate.lua
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ local function get_certificate(pk, sni_name, ws_id)
pk, sni_name, ws_id)

if certificate and hit_level ~= 3 and certificate["$refs"] then
certificate = parse_key_and_cert(kong.vault.update(certificate))
certificate, err = parse_key_and_cert(kong.vault.update(certificate))
end

return certificate, err
Expand Down

1 comment on commit cb90115

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bazel Build

Docker image available kong/kong-dev:cb901157ac1701c6fb541c63f0819679d4847c3d
Artifacts available https://github.com/Kong/kong/actions/runs/13155143072

Please sign in to comment.