Skip to content

Commit 234eb54

Browse files
estenryeclaude
andcommitted
fix: handle processing state in finalizeOrder 403 handler for ZeroSSL
ZeroSSL returns HTTP 403 orderNotReady on the first finalize call even when all authorizations are valid, and immediately transitions the order to 'processing' state server-side. The existing code only checked for 'valid' state after a 403, falling through to the generic 4xx error handler which incorrectly marks the order as 'errored'. Add an explicit 'processing' check in the 403 handler: when getACMEOrder returns StatusProcessing, set the local order state to Processing and re-queue via scheduledWorkQueue. The main sync loop (StatusProcessing case added by upstream PR cert-manager#7583) then polls until the order becomes valid. This fix, combined with the earlier StatusProcessing case in the main sync loop and the 90s context timeout on the finalize HTTP call, provides complete ZeroSSL ACME compatibility. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 044acbf commit 234eb54

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

pkg/controller/acmeorders/sync.go

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -608,6 +608,19 @@ func (c *controller) finalizeOrder(ctx context.Context, cl acmecl.Interface, o *
608608
return c.syncCertificateDataWithOrder(ctx, cl, *acmeOrder, o, issuer)
609609
}
610610

611+
// Some ACME servers (e.g. ZeroSSL) return 403 orderNotReady on the first
612+
// finalize call and immediately transition the order to 'processing' state.
613+
// When this happens, re-queue so the main sync loop can poll until valid.
614+
if acmeOrder.Status == acmeapi.StatusProcessing {
615+
log.V(logf.InfoLevel).Info("Order transitioned to processing state after 403 orderNotReady, re-queuing to poll for completion")
616+
c.setOrderState(&o.Status, string(cmacme.Processing))
617+
c.scheduledWorkQueue.Add(types.NamespacedName{
618+
Name: o.Name,
619+
Namespace: o.Namespace,
620+
}, RequeuePeriod)
621+
return nil
622+
}
623+
611624
}
612625

613626
// Any other ACME 4xx error means that the Order can be considered failed.

0 commit comments

Comments
 (0)