Skip to content

New CCADB report fixup#380

Merged
jschanck merged 4 commits intomozilla:mainfrom
jschanck:rootprogram-fixup
Feb 17, 2026
Merged

New CCADB report fixup#380
jschanck merged 4 commits intomozilla:mainfrom
jschanck:rootprogram-fixup

Conversation

@jschanck
Copy link
Collaborator

A few minor changes after observing a few runs with #379 on staging:

  • Save the new report to a new path to avoid attempting to load a copy of the old report.
  • Unquote URLs when we compare the path we fetched a CRL from against the list of CRL DPs in the CRL itself. Avoids false positives for compliance issues in the audit report.
  • Clear the MozIssuers member fields before loading from disk. We were getting two copies of each intermediate in enrolled.json, which was harmless as the duplicates get filtered out in moz_kinto_publisher, but created a lot of log messages.

@jschanck jschanck requested a review from mozkeeler February 13, 2026 17:42
return crl, shasum[:], err
}

func normalizedUrlString(u url.URL) string {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Might be nice to have a couple of unit tests for this function.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ah yeah, this is actually a very convoluted way to do this and I'm not sure it's correct. The real issue was that we were comparing strings from CRL DP extensions against the normalized URLs that we get from the String() method on url.URL. We can use the same String() function to normalize the CRL DP extension contents.

defer mi.mutex.Unlock()
mi.modTime = fi.ModTime()

// Reset maps to prevent duplicates on reload
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm not understanding this. Is the reload you're referring to when Load() calls LoadFromDisk() once, and then again if the dataset is old enough? Shouldn't InsertIssuer() already handle any duplicates?

Copy link
Collaborator Author

@jschanck jschanck Feb 17, 2026

Choose a reason for hiding this comment

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

Yes that's the reload I'm referring to. The hash map used in InsertIssuer() maps SPKI hashes to lists of certificates; it doesn't currently deduplicate the list although I guess it could.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Oh, I see. I feel like InsertIssuer() would be more robust in general if it deduplicated certificates at that point, but this should be fine for now.

Copy link
Collaborator

@mozkeeler mozkeeler left a comment

Choose a reason for hiding this comment

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

LGTM!

defer mi.mutex.Unlock()
mi.modTime = fi.ModTime()

// Reset maps to prevent duplicates on reload
Copy link
Collaborator

Choose a reason for hiding this comment

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

Oh, I see. I feel like InsertIssuer() would be more robust in general if it deduplicated certificates at that point, but this should be fine for now.

@jschanck jschanck merged commit 6866c48 into mozilla:main Feb 17, 2026
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.

2 participants