Skip to content

observer: add CCADB CRL prober#8644

Open
jsha wants to merge 3 commits intomainfrom
crl-fetch-observer
Open

observer: add CCADB CRL prober#8644
jsha wants to merge 3 commits intomainfrom
crl-fetch-observer

Conversation

@jsha
Copy link
Contributor

@jsha jsha commented Feb 24, 2026

Prior work: letsencrypt/crl-monitor#88

Fixes #8618

@jsha jsha marked this pull request as ready for review February 24, 2026 06:38
@jsha jsha requested a review from a team as a code owner February 24, 2026 06:38
@jsha jsha requested a review from aarongable February 24, 2026 06:38
Copy link
Contributor

@aarongable aarongable left a comment

Choose a reason for hiding this comment

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

I have a few minor comments about the code, but nothing big.

My major concern is that this simply doesn't feel like a prober. It's doing so much work, and has so many opportunities for failure, all of which get wrapped up in big accumulated errors. In my mind, the ideal prober is short, simple, only emits metrics (not meaningful logs), and we have alerts for every single metric it exposes. I understand that it is useful for this to live within boulder-observer, so we don't have to deploy and monitor Yet Another Component, but I'm registering my moderate discomfort with the complexity here.

cmd.FailOnError(err, "config failed validation")
}

defer cmd.AuditPanic()
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't this be at the very top of main(), as it documents that it should be "called in a defer statement as early as possible"?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep!

Copy link
Contributor

Choose a reason for hiding this comment

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

Was this file accidentally included? It's not a valid PEM file, and I don't see any references to it in the Go source.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oops, yes. But, fun note, PEM files can have stuff between the blocks! Will delete anyhow. :D

return err
}

var crls, entries, bytes int
Copy link
Contributor

Choose a reason for hiding this comment

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

These accumulator variables are written to, but never read from -- I think they can be removed. Also, bytes shadows the stdlib package of the same name.

return err
}

crlURLs, err := c.getCRLURLs(ctx, c.allCertificatesCSVURL, c.caOwner, issuers)
Copy link
Contributor

Choose a reason for hiding this comment

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

getCRLURLs is a method on the CCADBProber, so it doesn't need c.allCertificatesCSVURL and c.caOwner as arguments. It feels like it should either drop those arguments and read their values from the receiver, or it should become a helper function instead of method.

crls++
issuer := issuers[skid]
if issuer == nil {
return fmt.Errorf("no issuer found for skid %x", skid)
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this also be an append(errs, ...); continue instead of bailing out?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point. Moved it up a level at the same time so it won't trigger N times for every affected CRL.

if otherCRL, ok := serials[serialByteString]; ok {
otherCRLURL, err := getIDP(otherCRL)
if err != nil {
return err
Copy link
Contributor

Choose a reason for hiding this comment

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

Same comment as above about appending err and continuing?

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.

boulder-observer: add tool to fetch all CRLs from CCADB

2 participants