[DOC] Clarify that disabling principal parameter also disables JSR-250 annotations#2764
Open
Allen-wick wants to merge 3 commits into
Open
[DOC] Clarify that disabling principal parameter also disables JSR-250 annotations#2764Allen-wick wants to merge 3 commits into
Allen-wick wants to merge 3 commits into
Conversation
…e-effects on JSR-250
jbampton
reviewed
Jun 9, 2026
jbampton
left a comment
Member
There was a problem hiding this comment.
Checkstyle has failed.
Looks like the first line of your Java code comments are not indented properly
jbampton
reviewed
Jun 9, 2026
Co-authored-by: John Bampton <jbampton@users.noreply.github.com>
Author
Thanks for catching that. I've corrected the indentation for both Javadoc blocks to perfectly align with the code, and the Checkstyle CI should be passing now. Let me know if there's anything else needed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
[DOC] Clarify that disabling principal parameter also disables JSR-250 annotations
Description
This PR updates the Javadoc for the
disable-principalconfiguration parameters in theshiro-jakarta-eeandshiro-jaxrsmodules to explicitly document their cascading side-effects on JSR-250 security annotations.Context
This documentation improvement follows a private security report regarding JSR-250 annotation processing in the
shiro-jaxrsmodule. The Apache Shiro Security Team confirmed:Per the security team's recommendation, this PR adds explicit warnings to the source code Javadoc to prevent future misconfigurations.
Changes
support/jakarta-ee/src/main/java/org/apache/shiro/ee/listeners/EnvironmentLoaderListener.java:
SHIRO_WEB_DISABLE_PRINCIPAL_PARAMconstant explaining that enabling this parameter silently disables JSR-250 annotations (@RolesAllowed,@PermitAll,@DenyAll)support/jaxrs/src/main/java/org/apache/shiro/web/jaxrs/SubjectPrincipalRequestFilter.java:
SHIRO_WEB_JAXRS_DISABLE_PRINCIPAL_PARAMconstant with the same clarificationWhy This Matters
disable-principalremoves this protection layerTesting
mvn javadoc:javadocto verify formattingRelated Issue
fixes #2763
Checklist:
[DOC] - ...fixes #2763added to link to related issuemvn verifyrequired per contribution guidelinesThank you to the Apache Shiro Security Team for the transparent triage process and for guiding this documentation improvement.