Add CAA DNS Record Type Support for Custom Domain Operations#519
Merged
BinoyOza-okta merged 1 commit intomasterfrom Apr 7, 2026
Merged
Add CAA DNS Record Type Support for Custom Domain Operations#519BinoyOza-okta merged 1 commit intomasterfrom
BinoyOza-okta merged 1 commit intomasterfrom
Conversation
… operations This commit resolves a critical validation error that caused 5 out of 6 custom domain API endpoints to fail when the Okta API returned CAA (Certificate Authority Authorization) DNS records. Problem: - DNSRecordTypeDomains and EmailDomainDNSRecordType enums only defined CNAME and TXT - When API returned CAA records, Pydantic validation failed during deserialization Solution: Added CAA record type to both enum classes: - okta/models/dns_record_type_domains.py - okta/models/email_domain_dns_record_type.py Testing: Verified with get_custom_domain() method that CAA records now deserialize correctly without validation errors.
aniket-okta
reviewed
Apr 7, 2026
aniket-okta
approved these changes
Apr 7, 2026
There was a problem hiding this comment.
Thanks for the clarifications - all core concerns addressed:
✅ CAA-only scope confirmed as a deliberate product decision (discussed with Agrja)
✅ EmailDomainDNSRecordType + CAA confirmed as per ticket requirements
✅ .py files confirmed as regenerated via openapi-generator-cli, not hand-edited
✅ Live tested - get_custom_domain, verify_domain, and replace_custom_domain all work correctly with CAA records on okta-mcp-server.oktapreview.com
Two non-blocking suggestions for follow-up:
- Consider adding a unit test for the CAA deserialization repro case from the JIRA to prevent silent regressions
- A
CHANGELOG.mdentry would be good given the severity (5/6 endpoints were broken)
Approving - good fix, good discussion.
Contributor
Author
|
Sure, Aniket, the CHANGELOG.md changes will be covered in the release notes. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix: Add CAA DNS Record Type Support for Custom Domain Operations
Summary
This PR fixes a critical validation error that prevented custom domain operations from working when the Okta API returned CAA (Certificate Authority Authorization) DNS records.
SDK Version: okta-sdk-python 3.3.0
Issue: OKTA-1146219
Problem
Broken Functionality
5 out of 6 custom domain API endpoints were failing with Pydantic validation errors:
create_custom_domainget_custom_domainreplace_custom_domainverify_custom_domainlist_custom_domainsdelete_custom_domainRoot Cause
The
DNSRecordTypeDomainsandEmailDomainDNSRecordTypeenums only defined two record types:When the Okta API returned DNS records with
recordType: "CAA", Pydantic validation failed:Example Failure
Solution
Added
CAArecord type to both DNS enum classes:Files Changed
okta/models/dns_record_type_domains.py
okta/models/email_domain_dns_record_type.py
Testing
Verification Performed
✅ Tested
get_custom_domain()method with domain containing CAA records✅ DNS records with CAA type now deserialize correctly
✅ No validation errors during deserialization
✅ All custom domain operations work as expected
Test Prompts Verified
Impact
Before
After
Breaking Changes
None - This is a pure bug fix that adds support for additional DNS record types returned by the Okta API.
Notes
Related Issues: OKTA-1146219
Type: Bug Fix
Priority: High (5/6 endpoints broken)