CAMEL-23579: camel-pdf - align Exchange header constant names with Camel naming convention#23437
Merged
Merged
Conversation
davsclaus
approved these changes
May 21, 2026
Contributor
|
🌟 Thank you for your contribution to the Apache Camel project! 🌟 🐫 Apache Camel Committers, please review the following items:
|
Contributor
|
🧪 CI tested the following changed modules:
All tested modules (10 modules)
|
gnodet
approved these changes
May 22, 2026
Contributor
gnodet
left a comment
There was a problem hiding this comment.
Looks good — all 4 header values correctly renamed to CamelPdf* PascalCase convention. Upgrade guide entry is thorough with old-to-new mapping and Endpoint DSL accessor renames.
Minor: the PR title says CAMEL-23579 but the body says "Tracker: CAMEL-23577" — might want to align those.
Claude Code on behalf of Guillaume Nodet
…mel naming convention Renames the Exchange header string values in PdfHeaderConstants from non-Camel prefixed values (protection-policy, pdf-document, decryption-material, files-to-merge) to CamelPdf<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). The Java field names (PROTECTION_POLICY_HEADER_NAME, PDF_DOCUMENT_HEADER_NAME, DECRYPTION_MATERIAL_HEADER_NAME, FILES_TO_MERGE_HEADER_NAME) 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). The generated Endpoint DSL header accessors on PdfHeaderNameBuilder have been renamed accordingly: - protectionPolicy() -> pdfProtectionPolicy() - decryptionMaterial() -> pdfDecryptionMaterial() - filesToMerge() -> pdfFilesToMerge() - pdfDocument() unchanged in name but returns "CamelPdfDocument" All existing tests use symbolic constant references and continue to pass without changes. Tracker: CAMEL-23577 Reported by Claude Code on behalf of Andrea Cosentino Signed-off-by: Andrea Cosentino <ancosen@gmail.com>
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.
Summary
Renames the Exchange header string values in
PdfHeaderConstantsfrom non-Camelprefixed values (
protection-policy,pdf-document,decryption-material,files-to-merge) toCamelPdf<Name>, following the convention used acrossthe 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).The Java field names (
PROTECTION_POLICY_HEADER_NAME,PDF_DOCUMENT_HEADER_NAME,DECRYPTION_MATERIAL_HEADER_NAME,FILES_TO_MERGE_HEADER_NAME) are unchangedso routes referencing the constants symbolically continue to work; routes
using the literal string values must be updated (documented in the 4.21
upgrade guide).
Why it matters
The previous header names (
protection-policy,pdf-document,decryption-material,files-to-merge) sit outside theCamel*namespacethat
DefaultHeaderFilterStrategyfilters at transport boundaries. Thepdf-documentanddecryption-materialheaders carry security-sensitivePDFBox objects (
PDDocument,DecryptionMaterial);protection-policycarries the encryption settings used when writing the PDF. Untrusted producers
upstream of a PDF processing route could previously inject these headers
without them being filtered, allowing an attacker who controls a transport
hop (HTTP, JMS, etc.) to swap in their own
PDDocumentor bypass encryptionexpectations. Aligning the values with the
Camel*namespace lets thedefault header filter do its job.
Generated artifacts
components/camel-pdf/.../pdf.json(component catalog)catalog/camel-catalog/.../components/pdf.json(catalog mirror)dsl/camel-endpointdsl/.../PdfEndpointBuilderFactory.java— DSL headeraccessors renamed (
protectionPolicy()→pdfProtectionPolicy(),decryptionMaterial()→pdfDecryptionMaterial(),filesToMerge()→pdfFilesToMerge();pdfDocument()keeps its namebut returns the new value
CamelPdfDocument)Backports
camel-pdfexists oncamel-4.18.x(identical source) andcamel-4.14.x(same constant values, slightly older Javadoc style). Backports are
straightforward and will be filed as follow-up PRs.
Test plan
mvn testincomponents/camel-pdf— 10 tests passcamel-endpointdslfrom a cleanstate, verify only
camel-pdfregen artifacts appear ingit status=== camel-pdfTracker: CAMEL-23577
Reported by Claude Code on behalf of Andrea Cosentino