Claus Ibsen created CAMEL-27068:
-----------------------------------
Summary: camel-main - the security policy reports the camel-main
options flagged insecure:dev from the metadata
Key: CAMEL-27068
URL: https://issues.apache.org/jira/browse/CAMEL-27068
Project: Camel
Issue Type: Improvement
Components: camel-main
Reporter: Claus Ibsen
Fix For: 4.24.0
The security policy ({{camel.security.insecureDevPolicy}}, which fails startup
with {{camel.main.profile=prod}}) does not report four camel-main options that
are flagged {{security=insecure:dev}} in the camel-main configuration metadata:
* {{camel.management.mcpEnabled}}
* {{camel.management.openapiUiEnabled}}
* {{camel.server.jwtAllowMissingIssuerAndAudience}}
* {{camel.management.jwtAllowMissingIssuerAndAudience}}
The camel-main options that are reported ({{devConsoleEnabled}},
{{uploadEnabled}}, {{downloadEnabled}}, {{sendEnabled}}) come from the
hand-kept {{EXTRA_SECURITY_OPTIONS}} list in {{UpdateSensitizeHelper}}
(camel-package-maven-plugin). The generator reads the security category of
component, data format and language options, but not of the camel-main options.
Suggested change: let {{UpdateSensitizeHelper}} collect the camel-main options
that have a {{security}} category from
{{camel-main-configuration-metadata.json}}, matched by their whole key (like
{{camel.chaos.rules}} in {{SecurityUtils.SECURITY_KEYS}}), so new options are
picked up without editing the list by hand. Needs an upgrade-guide entry, as a
prod-profile app that enables one of these options would then fail at startup.
Found by Croway in the review of https://github.com/apache/camel/pull/30204,
which reads the camel-main metadata for the secret options only.
_Claude Code on behalf of davsclaus_
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)