-
Notifications
You must be signed in to change notification settings - Fork 148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Supporting SCIM feature | Workaround on node-auth0@v3 #921
Conversation
|
||
async updateOverride(requestParams: scimRequestParams, bodyParams: Asset) { | ||
// Extract `scim_configuration` from `bodyParams`. | ||
// Remove `scim_configuration` from `bodyParams`, because `connections.update` doesn't accept it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can add debug logs to this and few other newly added methods.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updateScimConfiguration
, createScimConfiguration
, and deleteScimConfiguration
are called within updateOverride
, which already has a debug logger in place.
// Return response from connections.update(...). | ||
return updated; | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can add a comment, explaining the general intention of this override function
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This code block contains more details about updateOverride
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ 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 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* Supporting SCIM feature * Handling rate limit on getScimConfiguration | Added unit test coverage * Removing un-used variables * Fixing lint issues | Adding dependency axios * Using built-in "sleep" method. | Using 2 space indentation * Removing axios from the dependency list * Adding AUTH0_ALLOW_DELETE condition before deleting the scim_configuration * Updating the debug logs * Updating the debug logs --------- Co-authored-by: KunalOfficial <[email protected]>
🔧 Changes
In this PR, I'm adding a workaround to enable
SCIM
support onauth0-deploy-cli
with the currentnode-auth0@v3
version using the Auth0 Management API. This lets us useSCIM
features with the current SDK until we complete the migration tonode-auth0@v4
.scim_configuration
is added toconnections
scim_configuration
:user_id_attribute
,mapping
📚 References
🔬 Testing
config.json
file and keep it in the root of your project.Example:
Make sure you have SCIM supported enterprise connections configured on your tenant. The currently the SCIM supported strategies are
samlp
,oidc
,okta
andwaad
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
Make changes to
scim_configuration
insideconnections
and runimport
ordeploy
command. And observe the changes on your tenant.Navigate to
Authentication > Enterprise > [YOUR_SCIM_CONNECTION] > Provisioning
and make changes toSCIM
configuration. Run anyexport
ordump
command. Observe the changes on your local.📝 Checklist