Environment
SaaS (https://sentry.io/)
Steps to Reproduce
- Set up a non-Okta SSO provider (e.g. Active Directory / SAML2) on an org.
- Settings → Auth → enable SCIM, Save.
- Disable SCIM, Save. (SCIM turns off immediately, but the underlying SCIM install is only cleaned up asynchronously.)
- Re-enable SCIM and Save before that cleanup completes.
Expected Result
Re-enabling SCIM works (or is safely handled), no server error.
Actual Result
HTTP 500. The server hits IntegrityError: duplicate key value violates unique constraint "sentry_sentryappinstalla_provider_organization_id_1bf014b7_uniq" in enable_scim (src/sentry/models/authprovider.py). The leftover-install check appears to look specifically for an okta_scim record, so for non-Okta providers it doesn't catch the org's existing _scim record and the re-create collides on the unique constraint. Okta orgs aren't affected.
Appears long-standing, not a recent regression.
See the linear case for more info.
Leaving the exact fix to the owning team.
Product Area
Settings - Auth
Link
No response
DSN
No response
Version
No response
Environment
SaaS (https://sentry.io/)
Steps to Reproduce
Expected Result
Re-enabling SCIM works (or is safely handled), no server error.
Actual Result
HTTP 500. The server hits IntegrityError: duplicate key value violates unique constraint "sentry_sentryappinstalla_provider_organization_id_1bf014b7_uniq" in enable_scim (src/sentry/models/authprovider.py). The leftover-install check appears to look specifically for an okta_scim record, so for non-Okta providers it doesn't catch the org's existing _scim record and the re-create collides on the unique constraint. Okta orgs aren't affected.
Appears long-standing, not a recent regression.
See the linear case for more info.
Leaving the exact fix to the owning team.
Product Area
Settings - Auth
Link
No response
DSN
No response
Version
No response