Skip to content

Replace CA-enforcement for MaxNames with Custom Lint#8739

Open
ezekiel wants to merge 9 commits intomainfrom
ezekiel/replace-ca-maxnames-with-lint
Open

Replace CA-enforcement for MaxNames with Custom Lint#8739
ezekiel wants to merge 9 commits intomainfrom
ezekiel/replace-ca-maxnames-with-lint

Conversation

@ezekiel
Copy link
Copy Markdown
Member

@ezekiel ezekiel commented Apr 28, 2026

Completely removes maxNames enforcement from CA and CA tests, and replaces with a custom zlint.

Both the RA and the CA use csr.VerifyCSR to verify various CSR aspects. Validation of maxnames was removed from this function, but separately preserved in the VA at finalize time.

maxNames values and on-disk testdata have also been deleted from both csr_tests and ca_tests.

Fixes #8391

@ezekiel ezekiel requested a review from a team as a code owner April 28, 2026 18:55
@ezekiel ezekiel requested a review from jsha April 28, 2026 18:55
aarongable
aarongable previously approved these changes Apr 28, 2026
Comment thread linter/lints/cpcps/lint_cert_has_san_count_out_of_bounds.go Outdated
Comment thread linter/lints/cpcps/lint_cert_has_san_count_out_of_bounds.go Outdated
@aarongable aarongable dismissed their stale review April 28, 2026 19:45

Oops, didn't mean to hit Approve yet; I know the rest of this PR is still coming.

@ezekiel ezekiel marked this pull request as draft April 28, 2026 20:12
@ezekiel ezekiel self-assigned this Apr 28, 2026
ezekiel added 6 commits April 28, 2026 20:26
Includes removal of configuration from test configs.
Necessarily removes maxNames from csr.VerifyCSR signature.
Also removes maxNames-related items from CSR and CA tests.
@ezekiel ezekiel marked this pull request as ready for review April 29, 2026 18:40
Copy link
Copy Markdown
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.

Two nits on the PR description:

  1. You're going to need to file an internal jira ticket asking SRE to remove the maxNames item from the CA's config, then reference that ticket with a line like IN-WXYZ tracks the corresponding production changes.
  2. We link from the PR to the issue it's addressing by having the last line of the PR description be Fixes https://github.com/letsencrypt/boulder/issues/8391.

Comment thread ca/ca_test.go
Comment thread ra/ra.go
Comment thread cmd/boulder-ca/main.go
// limits are per section 7.1 of our combined CP/CPS, under "DV-SSL
// Subscriber Certificate". The value must match the RA and WFE
// configurations.
MaxNames int `validate:"required,min=1,max=100"`
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We can't immediately delete this, because it's currently configured in prod. Deploying this change as-is would break, as the CA would refuse to load a config with an unrecognized key.

Instead, update the comment to mark the field as deprecated, and update the config validation from "required" to "omitempty".

Comment thread test/config/ca.json
]
},
"serialPrefixHex": "6e",
"maxNames": 100,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Don't remove this from test/config/ yet, since it's still configured in prod. We'll save that for a follow-up PR, after this initial change has been deployed and the prod configs have been updated.

CSR identifiers check needs to have an empty line after the error return.

Co-authored-by: Aaron Gable <aaron@letsencrypt.org>
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.

Remove maxNames from top-level RA and CA configs

2 participants