Skip to content

Revert "Check CAA record before issuing certificate"#10263

Merged
Meldiron merged 1 commit into1.7.xfrom
revert-10258-feat-check-CAA-in-DNS
Aug 5, 2025
Merged

Revert "Check CAA record before issuing certificate"#10263
Meldiron merged 1 commit into1.7.xfrom
revert-10258-feat-check-CAA-in-DNS

Conversation

@Meldiron
Copy link
Copy Markdown
Contributor

@Meldiron Meldiron commented Aug 5, 2025

Reverts #10258

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Aug 5, 2025

📝 Walkthrough

Walkthrough

This change removes support for CAA DNS record validation throughout the codebase. All references to the _APP_DOMAIN_TARGET_CAA and _APP_DNS environment variables are deleted from configuration files, Docker Compose files, and environment variable lists. The code responsible for CAA record validation is removed from backend logic, including certificate issuance and domain validation workflows. The DNS validator class is refactored to use native PHP DNS functions and no longer handles CAA records. Related tests and model definitions for CAA variables are also deleted or updated accordingly.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

Suggested reviewers

  • stnguyen90

Note

⚡️ Unit Test Generation is now available in beta!

Learn more here, or try it out under "Finishing Touches" below.


📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f8a7549 and 9c320f9.

⛔ Files ignored due to path filters (1)
  • composer.lock is excluded by !**/*.lock
📒 Files selected for processing (12)
  • .env (0 hunks)
  • app/config/variables.php (0 hunks)
  • app/controllers/api/console.php (0 hunks)
  • app/controllers/api/proxy.php (0 hunks)
  • app/views/install/compose.phtml (0 hunks)
  • composer.json (0 hunks)
  • docker-compose.yml (0 hunks)
  • src/Appwrite/Network/Validator/DNS.php (2 hunks)
  • src/Appwrite/Platform/Workers/Certificates.php (0 hunks)
  • src/Appwrite/Utopia/Response/Model/ConsoleVariables.php (1 hunks)
  • tests/e2e/Services/Console/ConsoleConsoleClientTest.php (1 hunks)
  • tests/unit/Network/Validators/DNSTest.php (0 hunks)
💤 Files with no reviewable changes (9)
  • composer.json
  • .env
  • app/controllers/api/console.php
  • tests/unit/Network/Validators/DNSTest.php
  • app/views/install/compose.phtml
  • app/controllers/api/proxy.php
  • docker-compose.yml
  • app/config/variables.php
  • src/Appwrite/Platform/Workers/Certificates.php
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: Setup & Build Appwrite Image
  • GitHub Check: Setup & Build Appwrite Image
  • GitHub Check: scan
🔇 Additional comments (5)
src/Appwrite/Network/Validator/DNS.php (3)

50-62: LGTM! Clean implementation with native PHP DNS functions.

The switch to native PHP DNS functions using match expressions is well-implemented. The mapping from custom constants to PHP DNS constants and the corresponding field key mapping is correct and comprehensive.


69-83: LGTM! Proper error handling and validation logic.

The implementation correctly uses dns_get_record() with appropriate error handling and validates records by checking the relevant field against the target value. The logic is sound and handles edge cases appropriately.


9-11: No breaking change from constant case update detected

All usages within the codebase reference DNS::RECORD_A / RECORD_AAAA / RECORD_CNAME, not hard-coded string literals. Since only the constant values changed (to lowercase) and every call uses the updated constants, there’s no internal breakage.

• Tests (tests/unit/Network/Validators/DNSTest.php) use DNS::RECORD_*
• Platform Workers and Proxy modules all reference DNS::RECORD_*
• No direct string literals "A", "AAAA", or "CNAME" found outside the constant definitions

tests/e2e/Services/Console/ConsoleConsoleClientTest.php (1)

27-27: LGTM! Test correctly updated for CAA variable removal.

The variable count has been appropriately decreased from 14 to 13 to reflect the removal of the _APP_DOMAIN_TARGET_CAA environment variable. This change is consistent with the broader CAA functionality removal.

src/Appwrite/Utopia/Response/Model/ConsoleVariables.php (1)

13-30: LGTM! Clean removal of CAA variable with improved formatting.

The removal of the _APP_DOMAIN_TARGET_CAA environment variable from the model is correct and consistent with the broader revert. The reformatting of the remaining domain target variables with consistent indentation improves code readability.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch revert-10258-feat-check-CAA-in-DNS

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Aug 5, 2025

Security Scan Results for PR

Docker Image Scan Results

Package Version Vulnerability Severity
binutils 2.42-r0 CVE-2025-0840 HIGH
git 2.45.3-r0 CVE-2025-48384 HIGH
git 2.45.3-r0 CVE-2025-48385 HIGH
git-init-template 2.45.3-r0 CVE-2025-48384 HIGH
git-init-template 2.45.3-r0 CVE-2025-48385 HIGH
icu 74.2-r0 CVE-2025-5222 HIGH
icu-data-en 74.2-r0 CVE-2025-5222 HIGH
icu-dev 74.2-r0 CVE-2025-5222 HIGH
icu-libs 74.2-r0 CVE-2025-5222 HIGH
libexpat 2.6.4-r0 CVE-2024-8176 HIGH
libxml2 2.12.7-r0 CVE-2024-56171 HIGH
libxml2 2.12.7-r0 CVE-2025-24928 HIGH
libxml2 2.12.7-r0 CVE-2025-27113 HIGH
libxml2 2.12.7-r0 CVE-2025-32414 HIGH
libxml2 2.12.7-r0 CVE-2025-32415 HIGH
pyc 3.12.9-r0 CVE-2024-12718 HIGH
pyc 3.12.9-r0 CVE-2025-4138 HIGH
pyc 3.12.9-r0 CVE-2025-4330 HIGH
pyc 3.12.9-r0 CVE-2025-4517 HIGH
python3 3.12.9-r0 CVE-2024-12718 HIGH
python3 3.12.9-r0 CVE-2025-4138 HIGH
python3 3.12.9-r0 CVE-2025-4330 HIGH
python3 3.12.9-r0 CVE-2025-4517 HIGH
python3-pyc 3.12.9-r0 CVE-2024-12718 HIGH
python3-pyc 3.12.9-r0 CVE-2025-4138 HIGH
python3-pyc 3.12.9-r0 CVE-2025-4330 HIGH
python3-pyc 3.12.9-r0 CVE-2025-4517 HIGH
python3-pycache-pyc0 3.12.9-r0 CVE-2024-12718 HIGH
python3-pycache-pyc0 3.12.9-r0 CVE-2025-4138 HIGH
python3-pycache-pyc0 3.12.9-r0 CVE-2025-4330 HIGH
python3-pycache-pyc0 3.12.9-r0 CVE-2025-4517 HIGH
sqlite-libs 3.45.3-r1 CVE-2025-29087 HIGH
xz 5.6.2-r0 CVE-2025-31115 HIGH
xz-libs 5.6.2-r0 CVE-2025-31115 HIGH
golang.org/x/crypto v0.31.0 CVE-2025-22869 HIGH
golang.org/x/oauth2 v0.24.0 CVE-2025-22868 HIGH

Source Code Scan Results

🎉 No vulnerabilities found!

@Meldiron Meldiron merged commit b882a5d into 1.7.x Aug 5, 2025
40 checks passed
@github-actions
Copy link
Copy Markdown

github-actions bot commented Aug 5, 2025

✨ Benchmark results

  • Requests per second: 917
  • Requests with 200 status code: 165,113
  • P99 latency: 0.198675837

⚡ Benchmark Comparison

Metric This PR Latest version
RPS 917 887
200 165,113 159,777
P99 0.198675837 0.217327737

@coderabbitai coderabbitai bot mentioned this pull request Aug 5, 2025
3 tasks
@coderabbitai coderabbitai bot mentioned this pull request Nov 4, 2025
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