From 6e2315d8ca3824fed558d11ab1e32ff873329748 Mon Sep 17 00:00:00 2001 From: Yannik Sembritzki Date: Tue, 24 Mar 2026 00:10:15 +0100 Subject: [PATCH] Add provisionerName to webhook request for x509 and SSH --- authority/ssh.go | 6 ++++++ authority/tls.go | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/authority/ssh.go b/authority/ssh.go index c34bcd65b..9dec30e12 100644 --- a/authority/ssh.go +++ b/authority/ssh.go @@ -700,6 +700,9 @@ func (a *Authority) callEnrichingWebhooksSSH(ctx context.Context, prov provision if whEnrichReq, err = webhook.NewRequestBody( webhook.WithSSHCertificateRequest(cr), ); err == nil { + if prov != nil { + whEnrichReq.ProvisionerName = prov.GetName() + } err = webhookCtl.Enrich(ctx, whEnrichReq) } @@ -716,6 +719,9 @@ func (a *Authority) callAuthorizingWebhooksSSH(ctx context.Context, prov provisi if whAuthBody, err = webhook.NewRequestBody( webhook.WithSSHCertificate(cert, certTpl), ); err == nil { + if prov != nil { + whAuthBody.ProvisionerName = prov.GetName() + } err = webhookCtl.Authorize(ctx, whAuthBody) } diff --git a/authority/tls.go b/authority/tls.go index d794ad73e..a4a879cff 100644 --- a/authority/tls.go +++ b/authority/tls.go @@ -1053,6 +1053,9 @@ func (a *Authority) callEnrichingWebhooksX509(ctx context.Context, prov provisio webhook.WithX509CertificateRequest(csr), webhook.WithAttestationData(attested), ); err == nil { + if prov != nil { + whEnrichReq.ProvisionerName = prov.GetName() + } err = webhookCtl.Enrich(ctx, whEnrichReq) } @@ -1077,6 +1080,9 @@ func (a *Authority) callAuthorizingWebhooksX509(ctx context.Context, prov provis webhook.WithX509Certificate(cert, leaf), webhook.WithAttestationData(attested), ); err == nil { + if prov != nil { + whAuthBody.ProvisionerName = prov.GetName() + } err = webhookCtl.Authorize(ctx, whAuthBody) }