Skip to content

[WPB-27953] Make scim error responses comply with RFC7644. - #5439

Open
fisx wants to merge 4 commits into
developfrom
WPB-27953-make-scim-error-responses-comply-with-rfc7644
Open

[WPB-27953] Make scim error responses comply with RFC7644.#5439
fisx wants to merge 4 commits into
developfrom
WPB-27953-make-scim-error-responses-comply-with-rfc7644

Conversation

@fisx

@fisx fisx commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Fixes #5434

This changes the error response body schema for most of the SCIM api. The release notes contain a warning about this with instructions how to re-align code. If anybody is impacted by this change, they are in violation of the RFC as we were and should follow the release note instructions.

https://wearezeta.atlassian.net/browse/WPB-27953

Checklist

  • Are there any SCIM end-points that throw non-scim spar errors? If so, fix them, too!
  • Add a new entry in an appropriate subdirectory of changelog.d
  • Read and follow the PR guidelines

@zebot zebot added the ok-to-test Approved for running tests in CI, overrides not-ok-to-test if both labels exist label Aug 11, 2026
@fisx

fisx commented Aug 12, 2026

Copy link
Copy Markdown
Contributor Author
  • Are there any SCIM end-points that throw non-scim spar errors? If so, fix them, too!

This is ruled out by the type signatures on the UserDB, GroupDB instances: ScimHandler is the only way of throwing errors (besides undefined and friends, of course).

@fisx
fisx force-pushed the WPB-27953-make-scim-error-responses-comply-with-rfc7644 branch from c198abc to c0b8ea0 Compare August 12, 2026 11:02
@fisx
fisx marked this pull request as ready for review August 12, 2026 13:15
@fisx
fisx requested review from a team as code owners August 12, 2026 13:15

-- This file is part of the Wire Server implementation.
--
-- Copyright (C) 2025 Wire Swiss GmbH <opensource@wire.com>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
-- Copyright (C) 2025 Wire Swiss GmbH <opensource@wire.com>
-- Copyright (C) 2026 Wire Swiss GmbH <opensource@wire.com>

-- RFC 7644 section 3.12 requires that the response body of a SCIM error *is*
-- the SCIM error object, not a wire-server 'Wai.Error' with the SCIM error
-- object nested (double-encoded) into its 'message' field.
it "renders a SCIM error as the bare RFC 7644 error object" $ do

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This test is great to show that the rendering works. But, it would also be good to prove that it is actually used. Either with dedicated integration or effect tests or by adding assertions to existing tests. I would lean to the latter, because that's quicker to do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ok-to-test Approved for running tests in CI, overrides not-ok-to-test if both labels exist

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SCIM Error Responses Not Compliant with RFC 7644 Section 3.12

3 participants