-
Notifications
You must be signed in to change notification settings - Fork 8
Persistent DNS bugfixes #61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
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 tightens DCV (Domain Control Validation) parameter validation and improves robustness of DNS persistent record parsing, with accompanying test updates and a patch version bump.
Changes:
- Add stricter validation for DNS-persistent parameters (
expected_account_uri,issuer_domain_names). - Harden DNS persistent TXT record evaluation against malformed/duplicate parameters.
- Update TLS-ALPN error creation and tests to match the new parameter-error message format; bump version to 6.3.1.
Reviewed changes
Copilot reviewed 8 out of 8 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 Pydantic validators for DNS-persistent check parameters. |
src/open_mpic_core/mpic_dcv_checker/mpic_dcv_checker.py |
Makes persistent DNS TXT parsing stricter (malformed/duplicate params). |
src/open_mpic_core/common_domain/messages/ErrorMessages.py |
Generalizes DCV_PARAMETER_ERROR key/message format. |
src/open_mpic_core/mpic_dcv_checker/dcv_tls_alpn_validator.py |
Uses the new parameter-error formatting; minor formatting changes. |
src/open_mpic_core/__about__.py |
Bumps package version to 6.3.1. |
tests/unit/open_mpic_core/test_check_request_parameters.py |
Adds negative cases for new DNS-persistent parameter validation. |
tests/unit/open_mpic_core/test_mpic_dcv_checker.py |
Expands test coverage for malformed/duplicate DNS persistent records. |
tests/unit/open_mpic_core/test_dcv_tls_alpn_validator.py |
Updates expected error messages for the new parameter-error format. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
birgelee
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work.
birgelee
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great, probably good to always have cleanup.
This pull request introduces several improvements and bug fixes to the DCV (Domain Control Validation) parameter validation, error handling, and DNS persistent record evaluation logic. The changes enhance input validation, improve error reporting, and make the DNS persistent record evaluation more robust against malformed records. Additionally, the tests have been updated to cover new validation logic and edge cases.
Validation and Error Handling Improvements:
expected_account_uriandissuer_domain_namesinDcvDnsPersistentValidationParameters, ensuringexpected_account_uriis a valid URI with scheme and host, andissuer_domain_namesis a non-empty list of non-empty strings.DCV_PARAMETER_ERRORmessage to be more general and include both the parameter name and value, improving error clarity.DNS Persistent Record Evaluation Enhancements:
evaluate_persistent_dns_responseto detect and reject records with malformed parameters, duplicateaccounturiorpersistuntilparameters, and to only accept well-formed records. [1] [2]Testing Enhancements:
expected_account_uriandissuer_domain_namesvalues, and for malformed DNS persistent records (e.g., duplicate parameters, missing names/values, etc.). [1] [2]Code Quality and Consistency:
Version Bump:
6.3.0to6.3.1to reflect these changes.