-
Notifications
You must be signed in to change notification settings - Fork 173
feat: Add support for riskAssessment
#1217
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
feat: Add support for riskAssessment
#1217
Conversation
|
Hi, @josh-cain Contributing guideline: https://github.com/auth0/auth0-deploy-cli/blob/master/CONTRIBUTING.md Let me know if you have any questions. Looking forward to your updates! |
|
Hey @kushalshit27 , will when I go to move it out of draft state, build is passing, etc. Thanks 👍 |
dce807e to
c774018
Compare
2d7d33b to
9f6141b
Compare
|
Should be ready to go. Only issue is the e2e tests, for which it looks like I'd need to |
|
Hi, @josh-cain |
|
Please add PR description similar to #1204 |
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.
HI, @josh-cain ,
Since there are no multiple risk assessments, use the singular riskAssessment.
Please keep a single file for riskAssessment , riskAssessmentsNewDevice.ts is not needed.
Refer to attackProtection for a reference on combining multiple APIs under a single resource.
|
@kushalshit27 Updated ✅ . Please LMK if those changes are what you had in mind. |
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.
@josh-cain
One small request, renaming all the files and variables:
riskAssessments to riskAssessment
This comment was marked as outdated.
This comment was marked as outdated.
🤔 The API endpoint + docs are |
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.
Hi, @josh-cain
Renaming the files from 'riskAssessments' to 'riskAssessment' would be helpful.
Co-authored-by: Kushal <43465488+kushalshit27@users.noreply.github.com>
Co-authored-by: Kushal <43465488+kushalshit27@users.noreply.github.com>
|
@kushalshit27 ready for another look when you are. |
|
Hi, @josh-cain , Is it okay if I make some changes to your fork PR, as we moved from node-sdk v4 to v5 on deploy-cli? Let me know if you have any preferences or concerns. |
|
@kushalshit27 Always 👍 , just ready to get this over the line. |
- src/tools/auth0/handlers/riskAssessment.ts: nest 'enabled' under 'settings' object - src/tools/auth0/handlers/riskAssessment.ts: change required fields to include 'settings'
- src/context/directory/handlers/riskAssessment.ts: change ParsedRiskAssessment type to use RiskAssessmentSettings - src/context/yaml/handlers/riskAssessment.ts: change ParsedRiskAssessment type to use RiskAssessmentSettings - test/context/directory/riskAssessment.test.js: update settings structure in test cases - test/context/yaml/context.test.js: update settings structure in test cases - test/tools/auth0/handlers/riskAssessment.tests.js: update settings structure in handler tests - test/utils.js: update mock for risk assessments to reflect new structure
- docs/resource-specific-documentation.md: enhance risk assessments section with detailed configuration options - examples/directory/risk-assessment/settings.json: add new settings.json file for risk assessment - examples/yaml/tenant.yaml: modify risk assessment structure to include settings
- src/context/directory/handlers/riskAssessment.ts: replace RiskAssessmentSettings with RiskAssessment - src/context/yaml/handlers/riskAssessment.ts: replace RiskAssessmentSettings with RiskAssessment - src/tools/auth0/handlers/riskAssessment.ts: rename RiskAssessmentSettings to RiskAssessment - src/types.ts: update riskAssessment type to use RiskAssessment instead of RiskAssessmentSettings - examples/directory/risk-assessments/settings.json: remove settings.json file
riskAssessment
🔧 Changes
Add the ability manage risk assessment settings (/v2/risk-assessments/settings) via the CLI. This change includes two settings:
Examples
YAML format
riskAssessment:
JSON format (directory settings.json)
{ "settings": { "enabled": true }, "new_device": { "remember_for": 30 } }📚 References
🔬 Testing
Unit tests passing ✅
Smoke tested locally with:
Everything seemed fine, the
tenant.jsonfile rendered correctly withriskAssessment.Next, ran the import script:
Everything checked out, and was properly reflected in tenant logs and the tenant:
📝 Checklist