Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Consider preventing null defaultRolePrefix in SecurityExpressionRoot #17782

Open
Labels
in: coreAn issue in spring-security-core type: breaks-passivityA change that breaks passivity with the previous release type: enhancementA general enhancement
Milestone
@sjohnr

Description

As a follow-up to gh-17585, consider preventing a null defaultRolePrefix in SecurityExpressionRoot and subclasses of AbstractSecurityExpressionHandler for more consistent behavior. This would break passivity in Spring Security 7.

Context:

Currently, SecurityExpressionRoot and subclasses of AbstractSecurityExpressionHandler allow a null defaultRolePrefix to be configured. The javadoc states:

If null or empty, then no default role prefix is used.

When switching to using an AuthorizationManager created by AuthorizationManagerFactory in SecurityExpressionRoot, we can no longer set a null role prefix. To work around this for passivity, we can set the role prefix to blank before setting it on an AuthorizationManagerFactory. See updates to SecurityExpressionRoot in #17673 for context.

Instead, we can consider throwing an IllegalArgumentException when null is passed into any setDefaultRolePrefix method.

Metadata

Metadata

Assignees

No one assigned

    Labels

    in: coreAn issue in spring-security-core type: breaks-passivityA change that breaks passivity with the previous release type: enhancementA general enhancement

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      AltStyle によって変換されたページ (->オリジナル) /