fix: remove enable_custom_domain_in_emails from managed tenant flags#1401
Draft
ankita10119 wants to merge 2 commits into
Draft
fix: remove enable_custom_domain_in_emails from managed tenant flags#1401ankita10119 wants to merge 2 commits into
ankita10119 wants to merge 2 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1401 +/- ##
=======================================
Coverage 80.10% 80.10%
=======================================
Files 153 153
Lines 7099 7099
Branches 1566 1566
=======================================
Hits 5687 5687
Misses 760 760
Partials 652 652 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
🔧 Changes
Removes
enable_custom_domain_in_emailsfrom the managed tenant flags allowlist (allowedTenantFlags) to prevent import failures in environments without a ready custom domain.Problem: The flag was included in
allowedTenantFlags, causing it to be:exportoutput (tenant.yaml) even though it is deprecatedimport, resulting in a400 Bad Requesterror on tenants that do not have a custom domain withstatus: "ready"- aborting the entire tenantprocessChangesstage and leaving no tenant settings appliedChanges:
enable_custom_domain_in_emailsfromallowedTenantFlagsinsrc/tools/auth0/handlers/tenant.ts- the existingremoveUnallowedTenantFlags()function now strips it on both the export and import paths automaticallycustomDomains[].is_defaultMigration: Users should remove
enable_custom_domain_in_emailsfrom their tenant configuration files and use theis_defaultfield oncustomDomainsinstead:📚 References
🔬 Testing
Unit tests: Updated test in
test/tools/auth0/handlers/tenant.tests.tsverifies:Manual export test: Running node lib/index.js export against a tenant with
enable_custom_domain_in_emails: trueconfirms:Not tested end-to-end for import (requires a tenant without a custom domain): the import path is covered by the unit test and by code analysis -
removeUnallowedTenantFlags()strips the flag before the API call in processChanges().📝 Checklist