8000 Account Console reports success when sharing a resource fails · Issue #55488 · keycloak/keycloak · GitHub
[go: up one dir, main page]

Skip to content

Account Console reports success when sharing a resource fails #55488

Backlog

Description

@ahus1

Before reporting an issue

  • I have read and understood the above terms for submitting issues, and I understand that my issue may be closed without action if I do not follow them.

Area

account/ui

Bug Description

When the server refuses a request to share, unshare or edit the permissions of a user-managed resource, the Account Console still shows "Resource successfully shared" (or the unshare/update success message). The user believes the change happened, and only a reload shows that nothing was stored.

Root cause: request() in js/apps/account-ui/src/api/request.ts is a plain fetch and returns the Respon D2D2 se for any status. Reads pass it to parseResponse, which throws when response.ok is false, and deleteConsent and deleteSession in api/methods.ts check response.ok themselves. The two writes in js/apps/account-ui/src/api.ts, updateRequest and updatePermissions, return the raw response without checking it. Their callers in ShareTheResource.tsx, ResourcesTab.tsx and EditTheResource.tsx then never reach their catch block and call addAlert with the success message.

Version

26.6.4, 26.8.2 and main

Regression

No

Expected behavior

For a non-2xx response, updateRequest and updatePermissions throw, as deleteConsent and deleteSession do (if (!response.ok) { throw await parseResponse(response); }), and the console shows the error and its error_description.

Actual behavior

The request returns an error status, such as 404 for an unknown user or 403, and the console shows the success alert.

How to Reproduce?

  1. In a realm, enable User-Managed Access, create a confidential client with authorization enabled, and create a resource owned by user alice with "User-Managed access enabled".
  2. Log in to the Account Console as alice, open Resources, and share the resource with a username that does not exist, such as nobody.
  3. The browser's network tab shows PUT /realms/{realm}/account/resources/{id}/permissions answered with 404, and the console shows "Resource successfully shared". A reload shows the resource is not shared.

Anything else?

The fix is the same check in updateRequest and updatePermissions that deleteConsent and deleteSession already have.

Activity

  1. added
    kind/bug
    area/account/ui
    on Nov 24, 2026
  2. added theissue type on Nov 24, 2026
  3. ahus1 commented on Nov 24, 2026

    @ahus1
    MemberAuthor

    I came across this one when testing UMA. While it is not blocking me, I want to show this error message in a demo. If the team doesn't have time for this, I'm happy to prepare a PR.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/account/uikind/bugstatus/triageteam/core-iam

    Type

    Fields

    No fields configured for bug.

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    0