Skip to content

Support third party app security params#1522

Open
bkiran6398 wants to merge 5 commits into
mainfrom
DXCDT-1726/3p_apps
Open

Support third party app security params#1522
bkiran6398 wants to merge 5 commits into
mainfrom
DXCDT-1726/3p_apps

Conversation

@bkiran6398
Copy link
Copy Markdown
Contributor

@bkiran6398 bkiran6398 commented May 18, 2026

🔧 Changes

Adds CLI support for Auth0's Third-Party Client security improvements.

New flags on apps create:

  • --third-party-security-mode (-s): Set security mode to strict or permissive
  • --redirection-policy (-y): Set to allow_always or open_redirect_protection

New flags on apps update:

  • --third-party-security-mode (-s): Update the security mode
  • --redirection-policy (-y): Update the redirection policy

Display updates:

  • apps show and apps list now display THIRD PARTY SECURITY MODE and REDIRECTION POLICY fields when set

Terraform fetcher fix:

  • Handles default_for client grants correctly during auth0 tf generate. Grants with default_for (which lack a client_id) now produce a meaningful resource name (default_for_third_party_clients_<audience>) instead of a broken _<audience> name.

Behavioral notes:

  • When creating a third-party app, is_first_party is automatically set to false
  • Default grant types are not applied for third-party apps (the API manages defaults)
  • Logout URL prompts are suppressed for third-party apps (not applicable)
  • Update uses IsSet() guards so these fields are only sent when explicitly provided

📚 References

🔬 Testing

  • Unit test added: TestClientGrantResourceFetcher_FetchData — verifies default_for grants produce correct resource names
  • Integration test added: test case 051 creates a regular app with --third-party-security-mode strict --redirection-policy open_redirect_protection and validates JSON output

Manual testing:

  • Verified CRUD operation on 3rd party apps using new flag values
  • Verified terraform generation for client grants with default_for value

📝 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)

… policy

- Introduced new flags for third-party applications:
  - `third-party-security-mode` to specify 'strict' or 'permissive'.
  - `redirection-policy` to control Auth0's behavior on authentication errors.

- Updated `createAppCmd` and `updateAppCmd` functions to handle new inputs.
- Enhanced `applicationView` to display third-party security mode and redirection policy.
- Ensured backward compatibility by integrating new features without affecting existing functionality.
…pport

- Updated the FetchData method in clientGrantResourceFetcher to handle
  grants marked as default_for, allowing for more accurate resource naming.
- Introduced a new test case to validate the handling of default_for grants
  in TestClientGrantResourceFetcher_FetchData, ensuring expected behavior
  when fetching client grants with different audiences.
…flags

- Added examples for `auth0 apps create` and `auth0 apps update` commands
  to demonstrate the usage of `--third-party-security-mode` and
  `--redirection-policy` flags.
- Updated documentation to reflect the new security features for
  third-party applications, enhancing clarity for users.
…ecurity mode

- Added a new test case to validate the creation of a regular app
  with third-party security mode set to strict and redirection policy
  set to open_redirect_protection.
- The test ensures that the app is created successfully and outputs
  the expected JSON response.
@bkiran6398 bkiran6398 marked this pull request as ready for review May 18, 2026 12:50
@bkiran6398 bkiran6398 requested a review from a team as a code owner May 18, 2026 12:50
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.

1 participant