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

Add a lambda function to allow the modification of the SCIM error response #1990

Open
jaywood128 opened this issue Dec 5, 2022 · 3 comments

Comments

@jaywood128
Copy link

jaywood128 commented Dec 5, 2022

Add a lambda function to allow the modification of the SCIM error response

Problem

The error response from a SCIM endpoint is not mutable. A specific example is when a webhook fails, and the following error is returned:

{
    "detail": "Request failed, see errors for additional details.",
    "schemas": [
        "urn:ietf:params:scim:api:messages:2.0:Error",
        "urn:ietf:params:scim:schemas:extension:fusionauth:2.0:Error"
    ],
    "status": "400",
    "urn:ietf:params:scim:schemas:extension:fusionauth:2.0:Error": {
        "fieldErrors": {},
        "generalErrors": [
            {
                "code": "[WebhookTransactionException]",
                "message": "One or more webhooks returned an invalid response or were unreachable. Based on your transaction configuration, your action cannot be completed."
            }
        ]
    }
}

Solution

We could allow the errors object to be passed to a lambda function to allow for mutation or customization.

In a customer provided example, here is an ideal output for the above error.

{
    "detail": "Specific message generated dynamically by us and returned in the web-hook response.",
    "schemas": [
        "urn:ietf:params:scim:api:messages:2.0:Error"
    ],
    "status": "409"
    }
}

Related

Community guidelines

All issues filed in this repository must abide by the FusionAuth community guidelines.

How to vote

Please give us a thumbs up or thumbs down as a reaction to help us prioritize this feature. Feel free to comment if you have a particular need or comment on how this feature should work.

@jaywood128 jaywood128 added enhancement New feature or request feature SCIM labels Dec 5, 2022
@marianooriosplit
Copy link

Thanks for submitting this feature request @jaywood128

Since the rfc for SCIM error responses specifies only the status as required, and the scimType and detail as optionals, IDPs may be displaying only that information to their customers, hiding relevant information for troubleshooting or error understanding.

A way to manipulate that response will be really useful to display quality info on failures (from FA directly or web-hook's non-success responses).

@robotdan
Copy link
Member

robotdan commented Dec 6, 2022

To accomplish this type of result, we would need to add another lambda to allow you to completely re-write the error response and remove our error extension.

@robotdan robotdan changed the title Add more descriptive message in case of a Webhook failure in the SCIM Error Response Add a lambda function to allow the modification of the error response from SCIM Dec 6, 2022
@robotdan robotdan changed the title Add a lambda function to allow the modification of the error response from SCIM Add a lambda function to allow the modification of the SCIM error response Dec 6, 2022
@marianooriosplit
Copy link

Hi @robotdan, can this be prioritized? It will be really helpful to display real errors to end customers avoiding many interactions between them and our support team. Thanks!

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

No branches or pull requests

3 participants