Skip to content
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

chore: SCIM guard for users #6836

Merged
merged 3 commits into from
Apr 12, 2024
Merged

chore: SCIM guard for users #6836

merged 3 commits into from
Apr 12, 2024

Conversation

nunogois
Copy link
Member

@nunogois nunogois commented Apr 11, 2024

https://linear.app/unleash/issue/2-2093/api-should-not-allow-manual-management-of-scim-managed-users-in

Introduces a SCIM guard for SCIM users. SCIM users should be managed exclusively by the SCIM client, not Unleash.

We decided to be restrictive for now, completely covering all of the write methods, but may fine-tune some of this at a later stage.

Will eventually be followed up by a UI-centric PR.

Copy link

vercel bot commented Apr 11, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
unleash-monorepo-frontend ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 11, 2024 1:59pm
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
unleash-docs ⬜️ Ignored (Inspect) Visit Preview Apr 11, 2024 1:59pm

Copy link

@codescene-delta-analysis codescene-delta-analysis bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Health Quality Gates: FAILED

  • Declining Code Health: 1 findings(s) 🚩

View detailed results in CodeScene

src/lib/routes/admin-api/user-admin.ts Show resolved Hide resolved
handleNotFound,
handleUnauthorized,
handleForbidden,
propagateErrors: true,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reason for this change was to have proper errors in the UI toast, otherwise we would get cannot read property "msg" of undefined errors. I think this is a safe change. Can you please confirm @FredrikOseberg and @Tymek?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Double checked with @FredrikOseberg and this should be safe as long as the calls to this hook's methods are wrapped in a try/catch, which they seem to be.

Copy link
Member

@sighphyre sighphyre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like it. It'd suggest double checking my comment on moving the boolean check to avoid an API call before you merge but this looks quite nice!

Copy link

@codescene-delta-analysis codescene-delta-analysis bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Health Quality Gates: FAILED

  • Declining Code Health: 1 findings(s) 🚩

View detailed results in CodeScene

Copy link

@codescene-delta-analysis codescene-delta-analysis bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Health Quality Gates: FAILED

  • Declining Code Health: 1 findings(s) 🚩

View detailed results in CodeScene

@nunogois nunogois merged commit f4ef06f into main Apr 12, 2024
13 of 14 checks passed
@nunogois nunogois deleted the chore-scim-guard-users branch April 12, 2024 07:23
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.

2 participants