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

   [CAMEL-27224](https://issues.apache.org/jira/browse/CAMEL-27224)
   
   The trap consumer of camel-snmp now receives only the traps of the 
`snmpVersion` of its endpoint.
   
   ## What changed
   - **`snmpVersion` 0 (default) or 1:** SNMPv1 and SNMPv2c traps, as before. 
SNMPv3 traps are dropped. v1 and v2c stay together, because most devices send 
v2c to consumers that keep the default 0.
   - **`snmpVersion` 3:** only SNMPv3 traps of the user in `securityName`, 
checked with the authentication and privacy options of the endpoint, and with 
at least `securityLevel`.
     - The consumer builds its own message dispatcher with an `MPv3` and a USM 
that holds only that user.
     - It no longer relies on the JVM-wide `SecurityModels` of SNMP4J, so it 
works without an SNMPv3 producer in the same JVM.
     - SNMPv1/v2c traps are dropped.
   - Dropped traps are logged at DEBUG.
   - `SnmpHelper.createUSM(endpoint)` builds the USM without registering it 
globally. The producer side is unchanged.
   - Docs: a paragraph and an SNMPv3 example on the component page.
   
   ## Upgrade note
   New 4.24 entry: "camel-snmp - the trap consumer receives only the traps of 
its snmpVersion".
   
   ## Tests
   - New `TrapConsumerVersionTest` (9 tests) sends traps from a plain SNMP4J 
sender on localhost. It covers:
     - v3 received;
     - v1/v2c dropped by a v3 consumer;
     - a lower security level, another user and another passphrase dropped;
     - a v2c consumer receiving v1/v2c and dropping v3.
   - 7 of them fail without the change.
   - The module's 43 tests pass.
   
   _Claude Code on behalf of Claus Ibsen_
   
   🤖 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