-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Closed
Labels
in: configAn issue in spring-security-configAn issue in spring-security-configstatus: ideal-for-contributionAn issue that we actively are looking for someone to help us withAn issue that we actively are looking for someone to help us withtype: enhancementA general enhancementA general enhancement
Milestone
Description
Describe the bug
Defined role hierarchy is not picked up by AuthorityAuthorizationManager.
- Role hierarchy: ROLE_SUPERUSER > ROLE_USER
- endpoint GET
/greet
is authorized to role USER - User
user
is configured as SUPERUSER. According to defined role hierarchy, access to resource should be granted.
After debugging I found that AuthorityAuthorizationManager
is always using NullRoleHierarchy
. This setter is never being assigned to the one I created.
Env: spring boot 3.0.0 / spring security 6.0.0
Context: Upgrading from spring boot 2.7.x to spring boot 3.0.0
To Reproduce
- Start the example
- Go to localhost:8080/greet
- log in should be shown
user: user
password: pass - response code is 403, forbidden.
Expected behavior
Should return "hello world" string
Sample
Metadata
Metadata
Assignees
Labels
in: configAn issue in spring-security-configAn issue in spring-security-configstatus: ideal-for-contributionAn issue that we actively are looking for someone to help us withAn issue that we actively are looking for someone to help us withtype: enhancementA general enhancementA general enhancement