Skip to content

Conversation

@aarongable
Copy link
Contributor

@aarongable aarongable commented Sep 12, 2025

In the SA, change the implementation of GetRevocationStatus to read from the revokedCertificates table instead of reading from the certificateStatus table.

In the WFE, switch to calling GetRevocationStatus when computing ARI windows. Similarly, in the RA, make the same switch when checking if a to-be-revoked certificate is already revoked.

Across all three locations, use new core constants to represent "good" and "revoked", to avoid references to OCSP and unwieldy string/int conversions.

This paves the way for removing sa.GetCertificateStatus, which now has only one remaining caller which is not quite so easily changed.

Part of #8322


Warning

Do not merge before #8400

Base automatically changed from all-explicit-sharding to main September 23, 2025 16:38
@aarongable aarongable marked this pull request as ready for review September 23, 2025 16:56
@aarongable aarongable requested a review from a team as a code owner September 23, 2025 16:56
@aarongable aarongable requested a review from jprenken September 23, 2025 16:56
jprenken
jprenken previously approved these changes Sep 24, 2025
@jprenken jprenken requested review from a team and beautifulentropy and removed request for a team September 24, 2025 04:52
Copy link
Member

@beautifulentropy beautifulentropy left a comment

Choose a reason for hiding this comment

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

We're preserving the behavior where SQLStorageAuthorityRO.GetRevocationStatus() returns NotFound for serials that do not match a known certificate, which is great. We should update the method doc comment to indicate that this is part of its API contract.

Similarly, we're depending on SQLStorageAuthorityRO.GetSerialMetadata() to return NotFound so that we meet this contract, we should update the doc comment for that as well.

Otherwise, the change looks great and makes perfect sense. I'm a little sad to see us take an extra query hit, but it keeps this method safe.

jprenken
jprenken previously approved these changes Sep 24, 2025
@aarongable aarongable merged commit a5cf372 into main Sep 25, 2025
12 checks passed
@aarongable aarongable deleted the revocation-status branch September 25, 2025 22:52
aarongable added a commit that referenced this pull request Oct 2, 2025
aarongable added a commit that referenced this pull request Oct 2, 2025
This reverts #8402

The revokedCertificates table does not have an index on the `serial`
column, unlike the certificateStatus table. This means that these
highly-targeted, single-certificate lookups are actually very
inefficient, and led to performance problems in the database.

This revert will be followed by a schema change to add an index to the
revokedCertificates table, and then by a reland of the original PR.

Part of #8322
aarongable added a commit that referenced this pull request Oct 2, 2025
In the SA, change the implementation of GetRevocationStatus to read from
the revokedCertificates table instead of reading from the
certificateStatus table.

In the WFE, switch to calling GetRevocationStatus when computing ARI
windows. Similarly, in the RA, make the same switch when checking if a
to-be-revoked certificate is already revoked.

Across all three locations, use new core constants to represent "good"
and "revoked", to avoid references to OCSP and unwieldy string/int
conversions.

This paves the way for removing sa.GetCertificateStatus, which now has
only one remaining caller which is not quite so easily changed.

Part of #8322

(cherry picked from commit a5cf372)
aarongable added a commit that referenced this pull request Oct 2, 2025
In the SA, change the implementation of GetRevocationStatus to read from
the revokedCertificates table instead of reading from the
certificateStatus table.

In the WFE, switch to calling GetRevocationStatus when computing ARI
windows. Similarly, in the RA, make the same switch when checking if a
to-be-revoked certificate is already revoked.

Across all three locations, use new core constants to represent "good"
and "revoked", to avoid references to OCSP and unwieldy string/int
conversions.

This paves the way for removing sa.GetCertificateStatus, which now has
only one remaining caller which is not quite so easily changed.

Part of #8322

(cherry picked from commit a5cf372)
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.

5 participants