Skip to content

[#2958] - Enable strict authorization configuration by default in 3.1 - #2959

Open
lprimak wants to merge 2 commits into
apache:mainfrom
lprimak:enabled-strict-config-default
Open

lprimak wants to merge 2 commits into
apache:mainfrom
lprimak:enabled-strict-config-default

Conversation

@lprimak

@lprimak lprimak commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Following this checklist to help us incorporate your contribution quickly and easily:

  • Make sure there is a GitHub issue filed for the change.
  • Format the pull request title like [#XXX] - Fixes bug in SessionManager.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • add fixes #XXX if merging the PR should close a related issue.
  • Run mvn verify to make sure basic checks pass. (mvnd package was run for core, web, support/cdi, support/guice and support/jaxrs and passed.)
  • Committers: Make sure a milestone is set on the PR
  • Committers: Use "Squash and Merge" to combine all commits into one when merging a PR when appropriate.

fixes #2958

What and why

shiro.authz.strictConfig now defaults to true when the system property is absent. -Dshiro.authz.strictConfig=false keeps the legacy behavior. Both enforcement points (empty authorization config and wildcard permission parsing) still use the single shared AuthorizationConfigPolicy.strictParsing.

Also:

  • Javadocs updated in AuthorizingAnnotationHandler and WildcardPermission.
  • AuthorizingRealmTest no longer uses permissions with blank parts, which strict parsing rejects.
  • The slow ExecutorServiceSessionValidationSchedulerTest (about 4.7s) is renamed to ExecutorServiceSessionValidationSchedulerIT.

Site documentation is a separate change in apache/shiro-site.

@lprimak lprimak added this to the 3.1.0 milestone Nov 12, 2026
@github-actions github-actions Bot added java Pull requests that update Java code tests labels Nov 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

java Pull requests that update Java code tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enable strict authorization configuration by default in 3.1

1 participant