Skip to content

Added case sensitivity flag (require_exact_case) for certain DCV methods#65

Merged
sciros merged 18 commits into
mainfrom
ds-dcv-case-sensitive-flag
Apr 6, 2026
Merged

Added case sensitivity flag (require_exact_case) for certain DCV methods#65
sciros merged 18 commits into
mainfrom
ds-dcv-case-sensitive-flag

Conversation

@sciros

@sciros sciros commented Apr 3, 2026

Copy link
Copy Markdown
Collaborator

This pull request introduces improved handling of case sensitivity for domain control validation (DCV) challenge values across various DCV methods. The changes add a new require_exact_case parameter to DCV parameter models, enforce correct case-sensitivity behavior for each validation method, and update the validation and test logic accordingly. Additionally, dependency versions are updated and the project version is bumped.

This should mostly affect those that use HTTP Website Change or DNS Change with TXT record methods and have been relying on matching hex values (that are case insensitive), as the default for case sensitivity is now on ("require_exact_case = True") for those methods. For case-insensitive matching logic, set the flag to False. See the OpenAPI spec for more information.

Case sensitivity handling improvements

  • Added a require_exact_case field to all DCV parameter models (e.g., DcvDnsChangeValidationParameters, DcvWebsiteChangeValidationParameters) to control case-sensitive comparison of challenge values, defaulting appropriately per method. For DNS validation, case sensitivity is only enabled for TXT records and forced off for others. [1] [2] [3] [4] [5] [6]
  • Updated the DCV checker logic to respect the require_exact_case flag in both DNS and HTTP validations, ensuring that comparisons are performed in a case-sensitive or case-insensitive manner as required. [1] [2] [3] [4] [5]
  • Enforced that for non-TXT DNS record types, require_exact_case is always set to False via a model validator, ensuring consistent and correct behavior regardless of input.

Test updates and coverage

  • Added and updated unit tests to verify correct enforcement of case sensitivity for all DCV methods, including new parameterized tests for edge cases and validation of the forced behavior for non-TXT records. [1] [2] [3]

Dependency and version updates

  • Updated dependencies in pyproject.toml: requests to 2.33.0, aiohttp to 3.13.4, and cryptography to 46.0.6.
  • Bumped project version to 6.4.0 in src/open_mpic_core/__about__.py.
  • Updated API spec version to 3.9.0 in pyproject.toml.

Copilot AI left a comment

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.

Pull request overview

This PR updates Domain Control Validation (DCV) request models and checker logic to support configurable case sensitivity when comparing challenge values, with method-specific defaults and enforcement (notably for DNS TXT vs non-TXT records). It also updates unit tests to reflect the new behavior and bumps dependency and project/spec versions.

Changes:

  • Add require_exact_case to DCV parameter models with method-appropriate defaults and enforcement for DNS record types.
  • Update DCV DNS/HTTP validation logic to perform case-sensitive vs case-insensitive comparisons based on require_exact_case.
  • Update unit tests and bump dependency, project, and spec versions.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/open_mpic_core/common_domain/check_parameters.py Adds require_exact_case across DCV parameter models and enforces it for DNS Change (non-TXT forced off).
src/open_mpic_core/mpic_dcv_checker/mpic_dcv_checker.py Threads require_exact_case through DNS and WEBSITE_CHANGE HTTP evaluation logic.
tests/unit/test_util/valid_check_creator.py Extends test request factory helpers to set require_exact_case where relevant.
tests/unit/open_mpic_core/test_mpic_dcv_checker.py Refactors/extends DCV checker tests to validate new case-sensitivity behavior by method and flag.
tests/unit/open_mpic_core/test_check_request_parameters.py Adds test ensuring non-TXT DNS Change requests force require_exact_case to False.
pyproject.toml Bumps runtime dependencies and API spec version.
src/open_mpic_core/__about__.py Bumps package version to 6.4.0.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/open_mpic_core/common_domain/check_parameters.py Outdated
Comment thread src/open_mpic_core/common_domain/check_parameters.py Outdated
Comment thread tests/unit/open_mpic_core/test_check_request_parameters.py Outdated
Comment thread tests/unit/open_mpic_core/test_mpic_dcv_checker.py
sciros and others added 2 commits April 3, 2026 13:41

Copilot AI left a comment

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.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tests/unit/test_util/valid_check_creator.py
Comment thread tests/unit/open_mpic_core/test_check_request_parameters.py

@birgelee birgelee left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I am in favor, would just recommend a public statement/update that some aspects of default behavior will be changing.

@sciros
sciros merged commit 184d662 into main Apr 6, 2026
1 check passed
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.

3 participants