Fix #738: add an SNMP source Kamelet - #2990
Merged
Merged
Conversation
Polls SNMP capable devices or receives SNMP traps via camel-snmp, whose own description -- "Receive traps and poll SNMP capable devices" -- is consumer shaped, so a source is the natural first Kamelet for it. A producer Kamelet for GET/SET could follow if there is demand. The type property selects POLL, GET_NEXT or TRAP; oids lists what to query on the first two. SNMP v3 security is exposed in full (securityName, securityLevel, authentication and privacy protocol/passphrase); both passphrases are format: password and carry the credentials descriptor. snmpCommunity keeps the component default of "public" but is marked with the credentials descriptor and its description says plainly that v1/v2c send it in clear text, with a pointer to v3 in the Kamelet description. Making the community a non-default would not add security -- it is sent unencrypted either way -- so the honest move is to label it rather than pretend otherwise. Marked Preview, no Citrus test: exercising this needs an SNMP agent and there is none in the project's test toolchain. Verified against the real camel-snmp component with `camel run`: the route starts clean -- "Routes startup (total:1 started:1 kamelets:1)" -- with all thirteen parameters bound, rather than failing on an unknown option. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
oscerd
added a commit
to oscerd/camel-kamelets-validator
that referenced
this pull request
Sep 1, 2026
KameletsCatalogTest.testGetKameletsByNamespace asserts an exact count for the AWS namespace, so adding aws-bedrock-agent-sink takes it from 31 to 32 and the catalog module's tests fail. Verified against the tree rather than just following the CI delta: 31 kamelets carry kamelet.namespace "AWS" on main, 32 with this branch. Only the AWS namespace is count-asserted, which is why the SMPP and SNMP Kamelets added in apache#2988, apache#2989 and apache#2990 did not trip it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
oscerd
added a commit
that referenced
this pull request
Sep 3, 2026
* Fix #1938: add an AWS Bedrock Agent sink Kamelet The catalog already covers aws-bedrock (aws-bedrock-text-sink) and aws-bedrock-agent-runtime (aws-bedrock-agent-runtime-sink). The aws-bedrock-agent component had no Kamelet, which is the gap this closes: managing the data source ingestion jobs of a knowledge base via startIngestionJob, listIngestionJobs and getIngestionJob. BedrockAgentProducer.determineOperation reads CamelAwsBedrockAgentOperation from the message before falling back to the endpoint, and knowledgeBaseId and dataSourceId are header-overridable the same way. A sink that pins those three as properties therefore has to strip the family, or an inbound header could redirect the call to a different knowledge base or a different operation. Same shape as the aws-ec2-sink strip. CamelAwsBedrockAgentIngestionJobId is excluded from the strip: it is the one input the Kamelet deliberately takes from the message, since getIngestionJob has to name a job. Marked Preview, no Citrus test: exercising this needs a real Bedrock knowledge base and there is no emulator for it in the project's toolchain. Verified with `camel run` against the real component -- the route starts with every parameter bound -- and the strip verified with the terminal endpoint swapped for a log: in: Operation=listIngestionJobs, KnowledgeBaseId=attacker-kb, DataSourceId=attacker-ds, IngestionJobId=job-42, keepMe=yes out: CamelAwsBedrockAgentIngestionJobId=job-42, keepMe=yes Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * Fix #1938: update the AWS namespace count in KameletsCatalogTest KameletsCatalogTest.testGetKameletsByNamespace asserts an exact count for the AWS namespace, so adding aws-bedrock-agent-sink takes it from 31 to 32 and the catalog module's tests fail. Verified against the tree rather than just following the CI delta: 31 kamelets carry kamelet.namespace "AWS" on main, 32 with this branch. Only the AWS namespace is count-asserted, which is why the SMPP and SNMP Kamelets added in #2988, #2989 and #2990 did not trip it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.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.
Fixes #738.
The issue asks for "a camel-snmp kamelet" without saying which shape. The component's own description — "Receive traps and poll SNMP capable devices" — is consumer shaped, and polling/trap-listening is what SNMP is overwhelmingly used for in an integration, so this adds a source. A producer Kamelet for GET/SET could follow if there is demand; happy to take that as a follow-up rather than guess at it now.
Properties
Only
hostis required.typeselects the mode;oidslists what to query.hostport161typePOLLPOLL/GET_NEXT/TRAPoidsPOLLandGET_NEXT, unused forTRAPprotocoludpudp/tcpdelay60000TRAPsnmpVersion00=v1,1=v2c,3=v3snmpCommunitypublictreeListfalseGET_NEXTonlysecurityNamesecurityLevel31=noAuthNoPriv,2=authNoPriv,3=authPrivauthenticationProtocolMD5/SHA1authenticationPassphraseformat: password+ credentialsprivacyProtocolDES,AES128privacyPassphraseformat: password+ credentialsOn the community string
snmpCommunitykeeps the component default ofpublic. I want to be explicit about that choice rather than let it pass unnoticed, given the catalog's secure-by-default direction.SNMP v1 and v2c send the community string in clear text on the wire. Changing the Kamelet default from
publicto something else would not make it secret — it would just make the Kamelet fail against devices left on the default, while still transmitting the value unencrypted. The real mitigation is v3 with authPriv, so the Kamelet:snmpCommunitywith the credentials descriptor so tooling groups it with secrets,snmpVersion: 3in the Kamelet description itself.securityLeveldefaults to3(authPriv), the strongest of the three, so an operator who moves to v3 gets authentication and privacy unless they deliberately weaken it.Happy to be overruled if reviewers would rather have no default community at all.
Verification
script/validatorreports no errors,script/generatoradds thenav.adocentry,mvn clean installpasses from the repository root.Parameter binding checked against the real component with
camel runrather than by eye — unlike a network-dependent sink this one starts cleanly with no device present:All thirteen parameters bound with no
unknown optionerror; the consumer then polls a device that is not there, which is the expected quiet outcome.No Citrus test — exercising this needs a real SNMP agent and the project's Citrus/Testcontainers toolchain has none, so it is marked
Previewand does not carrykamelet.verified=true.The icon is a plain SVG glyph authored for this Kamelet, consistent with how other protocol-based Kamelets (
ssh-sink,ftp-sink) use generic glyphs rather than a vendor logo.Claude Code on behalf of Andrea Cosentino