davsclaus opened a new pull request, #29808:
URL: https://github.com/apache/camel/pull/29808

   # Description
   
   [CAMEL-26916](https://issues.apache.org/jira/browse/CAMEL-26916). Stacked on 
#29807 (retarget to `main` once that is merged); this PR brings back the pulsar 
finding #29807 had to drop.
   
   The YAML validator treats a body type that depends on an option the route 
does not set, but that can be set on the component, as not known, and says 
nothing. For the insecure opt-ins that made it go quiet where it should not:
   
   - pulsar since #29753 (CAMEL-26012): `producerIn` depends on 
`allowJavaSerializedObject`
   - jms, activemq, activemq6, amqp: `transferExchange`, `objectMessageEnabled`
   - sjms, sjms2: `objectMessageEnabled`
   - mina: `transferExchange`, `objectCodecPattern`; netty: `transferExchange`
   - keycloak, spiffe: `allowOperationHeader`
   
   An option with `security` `insecure:ssl`, `insecure:serialization` or 
`insecure:dev` is off unless turned on, and one turned on for the whole 
component is reported by the [security 
policy](https://camel.apache.org/manual/security-policy.html) at startup 
(`camel.security.insecureSerializationPolicy`, the `prod` profile). So 
`CatalogBodyTypes` no longer counts such a component option as "can be set 
elsewhere": it keeps its default unless the route sets it.
   
   Keeping these options on the component, rather than making them 
endpoint-only, is deliberate: the startup policy checks the configured 
properties (`camel.component.<name>.<option>`), not endpoint URIs.
   
   ## Changes
   
   - `CatalogBodyTypes.componentSide()`: insecure component options are not in 
the set of options that may be set elsewhere.
   - `BodyTypeResolver`: the `hidden` parameter documents it.
   - `body-types.adoc` (Reading a side for a step): the rule says so.
   - `TextBodyFlowTest`: `testTheBodyOfMessaging` expects the pulsar finding 
again (as on main before #29807); new `testTheBodyOfAnInsecureOptIn`: a route 
that leaves `allowJavaSerializedObject` alone is reported, one that turns it on 
is not.
   
   ## Testing
   
   - `camel-yaml-dsl-validator`: 369 tests, all pass (run against a catalog 
with the current component JSON).
   - Without the `CatalogBodyTypes` change, `testTheBodyOfMessaging` fails as 
on CI (expected 4, was 3), and so does the new test.
   
   _Claude Code on behalf of davsclaus_
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to