Skip to content

feat: add Deploy CLI support for ACR authorization_policy on Auth0 My…#1381

Open
ankita10119 wants to merge 2 commits intomasterfrom
DXCDT-1569
Open

feat: add Deploy CLI support for ACR authorization_policy on Auth0 My…#1381
ankita10119 wants to merge 2 commits intomasterfrom
DXCDT-1569

Conversation

@ankita10119
Copy link
Copy Markdown
Contributor

@ankita10119 ankita10119 commented May 7, 2026

🔧 Changes

Add Deploy CLI support for ACR authorization_policy on Auth0 My Account API resource server.

  • Added authorization_policy to the allowedKeys list in getType() so the field is preserved when exporting the My Account API (previously stripped silently, causing the next import to always attempt to clear it)
  • Added authorization_policy to the hard-coded update payload in updateResourceServer() so the field is included in PATCH calls for system resource servers (previously never sent, making it impossible to set or clear via Deploy CLI)
  • Updated docs and examples for both YAML and directory formats

📚 References

🔬 Testing

Three new unit tests added to test/tools/auth0/handlers/resourceServers.tests.js:

  • should preserve authorization_policy on system resource server export (getType) - verifies field is not stripped on export
  • should include authorization_policy in update payload for Auth0 My Account API - verifies field is sent in PATCH body when setting a policy
  • should include authorization_policy: null in update payload for Auth0 My Account API - verifies null is passed through correctly to clear the policy

📝 Checklist

  • All new/changed/fixed functionality is covered by tests (or N/A)
  • I have added documentation for all new/changed functionality (or N/A)

@ankita10119 ankita10119 requested a review from a team as a code owner May 7, 2026 10:55
@ankita10119 ankita10119 marked this pull request as draft May 7, 2026 10:55
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.85%. Comparing base (406a6fc) to head (57dc270).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1381   +/-   ##
=======================================
  Coverage   79.85%   79.85%           
=======================================
  Files         153      153           
  Lines        7023     7023           
  Branches     1537     1537           
=======================================
  Hits         5608     5608           
  Misses        780      780           
  Partials      635      635           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ankita10119 ankita10119 marked this pull request as ready for review May 8, 2026 10:31
@kushalshit27
Copy link
Copy Markdown
Contributor

please add
Examples

  • YAML format
  • JSON format

In pr description

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