CAMEL-23592: camel-shiro - align Exchange header constant names with Camel naming convention#23506
CAMEL-23592: camel-shiro - align Exchange header constant names with Camel naming convention#23506oscerd wants to merge 1 commit into
Conversation
…Camel naming convention Renames the three Exchange header string values in ShiroSecurityConstants that drive Shiro authentication (SHIRO_SECURITY_TOKEN, SHIRO_SECURITY_USERNAME, SHIRO_SECURITY_PASSWORD) to CamelShiroSecurity<Name>, following the convention used across the rest of the Camel component catalog and matching the pattern established in CAMEL-23526 (camel-cxf), CAMEL-23522 (camel-mail), CAMEL-23461 (camel-aws-bedrock), CAMEL-23532 (camel-vertx-websocket / camel-atmosphere-websocket / camel-iggy), and CAMEL-23576 (camel-jira). - SHIRO_SECURITY_TOKEN: "SHIRO_SECURITY_TOKEN" -> "CamelShiroSecurityToken" - SHIRO_SECURITY_USERNAME: "SHIRO_SECURITY_USERNAME" -> "CamelShiroSecurityUsername" - SHIRO_SECURITY_PASSWORD: "SHIRO_SECURITY_PASSWORD" -> "CamelShiroSecurityPassword" These headers carry credentials and a serialized authentication token, so filtering them at transport boundaries by default is particularly important. The Java field names are unchanged so routes referencing the constants symbolically continue to work; routes using the literal string values must be updated (documented in the 4.21 upgrade guide). No tests reference the literal values, and the shiro adoc documentation references the constants symbolically. Tracker: CAMEL-23577 Reported by Claude Code on behalf of Andrea Cosentino Signed-off-by: Andrea Cosentino <ancosen@gmail.com>
|
🌟 Thank you for your contribution to the Apache Camel project! 🌟 🐫 Apache Camel Committers, please review the following items:
|
|
🧪 CI tested the following changed modules:
All tested modules (8 modules)
|
gnodet
left a comment
There was a problem hiding this comment.
Good change. The three Shiro constants (SHIRO_SECURITY_TOKEN, SHIRO_SECURITY_USERNAME, SHIRO_SECURITY_PASSWORD) carried credential-related data without the Camel prefix, meaning they weren't filtered by HeaderFilterStrategy at transport boundaries. Renaming to CamelShiroSecurity* is particularly important here since these headers carry authentication tokens and credentials. Upgrade guide entry is thorough.
LGTM.
Claude Code on behalf of Guillaume Nodet
Summary
Renames the three Exchange header string values in
ShiroSecurityConstantsthat drive Shiro authentication (
SHIRO_SECURITY_TOKEN,SHIRO_SECURITY_USERNAME,SHIRO_SECURITY_PASSWORD) toCamelShiroSecurity<Name>, following the convention used across the rest ofthe Camel component catalog and matching the pattern established in
CAMEL-23526 (
camel-cxf), CAMEL-23522 (camel-mail), CAMEL-23461(
camel-aws-bedrock), CAMEL-23532 (camel-vertx-websocket/camel-atmosphere-websocket/camel-iggy), and CAMEL-23576 (camel-jira).ShiroSecurityConstants.SHIRO_SECURITY_TOKENSHIRO_SECURITY_TOKENCamelShiroSecurityTokenShiroSecurityConstants.SHIRO_SECURITY_USERNAMESHIRO_SECURITY_USERNAMECamelShiroSecurityUsernameShiroSecurityConstants.SHIRO_SECURITY_PASSWORDSHIRO_SECURITY_PASSWORDCamelShiroSecurityPasswordThese headers carry credentials and a serialized authentication token, so
filtering them at transport boundaries by default is particularly important
(Cluster A — auth/credential/signing exposure — in the CAMEL-23577 epic).
The Java field names are unchanged so routes referencing the constants
symbolically continue to work; routes using the literal string values must
be updated (documented in the 4.21 upgrade guide).
Generated artifacts
ShiroSecurityConstantshas no@Metadataannotations (this is aSecurityPolicy-style component, not a producer/consumer-style componentthat surfaces headers in the catalog), so no catalog JSON or endpoint DSL
regeneration is needed. The diff is exactly the constants file + the upgrade
guide entry.
Backports
camel-shiroexists oncamel-4.18.xandcamel-4.14.xwith the samelegacy values — backports apply and will be filed as follow-up PRs.
Test plan
mvn testincomponents/camel-shiro— 21 tests passadoc (all references are symbolic via
ShiroSecurityConstants.XXX)=== camel-shiro - potential breaking change(consistent with the suffix convention adopted by camel-jira /camel-jgroups / camel-dns / camel-milo and the in-flight CAMEL-23577: docs - add "potential breaking change" suffix to 9 header-rename sub-task entries in the 4.21 upgrade guide #23505 suffix
follow-up for the other 9 CAMEL-23577 sub-task entries)
Tracker: CAMEL-23577
Reported by Claude Code on behalf of Andrea Cosentino