Skip to content

Resolve renew/reissue from order expiry for ~200 day certs - #13

Open
bhillkeyfactor wants to merge 9 commits into
release-1.1from
feature/200-day-cert-renew-reissue
Open

bhillkeyfactor wants to merge 9 commits into
release-1.1from
feature/200-day-cert-renew-reissue

Conversation

@bhillkeyfactor

Copy link
Copy Markdown
Collaborator

Requests carrying a prior certificate are now resolved from the SSL Store order expiry instead of the certificate expiry: reissue under the active order outside RenewalWindowDays (default 30), renew inside it, and order new once the order has expired. Removes the expired-cert renewal rejection.

Adds FlowLogger step diagrams to Enroll, Synchronize, Revoke, GetSingleRecord and Initialize, and tightens error handling on the enrollment path.

Requests carrying a prior certificate are now resolved from the SSL Store
order expiry instead of the certificate expiry: reissue under the active
order outside RenewalWindowDays (default 30), renew inside it, and order
new once the order has expired. Removes the expired-cert renewal rejection.

Adds FlowLogger step diagrams to Enroll, Synchronize, Revoke,
GetSingleRecord and Initialize, and tightens error handling on the
enrollment path.
Request and response bodies are logged through LogRedactor, which masks
AuthToken, PartnerCode, Token, TokenCode, TokenID and password values.
The PartnerCode is no longer logged at Initialize.
Enroll results had no CARequestID, so orders waiting on domain validation
left a row Command could not refresh (GetSingleRecord called with null).
Return the order id with a pending status, accept order-serial IDs in
GetSingleRecord, and return the certificate once the order is issued.
Older records carry CA request IDs like {order}|{partner order}. Parse the
order id on either separator for revoke, renew/reissue and GetSingleRecord.
Stop a renewal or reissue when SSL Store reports an error for the prior
order instead of building a request from an empty response.
SSL Store returns HTTP 200 with AuthResponse.isError for problems such as
the hourly quota. Sync treated the error body as an order and logged
SUCCESS. Count and log these as errors for the order query, per-order
status and organization list, and flag them in GetSingleRecord.
Command sends PriorCertSN without the DER sign-padding byte, but the
gateway stores serials such as 00A3B8... from sync. Try the serial as
sent, stripped, and with a leading 00 so renewals of high-bit serials
resolve their prior order.
A reissue of an order returns the same SSL Store order id, so using it as the CARequestID hit the unique index on the gateway Certificates table when a second reissue was submitted. Append the partner order id, which changes with every submission.
…equest ID

SSL Store rejects a reissue or renewal with -9033 while the order awaits validation, so check the prior order status first and report it plainly. A failed enrollment also saved a gateway row with a null CARequestID, which Command reported as 'Certificate with ID n was not found' and hid the real reason, so failures now carry a unique placeholder id that GetSingleRecord answers as failed.
SSL Store only downloads the current certificate of an order. GetSingleRecord for an {order}-{serial} request id returned that certificate under the old id after a reissue, so the gateway replaced the older certificate's row with the new one and the prior serial could no longer be found for renewal. Only return the certificate when its serial matches the request id.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant