Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Allow only normalized URLs in requests caused a regression in view authz permission details in Admin Consol #44056

@bahaa

Description

@bahaa

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

admin/ui

Describe the bug

After allowing only normalized URLs in requests (#43765), users can't view/edit permissions in Client Authorization tab in the Admin Console. Once the user clicks on a Permission the UI crashes with this error missingNormalization.

Version

26.4.4

Regression

  • The issue is a regression

Expected behavior

User should be able to view a client permission.

Actual behavior

UI crashes with error missingNormalization.

How to Reproduce?

  1. In the Admin Console, create a new Client. Enable Authorization.
  2. Go to the Authorization tab. Then Permissions tab.
  3. Click on the Default Permission.
  4. The UI will crash.
Image

Anything else?

  • The issue doesn't happen if you set http-accept-non-normalized-paths to true.
  • The cause of the issue is that the UI code calls the REST API /auth/admin/realms/{realmId}/clients/{clientId}/authz/resource-server/policy/{policyType}/{policyId} with empty policyType which results in double slashes in the URL.
  • After checking the code, in ResourcesPolicySelect.tsx calls findOnePolicy() with empty type here.

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions