auth0 / auth0-deploy-cli

The Auth0 Deploy CLI is a tool that helps you manage your Auth0 tenant configuration. It integrates into your development workflows as a standalone CLI or as a node module.
MIT License
248 stars 155 forks source link

Supporting SCIM feature | Workaround on node-auth0@v3 #921

Closed nandan-bhat closed 4 months ago

nandan-bhat commented 4 months ago

🔧 Changes

In this PR, I'm adding a workaround to enable SCIM support on auth0-deploy-cli with the current node-auth0@v3 version using the Auth0 Management API. This lets us use SCIM features with the current SDK until we complete the migration to node-auth0@v4.

📚 References

🔬 Testing

  1. Create a config.json file and keep it in the root of your project. Example:

    {
    "AUTH0_DOMAIN": "<YOUR_DOMAIN>",
    "AUTH0_CLIENT_ID": "<CLIENT_ID>",
    "AUTH0_CLIENT_SECRET": "<CLIENT_SECRET>",
    "AUTH0_INCLUDED_ONLY": ["themes"],
    "AUTH0_ALLOW_DELETE": false
    }
  2. Make sure you have SCIM supported enterprise connections configured on your tenant. The currently the SCIM supported strategies are samlp, oidc, okta and waad

  3. Use the following commands to import or export configs: Export YAML: node lib/index.js export -c config.json -o ./local -f yaml Import YAML: node lib/index.js import -c config.json --input_file ./local/tenant.yaml Refer documentation

  4. Make changes to scim_configuration inside connections and run import or deploy command. And observe the changes on your tenant.

  5. Navigate to Authentication > Enterprise > [YOUR_SCIM_CONNECTION] > Provisioning and make changes to SCIM configuration. Run any export or dump command. Observe the changes on your local.

📝 Checklist

codecov-commenter commented 4 months ago

Codecov Report

Attention: Patch coverage is 85.36585% with 12 lines in your changes missing coverage. Please review.

Project coverage is 84.24%. Comparing base (846c02c) to head (1c70019).

Files Patch % Lines
src/tools/auth0/handlers/scimHandler.ts 84.21% 5 Missing and 7 partials :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #921 +/- ## ========================================== + Coverage 84.16% 84.24% +0.08% ========================================== Files 115 116 +1 Lines 3612 3694 +82 Branches 700 715 +15 ========================================== + Hits 3040 3112 +72 - Misses 326 329 +3 - Partials 246 253 +7 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.