CAMEL-23250: Security policy enforcement with profile-aware defaults#22269
Open
CAMEL-23250: Security policy enforcement with profile-aware defaults#22269
Conversation
Contributor
|
🌟 Thank you for your contribution to the Apache Camel project! 🌟 🐫 Apache Camel Committers, please review the following items:
|
5 tasks
oscerd
approved these changes
Mar 27, 2026
7d1ca40 to
d186bfb
Compare
|
acc9a34 to
7ce2eb7
Compare
b6ed4ab to
7ce2eb7
Compare
5fe8a95 to
6c604f4
Compare
6c604f4 to
8fbeb08
Compare
Introduce a security policy framework that enables runtime enforcement of security-sensitive configuration options. This adds: - New `security` attribute on @metadata, @UriParam, @UriPath annotations with categories: "secret", "insecure:ssl", "insecure:serialization", "insecure:dev" - SecurityConfigurationProperties for policy configuration (camel.security.insecureSslPolicy, etc.) - SecurityUtils/SecurityViolation in camel-util for violation scanning - SecurityPolicyResult in camel-main for startup enforcement - SecurityPolicyHealthCheck for runtime monitoring - Updated all metadata generators (EndpointSchemaGeneratorMojo, PrepareCamelMainMojo, GeneratePojoBeanMojo, SchemaGeneratorMojo, PackageLanguageMojo) to emit the security field in JSON metadata - Bidirectional derivation: secret=true implies security="secret" and security="secret" implies secret=true - Profile-aware defaults: dev/test profiles default to "warn", prod defaults to "fail" for insecure options - Design proposal document (proposals/security.adoc) - Deprecate `secret` attribute in favor of `security = "secret"` Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add `security = "insecure:ssl"` to trustAllCertificates and similar SSL-bypass parameters across all affected components (HTTP, Netty, Undertow, Vert.x HTTP, Mina, Paho, SJMS, JMS, ActiveMQ, Splunk, etc.). Add `security = "insecure:serialization"` to allowJavaSerializedObject and similar deserialization-bypass parameters. Migrate `@UriParam(secret = true)` to `@UriParam(security = "secret")` and `@Metadata(secret = true)` to `@Metadata(security = "secret")` on all component and core configuration fields touched by this PR, removing usage of the now-deprecated `secret` attribute. Add `security = "insecure:dev"` to devConsoleEnabled, downloadEnabled, sendEnabled, uploadEnabled on main configuration properties. Add `insecureValue` attribute where applicable to flag the specific value that triggers a security concern (e.g., insecureValue = "true" for boolean flags). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Regenerate all component JSON metadata, catalog files, and camel-main configuration metadata to include the new security field in component/bean/language JSON schemas. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
8fbeb08 to
6da130a
Compare
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.



CAMEL-23250
Summary
Add a security policy enforcement framework that enables runtime detection and enforcement of security-sensitive configuration options in Apache Camel.
Commit structure (for easier review)
security = "insecure:ssl"/"insecure:serialization"/"insecure:dev"/"secret"annotations on affected components; migratessecret = truetosecurity = "secret"on all touched filesKey changes
securityattribute on@Metadata,@UriParam,@UriPathwith categories:"secret","insecure:ssl","insecure:serialization","insecure:dev"insecureValueattribute to flag the specific value that triggers a security concernSecurityConfigurationPropertiesfor policy configuration (camel.security.insecureSslPolicy, etc.)SecurityUtils/SecurityViolationin camel-util for violation scanningSecurityPolicyResultin camel-main for startup enforcement (fail/warn/allow)SecurityPolicyHealthCheckfor runtime monitoring via health APIwarn, prod defaults tofailsecret=trueimpliessecurity="secret"and vice versasecurityfield in JSON schemassecretattribute in favor ofsecurity = "secret"@UriParam(secret = true)/@Metadata(secret = true)usages in touched files tosecurity = "secret"BaseOptionModel.setSecurity()validates categories at build time — typos likesecurity = "sercet"cause an immediateIllegalArgumentExceptionwith a clear message listing valid valuesproposals/security.adocTest plan
MainSecurityPolicyTest— parameterized tests for policy enforcement (fail/warn/allow) across profilesMainSecurityPolicyHealthCheckTest— health check reports violationsSecurityUtilsTest— violation scanning logicsecurityfield🤖 Generated with Claude Code
Claude Code on behalf of Guillaume Nodet