You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2026/01/28 14:47:44 UTC
(camel) 01/01: CAMEL-22919 - Camel-AWS: Add a Security Hub component
This is an automated email from the ASF dual-hosted git repository.
acosentino pushed a commit to branch 22919
in repository https://gitbox.apache.org/repos/asf/camel.git
commit d4258f048168dab7f10311f78e9cf508d30fd1c4
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Jan 28 15:39:52 2026 +0100
CAMEL-22919 - Camel-AWS: Add a Security Hub component
Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
bom/camel-bom/pom.xml | 5 +
catalog/camel-allcomponents/pom.xml | 5 +
.../org/apache/camel/catalog/components.properties | 1 +
.../camel/catalog/components/aws-security-hub.json | 94 +++
.../camel-aws/camel-aws-security-hub/pom.xml | 83 ++
.../SecurityHubComponentConfigurer.java | 180 +++++
.../securityhub/SecurityHubEndpointConfigurer.java | 152 ++++
.../securityhub/SecurityHubEndpointUriFactory.java | 92 +++
.../aws/securityhub/aws-security-hub.json | 94 +++
.../services/org/apache/camel/component.properties | 7 +
.../org/apache/camel/component/aws-security-hub | 2 +
.../camel/configurer/aws-security-hub-component | 2 +
.../camel/configurer/aws-security-hub-endpoint | 2 +
.../camel/urifactory/aws-security-hub-endpoint | 2 +
.../src/main/docs/aws-security-hub-component.adoc | 204 +++++
.../aws/securityhub/SecurityHubComponent.java | 76 ++
.../aws/securityhub/SecurityHubConfiguration.java | 270 +++++++
.../aws/securityhub/SecurityHubConstants.java | 100 +++
.../aws/securityhub/SecurityHubEndpoint.java | 136 ++++
.../aws/securityhub/SecurityHubOperations.java | 58 ++
.../aws/securityhub/SecurityHubProducer.java | 425 ++++++++++
.../SecurityHubProducerHealthCheck.java | 69 ++
.../client/SecurityHubClientFactory.java | 42 +
.../SecurityHubComponentConfigurationTest.java | 111 +++
.../integration/SecurityHubManualIT.java | 247 ++++++
.../src/test/resources/log4j2.properties | 28 +
components/camel-aws/pom.xml | 1 +
.../camel-ocsf/src/main/docs/ocsf-dataformat.adoc | 82 ++
.../org/apache/camel/main/components.properties | 1 +
.../ROOT/examples/json/aws-security-hub.json | 1 +
docs/components/modules/ROOT/nav.adoc | 1 +
.../ROOT/pages/aws-security-hub-component.adoc | 1 +
.../component/ComponentsBuilderFactory.java | 13 +
.../dsl/AwsSecurityHubComponentBuilderFactory.java | 488 ++++++++++++
.../builder/endpoint/EndpointBuilderFactory.java | 1 +
.../camel/builder/endpoint/EndpointBuilders.java | 1 +
.../builder/endpoint/StaticEndpointBuilders.java | 40 +
.../dsl/SecurityHubEndpointBuilderFactory.java | 865 +++++++++++++++++++++
.../camel-component-known-dependencies.properties | 1 +
parent/pom.xml | 5 +
.../apache/camel/maven/packaging/MojoHelper.java | 2 +-
41 files changed, 3989 insertions(+), 1 deletion(-)
diff --git a/bom/camel-bom/pom.xml b/bom/camel-bom/pom.xml
index ffba83efc3de..307160da9d7d 100644
--- a/bom/camel-bom/pom.xml
+++ b/bom/camel-bom/pom.xml
@@ -156,6 +156,11 @@
<artifactId>camel-aws-secrets-manager</artifactId>
<version>4.18.0-SNAPSHOT</version>
</dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-aws-security-hub</artifactId>
+ <version>4.18.0-SNAPSHOT</version>
+ </dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-aws-xray</artifactId>
diff --git a/catalog/camel-allcomponents/pom.xml b/catalog/camel-allcomponents/pom.xml
index 3becdd4fdf14..a38ae7a63f68 100644
--- a/catalog/camel-allcomponents/pom.xml
+++ b/catalog/camel-allcomponents/pom.xml
@@ -157,6 +157,11 @@
<artifactId>camel-aws-secrets-manager</artifactId>
<version>${project.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-aws-security-hub</artifactId>
+ <version>${project.version}</version>
+ </dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-aws-xray</artifactId>
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components.properties b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components.properties
index 966a0e414a19..30850e26c29d 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components.properties
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components.properties
@@ -13,6 +13,7 @@ aws-bedrock-agent-runtime
aws-cloudtrail
aws-config
aws-secrets-manager
+aws-security-hub
aws2-athena
aws2-cw
aws2-ddb
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/aws-security-hub.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/aws-security-hub.json
new file mode 100644
index 000000000000..549c95c699ad
--- /dev/null
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/aws-security-hub.json
@@ -0,0 +1,94 @@
+{
+ "component": {
+ "kind": "component",
+ "name": "aws-security-hub",
+ "title": "AWS Security Hub",
+ "description": "Manage and interact with AWS Security Hub for security findings.",
+ "deprecated": false,
+ "firstVersion": "4.18.0",
+ "label": "cloud,security",
+ "javaType": "org.apache.camel.component.aws.securityhub.SecurityHubComponent",
+ "supportLevel": "Preview",
+ "groupId": "org.apache.camel",
+ "artifactId": "camel-aws-security-hub",
+ "version": "4.18.0-SNAPSHOT",
+ "scheme": "aws-security-hub",
+ "extendsScheme": "",
+ "syntax": "aws-security-hub:label",
+ "async": false,
+ "api": false,
+ "consumerOnly": false,
+ "producerOnly": true,
+ "lenientProperties": false,
+ "browsable": false,
+ "remote": true
+ },
+ "componentProperties": {
+ "configuration": { "index": 0, "kind": "property", "displayName": "Configuration", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "org.apache.camel.component.aws.securityhub.SecurityHubConfiguration", "deprecated": false, "autowired": false, "secret": false, "description": "Component configuration" },
+ "lazyStartProducer": { "index": 1, "kind": "property", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail [...]
+ "operation": { "index": 2, "kind": "property", "displayName": "Operation", "group": "producer", "label": "", "required": true, "type": "enum", "javaType": "org.apache.camel.component.aws.securityhub.SecurityHubOperations", "enum": [ "batchImportFindings", "getFindings", "batchUpdateFindings", "getFindingHistory", "describeHub", "listEnabledProductsForImport", "getFindingAggregator" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "defaultValue": "ba [...]
+ "overrideEndpoint": { "index": 3, "kind": "property", "displayName": "Override Endpoint", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws.securityhub.SecurityHubConfiguration", "configurationField": "configuration", "description": "Set the need for overriding the endpoint. This option needs to be used in [...]
+ "pojoRequest": { "index": 4, "kind": "property", "displayName": "Pojo Request", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws.securityhub.SecurityHubConfiguration", "configurationField": "configuration", "description": "If we want to use a POJO request as body or not" },
+ "region": { "index": 5, "kind": "property", "displayName": "Region", "group": "producer", "label": "", "required": false, "type": "enum", "javaType": "java.lang.String", "enum": [ "ap-south-2", "ap-south-1", "eu-south-1", "eu-south-2", "us-gov-east-1", "me-central-1", "il-central-1", "ca-central-1", "eu-central-1", "us-iso-west-1", "eu-central-2", "eu-isoe-west-1", "us-west-1", "us-west-2", "af-south-1", "eu-north-1", "eu-west-3", "eu-west-2", "eu-west-1", "ap-northeast-3", "ap-north [...]
+ "uriEndpointOverride": { "index": 6, "kind": "property", "displayName": "Uri Endpoint Override", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws.securityhub.SecurityHubConfiguration", "configurationField": "configuration", "description": "Set the overriding uri endpoint. This option needs to be used in combination with [...]
+ "autowiredEnabled": { "index": 7, "kind": "property", "displayName": "Autowired Enabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching t [...]
+ "securityHubClient": { "index": 8, "kind": "property", "displayName": "Security Hub Client", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "software.amazon.awssdk.services.securityhub.SecurityHubClient", "deprecated": false, "deprecationNote": "", "autowired": true, "secret": false, "configurationClass": "org.apache.camel.component.aws.securityhub.SecurityHubConfiguration", "configurationField": "configuration", "description": "To use an e [...]
+ "healthCheckConsumerEnabled": { "index": 9, "kind": "property", "displayName": "Health Check Consumer Enabled", "group": "health", "label": "health", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Used for enabling or disabling all consumer based health checks from this component" },
+ "healthCheckProducerEnabled": { "index": 10, "kind": "property", "displayName": "Health Check Producer Enabled", "group": "health", "label": "health", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Used for enabling or disabling all producer based health checks from this component. Notice: Camel has by default disabled all producer based health-checks. You can turn on produce [...]
+ "proxyHost": { "index": 11, "kind": "property", "displayName": "Proxy Host", "group": "proxy", "label": "proxy", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws.securityhub.SecurityHubConfiguration", "configurationField": "configuration", "description": "To define a proxy host when instantiating the Security Hub client" },
+ "proxyPort": { "index": 12, "kind": "property", "displayName": "Proxy Port", "group": "proxy", "label": "proxy", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws.securityhub.SecurityHubConfiguration", "configurationField": "configuration", "description": "To define a proxy port when instantiating the Security Hub client" },
+ "proxyProtocol": { "index": 13, "kind": "property", "displayName": "Proxy Protocol", "group": "proxy", "label": "proxy", "required": false, "type": "enum", "javaType": "software.amazon.awssdk.core.Protocol", "enum": [ "HTTP", "HTTPS" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "HTTPS", "configurationClass": "org.apache.camel.component.aws.securityhub.SecurityHubConfiguration", "configurationField": "configuration", "description": "To define a proxy pr [...]
+ "accessKey": { "index": 14, "kind": "property", "displayName": "Access Key", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.aws.securityhub.SecurityHubConfiguration", "configurationField": "configuration", "description": "Amazon AWS Access Key" },
+ "profileCredentialsName": { "index": 15, "kind": "property", "displayName": "Profile Credentials Name", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws.securityhub.SecurityHubConfiguration", "configurationField": "configuration", "description": "If using a profile credentials provider this parameter will set the [...]
+ "secretKey": { "index": 16, "kind": "property", "displayName": "Secret Key", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.aws.securityhub.SecurityHubConfiguration", "configurationField": "configuration", "description": "Amazon AWS Secret Key" },
+ "sessionToken": { "index": 17, "kind": "property", "displayName": "Session Token", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.aws.securityhub.SecurityHubConfiguration", "configurationField": "configuration", "description": "Amazon AWS Session Token used when the user needs to assume an IAM role" },
+ "trustAllCertificates": { "index": 18, "kind": "property", "displayName": "Trust All Certificates", "group": "security", "label": "security", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws.securityhub.SecurityHubConfiguration", "configurationField": "configuration", "description": "If we want to trust all certificates in case of overridi [...]
+ "useDefaultCredentialsProvider": { "index": 19, "kind": "property", "displayName": "Use Default Credentials Provider", "group": "security", "label": "security", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws.securityhub.SecurityHubConfiguration", "configurationField": "configuration", "description": "Set whether the Security Hub client s [...]
+ "useProfileCredentialsProvider": { "index": 20, "kind": "property", "displayName": "Use Profile Credentials Provider", "group": "security", "label": "security", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws.securityhub.SecurityHubConfiguration", "configurationField": "configuration", "description": "Set whether the Security Hub client s [...]
+ "useSessionCredentials": { "index": 21, "kind": "property", "displayName": "Use Session Credentials", "group": "security", "label": "security", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws.securityhub.SecurityHubConfiguration", "configurationField": "configuration", "description": "Set whether the Security Hub client should expect to u [...]
+ },
+ "headers": {
+ "CamelAwsSecurityHubOperation": { "index": 0, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The operation we want to perform", "constantName": "org.apache.camel.component.aws.securityhub.SecurityHubConstants#OPERATION" },
+ "CamelAwsSecurityHubFindings": { "index": 1, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "List<AwsSecurityFinding>", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The list of findings to import", "constantName": "org.apache.camel.component.aws.securityhub.SecurityHubConstants#FINDINGS" },
+ "CamelAwsSecurityHubFindingIdentifiers": { "index": 2, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "List<AwsSecurityFindingIdentifier>", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The finding identifiers for batch update", "constantName": "org.apache.camel.component.aws.securityhub.SecurityHubConstants#FINDING_IDENTIFIERS" },
+ "CamelAwsSecurityHubFilters": { "index": 3, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "AwsSecurityFindingFilters", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The filters to apply when retrieving findings", "constantName": "org.apache.camel.component.aws.securityhub.SecurityHubConstants#FILTERS" },
+ "CamelAwsSecurityHubNote": { "index": 4, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "NoteUpdate", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The note to add to findings during update", "constantName": "org.apache.camel.component.aws.securityhub.SecurityHubConstants#NOTE" },
+ "CamelAwsSecurityHubSeverity": { "index": 5, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "SeverityUpdate", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The severity to set on findings during update", "constantName": "org.apache.camel.component.aws.securityhub.SecurityHubConstants#SEVERITY" },
+ "CamelAwsSecurityHubWorkflow": { "index": 6, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "WorkflowUpdate", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The workflow status to set on findings", "constantName": "org.apache.camel.component.aws.securityhub.SecurityHubConstants#WORKFLOW" },
+ "CamelAwsSecurityHubVerificationState": { "index": 7, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The verification state to set on findings", "constantName": "org.apache.camel.component.aws.securityhub.SecurityHubConstants#VERIFICATION_STATE" },
+ "CamelAwsSecurityHubConfidence": { "index": 8, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Integer", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The confidence level to set on findings", "constantName": "org.apache.camel.component.aws.securityhub.SecurityHubConstants#CONFIDENCE" },
+ "CamelAwsSecurityHubCriticality": { "index": 9, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Integer", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The criticality level to set on findings", "constantName": "org.apache.camel.component.aws.securityhub.SecurityHubConstants#CRITICALITY" },
+ "CamelAwsSecurityHubUserDefinedFields": { "index": 10, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Map<String, String>", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "User-defined fields to add to findings", "constantName": "org.apache.camel.component.aws.securityhub.SecurityHubConstants#USER_DEFINED_FIELDS" },
+ "CamelAwsSecurityHubRelatedFindings": { "index": 11, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "List<RelatedFinding>", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Related findings to associate", "constantName": "org.apache.camel.component.aws.securityhub.SecurityHubConstants#RELATED_FINDINGS" },
+ "CamelAwsSecurityHubTypes": { "index": 12, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "List<String>", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The types to assign to findings", "constantName": "org.apache.camel.component.aws.securityhub.SecurityHubConstants#TYPES" },
+ "CamelAwsSecurityHubNextToken": { "index": 13, "kind": "header", "displayName": "", "group": "getFindings listEnabledProductsForImport getFindingHistory", "label": "getFindings listEnabledProductsForImport getFindingHistory", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The token for the next set of results", "constantName": "org.apache.camel.component.aws.securityhub.SecurityHubConstants#NEX [...]
+ "CamelAwsSecurityHubMaxResults": { "index": 14, "kind": "header", "displayName": "", "group": "getFindings", "label": "getFindings", "required": false, "javaType": "Integer", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The maximum number of results to return", "constantName": "org.apache.camel.component.aws.securityhub.SecurityHubConstants#MAX_RESULTS" },
+ "CamelAwsSecurityHubFailedCount": { "index": 15, "kind": "header", "displayName": "", "group": "batchImportFindings", "label": "batchImportFindings", "required": false, "javaType": "Integer", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The count of findings that failed to import", "constantName": "org.apache.camel.component.aws.securityhub.SecurityHubConstants#FAILED_COUNT" },
+ "CamelAwsSecurityHubSuccessCount": { "index": 16, "kind": "header", "displayName": "", "group": "batchImportFindings", "label": "batchImportFindings", "required": false, "javaType": "Integer", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The count of findings that were successfully imported", "constantName": "org.apache.camel.component.aws.securityhub.SecurityHubConstants#SUCCESS_COUNT" },
+ "CamelAwsSecurityHubUnprocessedFindings": { "index": 17, "kind": "header", "displayName": "", "group": "batchUpdateFindings", "label": "batchUpdateFindings", "required": false, "javaType": "List<BatchUpdateFindingsUnprocessedFinding>", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The list of findings that were not updated", "constantName": "org.apache.camel.component.aws.securityhub.SecurityHubConstants#UNPROCESSED_FINDINGS" },
+ "CamelAwsSecurityHubProcessedFindings": { "index": 18, "kind": "header", "displayName": "", "group": "batchUpdateFindings", "label": "batchUpdateFindings", "required": false, "javaType": "List<AwsSecurityFindingIdentifier>", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The list of findings that were updated successfully", "constantName": "org.apache.camel.component.aws.securityhub.SecurityHubConstants#PROCESSED_FINDINGS" },
+ "CamelAwsSecurityHubFindingId": { "index": 19, "kind": "header", "displayName": "", "group": "getFindingHistory", "label": "getFindingHistory", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The finding ID to get history for", "constantName": "org.apache.camel.component.aws.securityhub.SecurityHubConstants#FINDING_ID" },
+ "CamelAwsSecurityHubProductArn": { "index": 20, "kind": "header", "displayName": "", "group": "getFindingHistory", "label": "getFindingHistory", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The product ARN for the finding", "constantName": "org.apache.camel.component.aws.securityhub.SecurityHubConstants#PRODUCT_ARN" }
+ },
+ "properties": {
+ "label": { "index": 0, "kind": "path", "displayName": "Label", "group": "producer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Logical name" },
+ "operation": { "index": 1, "kind": "parameter", "displayName": "Operation", "group": "producer", "label": "", "required": true, "type": "enum", "javaType": "org.apache.camel.component.aws.securityhub.SecurityHubOperations", "enum": [ "batchImportFindings", "getFindings", "batchUpdateFindings", "getFindingHistory", "describeHub", "listEnabledProductsForImport", "getFindingAggregator" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "defaultValue": "b [...]
+ "overrideEndpoint": { "index": 2, "kind": "parameter", "displayName": "Override Endpoint", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws.securityhub.SecurityHubConfiguration", "configurationField": "configuration", "description": "Set the need for overriding the endpoint. This option needs to be used in [...]
+ "pojoRequest": { "index": 3, "kind": "parameter", "displayName": "Pojo Request", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws.securityhub.SecurityHubConfiguration", "configurationField": "configuration", "description": "If we want to use a POJO request as body or not" },
+ "region": { "index": 4, "kind": "parameter", "displayName": "Region", "group": "producer", "label": "", "required": false, "type": "enum", "javaType": "java.lang.String", "enum": [ "ap-south-2", "ap-south-1", "eu-south-1", "eu-south-2", "us-gov-east-1", "me-central-1", "il-central-1", "ca-central-1", "eu-central-1", "us-iso-west-1", "eu-central-2", "eu-isoe-west-1", "us-west-1", "us-west-2", "af-south-1", "eu-north-1", "eu-west-3", "eu-west-2", "eu-west-1", "ap-northeast-3", "ap-nort [...]
+ "uriEndpointOverride": { "index": 5, "kind": "parameter", "displayName": "Uri Endpoint Override", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws.securityhub.SecurityHubConfiguration", "configurationField": "configuration", "description": "Set the overriding uri endpoint. This option needs to be used in combination with [...]
+ "lazyStartProducer": { "index": 6, "kind": "parameter", "displayName": "Lazy Start Producer", "group": "producer (advanced)", "label": "producer,advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a produc [...]
+ "securityHubClient": { "index": 7, "kind": "parameter", "displayName": "Security Hub Client", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "software.amazon.awssdk.services.securityhub.SecurityHubClient", "deprecated": false, "deprecationNote": "", "autowired": true, "secret": false, "configurationClass": "org.apache.camel.component.aws.securityhub.SecurityHubConfiguration", "configurationField": "configuration", "description": "To use an [...]
+ "proxyHost": { "index": 8, "kind": "parameter", "displayName": "Proxy Host", "group": "proxy", "label": "proxy", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws.securityhub.SecurityHubConfiguration", "configurationField": "configuration", "description": "To define a proxy host when instantiating the Security Hub client" },
+ "proxyPort": { "index": 9, "kind": "parameter", "displayName": "Proxy Port", "group": "proxy", "label": "proxy", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws.securityhub.SecurityHubConfiguration", "configurationField": "configuration", "description": "To define a proxy port when instantiating the Security Hub client" },
+ "proxyProtocol": { "index": 10, "kind": "parameter", "displayName": "Proxy Protocol", "group": "proxy", "label": "proxy", "required": false, "type": "enum", "javaType": "software.amazon.awssdk.core.Protocol", "enum": [ "HTTP", "HTTPS" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "HTTPS", "configurationClass": "org.apache.camel.component.aws.securityhub.SecurityHubConfiguration", "configurationField": "configuration", "description": "To define a proxy p [...]
+ "accessKey": { "index": 11, "kind": "parameter", "displayName": "Access Key", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.aws.securityhub.SecurityHubConfiguration", "configurationField": "configuration", "description": "Amazon AWS Access Key" },
+ "profileCredentialsName": { "index": 12, "kind": "parameter", "displayName": "Profile Credentials Name", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws.securityhub.SecurityHubConfiguration", "configurationField": "configuration", "description": "If using a profile credentials provider this parameter will set th [...]
+ "secretKey": { "index": 13, "kind": "parameter", "displayName": "Secret Key", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.aws.securityhub.SecurityHubConfiguration", "configurationField": "configuration", "description": "Amazon AWS Secret Key" },
+ "sessionToken": { "index": 14, "kind": "parameter", "displayName": "Session Token", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.aws.securityhub.SecurityHubConfiguration", "configurationField": "configuration", "description": "Amazon AWS Session Token used when the user needs to assume an IAM role" },
+ "trustAllCertificates": { "index": 15, "kind": "parameter", "displayName": "Trust All Certificates", "group": "security", "label": "security", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws.securityhub.SecurityHubConfiguration", "configurationField": "configuration", "description": "If we want to trust all certificates in case of overrid [...]
+ "useDefaultCredentialsProvider": { "index": 16, "kind": "parameter", "displayName": "Use Default Credentials Provider", "group": "security", "label": "security", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws.securityhub.SecurityHubConfiguration", "configurationField": "configuration", "description": "Set whether the Security Hub client [...]
+ "useProfileCredentialsProvider": { "index": 17, "kind": "parameter", "displayName": "Use Profile Credentials Provider", "group": "security", "label": "security", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws.securityhub.SecurityHubConfiguration", "configurationField": "configuration", "description": "Set whether the Security Hub client [...]
+ "useSessionCredentials": { "index": 18, "kind": "parameter", "displayName": "Use Session Credentials", "group": "security", "label": "security", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws.securityhub.SecurityHubConfiguration", "configurationField": "configuration", "description": "Set whether the Security Hub client should expect to [...]
+ }
+}
diff --git a/components/camel-aws/camel-aws-security-hub/pom.xml b/components/camel-aws/camel-aws-security-hub/pom.xml
new file mode 100644
index 000000000000..547c3d8486ec
--- /dev/null
+++ b/components/camel-aws/camel-aws-security-hub/pom.xml
@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-aws-parent</artifactId>
+ <version>4.18.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>camel-aws-security-hub</artifactId>
+ <packaging>jar</packaging>
+
+ <name>Camel :: AWS Security Hub</name>
+ <description>Interact with AWS Security Hub service for managing security findings</description>
+
+ <properties>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-support</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-aws-common</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>software.amazon.awssdk</groupId>
+ <artifactId>securityhub</artifactId>
+ <version>${aws-java-sdk2-version}</version>
+ </dependency>
+ <dependency>
+ <groupId>software.amazon.awssdk</groupId>
+ <artifactId>sts</artifactId>
+ <version>${aws-java-sdk2-version}</version>
+ </dependency>
+ <dependency>
+ <groupId>software.amazon.awssdk</groupId>
+ <artifactId>apache-client</artifactId>
+ <version>${aws-java-sdk2-version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-health</artifactId>
+ </dependency>
+
+ <!-- for testing -->
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-test-spring-junit5</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <!-- test infra -->
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-test-infra-aws-v2</artifactId>
+ <version>${project.version}</version>
+ <type>test-jar</type>
+ <scope>test</scope>
+ </dependency>
+
+ </dependencies>
+</project>
diff --git a/components/camel-aws/camel-aws-security-hub/src/generated/java/org/apache/camel/component/aws/securityhub/SecurityHubComponentConfigurer.java b/components/camel-aws/camel-aws-security-hub/src/generated/java/org/apache/camel/component/aws/securityhub/SecurityHubComponentConfigurer.java
new file mode 100644
index 000000000000..d52a6805eebc
--- /dev/null
+++ b/components/camel-aws/camel-aws-security-hub/src/generated/java/org/apache/camel/component/aws/securityhub/SecurityHubComponentConfigurer.java
@@ -0,0 +1,180 @@
+/* Generated by camel build tools - do NOT edit this file! */
+package org.apache.camel.component.aws.securityhub;
+
+import javax.annotation.processing.Generated;
+import java.util.Map;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.spi.ExtendedPropertyConfigurerGetter;
+import org.apache.camel.spi.PropertyConfigurerGetter;
+import org.apache.camel.spi.ConfigurerStrategy;
+import org.apache.camel.spi.GeneratedPropertyConfigurer;
+import org.apache.camel.util.CaseInsensitiveMap;
+import org.apache.camel.support.component.PropertyConfigurerSupport;
+
+/**
+ * Generated by camel build tools - do NOT edit this file!
+ */
+@Generated("org.apache.camel.maven.packaging.EndpointSchemaGeneratorMojo")
+@SuppressWarnings("unchecked")
+public class SecurityHubComponentConfigurer extends PropertyConfigurerSupport implements GeneratedPropertyConfigurer, PropertyConfigurerGetter {
+
+ private org.apache.camel.component.aws.securityhub.SecurityHubConfiguration getOrCreateConfiguration(SecurityHubComponent target) {
+ if (target.getConfiguration() == null) {
+ target.setConfiguration(new org.apache.camel.component.aws.securityhub.SecurityHubConfiguration());
+ }
+ return target.getConfiguration();
+ }
+
+ @Override
+ public boolean configure(CamelContext camelContext, Object obj, String name, Object value, boolean ignoreCase) {
+ SecurityHubComponent target = (SecurityHubComponent) obj;
+ switch (ignoreCase ? name.toLowerCase() : name) {
+ case "accesskey":
+ case "accessKey": getOrCreateConfiguration(target).setAccessKey(property(camelContext, java.lang.String.class, value)); return true;
+ case "autowiredenabled":
+ case "autowiredEnabled": target.setAutowiredEnabled(property(camelContext, boolean.class, value)); return true;
+ case "configuration": target.setConfiguration(property(camelContext, org.apache.camel.component.aws.securityhub.SecurityHubConfiguration.class, value)); return true;
+ case "healthcheckconsumerenabled":
+ case "healthCheckConsumerEnabled": target.setHealthCheckConsumerEnabled(property(camelContext, boolean.class, value)); return true;
+ case "healthcheckproducerenabled":
+ case "healthCheckProducerEnabled": target.setHealthCheckProducerEnabled(property(camelContext, boolean.class, value)); return true;
+ case "lazystartproducer":
+ case "lazyStartProducer": target.setLazyStartProducer(property(camelContext, boolean.class, value)); return true;
+ case "operation": getOrCreateConfiguration(target).setOperation(property(camelContext, org.apache.camel.component.aws.securityhub.SecurityHubOperations.class, value)); return true;
+ case "overrideendpoint":
+ case "overrideEndpoint": getOrCreateConfiguration(target).setOverrideEndpoint(property(camelContext, boolean.class, value)); return true;
+ case "pojorequest":
+ case "pojoRequest": getOrCreateConfiguration(target).setPojoRequest(property(camelContext, boolean.class, value)); return true;
+ case "profilecredentialsname":
+ case "profileCredentialsName": getOrCreateConfiguration(target).setProfileCredentialsName(property(camelContext, java.lang.String.class, value)); return true;
+ case "proxyhost":
+ case "proxyHost": getOrCreateConfiguration(target).setProxyHost(property(camelContext, java.lang.String.class, value)); return true;
+ case "proxyport":
+ case "proxyPort": getOrCreateConfiguration(target).setProxyPort(property(camelContext, java.lang.Integer.class, value)); return true;
+ case "proxyprotocol":
+ case "proxyProtocol": getOrCreateConfiguration(target).setProxyProtocol(property(camelContext, software.amazon.awssdk.core.Protocol.class, value)); return true;
+ case "region": getOrCreateConfiguration(target).setRegion(property(camelContext, java.lang.String.class, value)); return true;
+ case "secretkey":
+ case "secretKey": getOrCreateConfiguration(target).setSecretKey(property(camelContext, java.lang.String.class, value)); return true;
+ case "securityhubclient":
+ case "securityHubClient": getOrCreateConfiguration(target).setSecurityHubClient(property(camelContext, software.amazon.awssdk.services.securityhub.SecurityHubClient.class, value)); return true;
+ case "sessiontoken":
+ case "sessionToken": getOrCreateConfiguration(target).setSessionToken(property(camelContext, java.lang.String.class, value)); return true;
+ case "trustallcertificates":
+ case "trustAllCertificates": getOrCreateConfiguration(target).setTrustAllCertificates(property(camelContext, boolean.class, value)); return true;
+ case "uriendpointoverride":
+ case "uriEndpointOverride": getOrCreateConfiguration(target).setUriEndpointOverride(property(camelContext, java.lang.String.class, value)); return true;
+ case "usedefaultcredentialsprovider":
+ case "useDefaultCredentialsProvider": getOrCreateConfiguration(target).setUseDefaultCredentialsProvider(property(camelContext, boolean.class, value)); return true;
+ case "useprofilecredentialsprovider":
+ case "useProfileCredentialsProvider": getOrCreateConfiguration(target).setUseProfileCredentialsProvider(property(camelContext, boolean.class, value)); return true;
+ case "usesessioncredentials":
+ case "useSessionCredentials": getOrCreateConfiguration(target).setUseSessionCredentials(property(camelContext, boolean.class, value)); return true;
+ default: return false;
+ }
+ }
+
+ @Override
+ public String[] getAutowiredNames() {
+ return new String[]{"securityHubClient"};
+ }
+
+ @Override
+ public Class<?> getOptionType(String name, boolean ignoreCase) {
+ switch (ignoreCase ? name.toLowerCase() : name) {
+ case "accesskey":
+ case "accessKey": return java.lang.String.class;
+ case "autowiredenabled":
+ case "autowiredEnabled": return boolean.class;
+ case "configuration": return org.apache.camel.component.aws.securityhub.SecurityHubConfiguration.class;
+ case "healthcheckconsumerenabled":
+ case "healthCheckConsumerEnabled": return boolean.class;
+ case "healthcheckproducerenabled":
+ case "healthCheckProducerEnabled": return boolean.class;
+ case "lazystartproducer":
+ case "lazyStartProducer": return boolean.class;
+ case "operation": return org.apache.camel.component.aws.securityhub.SecurityHubOperations.class;
+ case "overrideendpoint":
+ case "overrideEndpoint": return boolean.class;
+ case "pojorequest":
+ case "pojoRequest": return boolean.class;
+ case "profilecredentialsname":
+ case "profileCredentialsName": return java.lang.String.class;
+ case "proxyhost":
+ case "proxyHost": return java.lang.String.class;
+ case "proxyport":
+ case "proxyPort": return java.lang.Integer.class;
+ case "proxyprotocol":
+ case "proxyProtocol": return software.amazon.awssdk.core.Protocol.class;
+ case "region": return java.lang.String.class;
+ case "secretkey":
+ case "secretKey": return java.lang.String.class;
+ case "securityhubclient":
+ case "securityHubClient": return software.amazon.awssdk.services.securityhub.SecurityHubClient.class;
+ case "sessiontoken":
+ case "sessionToken": return java.lang.String.class;
+ case "trustallcertificates":
+ case "trustAllCertificates": return boolean.class;
+ case "uriendpointoverride":
+ case "uriEndpointOverride": return java.lang.String.class;
+ case "usedefaultcredentialsprovider":
+ case "useDefaultCredentialsProvider": return boolean.class;
+ case "useprofilecredentialsprovider":
+ case "useProfileCredentialsProvider": return boolean.class;
+ case "usesessioncredentials":
+ case "useSessionCredentials": return boolean.class;
+ default: return null;
+ }
+ }
+
+ @Override
+ public Object getOptionValue(Object obj, String name, boolean ignoreCase) {
+ SecurityHubComponent target = (SecurityHubComponent) obj;
+ switch (ignoreCase ? name.toLowerCase() : name) {
+ case "accesskey":
+ case "accessKey": return getOrCreateConfiguration(target).getAccessKey();
+ case "autowiredenabled":
+ case "autowiredEnabled": return target.isAutowiredEnabled();
+ case "configuration": return target.getConfiguration();
+ case "healthcheckconsumerenabled":
+ case "healthCheckConsumerEnabled": return target.isHealthCheckConsumerEnabled();
+ case "healthcheckproducerenabled":
+ case "healthCheckProducerEnabled": return target.isHealthCheckProducerEnabled();
+ case "lazystartproducer":
+ case "lazyStartProducer": return target.isLazyStartProducer();
+ case "operation": return getOrCreateConfiguration(target).getOperation();
+ case "overrideendpoint":
+ case "overrideEndpoint": return getOrCreateConfiguration(target).isOverrideEndpoint();
+ case "pojorequest":
+ case "pojoRequest": return getOrCreateConfiguration(target).isPojoRequest();
+ case "profilecredentialsname":
+ case "profileCredentialsName": return getOrCreateConfiguration(target).getProfileCredentialsName();
+ case "proxyhost":
+ case "proxyHost": return getOrCreateConfiguration(target).getProxyHost();
+ case "proxyport":
+ case "proxyPort": return getOrCreateConfiguration(target).getProxyPort();
+ case "proxyprotocol":
+ case "proxyProtocol": return getOrCreateConfiguration(target).getProxyProtocol();
+ case "region": return getOrCreateConfiguration(target).getRegion();
+ case "secretkey":
+ case "secretKey": return getOrCreateConfiguration(target).getSecretKey();
+ case "securityhubclient":
+ case "securityHubClient": return getOrCreateConfiguration(target).getSecurityHubClient();
+ case "sessiontoken":
+ case "sessionToken": return getOrCreateConfiguration(target).getSessionToken();
+ case "trustallcertificates":
+ case "trustAllCertificates": return getOrCreateConfiguration(target).isTrustAllCertificates();
+ case "uriendpointoverride":
+ case "uriEndpointOverride": return getOrCreateConfiguration(target).getUriEndpointOverride();
+ case "usedefaultcredentialsprovider":
+ case "useDefaultCredentialsProvider": return getOrCreateConfiguration(target).isUseDefaultCredentialsProvider();
+ case "useprofilecredentialsprovider":
+ case "useProfileCredentialsProvider": return getOrCreateConfiguration(target).isUseProfileCredentialsProvider();
+ case "usesessioncredentials":
+ case "useSessionCredentials": return getOrCreateConfiguration(target).isUseSessionCredentials();
+ default: return null;
+ }
+ }
+}
+
diff --git a/components/camel-aws/camel-aws-security-hub/src/generated/java/org/apache/camel/component/aws/securityhub/SecurityHubEndpointConfigurer.java b/components/camel-aws/camel-aws-security-hub/src/generated/java/org/apache/camel/component/aws/securityhub/SecurityHubEndpointConfigurer.java
new file mode 100644
index 000000000000..6b87c7413462
--- /dev/null
+++ b/components/camel-aws/camel-aws-security-hub/src/generated/java/org/apache/camel/component/aws/securityhub/SecurityHubEndpointConfigurer.java
@@ -0,0 +1,152 @@
+/* Generated by camel build tools - do NOT edit this file! */
+package org.apache.camel.component.aws.securityhub;
+
+import javax.annotation.processing.Generated;
+import java.util.Map;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.spi.ExtendedPropertyConfigurerGetter;
+import org.apache.camel.spi.PropertyConfigurerGetter;
+import org.apache.camel.spi.ConfigurerStrategy;
+import org.apache.camel.spi.GeneratedPropertyConfigurer;
+import org.apache.camel.util.CaseInsensitiveMap;
+import org.apache.camel.support.component.PropertyConfigurerSupport;
+
+/**
+ * Generated by camel build tools - do NOT edit this file!
+ */
+@Generated("org.apache.camel.maven.packaging.EndpointSchemaGeneratorMojo")
+@SuppressWarnings("unchecked")
+public class SecurityHubEndpointConfigurer extends PropertyConfigurerSupport implements GeneratedPropertyConfigurer, PropertyConfigurerGetter {
+
+ @Override
+ public boolean configure(CamelContext camelContext, Object obj, String name, Object value, boolean ignoreCase) {
+ SecurityHubEndpoint target = (SecurityHubEndpoint) obj;
+ switch (ignoreCase ? name.toLowerCase() : name) {
+ case "accesskey":
+ case "accessKey": target.getConfiguration().setAccessKey(property(camelContext, java.lang.String.class, value)); return true;
+ case "lazystartproducer":
+ case "lazyStartProducer": target.setLazyStartProducer(property(camelContext, boolean.class, value)); return true;
+ case "operation": target.getConfiguration().setOperation(property(camelContext, org.apache.camel.component.aws.securityhub.SecurityHubOperations.class, value)); return true;
+ case "overrideendpoint":
+ case "overrideEndpoint": target.getConfiguration().setOverrideEndpoint(property(camelContext, boolean.class, value)); return true;
+ case "pojorequest":
+ case "pojoRequest": target.getConfiguration().setPojoRequest(property(camelContext, boolean.class, value)); return true;
+ case "profilecredentialsname":
+ case "profileCredentialsName": target.getConfiguration().setProfileCredentialsName(property(camelContext, java.lang.String.class, value)); return true;
+ case "proxyhost":
+ case "proxyHost": target.getConfiguration().setProxyHost(property(camelContext, java.lang.String.class, value)); return true;
+ case "proxyport":
+ case "proxyPort": target.getConfiguration().setProxyPort(property(camelContext, java.lang.Integer.class, value)); return true;
+ case "proxyprotocol":
+ case "proxyProtocol": target.getConfiguration().setProxyProtocol(property(camelContext, software.amazon.awssdk.core.Protocol.class, value)); return true;
+ case "region": target.getConfiguration().setRegion(property(camelContext, java.lang.String.class, value)); return true;
+ case "secretkey":
+ case "secretKey": target.getConfiguration().setSecretKey(property(camelContext, java.lang.String.class, value)); return true;
+ case "securityhubclient":
+ case "securityHubClient": target.getConfiguration().setSecurityHubClient(property(camelContext, software.amazon.awssdk.services.securityhub.SecurityHubClient.class, value)); return true;
+ case "sessiontoken":
+ case "sessionToken": target.getConfiguration().setSessionToken(property(camelContext, java.lang.String.class, value)); return true;
+ case "trustallcertificates":
+ case "trustAllCertificates": target.getConfiguration().setTrustAllCertificates(property(camelContext, boolean.class, value)); return true;
+ case "uriendpointoverride":
+ case "uriEndpointOverride": target.getConfiguration().setUriEndpointOverride(property(camelContext, java.lang.String.class, value)); return true;
+ case "usedefaultcredentialsprovider":
+ case "useDefaultCredentialsProvider": target.getConfiguration().setUseDefaultCredentialsProvider(property(camelContext, boolean.class, value)); return true;
+ case "useprofilecredentialsprovider":
+ case "useProfileCredentialsProvider": target.getConfiguration().setUseProfileCredentialsProvider(property(camelContext, boolean.class, value)); return true;
+ case "usesessioncredentials":
+ case "useSessionCredentials": target.getConfiguration().setUseSessionCredentials(property(camelContext, boolean.class, value)); return true;
+ default: return false;
+ }
+ }
+
+ @Override
+ public String[] getAutowiredNames() {
+ return new String[]{"securityHubClient"};
+ }
+
+ @Override
+ public Class<?> getOptionType(String name, boolean ignoreCase) {
+ switch (ignoreCase ? name.toLowerCase() : name) {
+ case "accesskey":
+ case "accessKey": return java.lang.String.class;
+ case "lazystartproducer":
+ case "lazyStartProducer": return boolean.class;
+ case "operation": return org.apache.camel.component.aws.securityhub.SecurityHubOperations.class;
+ case "overrideendpoint":
+ case "overrideEndpoint": return boolean.class;
+ case "pojorequest":
+ case "pojoRequest": return boolean.class;
+ case "profilecredentialsname":
+ case "profileCredentialsName": return java.lang.String.class;
+ case "proxyhost":
+ case "proxyHost": return java.lang.String.class;
+ case "proxyport":
+ case "proxyPort": return java.lang.Integer.class;
+ case "proxyprotocol":
+ case "proxyProtocol": return software.amazon.awssdk.core.Protocol.class;
+ case "region": return java.lang.String.class;
+ case "secretkey":
+ case "secretKey": return java.lang.String.class;
+ case "securityhubclient":
+ case "securityHubClient": return software.amazon.awssdk.services.securityhub.SecurityHubClient.class;
+ case "sessiontoken":
+ case "sessionToken": return java.lang.String.class;
+ case "trustallcertificates":
+ case "trustAllCertificates": return boolean.class;
+ case "uriendpointoverride":
+ case "uriEndpointOverride": return java.lang.String.class;
+ case "usedefaultcredentialsprovider":
+ case "useDefaultCredentialsProvider": return boolean.class;
+ case "useprofilecredentialsprovider":
+ case "useProfileCredentialsProvider": return boolean.class;
+ case "usesessioncredentials":
+ case "useSessionCredentials": return boolean.class;
+ default: return null;
+ }
+ }
+
+ @Override
+ public Object getOptionValue(Object obj, String name, boolean ignoreCase) {
+ SecurityHubEndpoint target = (SecurityHubEndpoint) obj;
+ switch (ignoreCase ? name.toLowerCase() : name) {
+ case "accesskey":
+ case "accessKey": return target.getConfiguration().getAccessKey();
+ case "lazystartproducer":
+ case "lazyStartProducer": return target.isLazyStartProducer();
+ case "operation": return target.getConfiguration().getOperation();
+ case "overrideendpoint":
+ case "overrideEndpoint": return target.getConfiguration().isOverrideEndpoint();
+ case "pojorequest":
+ case "pojoRequest": return target.getConfiguration().isPojoRequest();
+ case "profilecredentialsname":
+ case "profileCredentialsName": return target.getConfiguration().getProfileCredentialsName();
+ case "proxyhost":
+ case "proxyHost": return target.getConfiguration().getProxyHost();
+ case "proxyport":
+ case "proxyPort": return target.getConfiguration().getProxyPort();
+ case "proxyprotocol":
+ case "proxyProtocol": return target.getConfiguration().getProxyProtocol();
+ case "region": return target.getConfiguration().getRegion();
+ case "secretkey":
+ case "secretKey": return target.getConfiguration().getSecretKey();
+ case "securityhubclient":
+ case "securityHubClient": return target.getConfiguration().getSecurityHubClient();
+ case "sessiontoken":
+ case "sessionToken": return target.getConfiguration().getSessionToken();
+ case "trustallcertificates":
+ case "trustAllCertificates": return target.getConfiguration().isTrustAllCertificates();
+ case "uriendpointoverride":
+ case "uriEndpointOverride": return target.getConfiguration().getUriEndpointOverride();
+ case "usedefaultcredentialsprovider":
+ case "useDefaultCredentialsProvider": return target.getConfiguration().isUseDefaultCredentialsProvider();
+ case "useprofilecredentialsprovider":
+ case "useProfileCredentialsProvider": return target.getConfiguration().isUseProfileCredentialsProvider();
+ case "usesessioncredentials":
+ case "useSessionCredentials": return target.getConfiguration().isUseSessionCredentials();
+ default: return null;
+ }
+ }
+}
+
diff --git a/components/camel-aws/camel-aws-security-hub/src/generated/java/org/apache/camel/component/aws/securityhub/SecurityHubEndpointUriFactory.java b/components/camel-aws/camel-aws-security-hub/src/generated/java/org/apache/camel/component/aws/securityhub/SecurityHubEndpointUriFactory.java
new file mode 100644
index 000000000000..35ff0af65213
--- /dev/null
+++ b/components/camel-aws/camel-aws-security-hub/src/generated/java/org/apache/camel/component/aws/securityhub/SecurityHubEndpointUriFactory.java
@@ -0,0 +1,92 @@
+/* Generated by camel build tools - do NOT edit this file! */
+package org.apache.camel.component.aws.securityhub;
+
+import javax.annotation.processing.Generated;
+import java.net.URISyntaxException;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
+import org.apache.camel.spi.EndpointUriFactory;
+
+/**
+ * Generated by camel build tools - do NOT edit this file!
+ */
+@Generated("org.apache.camel.maven.packaging.GenerateEndpointUriFactoryMojo")
+public class SecurityHubEndpointUriFactory extends org.apache.camel.support.component.EndpointUriFactorySupport implements EndpointUriFactory {
+
+ private static final String BASE = ":label";
+
+ private static final Set<String> PROPERTY_NAMES;
+ private static final Set<String> SECRET_PROPERTY_NAMES;
+ private static final Map<String, String> MULTI_VALUE_PREFIXES;
+ static {
+ Set<String> props = new HashSet<>(19);
+ props.add("accessKey");
+ props.add("label");
+ props.add("lazyStartProducer");
+ props.add("operation");
+ props.add("overrideEndpoint");
+ props.add("pojoRequest");
+ props.add("profileCredentialsName");
+ props.add("proxyHost");
+ props.add("proxyPort");
+ props.add("proxyProtocol");
+ props.add("region");
+ props.add("secretKey");
+ props.add("securityHubClient");
+ props.add("sessionToken");
+ props.add("trustAllCertificates");
+ props.add("uriEndpointOverride");
+ props.add("useDefaultCredentialsProvider");
+ props.add("useProfileCredentialsProvider");
+ props.add("useSessionCredentials");
+ PROPERTY_NAMES = Collections.unmodifiableSet(props);
+ Set<String> secretProps = new HashSet<>(3);
+ secretProps.add("accessKey");
+ secretProps.add("secretKey");
+ secretProps.add("sessionToken");
+ SECRET_PROPERTY_NAMES = Collections.unmodifiableSet(secretProps);
+ MULTI_VALUE_PREFIXES = Collections.emptyMap();
+ }
+
+ @Override
+ public boolean isEnabled(String scheme) {
+ return "aws-security-hub".equals(scheme);
+ }
+
+ @Override
+ public String buildUri(String scheme, Map<String, Object> properties, boolean encode) throws URISyntaxException {
+ String syntax = scheme + BASE;
+ String uri = syntax;
+
+ Map<String, Object> copy = new HashMap<>(properties);
+
+ uri = buildPathParameter(syntax, uri, "label", null, true, copy);
+ uri = buildQueryParameters(uri, copy, encode);
+ return uri;
+ }
+
+ @Override
+ public Set<String> propertyNames() {
+ return PROPERTY_NAMES;
+ }
+
+ @Override
+ public Set<String> secretPropertyNames() {
+ return SECRET_PROPERTY_NAMES;
+ }
+
+ @Override
+ public Map<String, String> multiValuePrefixes() {
+ return MULTI_VALUE_PREFIXES;
+ }
+
+ @Override
+ public boolean isLenientProperties() {
+ return false;
+ }
+}
+
diff --git a/components/camel-aws/camel-aws-security-hub/src/generated/resources/META-INF/org/apache/camel/component/aws/securityhub/aws-security-hub.json b/components/camel-aws/camel-aws-security-hub/src/generated/resources/META-INF/org/apache/camel/component/aws/securityhub/aws-security-hub.json
new file mode 100644
index 000000000000..549c95c699ad
--- /dev/null
+++ b/components/camel-aws/camel-aws-security-hub/src/generated/resources/META-INF/org/apache/camel/component/aws/securityhub/aws-security-hub.json
@@ -0,0 +1,94 @@
+{
+ "component": {
+ "kind": "component",
+ "name": "aws-security-hub",
+ "title": "AWS Security Hub",
+ "description": "Manage and interact with AWS Security Hub for security findings.",
+ "deprecated": false,
+ "firstVersion": "4.18.0",
+ "label": "cloud,security",
+ "javaType": "org.apache.camel.component.aws.securityhub.SecurityHubComponent",
+ "supportLevel": "Preview",
+ "groupId": "org.apache.camel",
+ "artifactId": "camel-aws-security-hub",
+ "version": "4.18.0-SNAPSHOT",
+ "scheme": "aws-security-hub",
+ "extendsScheme": "",
+ "syntax": "aws-security-hub:label",
+ "async": false,
+ "api": false,
+ "consumerOnly": false,
+ "producerOnly": true,
+ "lenientProperties": false,
+ "browsable": false,
+ "remote": true
+ },
+ "componentProperties": {
+ "configuration": { "index": 0, "kind": "property", "displayName": "Configuration", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "org.apache.camel.component.aws.securityhub.SecurityHubConfiguration", "deprecated": false, "autowired": false, "secret": false, "description": "Component configuration" },
+ "lazyStartProducer": { "index": 1, "kind": "property", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail [...]
+ "operation": { "index": 2, "kind": "property", "displayName": "Operation", "group": "producer", "label": "", "required": true, "type": "enum", "javaType": "org.apache.camel.component.aws.securityhub.SecurityHubOperations", "enum": [ "batchImportFindings", "getFindings", "batchUpdateFindings", "getFindingHistory", "describeHub", "listEnabledProductsForImport", "getFindingAggregator" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "defaultValue": "ba [...]
+ "overrideEndpoint": { "index": 3, "kind": "property", "displayName": "Override Endpoint", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws.securityhub.SecurityHubConfiguration", "configurationField": "configuration", "description": "Set the need for overriding the endpoint. This option needs to be used in [...]
+ "pojoRequest": { "index": 4, "kind": "property", "displayName": "Pojo Request", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws.securityhub.SecurityHubConfiguration", "configurationField": "configuration", "description": "If we want to use a POJO request as body or not" },
+ "region": { "index": 5, "kind": "property", "displayName": "Region", "group": "producer", "label": "", "required": false, "type": "enum", "javaType": "java.lang.String", "enum": [ "ap-south-2", "ap-south-1", "eu-south-1", "eu-south-2", "us-gov-east-1", "me-central-1", "il-central-1", "ca-central-1", "eu-central-1", "us-iso-west-1", "eu-central-2", "eu-isoe-west-1", "us-west-1", "us-west-2", "af-south-1", "eu-north-1", "eu-west-3", "eu-west-2", "eu-west-1", "ap-northeast-3", "ap-north [...]
+ "uriEndpointOverride": { "index": 6, "kind": "property", "displayName": "Uri Endpoint Override", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws.securityhub.SecurityHubConfiguration", "configurationField": "configuration", "description": "Set the overriding uri endpoint. This option needs to be used in combination with [...]
+ "autowiredEnabled": { "index": 7, "kind": "property", "displayName": "Autowired Enabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching t [...]
+ "securityHubClient": { "index": 8, "kind": "property", "displayName": "Security Hub Client", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "software.amazon.awssdk.services.securityhub.SecurityHubClient", "deprecated": false, "deprecationNote": "", "autowired": true, "secret": false, "configurationClass": "org.apache.camel.component.aws.securityhub.SecurityHubConfiguration", "configurationField": "configuration", "description": "To use an e [...]
+ "healthCheckConsumerEnabled": { "index": 9, "kind": "property", "displayName": "Health Check Consumer Enabled", "group": "health", "label": "health", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Used for enabling or disabling all consumer based health checks from this component" },
+ "healthCheckProducerEnabled": { "index": 10, "kind": "property", "displayName": "Health Check Producer Enabled", "group": "health", "label": "health", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Used for enabling or disabling all producer based health checks from this component. Notice: Camel has by default disabled all producer based health-checks. You can turn on produce [...]
+ "proxyHost": { "index": 11, "kind": "property", "displayName": "Proxy Host", "group": "proxy", "label": "proxy", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws.securityhub.SecurityHubConfiguration", "configurationField": "configuration", "description": "To define a proxy host when instantiating the Security Hub client" },
+ "proxyPort": { "index": 12, "kind": "property", "displayName": "Proxy Port", "group": "proxy", "label": "proxy", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws.securityhub.SecurityHubConfiguration", "configurationField": "configuration", "description": "To define a proxy port when instantiating the Security Hub client" },
+ "proxyProtocol": { "index": 13, "kind": "property", "displayName": "Proxy Protocol", "group": "proxy", "label": "proxy", "required": false, "type": "enum", "javaType": "software.amazon.awssdk.core.Protocol", "enum": [ "HTTP", "HTTPS" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "HTTPS", "configurationClass": "org.apache.camel.component.aws.securityhub.SecurityHubConfiguration", "configurationField": "configuration", "description": "To define a proxy pr [...]
+ "accessKey": { "index": 14, "kind": "property", "displayName": "Access Key", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.aws.securityhub.SecurityHubConfiguration", "configurationField": "configuration", "description": "Amazon AWS Access Key" },
+ "profileCredentialsName": { "index": 15, "kind": "property", "displayName": "Profile Credentials Name", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws.securityhub.SecurityHubConfiguration", "configurationField": "configuration", "description": "If using a profile credentials provider this parameter will set the [...]
+ "secretKey": { "index": 16, "kind": "property", "displayName": "Secret Key", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.aws.securityhub.SecurityHubConfiguration", "configurationField": "configuration", "description": "Amazon AWS Secret Key" },
+ "sessionToken": { "index": 17, "kind": "property", "displayName": "Session Token", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.aws.securityhub.SecurityHubConfiguration", "configurationField": "configuration", "description": "Amazon AWS Session Token used when the user needs to assume an IAM role" },
+ "trustAllCertificates": { "index": 18, "kind": "property", "displayName": "Trust All Certificates", "group": "security", "label": "security", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws.securityhub.SecurityHubConfiguration", "configurationField": "configuration", "description": "If we want to trust all certificates in case of overridi [...]
+ "useDefaultCredentialsProvider": { "index": 19, "kind": "property", "displayName": "Use Default Credentials Provider", "group": "security", "label": "security", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws.securityhub.SecurityHubConfiguration", "configurationField": "configuration", "description": "Set whether the Security Hub client s [...]
+ "useProfileCredentialsProvider": { "index": 20, "kind": "property", "displayName": "Use Profile Credentials Provider", "group": "security", "label": "security", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws.securityhub.SecurityHubConfiguration", "configurationField": "configuration", "description": "Set whether the Security Hub client s [...]
+ "useSessionCredentials": { "index": 21, "kind": "property", "displayName": "Use Session Credentials", "group": "security", "label": "security", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws.securityhub.SecurityHubConfiguration", "configurationField": "configuration", "description": "Set whether the Security Hub client should expect to u [...]
+ },
+ "headers": {
+ "CamelAwsSecurityHubOperation": { "index": 0, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The operation we want to perform", "constantName": "org.apache.camel.component.aws.securityhub.SecurityHubConstants#OPERATION" },
+ "CamelAwsSecurityHubFindings": { "index": 1, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "List<AwsSecurityFinding>", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The list of findings to import", "constantName": "org.apache.camel.component.aws.securityhub.SecurityHubConstants#FINDINGS" },
+ "CamelAwsSecurityHubFindingIdentifiers": { "index": 2, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "List<AwsSecurityFindingIdentifier>", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The finding identifiers for batch update", "constantName": "org.apache.camel.component.aws.securityhub.SecurityHubConstants#FINDING_IDENTIFIERS" },
+ "CamelAwsSecurityHubFilters": { "index": 3, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "AwsSecurityFindingFilters", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The filters to apply when retrieving findings", "constantName": "org.apache.camel.component.aws.securityhub.SecurityHubConstants#FILTERS" },
+ "CamelAwsSecurityHubNote": { "index": 4, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "NoteUpdate", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The note to add to findings during update", "constantName": "org.apache.camel.component.aws.securityhub.SecurityHubConstants#NOTE" },
+ "CamelAwsSecurityHubSeverity": { "index": 5, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "SeverityUpdate", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The severity to set on findings during update", "constantName": "org.apache.camel.component.aws.securityhub.SecurityHubConstants#SEVERITY" },
+ "CamelAwsSecurityHubWorkflow": { "index": 6, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "WorkflowUpdate", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The workflow status to set on findings", "constantName": "org.apache.camel.component.aws.securityhub.SecurityHubConstants#WORKFLOW" },
+ "CamelAwsSecurityHubVerificationState": { "index": 7, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The verification state to set on findings", "constantName": "org.apache.camel.component.aws.securityhub.SecurityHubConstants#VERIFICATION_STATE" },
+ "CamelAwsSecurityHubConfidence": { "index": 8, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Integer", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The confidence level to set on findings", "constantName": "org.apache.camel.component.aws.securityhub.SecurityHubConstants#CONFIDENCE" },
+ "CamelAwsSecurityHubCriticality": { "index": 9, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Integer", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The criticality level to set on findings", "constantName": "org.apache.camel.component.aws.securityhub.SecurityHubConstants#CRITICALITY" },
+ "CamelAwsSecurityHubUserDefinedFields": { "index": 10, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Map<String, String>", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "User-defined fields to add to findings", "constantName": "org.apache.camel.component.aws.securityhub.SecurityHubConstants#USER_DEFINED_FIELDS" },
+ "CamelAwsSecurityHubRelatedFindings": { "index": 11, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "List<RelatedFinding>", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Related findings to associate", "constantName": "org.apache.camel.component.aws.securityhub.SecurityHubConstants#RELATED_FINDINGS" },
+ "CamelAwsSecurityHubTypes": { "index": 12, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "List<String>", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The types to assign to findings", "constantName": "org.apache.camel.component.aws.securityhub.SecurityHubConstants#TYPES" },
+ "CamelAwsSecurityHubNextToken": { "index": 13, "kind": "header", "displayName": "", "group": "getFindings listEnabledProductsForImport getFindingHistory", "label": "getFindings listEnabledProductsForImport getFindingHistory", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The token for the next set of results", "constantName": "org.apache.camel.component.aws.securityhub.SecurityHubConstants#NEX [...]
+ "CamelAwsSecurityHubMaxResults": { "index": 14, "kind": "header", "displayName": "", "group": "getFindings", "label": "getFindings", "required": false, "javaType": "Integer", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The maximum number of results to return", "constantName": "org.apache.camel.component.aws.securityhub.SecurityHubConstants#MAX_RESULTS" },
+ "CamelAwsSecurityHubFailedCount": { "index": 15, "kind": "header", "displayName": "", "group": "batchImportFindings", "label": "batchImportFindings", "required": false, "javaType": "Integer", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The count of findings that failed to import", "constantName": "org.apache.camel.component.aws.securityhub.SecurityHubConstants#FAILED_COUNT" },
+ "CamelAwsSecurityHubSuccessCount": { "index": 16, "kind": "header", "displayName": "", "group": "batchImportFindings", "label": "batchImportFindings", "required": false, "javaType": "Integer", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The count of findings that were successfully imported", "constantName": "org.apache.camel.component.aws.securityhub.SecurityHubConstants#SUCCESS_COUNT" },
+ "CamelAwsSecurityHubUnprocessedFindings": { "index": 17, "kind": "header", "displayName": "", "group": "batchUpdateFindings", "label": "batchUpdateFindings", "required": false, "javaType": "List<BatchUpdateFindingsUnprocessedFinding>", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The list of findings that were not updated", "constantName": "org.apache.camel.component.aws.securityhub.SecurityHubConstants#UNPROCESSED_FINDINGS" },
+ "CamelAwsSecurityHubProcessedFindings": { "index": 18, "kind": "header", "displayName": "", "group": "batchUpdateFindings", "label": "batchUpdateFindings", "required": false, "javaType": "List<AwsSecurityFindingIdentifier>", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The list of findings that were updated successfully", "constantName": "org.apache.camel.component.aws.securityhub.SecurityHubConstants#PROCESSED_FINDINGS" },
+ "CamelAwsSecurityHubFindingId": { "index": 19, "kind": "header", "displayName": "", "group": "getFindingHistory", "label": "getFindingHistory", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The finding ID to get history for", "constantName": "org.apache.camel.component.aws.securityhub.SecurityHubConstants#FINDING_ID" },
+ "CamelAwsSecurityHubProductArn": { "index": 20, "kind": "header", "displayName": "", "group": "getFindingHistory", "label": "getFindingHistory", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The product ARN for the finding", "constantName": "org.apache.camel.component.aws.securityhub.SecurityHubConstants#PRODUCT_ARN" }
+ },
+ "properties": {
+ "label": { "index": 0, "kind": "path", "displayName": "Label", "group": "producer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Logical name" },
+ "operation": { "index": 1, "kind": "parameter", "displayName": "Operation", "group": "producer", "label": "", "required": true, "type": "enum", "javaType": "org.apache.camel.component.aws.securityhub.SecurityHubOperations", "enum": [ "batchImportFindings", "getFindings", "batchUpdateFindings", "getFindingHistory", "describeHub", "listEnabledProductsForImport", "getFindingAggregator" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "defaultValue": "b [...]
+ "overrideEndpoint": { "index": 2, "kind": "parameter", "displayName": "Override Endpoint", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws.securityhub.SecurityHubConfiguration", "configurationField": "configuration", "description": "Set the need for overriding the endpoint. This option needs to be used in [...]
+ "pojoRequest": { "index": 3, "kind": "parameter", "displayName": "Pojo Request", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws.securityhub.SecurityHubConfiguration", "configurationField": "configuration", "description": "If we want to use a POJO request as body or not" },
+ "region": { "index": 4, "kind": "parameter", "displayName": "Region", "group": "producer", "label": "", "required": false, "type": "enum", "javaType": "java.lang.String", "enum": [ "ap-south-2", "ap-south-1", "eu-south-1", "eu-south-2", "us-gov-east-1", "me-central-1", "il-central-1", "ca-central-1", "eu-central-1", "us-iso-west-1", "eu-central-2", "eu-isoe-west-1", "us-west-1", "us-west-2", "af-south-1", "eu-north-1", "eu-west-3", "eu-west-2", "eu-west-1", "ap-northeast-3", "ap-nort [...]
+ "uriEndpointOverride": { "index": 5, "kind": "parameter", "displayName": "Uri Endpoint Override", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws.securityhub.SecurityHubConfiguration", "configurationField": "configuration", "description": "Set the overriding uri endpoint. This option needs to be used in combination with [...]
+ "lazyStartProducer": { "index": 6, "kind": "parameter", "displayName": "Lazy Start Producer", "group": "producer (advanced)", "label": "producer,advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a produc [...]
+ "securityHubClient": { "index": 7, "kind": "parameter", "displayName": "Security Hub Client", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "software.amazon.awssdk.services.securityhub.SecurityHubClient", "deprecated": false, "deprecationNote": "", "autowired": true, "secret": false, "configurationClass": "org.apache.camel.component.aws.securityhub.SecurityHubConfiguration", "configurationField": "configuration", "description": "To use an [...]
+ "proxyHost": { "index": 8, "kind": "parameter", "displayName": "Proxy Host", "group": "proxy", "label": "proxy", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws.securityhub.SecurityHubConfiguration", "configurationField": "configuration", "description": "To define a proxy host when instantiating the Security Hub client" },
+ "proxyPort": { "index": 9, "kind": "parameter", "displayName": "Proxy Port", "group": "proxy", "label": "proxy", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws.securityhub.SecurityHubConfiguration", "configurationField": "configuration", "description": "To define a proxy port when instantiating the Security Hub client" },
+ "proxyProtocol": { "index": 10, "kind": "parameter", "displayName": "Proxy Protocol", "group": "proxy", "label": "proxy", "required": false, "type": "enum", "javaType": "software.amazon.awssdk.core.Protocol", "enum": [ "HTTP", "HTTPS" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "HTTPS", "configurationClass": "org.apache.camel.component.aws.securityhub.SecurityHubConfiguration", "configurationField": "configuration", "description": "To define a proxy p [...]
+ "accessKey": { "index": 11, "kind": "parameter", "displayName": "Access Key", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.aws.securityhub.SecurityHubConfiguration", "configurationField": "configuration", "description": "Amazon AWS Access Key" },
+ "profileCredentialsName": { "index": 12, "kind": "parameter", "displayName": "Profile Credentials Name", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.aws.securityhub.SecurityHubConfiguration", "configurationField": "configuration", "description": "If using a profile credentials provider this parameter will set th [...]
+ "secretKey": { "index": 13, "kind": "parameter", "displayName": "Secret Key", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.aws.securityhub.SecurityHubConfiguration", "configurationField": "configuration", "description": "Amazon AWS Secret Key" },
+ "sessionToken": { "index": 14, "kind": "parameter", "displayName": "Session Token", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.aws.securityhub.SecurityHubConfiguration", "configurationField": "configuration", "description": "Amazon AWS Session Token used when the user needs to assume an IAM role" },
+ "trustAllCertificates": { "index": 15, "kind": "parameter", "displayName": "Trust All Certificates", "group": "security", "label": "security", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws.securityhub.SecurityHubConfiguration", "configurationField": "configuration", "description": "If we want to trust all certificates in case of overrid [...]
+ "useDefaultCredentialsProvider": { "index": 16, "kind": "parameter", "displayName": "Use Default Credentials Provider", "group": "security", "label": "security", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws.securityhub.SecurityHubConfiguration", "configurationField": "configuration", "description": "Set whether the Security Hub client [...]
+ "useProfileCredentialsProvider": { "index": 17, "kind": "parameter", "displayName": "Use Profile Credentials Provider", "group": "security", "label": "security", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws.securityhub.SecurityHubConfiguration", "configurationField": "configuration", "description": "Set whether the Security Hub client [...]
+ "useSessionCredentials": { "index": 18, "kind": "parameter", "displayName": "Use Session Credentials", "group": "security", "label": "security", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.aws.securityhub.SecurityHubConfiguration", "configurationField": "configuration", "description": "Set whether the Security Hub client should expect to [...]
+ }
+}
diff --git a/components/camel-aws/camel-aws-security-hub/src/generated/resources/META-INF/services/org/apache/camel/component.properties b/components/camel-aws/camel-aws-security-hub/src/generated/resources/META-INF/services/org/apache/camel/component.properties
new file mode 100644
index 000000000000..09f175c863a1
--- /dev/null
+++ b/components/camel-aws/camel-aws-security-hub/src/generated/resources/META-INF/services/org/apache/camel/component.properties
@@ -0,0 +1,7 @@
+# Generated by camel build tools - do NOT edit this file!
+components=aws-security-hub
+groupId=org.apache.camel
+artifactId=camel-aws-security-hub
+version=4.18.0-SNAPSHOT
+projectName=Camel :: AWS Security Hub
+projectDescription=Interact with AWS Security Hub service for managing security findings
diff --git a/components/camel-aws/camel-aws-security-hub/src/generated/resources/META-INF/services/org/apache/camel/component/aws-security-hub b/components/camel-aws/camel-aws-security-hub/src/generated/resources/META-INF/services/org/apache/camel/component/aws-security-hub
new file mode 100644
index 000000000000..321f81e1fe39
--- /dev/null
+++ b/components/camel-aws/camel-aws-security-hub/src/generated/resources/META-INF/services/org/apache/camel/component/aws-security-hub
@@ -0,0 +1,2 @@
+# Generated by camel build tools - do NOT edit this file!
+class=org.apache.camel.component.aws.securityhub.SecurityHubComponent
diff --git a/components/camel-aws/camel-aws-security-hub/src/generated/resources/META-INF/services/org/apache/camel/configurer/aws-security-hub-component b/components/camel-aws/camel-aws-security-hub/src/generated/resources/META-INF/services/org/apache/camel/configurer/aws-security-hub-component
new file mode 100644
index 000000000000..ef42a71d8703
--- /dev/null
+++ b/components/camel-aws/camel-aws-security-hub/src/generated/resources/META-INF/services/org/apache/camel/configurer/aws-security-hub-component
@@ -0,0 +1,2 @@
+# Generated by camel build tools - do NOT edit this file!
+class=org.apache.camel.component.aws.securityhub.SecurityHubComponentConfigurer
diff --git a/components/camel-aws/camel-aws-security-hub/src/generated/resources/META-INF/services/org/apache/camel/configurer/aws-security-hub-endpoint b/components/camel-aws/camel-aws-security-hub/src/generated/resources/META-INF/services/org/apache/camel/configurer/aws-security-hub-endpoint
new file mode 100644
index 000000000000..19799378957c
--- /dev/null
+++ b/components/camel-aws/camel-aws-security-hub/src/generated/resources/META-INF/services/org/apache/camel/configurer/aws-security-hub-endpoint
@@ -0,0 +1,2 @@
+# Generated by camel build tools - do NOT edit this file!
+class=org.apache.camel.component.aws.securityhub.SecurityHubEndpointConfigurer
diff --git a/components/camel-aws/camel-aws-security-hub/src/generated/resources/META-INF/services/org/apache/camel/urifactory/aws-security-hub-endpoint b/components/camel-aws/camel-aws-security-hub/src/generated/resources/META-INF/services/org/apache/camel/urifactory/aws-security-hub-endpoint
new file mode 100644
index 000000000000..8e0053ff2bae
--- /dev/null
+++ b/components/camel-aws/camel-aws-security-hub/src/generated/resources/META-INF/services/org/apache/camel/urifactory/aws-security-hub-endpoint
@@ -0,0 +1,2 @@
+# Generated by camel build tools - do NOT edit this file!
+class=org.apache.camel.component.aws.securityhub.SecurityHubEndpointUriFactory
diff --git a/components/camel-aws/camel-aws-security-hub/src/main/docs/aws-security-hub-component.adoc b/components/camel-aws/camel-aws-security-hub/src/main/docs/aws-security-hub-component.adoc
new file mode 100644
index 000000000000..a5f20f4d75d5
--- /dev/null
+++ b/components/camel-aws/camel-aws-security-hub/src/main/docs/aws-security-hub-component.adoc
@@ -0,0 +1,204 @@
+= AWS Security Hub Component
+:doctitle: AWS Security Hub
+:shortname: aws-security-hub
+:artifactid: camel-aws-security-hub
+:description: Manage and interact with AWS Security Hub for security findings.
+:since: 4.18
+:supportlevel: Preview
+:tabs-sync-option:
+:component-header: Only producer is supported
+//Manually maintained attributes
+:group: AWS
+:camel-spring-boot-name: aws-security-hub
+
+*Since Camel {since}*
+
+*{component-header}*
+
+The AWS Security Hub component allows you to interact with
+https://aws.amazon.com/security-hub/[AWS Security Hub] to manage security findings.
+
+AWS Security Hub provides a comprehensive view of your security state in AWS and helps you check your environment against security industry standards and best practices.
+
+Prerequisites
+
+You must have a valid Amazon Web Services developer account, and be
+signed up to use Amazon Security Hub. More information is available at
+https://aws.amazon.com/security-hub/[Amazon Security Hub].
+
+== URI Format
+
+-------------------------
+aws-security-hub://label[?options]
+-------------------------
+
+You can append query options to the URI in the following format:
+
+`?options=value&option2=value&...`
+
+
+// component options: START
+include::partial$component-configure-options.adoc[]
+include::partial$component-endpoint-options.adoc[]
+include::partial$component-endpoint-headers.adoc[]
+// component options: END
+
+== Usage
+
+=== Static credentials, Default Credential Provider and Profile Credentials Provider
+
+You have the possibility of avoiding the usage of explicit static credentials by specifying the useDefaultCredentialsProvider option and set it to true.
+
+The order of evaluation for Default Credentials Provider is the following:
+
+ - Java system properties - `aws.accessKeyId` and `aws.secretKey`.
+ - Environment variables - `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY`.
+ - Web Identity Token from AWS STS.
+ - The shared credentials and config files.
+ - Amazon ECS container credentials - loaded from the Amazon ECS if the environment variable `AWS_CONTAINER_CREDENTIALS_RELATIVE_URI` is set.
+ - Amazon EC2 Instance profile credentials.
+
+You have also the possibility of using Profile Credentials Provider, by specifying the useProfileCredentialsProvider option to true and profileCredentialsName to the profile name.
+
+Only one of static, default and profile credentials could be used at the same time.
+
+For more information about this you can look at https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/credentials.html[AWS credentials documentation]
+
+=== AWS Security Hub Producer operations
+
+Camel-AWS Security Hub component provides the following operation on the producer side:
+
+- batchImportFindings
+- getFindings
+- batchUpdateFindings
+- getFindingHistory
+- describeHub
+- listEnabledProductsForImport
+
+==== BatchImportFindings
+
+Import security findings into Security Hub. This is the primary way to send findings from custom integrations.
+
+[source,java]
+--------------------------------------------------------------------------------
+from("direct:importFindings")
+ .process(exchange -> {
+ AwsSecurityFinding finding = AwsSecurityFinding.builder()
+ .schemaVersion("2018-10-08")
+ .id("my-finding-id")
+ .productArn("arn:aws:securityhub:us-east-1:123456789012:product/123456789012/default")
+ .generatorId("my-generator")
+ .awsAccountId("123456789012")
+ .types("Software and Configuration Checks/Vulnerabilities/CVE")
+ .createdAt("2024-01-15T00:00:00.000Z")
+ .updatedAt("2024-01-15T00:00:00.000Z")
+ .severity(Severity.builder().label(SeverityLabel.HIGH).build())
+ .title("Critical vulnerability found")
+ .description("A critical vulnerability was detected")
+ .resources(Resource.builder()
+ .type("AwsEc2Instance")
+ .id("arn:aws:ec2:us-east-1:123456789012:instance/i-1234567890abcdef0")
+ .build())
+ .build();
+ exchange.getIn().setBody(List.of(finding));
+ })
+ .to("aws-security-hub://findings?operation=batchImportFindings")
+ .to("mock:result");
+--------------------------------------------------------------------------------
+
+==== GetFindings
+
+Retrieve security findings from Security Hub with optional filtering.
+
+[source,java]
+--------------------------------------------------------------------------------
+from("direct:getFindings")
+ .process(exchange -> {
+ AwsSecurityFindingFilters filters = AwsSecurityFindingFilters.builder()
+ .severityLabel(StringFilter.builder()
+ .comparison(StringFilterComparison.EQUALS)
+ .value("CRITICAL")
+ .build())
+ .build();
+ exchange.getIn().setHeader(SecurityHubConstants.FILTERS, filters);
+ exchange.getIn().setHeader(SecurityHubConstants.MAX_RESULTS, 10);
+ })
+ .to("aws-security-hub://findings?operation=getFindings")
+ .to("mock:result");
+--------------------------------------------------------------------------------
+
+==== BatchUpdateFindings
+
+Update security findings with notes, severity changes, workflow status, etc.
+
+[source,java]
+--------------------------------------------------------------------------------
+from("direct:updateFindings")
+ .process(exchange -> {
+ List<AwsSecurityFindingIdentifier> identifiers = List.of(
+ AwsSecurityFindingIdentifier.builder()
+ .id("my-finding-id")
+ .productArn("arn:aws:securityhub:us-east-1:123456789012:product/123456789012/default")
+ .build()
+ );
+ exchange.getIn().setHeader(SecurityHubConstants.FINDING_IDENTIFIERS, identifiers);
+
+ NoteUpdate note = NoteUpdate.builder()
+ .text("Reviewed and confirmed as false positive")
+ .updatedBy("security-team")
+ .build();
+ exchange.getIn().setHeader(SecurityHubConstants.NOTE, note);
+
+ WorkflowUpdate workflow = WorkflowUpdate.builder()
+ .status(WorkflowStatus.RESOLVED)
+ .build();
+ exchange.getIn().setHeader(SecurityHubConstants.WORKFLOW, workflow);
+ })
+ .to("aws-security-hub://findings?operation=batchUpdateFindings")
+ .to("mock:result");
+--------------------------------------------------------------------------------
+
+==== DescribeHub
+
+Get information about the Security Hub configuration in your account.
+
+[source,java]
+--------------------------------------------------------------------------------
+from("direct:describeHub")
+ .to("aws-security-hub://hub?operation=describeHub")
+ .to("mock:result");
+--------------------------------------------------------------------------------
+
+=== OCSF Integration
+
+AWS Security Hub uses the https://schema.ocsf.io/[Open Cybersecurity Schema Framework (OCSF)] for findings. You can use the Camel OCSF DataFormat to work with security events in a vendor-neutral format, then convert them for import into Security Hub.
+
+[source,java]
+--------------------------------------------------------------------------------
+from("direct:ocsfToSecurityHub")
+ .unmarshal().ocsf(DetectionFinding.class)
+ .process(exchange -> {
+ DetectionFinding ocsf = exchange.getIn().getBody(DetectionFinding.class);
+ // Convert OCSF finding to AWS Security Finding format
+ AwsSecurityFinding finding = convertToAwsFinding(ocsf);
+ exchange.getIn().setBody(List.of(finding));
+ })
+ .to("aws-security-hub://findings?operation=batchImportFindings");
+--------------------------------------------------------------------------------
+
+== Dependencies
+
+Maven users will need to add the following dependency to their pom.xml.
+
+*pom.xml*
+
+[source,xml]
+---------------------------------------
+<dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-aws-security-hub</artifactId>
+ <version>${camel-version}</version>
+</dependency>
+---------------------------------------
+
+where `${camel-version}` must be replaced by the actual version of Camel.
diff --git a/components/camel-aws/camel-aws-security-hub/src/main/java/org/apache/camel/component/aws/securityhub/SecurityHubComponent.java b/components/camel-aws/camel-aws-security-hub/src/main/java/org/apache/camel/component/aws/securityhub/SecurityHubComponent.java
new file mode 100644
index 000000000000..8813cd2e8457
--- /dev/null
+++ b/components/camel-aws/camel-aws-security-hub/src/main/java/org/apache/camel/component/aws/securityhub/SecurityHubComponent.java
@@ -0,0 +1,76 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.aws.securityhub;
+
+import java.util.Map;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.Endpoint;
+import org.apache.camel.spi.Metadata;
+import org.apache.camel.spi.annotations.Component;
+import org.apache.camel.support.HealthCheckComponent;
+
+/**
+ * For working with Amazon Security Hub SDK v2.
+ */
+@Component("aws-security-hub")
+public class SecurityHubComponent extends HealthCheckComponent {
+
+ @Metadata
+ private SecurityHubConfiguration configuration = new SecurityHubConfiguration();
+
+ public SecurityHubComponent() {
+ this(null);
+ }
+
+ public SecurityHubComponent(CamelContext context) {
+ super(context);
+ }
+
+ @Override
+ protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters) throws Exception {
+ if (remaining == null || remaining.isBlank()) {
+ throw new IllegalArgumentException("Label must be specified.");
+ }
+ SecurityHubConfiguration configuration
+ = this.configuration != null ? this.configuration.copy() : new SecurityHubConfiguration();
+ SecurityHubEndpoint endpoint = new SecurityHubEndpoint(uri, this, configuration);
+ endpoint.setLabel(remaining);
+ setProperties(endpoint, parameters);
+ if (Boolean.FALSE.equals(configuration.isUseDefaultCredentialsProvider())
+ && Boolean.FALSE.equals(configuration.isUseProfileCredentialsProvider())
+ && Boolean.FALSE.equals(configuration.isUseSessionCredentials())
+ && configuration.getSecurityHubClient() == null
+ && (configuration.getAccessKey() == null || configuration.getSecretKey() == null)) {
+ throw new IllegalArgumentException(
+ "useDefaultCredentialsProvider is set to false, useProfileCredentialsProvider is set to false, useSessionCredentials is set to false, Amazon Security Hub client or accessKey and secretKey must be specified");
+ }
+
+ return endpoint;
+ }
+
+ public SecurityHubConfiguration getConfiguration() {
+ return configuration;
+ }
+
+ /**
+ * Component configuration
+ */
+ public void setConfiguration(SecurityHubConfiguration configuration) {
+ this.configuration = configuration;
+ }
+}
diff --git a/components/camel-aws/camel-aws-security-hub/src/main/java/org/apache/camel/component/aws/securityhub/SecurityHubConfiguration.java b/components/camel-aws/camel-aws-security-hub/src/main/java/org/apache/camel/component/aws/securityhub/SecurityHubConfiguration.java
new file mode 100644
index 000000000000..177ce7e098d4
--- /dev/null
+++ b/components/camel-aws/camel-aws-security-hub/src/main/java/org/apache/camel/component/aws/securityhub/SecurityHubConfiguration.java
@@ -0,0 +1,270 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.aws.securityhub;
+
+import org.apache.camel.RuntimeCamelException;
+import org.apache.camel.component.aws.common.AwsCommonConfiguration;
+import org.apache.camel.spi.Metadata;
+import org.apache.camel.spi.UriParam;
+import org.apache.camel.spi.UriParams;
+import software.amazon.awssdk.core.Protocol;
+import software.amazon.awssdk.services.securityhub.SecurityHubClient;
+
+@UriParams
+public class SecurityHubConfiguration implements Cloneable, AwsCommonConfiguration {
+
+ @UriParam
+ @Metadata(label = "advanced", autowired = true)
+ private SecurityHubClient securityHubClient;
+ @UriParam(label = "security", secret = true)
+ private String accessKey;
+ @UriParam(label = "security", secret = true)
+ private String secretKey;
+ @UriParam(label = "security", secret = true)
+ private String sessionToken;
+ @UriParam
+ @Metadata(required = true, defaultValue = "batchImportFindings")
+ private SecurityHubOperations operation = SecurityHubOperations.batchImportFindings;
+ @UriParam(label = "proxy", enums = "HTTP,HTTPS", defaultValue = "HTTPS")
+ private Protocol proxyProtocol = Protocol.HTTPS;
+ @UriParam(label = "proxy")
+ private String proxyHost;
+ @UriParam(label = "proxy")
+ private Integer proxyPort;
+ @UriParam(enums = "ap-south-2,ap-south-1,eu-south-1,eu-south-2,us-gov-east-1,me-central-1,il-central-1,ca-central-1,eu-central-1,us-iso-west-1,eu-central-2,eu-isoe-west-1,us-west-1,us-west-2,af-south-1,eu-north-1,eu-west-3,eu-west-2,eu-west-1,ap-northeast-3,ap-northeast-2,ap-northeast-1,me-south-1,sa-east-1,ap-east-1,cn-north-1,ca-west-1,us-gov-west-1,ap-southeast-1,ap-southeast-2,us-iso-east-1,ap-southeast-3,ap-southeast-4,us-east-1,us-east-2,cn-northwest-1,us-isob-east-1,aws-global [...]
+ private String region;
+ @UriParam
+ private boolean pojoRequest;
+ @UriParam(label = "security")
+ private boolean trustAllCertificates;
+ @UriParam
+ private boolean overrideEndpoint;
+ @UriParam
+ private String uriEndpointOverride;
+ @UriParam(label = "security")
+ private boolean useDefaultCredentialsProvider;
+ @UriParam(label = "security")
+ private boolean useProfileCredentialsProvider;
+ @UriParam(label = "security")
+ private boolean useSessionCredentials;
+ @UriParam(label = "security")
+ private String profileCredentialsName;
+
+ public SecurityHubClient getSecurityHubClient() {
+ return securityHubClient;
+ }
+
+ /**
+ * To use an existing configured AWS Security Hub client
+ */
+ public void setSecurityHubClient(SecurityHubClient securityHubClient) {
+ this.securityHubClient = securityHubClient;
+ }
+
+ public String getAccessKey() {
+ return accessKey;
+ }
+
+ /**
+ * Amazon AWS Access Key
+ */
+ public void setAccessKey(String accessKey) {
+ this.accessKey = accessKey;
+ }
+
+ public String getSecretKey() {
+ return secretKey;
+ }
+
+ /**
+ * Amazon AWS Secret Key
+ */
+ public void setSecretKey(String secretKey) {
+ this.secretKey = secretKey;
+ }
+
+ public String getSessionToken() {
+ return sessionToken;
+ }
+
+ /**
+ * Amazon AWS Session Token used when the user needs to assume an IAM role
+ */
+ public void setSessionToken(String sessionToken) {
+ this.sessionToken = sessionToken;
+ }
+
+ public SecurityHubOperations getOperation() {
+ return operation;
+ }
+
+ /**
+ * The operation to perform
+ */
+ public void setOperation(SecurityHubOperations operation) {
+ this.operation = operation;
+ }
+
+ public Protocol getProxyProtocol() {
+ return proxyProtocol;
+ }
+
+ /**
+ * To define a proxy protocol when instantiating the Security Hub client
+ */
+ public void setProxyProtocol(Protocol proxyProtocol) {
+ this.proxyProtocol = proxyProtocol;
+ }
+
+ public String getProxyHost() {
+ return proxyHost;
+ }
+
+ /**
+ * To define a proxy host when instantiating the Security Hub client
+ */
+ public void setProxyHost(String proxyHost) {
+ this.proxyHost = proxyHost;
+ }
+
+ public Integer getProxyPort() {
+ return proxyPort;
+ }
+
+ /**
+ * To define a proxy port when instantiating the Security Hub client
+ */
+ public void setProxyPort(Integer proxyPort) {
+ this.proxyPort = proxyPort;
+ }
+
+ public String getRegion() {
+ return region;
+ }
+
+ /**
+ * The region in which the Security Hub client needs to work. When using this parameter, the configuration will
+ * expect the lowercase name of the region (for example, ap-east-1) You'll need to use the name
+ * Region.EU_WEST_1.id()
+ */
+ public void setRegion(String region) {
+ this.region = region;
+ }
+
+ public boolean isPojoRequest() {
+ return pojoRequest;
+ }
+
+ /**
+ * If we want to use a POJO request as body or not
+ */
+ public void setPojoRequest(boolean pojoRequest) {
+ this.pojoRequest = pojoRequest;
+ }
+
+ public boolean isTrustAllCertificates() {
+ return trustAllCertificates;
+ }
+
+ /**
+ * If we want to trust all certificates in case of overriding the endpoint
+ */
+ public void setTrustAllCertificates(boolean trustAllCertificates) {
+ this.trustAllCertificates = trustAllCertificates;
+ }
+
+ public boolean isOverrideEndpoint() {
+ return overrideEndpoint;
+ }
+
+ /**
+ * Set the need for overriding the endpoint. This option needs to be used in combination with the
+ * uriEndpointOverride option
+ */
+ public void setOverrideEndpoint(boolean overrideEndpoint) {
+ this.overrideEndpoint = overrideEndpoint;
+ }
+
+ public String getUriEndpointOverride() {
+ return uriEndpointOverride;
+ }
+
+ /**
+ * Set the overriding uri endpoint. This option needs to be used in combination with overrideEndpoint option
+ */
+ public void setUriEndpointOverride(String uriEndpointOverride) {
+ this.uriEndpointOverride = uriEndpointOverride;
+ }
+
+ /**
+ * Set whether the Security Hub client should expect to load credentials through a default credentials provider or
+ * to expect static credentials to be passed in.
+ */
+ public void setUseDefaultCredentialsProvider(Boolean useDefaultCredentialsProvider) {
+ this.useDefaultCredentialsProvider = useDefaultCredentialsProvider;
+ }
+
+ public boolean isUseDefaultCredentialsProvider() {
+ return useDefaultCredentialsProvider;
+ }
+
+ public boolean isUseProfileCredentialsProvider() {
+ return useProfileCredentialsProvider;
+ }
+
+ /**
+ * Set whether the Security Hub client should expect to load credentials through a profile credentials provider.
+ */
+ public void setUseProfileCredentialsProvider(boolean useProfileCredentialsProvider) {
+ this.useProfileCredentialsProvider = useProfileCredentialsProvider;
+ }
+
+ public boolean isUseSessionCredentials() {
+ return useSessionCredentials;
+ }
+
+ /**
+ * Set whether the Security Hub client should expect to use Session Credentials. This is useful in a situation in
+ * which the user needs to assume an IAM role for doing operations in Security Hub.
+ */
+ public void setUseSessionCredentials(boolean useSessionCredentials) {
+ this.useSessionCredentials = useSessionCredentials;
+ }
+
+ public String getProfileCredentialsName() {
+ return profileCredentialsName;
+ }
+
+ /**
+ * If using a profile credentials provider this parameter will set the profile name
+ */
+ public void setProfileCredentialsName(String profileCredentialsName) {
+ this.profileCredentialsName = profileCredentialsName;
+ }
+
+ // *************************************************
+ //
+ // *************************************************
+
+ public SecurityHubConfiguration copy() {
+ try {
+ return (SecurityHubConfiguration) super.clone();
+ } catch (CloneNotSupportedException e) {
+ throw new RuntimeCamelException(e);
+ }
+ }
+}
diff --git a/components/camel-aws/camel-aws-security-hub/src/main/java/org/apache/camel/component/aws/securityhub/SecurityHubConstants.java b/components/camel-aws/camel-aws-security-hub/src/main/java/org/apache/camel/component/aws/securityhub/SecurityHubConstants.java
new file mode 100644
index 000000000000..e4c52e045c24
--- /dev/null
+++ b/components/camel-aws/camel-aws-security-hub/src/main/java/org/apache/camel/component/aws/securityhub/SecurityHubConstants.java
@@ -0,0 +1,100 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.aws.securityhub;
+
+import org.apache.camel.spi.Metadata;
+
+/**
+ * Constants used in Camel AWS Security Hub component
+ */
+public interface SecurityHubConstants {
+
+ @Metadata(description = "The operation we want to perform", javaType = "String")
+ String OPERATION = "CamelAwsSecurityHubOperation";
+
+ @Metadata(description = "The list of findings to import", javaType = "List<AwsSecurityFinding>")
+ String FINDINGS = "CamelAwsSecurityHubFindings";
+
+ @Metadata(description = "The finding identifiers for batch update", javaType = "List<AwsSecurityFindingIdentifier>")
+ String FINDING_IDENTIFIERS = "CamelAwsSecurityHubFindingIdentifiers";
+
+ @Metadata(description = "The filters to apply when retrieving findings", javaType = "AwsSecurityFindingFilters")
+ String FILTERS = "CamelAwsSecurityHubFilters";
+
+ @Metadata(description = "The note to add to findings during update", javaType = "NoteUpdate")
+ String NOTE = "CamelAwsSecurityHubNote";
+
+ @Metadata(description = "The severity to set on findings during update", javaType = "SeverityUpdate")
+ String SEVERITY = "CamelAwsSecurityHubSeverity";
+
+ @Metadata(description = "The workflow status to set on findings", javaType = "WorkflowUpdate")
+ String WORKFLOW = "CamelAwsSecurityHubWorkflow";
+
+ @Metadata(description = "The verification state to set on findings", javaType = "String")
+ String VERIFICATION_STATE = "CamelAwsSecurityHubVerificationState";
+
+ @Metadata(description = "The confidence level to set on findings", javaType = "Integer")
+ String CONFIDENCE = "CamelAwsSecurityHubConfidence";
+
+ @Metadata(description = "The criticality level to set on findings", javaType = "Integer")
+ String CRITICALITY = "CamelAwsSecurityHubCriticality";
+
+ @Metadata(description = "User-defined fields to add to findings", javaType = "Map<String, String>")
+ String USER_DEFINED_FIELDS = "CamelAwsSecurityHubUserDefinedFields";
+
+ @Metadata(description = "Related findings to associate", javaType = "List<RelatedFinding>")
+ String RELATED_FINDINGS = "CamelAwsSecurityHubRelatedFindings";
+
+ @Metadata(description = "The types to assign to findings", javaType = "List<String>")
+ String TYPES = "CamelAwsSecurityHubTypes";
+
+ // Pagination constants
+ @Metadata(label = "getFindings listEnabledProductsForImport getFindingHistory",
+ description = "The token for the next set of results", javaType = "String")
+ String NEXT_TOKEN = "CamelAwsSecurityHubNextToken";
+
+ @Metadata(label = "getFindings",
+ description = "The maximum number of results to return", javaType = "Integer")
+ String MAX_RESULTS = "CamelAwsSecurityHubMaxResults";
+
+ // Response metadata
+ @Metadata(label = "batchImportFindings",
+ description = "The count of findings that failed to import", javaType = "Integer")
+ String FAILED_COUNT = "CamelAwsSecurityHubFailedCount";
+
+ @Metadata(label = "batchImportFindings",
+ description = "The count of findings that were successfully imported", javaType = "Integer")
+ String SUCCESS_COUNT = "CamelAwsSecurityHubSuccessCount";
+
+ @Metadata(label = "batchUpdateFindings",
+ description = "The list of findings that were not updated",
+ javaType = "List<BatchUpdateFindingsUnprocessedFinding>")
+ String UNPROCESSED_FINDINGS = "CamelAwsSecurityHubUnprocessedFindings";
+
+ @Metadata(label = "batchUpdateFindings",
+ description = "The list of findings that were updated successfully",
+ javaType = "List<AwsSecurityFindingIdentifier>")
+ String PROCESSED_FINDINGS = "CamelAwsSecurityHubProcessedFindings";
+
+ @Metadata(label = "getFindingHistory",
+ description = "The finding ID to get history for", javaType = "String")
+ String FINDING_ID = "CamelAwsSecurityHubFindingId";
+
+ @Metadata(label = "getFindingHistory",
+ description = "The product ARN for the finding", javaType = "String")
+ String PRODUCT_ARN = "CamelAwsSecurityHubProductArn";
+}
diff --git a/components/camel-aws/camel-aws-security-hub/src/main/java/org/apache/camel/component/aws/securityhub/SecurityHubEndpoint.java b/components/camel-aws/camel-aws-security-hub/src/main/java/org/apache/camel/component/aws/securityhub/SecurityHubEndpoint.java
new file mode 100644
index 000000000000..679a76f0378d
--- /dev/null
+++ b/components/camel-aws/camel-aws-security-hub/src/main/java/org/apache/camel/component/aws/securityhub/SecurityHubEndpoint.java
@@ -0,0 +1,136 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.aws.securityhub;
+
+import java.util.Map;
+
+import org.apache.camel.Category;
+import org.apache.camel.Component;
+import org.apache.camel.Consumer;
+import org.apache.camel.Processor;
+import org.apache.camel.Producer;
+import org.apache.camel.component.aws.securityhub.client.SecurityHubClientFactory;
+import org.apache.camel.spi.EndpointServiceLocation;
+import org.apache.camel.spi.Metadata;
+import org.apache.camel.spi.UriEndpoint;
+import org.apache.camel.spi.UriParam;
+import org.apache.camel.spi.UriPath;
+import org.apache.camel.support.DefaultEndpoint;
+import org.apache.camel.util.ObjectHelper;
+import software.amazon.awssdk.services.securityhub.SecurityHubClient;
+
+/**
+ * Manage and interact with AWS Security Hub for security findings.
+ */
+@UriEndpoint(firstVersion = "4.18.0", scheme = "aws-security-hub", title = "AWS Security Hub",
+ syntax = "aws-security-hub:label", producerOnly = true, category = {
+ Category.CLOUD,
+ Category.SECURITY },
+ headersClass = SecurityHubConstants.class)
+public class SecurityHubEndpoint extends DefaultEndpoint implements EndpointServiceLocation {
+
+ private SecurityHubClient securityHubClient;
+
+ @UriPath(description = "Logical name")
+ @Metadata(required = true)
+ private String label;
+ @UriParam
+ private SecurityHubConfiguration configuration;
+
+ public SecurityHubEndpoint(String uri, Component component, SecurityHubConfiguration configuration) {
+ super(uri, component);
+ this.configuration = configuration;
+ }
+
+ @Override
+ public SecurityHubComponent getComponent() {
+ return (SecurityHubComponent) super.getComponent();
+ }
+
+ @Override
+ public Consumer createConsumer(Processor processor) throws Exception {
+ throw new UnsupportedOperationException("You cannot receive messages from this endpoint");
+ }
+
+ @Override
+ public Producer createProducer() throws Exception {
+ return new SecurityHubProducer(this);
+ }
+
+ @Override
+ public void doStart() throws Exception {
+ super.doStart();
+
+ securityHubClient = configuration.getSecurityHubClient() != null
+ ? configuration.getSecurityHubClient()
+ : SecurityHubClientFactory.getSecurityHubClient(configuration);
+ }
+
+ @Override
+ public void doStop() throws Exception {
+ if (ObjectHelper.isEmpty(configuration.getSecurityHubClient())) {
+ if (securityHubClient != null) {
+ securityHubClient.close();
+ }
+ }
+ super.doStop();
+ }
+
+ public SecurityHubConfiguration getConfiguration() {
+ return configuration;
+ }
+
+ public SecurityHubClient getSecurityHubClient() {
+ return securityHubClient;
+ }
+
+ public String getLabel() {
+ return label;
+ }
+
+ /**
+ * Logical name
+ */
+ public void setLabel(String label) {
+ this.label = label;
+ }
+
+ @Override
+ public String getServiceUrl() {
+ if (!configuration.isOverrideEndpoint()) {
+ if (ObjectHelper.isNotEmpty(configuration.getRegion())) {
+ return configuration.getRegion();
+ }
+ } else if (ObjectHelper.isNotEmpty(configuration.getUriEndpointOverride())) {
+ return configuration.getUriEndpointOverride();
+ }
+ return null;
+ }
+
+ @Override
+ public String getServiceProtocol() {
+ return "securityhub";
+ }
+
+ @Override
+ public Map<String, String> getServiceMetadata() {
+ if (label != null) {
+ return Map.of("label", label);
+ }
+ return null;
+ }
+}
diff --git a/components/camel-aws/camel-aws-security-hub/src/main/java/org/apache/camel/component/aws/securityhub/SecurityHubOperations.java b/components/camel-aws/camel-aws-security-hub/src/main/java/org/apache/camel/component/aws/securityhub/SecurityHubOperations.java
new file mode 100644
index 000000000000..fc2087ddd45a
--- /dev/null
+++ b/components/camel-aws/camel-aws-security-hub/src/main/java/org/apache/camel/component/aws/securityhub/SecurityHubOperations.java
@@ -0,0 +1,58 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.aws.securityhub;
+
+/**
+ * Operations supported by the AWS Security Hub component.
+ */
+public enum SecurityHubOperations {
+
+ /**
+ * Import security findings into Security Hub
+ */
+ batchImportFindings,
+
+ /**
+ * Retrieve security findings from Security Hub
+ */
+ getFindings,
+
+ /**
+ * Update information about security findings
+ */
+ batchUpdateFindings,
+
+ /**
+ * Get the history of a finding
+ */
+ getFindingHistory,
+
+ /**
+ * Describe the hub resource in your account
+ */
+ describeHub,
+
+ /**
+ * Get information about enabled products
+ */
+ listEnabledProductsForImport,
+
+ /**
+ * Get aggregated findings count
+ */
+ getFindingAggregator
+}
diff --git a/components/camel-aws/camel-aws-security-hub/src/main/java/org/apache/camel/component/aws/securityhub/SecurityHubProducer.java b/components/camel-aws/camel-aws-security-hub/src/main/java/org/apache/camel/component/aws/securityhub/SecurityHubProducer.java
new file mode 100644
index 000000000000..3b45b0e39947
--- /dev/null
+++ b/components/camel-aws/camel-aws-security-hub/src/main/java/org/apache/camel/component/aws/securityhub/SecurityHubProducer.java
@@ -0,0 +1,425 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.aws.securityhub;
+
+import java.util.List;
+import java.util.Map;
+import java.util.function.BiConsumer;
+import java.util.function.Function;
+import java.util.function.Supplier;
+
+import org.apache.camel.Endpoint;
+import org.apache.camel.Exchange;
+import org.apache.camel.InvalidPayloadException;
+import org.apache.camel.Message;
+import org.apache.camel.health.HealthCheck;
+import org.apache.camel.health.HealthCheckHelper;
+import org.apache.camel.health.WritableHealthCheckRepository;
+import org.apache.camel.support.DefaultProducer;
+import org.apache.camel.util.ObjectHelper;
+import org.apache.camel.util.URISupport;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import software.amazon.awssdk.awscore.exception.AwsServiceException;
+import software.amazon.awssdk.services.securityhub.SecurityHubClient;
+import software.amazon.awssdk.services.securityhub.model.AwsSecurityFinding;
+import software.amazon.awssdk.services.securityhub.model.AwsSecurityFindingFilters;
+import software.amazon.awssdk.services.securityhub.model.AwsSecurityFindingIdentifier;
+import software.amazon.awssdk.services.securityhub.model.BatchImportFindingsRequest;
+import software.amazon.awssdk.services.securityhub.model.BatchImportFindingsResponse;
+import software.amazon.awssdk.services.securityhub.model.BatchUpdateFindingsRequest;
+import software.amazon.awssdk.services.securityhub.model.BatchUpdateFindingsResponse;
+import software.amazon.awssdk.services.securityhub.model.DescribeHubRequest;
+import software.amazon.awssdk.services.securityhub.model.DescribeHubResponse;
+import software.amazon.awssdk.services.securityhub.model.GetFindingHistoryRequest;
+import software.amazon.awssdk.services.securityhub.model.GetFindingHistoryResponse;
+import software.amazon.awssdk.services.securityhub.model.GetFindingsRequest;
+import software.amazon.awssdk.services.securityhub.model.GetFindingsResponse;
+import software.amazon.awssdk.services.securityhub.model.ListEnabledProductsForImportRequest;
+import software.amazon.awssdk.services.securityhub.model.ListEnabledProductsForImportResponse;
+import software.amazon.awssdk.services.securityhub.model.NoteUpdate;
+import software.amazon.awssdk.services.securityhub.model.RelatedFinding;
+import software.amazon.awssdk.services.securityhub.model.SeverityUpdate;
+import software.amazon.awssdk.services.securityhub.model.VerificationState;
+import software.amazon.awssdk.services.securityhub.model.WorkflowUpdate;
+
+/**
+ * A Producer which sends messages to the AWS Security Hub Service SDK v2
+ * <a href="https://aws.amazon.com/security-hub/">AWS Security Hub</a>
+ */
+public class SecurityHubProducer extends DefaultProducer {
+
+ private static final Logger LOG = LoggerFactory.getLogger(SecurityHubProducer.class);
+
+ private transient String securityHubProducerToString;
+ private HealthCheck producerHealthCheck;
+ private WritableHealthCheckRepository healthCheckRepository;
+
+ public SecurityHubProducer(Endpoint endpoint) {
+ super(endpoint);
+ }
+
+ @Override
+ public void process(Exchange exchange) throws Exception {
+ switch (determineOperation(exchange)) {
+ case batchImportFindings:
+ batchImportFindings(getEndpoint().getSecurityHubClient(), exchange);
+ break;
+ case getFindings:
+ getFindings(getEndpoint().getSecurityHubClient(), exchange);
+ break;
+ case batchUpdateFindings:
+ batchUpdateFindings(getEndpoint().getSecurityHubClient(), exchange);
+ break;
+ case getFindingHistory:
+ getFindingHistory(getEndpoint().getSecurityHubClient(), exchange);
+ break;
+ case describeHub:
+ describeHub(getEndpoint().getSecurityHubClient(), exchange);
+ break;
+ case listEnabledProductsForImport:
+ listEnabledProductsForImport(getEndpoint().getSecurityHubClient(), exchange);
+ break;
+ default:
+ throw new IllegalArgumentException("Unsupported operation");
+ }
+ }
+
+ private SecurityHubOperations determineOperation(Exchange exchange) {
+ SecurityHubOperations operation
+ = exchange.getIn().getHeader(SecurityHubConstants.OPERATION, SecurityHubOperations.class);
+ if (operation == null) {
+ operation = getConfiguration().getOperation();
+ }
+ return operation;
+ }
+
+ protected SecurityHubConfiguration getConfiguration() {
+ return getEndpoint().getConfiguration();
+ }
+
+ @Override
+ public String toString() {
+ if (securityHubProducerToString == null) {
+ securityHubProducerToString = "SecurityHubProducer[" + URISupport.sanitizeUri(getEndpoint().getEndpointUri()) + "]";
+ }
+ return securityHubProducerToString;
+ }
+
+ @SuppressWarnings("unchecked")
+ private void batchImportFindings(SecurityHubClient securityHubClient, Exchange exchange) throws InvalidPayloadException {
+ executeOperation(
+ exchange,
+ BatchImportFindingsRequest.class,
+ securityHubClient::batchImportFindings,
+ () -> {
+ BatchImportFindingsRequest.Builder builder = BatchImportFindingsRequest.builder();
+ List<AwsSecurityFinding> findings
+ = exchange.getIn().getHeader(SecurityHubConstants.FINDINGS, List.class);
+ if (findings == null || findings.isEmpty()) {
+ // Try to get findings from body
+ Object body = exchange.getIn().getBody();
+ if (body instanceof List) {
+ findings = (List<AwsSecurityFinding>) body;
+ } else if (body instanceof AwsSecurityFinding) {
+ findings = List.of((AwsSecurityFinding) body);
+ }
+ }
+ if (findings == null || findings.isEmpty()) {
+ throw new IllegalArgumentException("At least one finding must be specified");
+ }
+ builder.findings(findings);
+ return securityHubClient.batchImportFindings(builder.build());
+ },
+ "Batch Import Findings",
+ (BatchImportFindingsResponse response, Message message) -> {
+ message.setHeader(SecurityHubConstants.FAILED_COUNT, response.failedCount());
+ message.setHeader(SecurityHubConstants.SUCCESS_COUNT, response.successCount());
+ });
+ }
+
+ private void getFindings(SecurityHubClient securityHubClient, Exchange exchange) throws InvalidPayloadException {
+ executeOperation(
+ exchange,
+ GetFindingsRequest.class,
+ securityHubClient::getFindings,
+ () -> {
+ GetFindingsRequest.Builder builder = GetFindingsRequest.builder();
+ AwsSecurityFindingFilters filters
+ = exchange.getIn().getHeader(SecurityHubConstants.FILTERS, AwsSecurityFindingFilters.class);
+ if (filters != null) {
+ builder.filters(filters);
+ }
+ String nextToken = exchange.getIn().getHeader(SecurityHubConstants.NEXT_TOKEN, String.class);
+ if (nextToken != null) {
+ builder.nextToken(nextToken);
+ }
+ Integer maxResults = exchange.getIn().getHeader(SecurityHubConstants.MAX_RESULTS, Integer.class);
+ if (maxResults != null) {
+ builder.maxResults(maxResults);
+ }
+ return securityHubClient.getFindings(builder.build());
+ },
+ "Get Findings",
+ (GetFindingsResponse response, Message message) -> {
+ message.setHeader(SecurityHubConstants.NEXT_TOKEN, response.nextToken());
+ });
+ }
+
+ @SuppressWarnings("unchecked")
+ private void batchUpdateFindings(SecurityHubClient securityHubClient, Exchange exchange) throws InvalidPayloadException {
+ executeOperation(
+ exchange,
+ BatchUpdateFindingsRequest.class,
+ securityHubClient::batchUpdateFindings,
+ () -> {
+ BatchUpdateFindingsRequest.Builder builder = BatchUpdateFindingsRequest.builder();
+
+ List<AwsSecurityFindingIdentifier> findingIdentifiers
+ = exchange.getIn().getHeader(SecurityHubConstants.FINDING_IDENTIFIERS, List.class);
+ if (findingIdentifiers == null || findingIdentifiers.isEmpty()) {
+ throw new IllegalArgumentException("Finding identifiers must be specified");
+ }
+ builder.findingIdentifiers(findingIdentifiers);
+
+ NoteUpdate note = exchange.getIn().getHeader(SecurityHubConstants.NOTE, NoteUpdate.class);
+ if (note != null) {
+ builder.note(note);
+ }
+
+ SeverityUpdate severity = exchange.getIn().getHeader(SecurityHubConstants.SEVERITY, SeverityUpdate.class);
+ if (severity != null) {
+ builder.severity(severity);
+ }
+
+ WorkflowUpdate workflow = exchange.getIn().getHeader(SecurityHubConstants.WORKFLOW, WorkflowUpdate.class);
+ if (workflow != null) {
+ builder.workflow(workflow);
+ }
+
+ String verificationState
+ = exchange.getIn().getHeader(SecurityHubConstants.VERIFICATION_STATE, String.class);
+ if (verificationState != null) {
+ builder.verificationState(VerificationState.fromValue(verificationState));
+ }
+
+ Integer confidence = exchange.getIn().getHeader(SecurityHubConstants.CONFIDENCE, Integer.class);
+ if (confidence != null) {
+ builder.confidence(confidence);
+ }
+
+ Integer criticality = exchange.getIn().getHeader(SecurityHubConstants.CRITICALITY, Integer.class);
+ if (criticality != null) {
+ builder.criticality(criticality);
+ }
+
+ Map<String, String> userDefinedFields
+ = exchange.getIn().getHeader(SecurityHubConstants.USER_DEFINED_FIELDS, Map.class);
+ if (userDefinedFields != null) {
+ builder.userDefinedFields(userDefinedFields);
+ }
+
+ List<RelatedFinding> relatedFindings
+ = exchange.getIn().getHeader(SecurityHubConstants.RELATED_FINDINGS, List.class);
+ if (relatedFindings != null) {
+ builder.relatedFindings(relatedFindings);
+ }
+
+ List<String> types = exchange.getIn().getHeader(SecurityHubConstants.TYPES, List.class);
+ if (types != null) {
+ builder.types(types);
+ }
+
+ return securityHubClient.batchUpdateFindings(builder.build());
+ },
+ "Batch Update Findings",
+ (BatchUpdateFindingsResponse response, Message message) -> {
+ message.setHeader(SecurityHubConstants.PROCESSED_FINDINGS, response.processedFindings());
+ message.setHeader(SecurityHubConstants.UNPROCESSED_FINDINGS, response.unprocessedFindings());
+ });
+ }
+
+ private void getFindingHistory(SecurityHubClient securityHubClient, Exchange exchange) throws InvalidPayloadException {
+ executeOperation(
+ exchange,
+ GetFindingHistoryRequest.class,
+ securityHubClient::getFindingHistory,
+ () -> {
+ GetFindingHistoryRequest.Builder builder = GetFindingHistoryRequest.builder();
+
+ String findingId = exchange.getIn().getHeader(SecurityHubConstants.FINDING_ID, String.class);
+ String productArn = exchange.getIn().getHeader(SecurityHubConstants.PRODUCT_ARN, String.class);
+
+ if (ObjectHelper.isEmpty(findingId) || ObjectHelper.isEmpty(productArn)) {
+ throw new IllegalArgumentException("Finding ID and Product ARN must be specified");
+ }
+
+ AwsSecurityFindingIdentifier findingIdentifier = AwsSecurityFindingIdentifier.builder()
+ .id(findingId)
+ .productArn(productArn)
+ .build();
+ builder.findingIdentifier(findingIdentifier);
+
+ String nextToken = exchange.getIn().getHeader(SecurityHubConstants.NEXT_TOKEN, String.class);
+ if (nextToken != null) {
+ builder.nextToken(nextToken);
+ }
+
+ Integer maxResults = exchange.getIn().getHeader(SecurityHubConstants.MAX_RESULTS, Integer.class);
+ if (maxResults != null) {
+ builder.maxResults(maxResults);
+ }
+
+ return securityHubClient.getFindingHistory(builder.build());
+ },
+ "Get Finding History",
+ (GetFindingHistoryResponse response, Message message) -> {
+ message.setHeader(SecurityHubConstants.NEXT_TOKEN, response.nextToken());
+ });
+ }
+
+ private void describeHub(SecurityHubClient securityHubClient, Exchange exchange) throws InvalidPayloadException {
+ executeOperation(
+ exchange,
+ DescribeHubRequest.class,
+ securityHubClient::describeHub,
+ () -> {
+ DescribeHubRequest.Builder builder = DescribeHubRequest.builder();
+ return securityHubClient.describeHub(builder.build());
+ },
+ "Describe Hub",
+ (DescribeHubResponse response, Message message) -> {
+ // Response body contains the hub details
+ });
+ }
+
+ private void listEnabledProductsForImport(SecurityHubClient securityHubClient, Exchange exchange)
+ throws InvalidPayloadException {
+ executeOperation(
+ exchange,
+ ListEnabledProductsForImportRequest.class,
+ securityHubClient::listEnabledProductsForImport,
+ () -> {
+ ListEnabledProductsForImportRequest.Builder builder = ListEnabledProductsForImportRequest.builder();
+
+ String nextToken = exchange.getIn().getHeader(SecurityHubConstants.NEXT_TOKEN, String.class);
+ if (nextToken != null) {
+ builder.nextToken(nextToken);
+ }
+
+ Integer maxResults = exchange.getIn().getHeader(SecurityHubConstants.MAX_RESULTS, Integer.class);
+ if (maxResults != null) {
+ builder.maxResults(maxResults);
+ }
+
+ return securityHubClient.listEnabledProductsForImport(builder.build());
+ },
+ "List Enabled Products For Import",
+ (ListEnabledProductsForImportResponse response, Message message) -> {
+ message.setHeader(SecurityHubConstants.NEXT_TOKEN, response.nextToken());
+ });
+ }
+
+ @Override
+ public SecurityHubEndpoint getEndpoint() {
+ return (SecurityHubEndpoint) super.getEndpoint();
+ }
+
+ public static Message getMessageForResponse(final Exchange exchange) {
+ return exchange.getMessage();
+ }
+
+ /**
+ * Executes a Security Hub operation with POJO request support.
+ */
+ private <REQ, RES> void executeOperation(
+ Exchange exchange,
+ Class<REQ> requestClass,
+ Function<REQ, RES> pojoExecutor,
+ Supplier<RES> headerExecutor,
+ String operationName)
+ throws InvalidPayloadException {
+ executeOperation(exchange, requestClass, pojoExecutor, headerExecutor, operationName, null);
+ }
+
+ /**
+ * Executes a Security Hub operation with POJO request support and optional response post-processing.
+ */
+ private <REQ, RES> void executeOperation(
+ Exchange exchange,
+ Class<REQ> requestClass,
+ Function<REQ, RES> pojoExecutor,
+ Supplier<RES> headerExecutor,
+ String operationName,
+ BiConsumer<RES, Message> responseProcessor)
+ throws InvalidPayloadException {
+
+ RES result;
+ if (getConfiguration().isPojoRequest()) {
+ Object payload = exchange.getIn().getMandatoryBody();
+ if (requestClass.isInstance(payload)) {
+ try {
+ result = pojoExecutor.apply(requestClass.cast(payload));
+ } catch (AwsServiceException ase) {
+ LOG.trace("{} command returned the error code {}", operationName, ase.awsErrorDetails().errorCode());
+ throw ase;
+ }
+ } else {
+ throw new IllegalArgumentException(
+ String.format("Expected body of type %s but was %s",
+ requestClass.getName(),
+ payload != null ? payload.getClass().getName() : "null"));
+ }
+ } else {
+ try {
+ result = headerExecutor.get();
+ } catch (AwsServiceException ase) {
+ LOG.trace("{} command returned the error code {}", operationName, ase.awsErrorDetails().errorCode());
+ throw ase;
+ }
+ }
+ Message message = getMessageForResponse(exchange);
+ message.setBody(result);
+ if (responseProcessor != null) {
+ responseProcessor.accept(result, message);
+ }
+ }
+
+ @Override
+ protected void doStart() throws Exception {
+ // health-check is optional so discover and resolve
+ healthCheckRepository = HealthCheckHelper.getHealthCheckRepository(
+ getEndpoint().getCamelContext(),
+ "producers",
+ WritableHealthCheckRepository.class);
+
+ if (healthCheckRepository != null) {
+ String id = getEndpoint().getId();
+ producerHealthCheck = new SecurityHubProducerHealthCheck(getEndpoint(), id);
+ producerHealthCheck.setEnabled(getEndpoint().getComponent().isHealthCheckProducerEnabled());
+ healthCheckRepository.addHealthCheck(producerHealthCheck);
+ }
+ }
+
+ @Override
+ protected void doStop() throws Exception {
+ if (healthCheckRepository != null && producerHealthCheck != null) {
+ healthCheckRepository.removeHealthCheck(producerHealthCheck);
+ producerHealthCheck = null;
+ }
+ }
+}
diff --git a/components/camel-aws/camel-aws-security-hub/src/main/java/org/apache/camel/component/aws/securityhub/SecurityHubProducerHealthCheck.java b/components/camel-aws/camel-aws-security-hub/src/main/java/org/apache/camel/component/aws/securityhub/SecurityHubProducerHealthCheck.java
new file mode 100644
index 000000000000..3f262e92abef
--- /dev/null
+++ b/components/camel-aws/camel-aws-security-hub/src/main/java/org/apache/camel/component/aws/securityhub/SecurityHubProducerHealthCheck.java
@@ -0,0 +1,69 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.aws.securityhub;
+
+import java.util.Map;
+
+import org.apache.camel.health.HealthCheckResultBuilder;
+import org.apache.camel.impl.health.AbstractHealthCheck;
+import org.apache.camel.util.ObjectHelper;
+import software.amazon.awssdk.awscore.exception.AwsServiceException;
+import software.amazon.awssdk.regions.Region;
+import software.amazon.awssdk.services.securityhub.SecurityHubClient;
+import software.amazon.awssdk.services.securityhub.model.DescribeHubRequest;
+
+public class SecurityHubProducerHealthCheck extends AbstractHealthCheck {
+
+ private final SecurityHubEndpoint securityHubEndpoint;
+
+ public SecurityHubProducerHealthCheck(SecurityHubEndpoint securityHubEndpoint, String clientId) {
+ super("camel", "producer:aws-security-hub-" + clientId);
+ this.securityHubEndpoint = securityHubEndpoint;
+ }
+
+ @Override
+ protected void doCall(HealthCheckResultBuilder builder, Map<String, Object> options) {
+ SecurityHubConfiguration configuration = securityHubEndpoint.getConfiguration();
+ if (ObjectHelper.isNotEmpty(configuration.getRegion())) {
+ if (!SecurityHubClient.serviceMetadata().regions().contains(Region.of(configuration.getRegion()))) {
+ builder.message("The service is not supported in this region");
+ builder.down();
+ return;
+ }
+ }
+ try {
+ SecurityHubClient securityHubClient = securityHubEndpoint.getSecurityHubClient();
+ securityHubClient.describeHub(DescribeHubRequest.builder().build());
+ } catch (AwsServiceException e) {
+ builder.message(e.getMessage());
+ builder.error(e);
+ if (ObjectHelper.isNotEmpty(e.statusCode())) {
+ builder.detail(SERVICE_STATUS_CODE, e.statusCode());
+ }
+ if (ObjectHelper.isNotEmpty(e.awsErrorDetails().errorCode())) {
+ builder.detail(SERVICE_ERROR_CODE, e.awsErrorDetails().errorCode());
+ }
+ builder.down();
+ return;
+ } catch (Exception e) {
+ builder.error(e);
+ builder.down();
+ return;
+ }
+ builder.up();
+ }
+}
diff --git a/components/camel-aws/camel-aws-security-hub/src/main/java/org/apache/camel/component/aws/securityhub/client/SecurityHubClientFactory.java b/components/camel-aws/camel-aws-security-hub/src/main/java/org/apache/camel/component/aws/securityhub/client/SecurityHubClientFactory.java
new file mode 100644
index 000000000000..235b980fd270
--- /dev/null
+++ b/components/camel-aws/camel-aws-security-hub/src/main/java/org/apache/camel/component/aws/securityhub/client/SecurityHubClientFactory.java
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.aws.securityhub.client;
+
+import org.apache.camel.component.aws.common.AwsClientBuilderUtil;
+import org.apache.camel.component.aws.securityhub.SecurityHubConfiguration;
+import software.amazon.awssdk.services.securityhub.SecurityHubClient;
+
+/**
+ * Factory class to create AWS Security Hub clients using common configuration.
+ */
+public final class SecurityHubClientFactory {
+
+ private SecurityHubClientFactory() {
+ }
+
+ /**
+ * Create a Security Hub client based on configuration.
+ *
+ * @param configuration The Security Hub configuration
+ * @return Configured SecurityHubClient
+ */
+ public static SecurityHubClient getSecurityHubClient(SecurityHubConfiguration configuration) {
+ return AwsClientBuilderUtil.buildClient(
+ configuration,
+ SecurityHubClient::builder);
+ }
+}
diff --git a/components/camel-aws/camel-aws-security-hub/src/test/java/org/apache/camel/component/aws/securityhub/SecurityHubComponentConfigurationTest.java b/components/camel-aws/camel-aws-security-hub/src/test/java/org/apache/camel/component/aws/securityhub/SecurityHubComponentConfigurationTest.java
new file mode 100644
index 000000000000..d84f66b51a90
--- /dev/null
+++ b/components/camel-aws/camel-aws-security-hub/src/test/java/org/apache/camel/component/aws/securityhub/SecurityHubComponentConfigurationTest.java
@@ -0,0 +1,111 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.aws.securityhub;
+
+import org.apache.camel.test.junit5.CamelTestSupport;
+import org.junit.jupiter.api.Test;
+import software.amazon.awssdk.core.Protocol;
+import software.amazon.awssdk.regions.Region;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
+public class SecurityHubComponentConfigurationTest extends CamelTestSupport {
+
+ @Test
+ public void createEndpointWithComponentElements() throws Exception {
+ SecurityHubComponent component = context.getComponent("aws-security-hub", SecurityHubComponent.class);
+ component.getConfiguration().setAccessKey("XXX");
+ component.getConfiguration().setSecretKey("YYY");
+ SecurityHubEndpoint endpoint = (SecurityHubEndpoint) component.createEndpoint("aws-security-hub://label");
+
+ assertEquals("XXX", endpoint.getConfiguration().getAccessKey());
+ assertEquals("YYY", endpoint.getConfiguration().getSecretKey());
+ }
+
+ @Test
+ public void createEndpointWithComponentAndEndpointElements() throws Exception {
+ SecurityHubComponent component = context.getComponent("aws-security-hub", SecurityHubComponent.class);
+ component.getConfiguration().setAccessKey("XXX");
+ component.getConfiguration().setSecretKey("YYY");
+ component.getConfiguration().setRegion(Region.US_WEST_1.toString());
+ SecurityHubEndpoint endpoint
+ = (SecurityHubEndpoint) component
+ .createEndpoint("aws-security-hub://label?accessKey=xxxxxx&secretKey=yyyyy®ion=US_EAST_1");
+
+ assertEquals("xxxxxx", endpoint.getConfiguration().getAccessKey());
+ assertEquals("yyyyy", endpoint.getConfiguration().getSecretKey());
+ assertEquals("US_EAST_1", endpoint.getConfiguration().getRegion());
+ }
+
+ @Test
+ public void createEndpointWithComponentEndpointElementsAndProxy() throws Exception {
+ SecurityHubComponent component = context.getComponent("aws-security-hub", SecurityHubComponent.class);
+ component.getConfiguration().setAccessKey("XXX");
+ component.getConfiguration().setSecretKey("YYY");
+ component.getConfiguration().setRegion(Region.US_WEST_1.toString());
+ SecurityHubEndpoint endpoint = (SecurityHubEndpoint) component
+ .createEndpoint(
+ "aws-security-hub://label?accessKey=xxxxxx&secretKey=yyyyy®ion=US_EAST_1&proxyHost=localhost&proxyPort=9000&proxyProtocol=HTTP");
+
+ assertEquals("xxxxxx", endpoint.getConfiguration().getAccessKey());
+ assertEquals("yyyyy", endpoint.getConfiguration().getSecretKey());
+ assertEquals("US_EAST_1", endpoint.getConfiguration().getRegion());
+ assertEquals(Protocol.HTTP, endpoint.getConfiguration().getProxyProtocol());
+ assertEquals("localhost", endpoint.getConfiguration().getProxyHost());
+ assertEquals(Integer.valueOf(9000), endpoint.getConfiguration().getProxyPort());
+ }
+
+ @Test
+ public void createEndpointWithOverride() throws Exception {
+ SecurityHubComponent component = context.getComponent("aws-security-hub", SecurityHubComponent.class);
+ SecurityHubEndpoint endpoint
+ = (SecurityHubEndpoint) component
+ .createEndpoint(
+ "aws-security-hub://label?accessKey=xxxxxx&secretKey=yyyyy®ion=US_EAST_1&overrideEndpoint=true&uriEndpointOverride=http://localhost:9090");
+
+ assertEquals("xxxxxx", endpoint.getConfiguration().getAccessKey());
+ assertEquals("yyyyy", endpoint.getConfiguration().getSecretKey());
+ assertEquals("US_EAST_1", endpoint.getConfiguration().getRegion());
+ assertTrue(endpoint.getConfiguration().isOverrideEndpoint());
+ assertEquals("http://localhost:9090", endpoint.getConfiguration().getUriEndpointOverride());
+ }
+
+ @Test
+ public void createEndpointWithOperations() throws Exception {
+ SecurityHubComponent component = context.getComponent("aws-security-hub", SecurityHubComponent.class);
+ SecurityHubEndpoint endpoint
+ = (SecurityHubEndpoint) component
+ .createEndpoint(
+ "aws-security-hub://label?accessKey=xxxxxx&secretKey=yyyyy®ion=US_EAST_1&operation=getFindings");
+
+ assertEquals("xxxxxx", endpoint.getConfiguration().getAccessKey());
+ assertEquals("yyyyy", endpoint.getConfiguration().getSecretKey());
+ assertEquals("US_EAST_1", endpoint.getConfiguration().getRegion());
+ assertEquals(SecurityHubOperations.getFindings, endpoint.getConfiguration().getOperation());
+ }
+
+ @Test
+ public void createEndpointWithDefaultOperation() throws Exception {
+ SecurityHubComponent component = context.getComponent("aws-security-hub", SecurityHubComponent.class);
+ SecurityHubEndpoint endpoint
+ = (SecurityHubEndpoint) component
+ .createEndpoint("aws-security-hub://label?accessKey=xxxxxx&secretKey=yyyyy®ion=US_EAST_1");
+
+ assertEquals(SecurityHubOperations.batchImportFindings, endpoint.getConfiguration().getOperation());
+ }
+}
diff --git a/components/camel-aws/camel-aws-security-hub/src/test/java/org/apache/camel/component/aws/securityhub/integration/SecurityHubManualIT.java b/components/camel-aws/camel-aws-security-hub/src/test/java/org/apache/camel/component/aws/securityhub/integration/SecurityHubManualIT.java
new file mode 100644
index 000000000000..464775cd156c
--- /dev/null
+++ b/components/camel-aws/camel-aws-security-hub/src/test/java/org/apache/camel/component/aws/securityhub/integration/SecurityHubManualIT.java
@@ -0,0 +1,247 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.aws.securityhub.integration;
+
+import java.time.Instant;
+import java.util.List;
+
+import org.apache.camel.BindToRegistry;
+import org.apache.camel.EndpointInject;
+import org.apache.camel.Exchange;
+import org.apache.camel.Processor;
+import org.apache.camel.ProducerTemplate;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.aws.securityhub.SecurityHubConstants;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.test.junit5.CamelTestSupport;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.condition.EnabledIfSystemProperties;
+import org.junit.jupiter.api.condition.EnabledIfSystemProperty;
+import software.amazon.awssdk.auth.credentials.AwsBasicCredentials;
+import software.amazon.awssdk.auth.credentials.StaticCredentialsProvider;
+import software.amazon.awssdk.regions.Region;
+import software.amazon.awssdk.services.securityhub.SecurityHubClient;
+import software.amazon.awssdk.services.securityhub.model.AwsSecurityFinding;
+import software.amazon.awssdk.services.securityhub.model.AwsSecurityFindingFilters;
+import software.amazon.awssdk.services.securityhub.model.Resource;
+import software.amazon.awssdk.services.securityhub.model.Severity;
+import software.amazon.awssdk.services.securityhub.model.SeverityLabel;
+import software.amazon.awssdk.services.securityhub.model.StringFilter;
+import software.amazon.awssdk.services.securityhub.model.StringFilterComparison;
+
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+
+// Must be manually tested. Provide your own accessKey and secretKey using -Daws.manual.access.key and -Daws.manual.secret.key
+@EnabledIfSystemProperties({
+ @EnabledIfSystemProperty(named = "aws.manual.access.key", matches = ".*", disabledReason = "Access key not provided"),
+ @EnabledIfSystemProperty(named = "aws.manual.secret.key", matches = ".*", disabledReason = "Secret key not provided")
+})
+public class SecurityHubManualIT extends CamelTestSupport {
+ private static String accessKey = System.getProperty("aws.manual.access.key");
+ private static String secretKey = System.getProperty("aws.manual.secret.key");
+ private static String region = System.getProperty("aws.manual.region", "us-east-1");
+
+ @BindToRegistry("securityhub-client")
+ SecurityHubClient client
+ = SecurityHubClient.builder()
+ .credentialsProvider(StaticCredentialsProvider.create(
+ AwsBasicCredentials.create(accessKey, secretKey)))
+ .region(Region.of(region)).build();
+
+ @EndpointInject
+ private ProducerTemplate template;
+
+ @EndpointInject("mock:result")
+ private MockEndpoint result;
+
+ @Test
+ public void testDescribeHub() throws Exception {
+ result.expectedMessageCount(1);
+
+ template.send("direct:describeHub", new Processor() {
+ @Override
+ public void process(Exchange exchange) {
+ // No specific headers needed for describeHub
+ }
+ });
+
+ MockEndpoint.assertIsSatisfied(context);
+
+ Exchange exchange = result.getExchanges().get(0);
+ assertNotNull(exchange.getIn().getBody());
+ }
+
+ @Test
+ public void testGetFindings() throws Exception {
+ result.expectedMessageCount(1);
+
+ template.send("direct:getFindings", new Processor() {
+ @Override
+ public void process(Exchange exchange) {
+ exchange.getIn().setHeader(SecurityHubConstants.MAX_RESULTS, 10);
+ }
+ });
+
+ MockEndpoint.assertIsSatisfied(context);
+ }
+
+ @Test
+ public void testGetFindingsWithFilters() throws Exception {
+ result.expectedMessageCount(1);
+
+ template.send("direct:getFindings", new Processor() {
+ @Override
+ public void process(Exchange exchange) {
+ AwsSecurityFindingFilters filters = AwsSecurityFindingFilters.builder()
+ .severityLabel(StringFilter.builder()
+ .comparison(StringFilterComparison.EQUALS)
+ .value("CRITICAL")
+ .build())
+ .build();
+ exchange.getIn().setHeader(SecurityHubConstants.FILTERS, filters);
+ exchange.getIn().setHeader(SecurityHubConstants.MAX_RESULTS, 5);
+ }
+ });
+
+ MockEndpoint.assertIsSatisfied(context);
+ }
+
+ @Test
+ public void testGetCamelFindings() throws Exception {
+ result.expectedMessageCount(1);
+
+ template.send("direct:getFindings", new Processor() {
+ @Override
+ public void process(Exchange exchange) {
+ AwsSecurityFindingFilters filters = AwsSecurityFindingFilters.builder()
+ .generatorId(StringFilter.builder()
+ .comparison(StringFilterComparison.EQUALS)
+ .value("camel-security-hub-test")
+ .build())
+ .build();
+ exchange.getIn().setHeader(SecurityHubConstants.FILTERS, filters);
+ exchange.getIn().setHeader(SecurityHubConstants.MAX_RESULTS, 50);
+ }
+ });
+
+ MockEndpoint.assertIsSatisfied(context);
+ }
+
+ @Test
+ public void testListEnabledProductsForImport() throws Exception {
+ result.expectedMessageCount(1);
+
+ template.send("direct:listProducts", new Processor() {
+ @Override
+ public void process(Exchange exchange) {
+ // No specific headers needed
+ }
+ });
+
+ MockEndpoint.assertIsSatisfied(context);
+ }
+
+ @Test
+ public void testBatchImportFindings() throws Exception {
+ result.expectedMessageCount(1);
+
+ // Note: This test requires a valid product ARN registered with Security Hub
+ // You may need to adjust the productArn to match your AWS account setup
+ String accountId = System.getProperty("aws.manual.account.id");
+ if (accountId == null || accountId.isEmpty()) {
+ // Skip if account ID not provided
+ return;
+ }
+
+ template.send("direct:batchImport", new Processor() {
+ @Override
+ public void process(Exchange exchange) {
+ String timestamp = Instant.now().toString();
+ String productArn = String.format("arn:aws:securityhub:%s:%s:product/%s/default",
+ region, accountId, accountId);
+
+ AwsSecurityFinding finding = AwsSecurityFinding.builder()
+ .schemaVersion("2018-10-08")
+ .id("camel-test-finding-" + System.currentTimeMillis())
+ .productArn(productArn)
+ .generatorId("camel-security-hub-test")
+ .awsAccountId(accountId)
+ .types("Software and Configuration Checks/Vulnerabilities/Test")
+ .createdAt(timestamp)
+ .updatedAt(timestamp)
+ .severity(Severity.builder().label(SeverityLabel.INFORMATIONAL).build())
+ .title("Camel Security Hub Integration Test Finding")
+ .description("This is a test finding created by the Camel AWS Security Hub integration test")
+ .resources(Resource.builder()
+ .type("Other")
+ .id("camel-test-resource")
+ .build())
+ .build();
+
+ exchange.getIn().setBody(List.of(finding));
+ }
+ });
+
+ MockEndpoint.assertIsSatisfied(context);
+
+ Exchange exchange = result.getExchanges().get(0);
+ Integer successCount = exchange.getIn().getHeader(SecurityHubConstants.SUCCESS_COUNT, Integer.class);
+ Integer failedCount = exchange.getIn().getHeader(SecurityHubConstants.FAILED_COUNT, Integer.class);
+ assertNotNull(successCount);
+ assertNotNull(failedCount);
+ }
+
+ @Override
+ protected RouteBuilder createRouteBuilder() {
+ return new RouteBuilder() {
+ @Override
+ public void configure() {
+ from("direct:describeHub")
+ .to("aws-security-hub://hub?operation=describeHub")
+ .log("DescribeHub result: ${body}")
+ .to("mock:result");
+
+ from("direct:getFindings")
+ .to("aws-security-hub://findings?operation=getFindings")
+ .log("GetFindings result: ${body}")
+ .split(simple("${body.findings}"))
+ .log("Finding ID: ${body.id}")
+ .log(" Title: ${body.title}")
+ .log(" Severity: ${body.severity.label}")
+ .log(" Description: ${body.description}")
+ .log(" Created: ${body.createdAt}")
+ .log(" Product ARN: ${body.productArn}")
+ .end()
+ .to("mock:result");
+
+ from("direct:listProducts")
+ .to("aws-security-hub://products?operation=listEnabledProductsForImport")
+ .log("ListProducts result: ${body}")
+ .to("mock:result");
+
+ from("direct:batchImport")
+ .log("Importing findings: ${body}")
+ .to("aws-security-hub://findings?operation=batchImportFindings")
+ .log("BatchImport result: ${body}")
+ .log(" Success count: ${header.CamelAwsSecurityHubSuccessCount}")
+ .log(" Failed count: ${header.CamelAwsSecurityHubFailedCount}")
+ .log(" Failed findings: ${body.failedFindings}")
+ .to("mock:result");
+ }
+ };
+ }
+}
diff --git a/components/camel-aws/camel-aws-security-hub/src/test/resources/log4j2.properties b/components/camel-aws/camel-aws-security-hub/src/test/resources/log4j2.properties
new file mode 100644
index 000000000000..87c92c8f73e6
--- /dev/null
+++ b/components/camel-aws/camel-aws-security-hub/src/test/resources/log4j2.properties
@@ -0,0 +1,28 @@
+## ---------------------------------------------------------------------------
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements. See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You under the Apache License, Version 2.0
+## (the "License"); you may not use this file except in compliance with
+## the License. You may obtain a copy of the License at
+##
+## http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing, software
+## distributed under the License is distributed on an "AS IS" BASIS,
+## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+## See the License for the specific language governing permissions and
+## limitations under the License.
+## ---------------------------------------------------------------------------
+
+appender.file.type = File
+appender.file.name = file
+appender.file.fileName = target/camel-aws-security-hub-test.log
+appender.file.layout.type = PatternLayout
+appender.file.layout.pattern = %d [%-15.15t] %-5p %-30.30c{1} - %m%n
+appender.out.type = Console
+appender.out.name = out
+appender.out.layout.type = PatternLayout
+appender.out.layout.pattern = %d [%-15.15t] %-5p %-30.30c{1} - %m%n
+rootLogger.level = INFO
+rootLogger.appenderRef.file.ref = file
diff --git a/components/camel-aws/pom.xml b/components/camel-aws/pom.xml
index 4538a09e66bf..79b7c2f7255f 100644
--- a/components/camel-aws/pom.xml
+++ b/components/camel-aws/pom.xml
@@ -73,6 +73,7 @@
<module>camel-aws2-translate</module>
<module>camel-aws-xray</module>
<module>camel-aws2-rekognition</module>
+ <module>camel-aws-security-hub</module>
</modules>
</project>
diff --git a/components/camel-ocsf/src/main/docs/ocsf-dataformat.adoc b/components/camel-ocsf/src/main/docs/ocsf-dataformat.adoc
index da226cea9a43..47e1734a5c7e 100644
--- a/components/camel-ocsf/src/main/docs/ocsf-dataformat.adoc
+++ b/components/camel-ocsf/src/main/docs/ocsf-dataformat.adoc
@@ -164,6 +164,88 @@ from("direct:start")
.to("splunk-hec:...");
----
+== Example: AI-Powered Security Finding Summarization
+
+You can combine the OCSF DataFormat with the LangChain4j Chat component to use an AI agent that analyzes and summarizes security findings. This is useful for:
+
+* Generating human-readable summaries for security analysts
+* Prioritizing alerts based on AI assessment
+* Enriching findings with additional context and recommendations
+
+=== Java DSL Example
+
+[source,java]
+----
+from("kafka:security-events")
+ .unmarshal().ocsf(DetectionFinding.class)
+ .process(exchange -> {
+ DetectionFinding finding = exchange.getIn().getBody(DetectionFinding.class);
+
+ // Build a prompt with the finding details
+ String prompt = String.format("""
+ Analyze this security detection finding and provide a brief summary:
+
+ Title: %s
+ Severity: %s
+ Message: %s
+ Description: %s
+
+ Provide:
+ 1. A one-sentence summary of the threat
+ 2. Recommended immediate actions
+ 3. Risk assessment (Critical/High/Medium/Low)
+ """,
+ finding.getFindingInfo() != null ? finding.getFindingInfo().getTitle() : "Unknown",
+ finding.getSeverityId(),
+ finding.getMessage(),
+ finding.getFindingInfo() != null ? finding.getFindingInfo().getDesc() : "No description"
+ );
+ exchange.getIn().setBody(prompt);
+ })
+ .to("langchain4j-chat:security-analyst?chatModel=#chatLanguageModel")
+ .to("direct:ai-summary");
+----
+
+=== YAML DSL Example
+
+[source,yaml]
+----
+- route:
+ from:
+ uri: "kafka:security-events"
+ steps:
+ - unmarshal:
+ ocsf:
+ unmarshalType: "org.apache.camel.dataformat.ocsf.model.DetectionFinding"
+ - setHeader:
+ name: "findingTitle"
+ simple: "${body.findingInfo?.title}"
+ - setHeader:
+ name: "findingSeverity"
+ simple: "${body.severityId}"
+ - setHeader:
+ name: "findingMessage"
+ simple: "${body.message}"
+ - setBody:
+ simple: |
+ Analyze this security detection finding and provide a brief summary:
+
+ Title: ${header.findingTitle}
+ Severity: ${header.findingSeverity}
+ Message: ${header.findingMessage}
+
+ Provide:
+ 1. A one-sentence summary of the threat
+ 2. Recommended immediate actions
+ 3. Risk assessment (Critical/High/Medium/Low)
+ - to:
+ uri: "langchain4j-chat:security-analyst"
+ parameters:
+ chatModel: "#chatLanguageModel"
+ - to:
+ uri: "direct:ai-summary"
+----
+
== Dependencies
[source,xml]
diff --git a/core/camel-main/src/generated/resources/org/apache/camel/main/components.properties b/core/camel-main/src/generated/resources/org/apache/camel/main/components.properties
index 966a0e414a19..30850e26c29d 100644
--- a/core/camel-main/src/generated/resources/org/apache/camel/main/components.properties
+++ b/core/camel-main/src/generated/resources/org/apache/camel/main/components.properties
@@ -13,6 +13,7 @@ aws-bedrock-agent-runtime
aws-cloudtrail
aws-config
aws-secrets-manager
+aws-security-hub
aws2-athena
aws2-cw
aws2-ddb
diff --git a/docs/components/modules/ROOT/examples/json/aws-security-hub.json b/docs/components/modules/ROOT/examples/json/aws-security-hub.json
new file mode 120000
index 000000000000..88ef840447ab
--- /dev/null
+++ b/docs/components/modules/ROOT/examples/json/aws-security-hub.json
@@ -0,0 +1 @@
+../../../../../../components/camel-aws/camel-aws-security-hub/src/generated/resources/META-INF/org/apache/camel/component/aws/securityhub/aws-security-hub.json
\ No newline at end of file
diff --git a/docs/components/modules/ROOT/nav.adoc b/docs/components/modules/ROOT/nav.adoc
index 5d05d616be67..0b1364a434e6 100644
--- a/docs/components/modules/ROOT/nav.adoc
+++ b/docs/components/modules/ROOT/nav.adoc
@@ -62,6 +62,7 @@
*** xref:aws2-s3-component.adoc[AWS S3 Storage Service]
*** xref:aws2-s3-vectors-component.adoc[AWS S3 Vectors]
*** xref:aws-secrets-manager-component.adoc[AWS Secrets Manager]
+*** xref:aws-security-hub-component.adoc[AWS Security Hub]
*** xref:aws2-sts-component.adoc[AWS Security Token Service (STS)]
*** xref:aws2-ses-component.adoc[AWS Simple Email Service (SES)]
*** xref:aws2-sns-component.adoc[AWS Simple Notification System (SNS)]
diff --git a/docs/components/modules/ROOT/pages/aws-security-hub-component.adoc b/docs/components/modules/ROOT/pages/aws-security-hub-component.adoc
new file mode 120000
index 000000000000..e784b4bf061b
--- /dev/null
+++ b/docs/components/modules/ROOT/pages/aws-security-hub-component.adoc
@@ -0,0 +1 @@
+../../../../../components/camel-aws/camel-aws-security-hub/src/main/docs/aws-security-hub-component.adoc
\ No newline at end of file
diff --git a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/ComponentsBuilderFactory.java b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/ComponentsBuilderFactory.java
index ba3160ab14ac..b978e1197758 100644
--- a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/ComponentsBuilderFactory.java
+++ b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/ComponentsBuilderFactory.java
@@ -243,6 +243,19 @@ public interface ComponentsBuilderFactory {
static AwsSecretsManagerComponentBuilderFactory.AwsSecretsManagerComponentBuilder awsSecretsManager() {
return AwsSecretsManagerComponentBuilderFactory.awsSecretsManager();
}
+ /**
+ * AWS Security Hub (camel-aws-security-hub)
+ * Manage and interact with AWS Security Hub for security findings.
+ *
+ * Category: cloud,security
+ * Since: 4.18
+ * Maven coordinates: org.apache.camel:camel-aws-security-hub
+ *
+ * @return the dsl builder
+ */
+ static AwsSecurityHubComponentBuilderFactory.AwsSecurityHubComponentBuilder awsSecurityHub() {
+ return AwsSecurityHubComponentBuilderFactory.awsSecurityHub();
+ }
/**
* AWS Athena (camel-aws2-athena)
* Access AWS Athena.
diff --git a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/AwsSecurityHubComponentBuilderFactory.java b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/AwsSecurityHubComponentBuilderFactory.java
new file mode 100644
index 000000000000..437cacd59c10
--- /dev/null
+++ b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/AwsSecurityHubComponentBuilderFactory.java
@@ -0,0 +1,488 @@
+/* Generated by camel build tools - do NOT edit this file! */
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.builder.component.dsl;
+
+import javax.annotation.processing.Generated;
+import org.apache.camel.Component;
+import org.apache.camel.builder.component.AbstractComponentBuilder;
+import org.apache.camel.builder.component.ComponentBuilder;
+import org.apache.camel.component.aws.securityhub.SecurityHubComponent;
+
+/**
+ * Manage and interact with AWS Security Hub for security findings.
+ *
+ * Generated by camel build tools - do NOT edit this file!
+ */
+@Generated("org.apache.camel.maven.packaging.ComponentDslMojo")
+public interface AwsSecurityHubComponentBuilderFactory {
+
+ /**
+ * AWS Security Hub (camel-aws-security-hub)
+ * Manage and interact with AWS Security Hub for security findings.
+ *
+ * Category: cloud,security
+ * Since: 4.18
+ * Maven coordinates: org.apache.camel:camel-aws-security-hub
+ *
+ * @return the dsl builder
+ */
+ static AwsSecurityHubComponentBuilder awsSecurityHub() {
+ return new AwsSecurityHubComponentBuilderImpl();
+ }
+
+ /**
+ * Builder for the AWS Security Hub component.
+ */
+ interface AwsSecurityHubComponentBuilder extends ComponentBuilder<SecurityHubComponent> {
+
+ /**
+ * Component configuration.
+ *
+ * The option is a:
+ * <code>org.apache.camel.component.aws.securityhub.SecurityHubConfiguration</code> type.
+ *
+ * Group: producer
+ *
+ * @param configuration the value to set
+ * @return the dsl builder
+ */
+ default AwsSecurityHubComponentBuilder configuration(org.apache.camel.component.aws.securityhub.SecurityHubConfiguration configuration) {
+ doSetProperty("configuration", configuration);
+ return this;
+ }
+
+
+ /**
+ * Whether the producer should be started lazy (on the first message).
+ * By starting lazy you can use this to allow CamelContext and routes to
+ * startup in situations where a producer may otherwise fail during
+ * starting and cause the route to fail being started. By deferring this
+ * startup to be lazy then the startup failure can be handled during
+ * routing messages via Camel's routing error handlers. Beware that when
+ * the first message is processed then creating and starting the
+ * producer may take a little time and prolong the total processing time
+ * of the processing.
+ *
+ * The option is a: <code>boolean</code> type.
+ *
+ * Default: false
+ * Group: producer
+ *
+ * @param lazyStartProducer the value to set
+ * @return the dsl builder
+ */
+ default AwsSecurityHubComponentBuilder lazyStartProducer(boolean lazyStartProducer) {
+ doSetProperty("lazyStartProducer", lazyStartProducer);
+ return this;
+ }
+
+
+ /**
+ * The operation to perform.
+ *
+ * The option is a:
+ * <code>org.apache.camel.component.aws.securityhub.SecurityHubOperations</code> type.
+ *
+ * Default: batchImportFindings
+ * Group: producer
+ *
+ * @param operation the value to set
+ * @return the dsl builder
+ */
+ default AwsSecurityHubComponentBuilder operation(org.apache.camel.component.aws.securityhub.SecurityHubOperations operation) {
+ doSetProperty("operation", operation);
+ return this;
+ }
+
+
+ /**
+ * Set the need for overriding the endpoint. This option needs to be
+ * used in combination with the uriEndpointOverride option.
+ *
+ * The option is a: <code>boolean</code> type.
+ *
+ * Default: false
+ * Group: producer
+ *
+ * @param overrideEndpoint the value to set
+ * @return the dsl builder
+ */
+ default AwsSecurityHubComponentBuilder overrideEndpoint(boolean overrideEndpoint) {
+ doSetProperty("overrideEndpoint", overrideEndpoint);
+ return this;
+ }
+
+
+ /**
+ * If we want to use a POJO request as body or not.
+ *
+ * The option is a: <code>boolean</code> type.
+ *
+ * Default: false
+ * Group: producer
+ *
+ * @param pojoRequest the value to set
+ * @return the dsl builder
+ */
+ default AwsSecurityHubComponentBuilder pojoRequest(boolean pojoRequest) {
+ doSetProperty("pojoRequest", pojoRequest);
+ return this;
+ }
+
+ /**
+ * The region in which the Security Hub client needs to work. When using
+ * this parameter, the configuration will expect the lowercase name of
+ * the region (for example, ap-east-1) You'll need to use the name
+ * Region.EU_WEST_1.id().
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: producer
+ *
+ * @param region the value to set
+ * @return the dsl builder
+ */
+ default AwsSecurityHubComponentBuilder region(java.lang.String region) {
+ doSetProperty("region", region);
+ return this;
+ }
+
+ /**
+ * Set the overriding uri endpoint. This option needs to be used in
+ * combination with overrideEndpoint option.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: producer
+ *
+ * @param uriEndpointOverride the value to set
+ * @return the dsl builder
+ */
+ default AwsSecurityHubComponentBuilder uriEndpointOverride(java.lang.String uriEndpointOverride) {
+ doSetProperty("uriEndpointOverride", uriEndpointOverride);
+ return this;
+ }
+
+
+ /**
+ * Whether autowiring is enabled. This is used for automatic autowiring
+ * options (the option must be marked as autowired) by looking up in the
+ * registry to find if there is a single instance of matching type,
+ * which then gets configured on the component. This can be used for
+ * automatic configuring JDBC data sources, JMS connection factories,
+ * AWS Clients, etc.
+ *
+ * The option is a: <code>boolean</code> type.
+ *
+ * Default: true
+ * Group: advanced
+ *
+ * @param autowiredEnabled the value to set
+ * @return the dsl builder
+ */
+ default AwsSecurityHubComponentBuilder autowiredEnabled(boolean autowiredEnabled) {
+ doSetProperty("autowiredEnabled", autowiredEnabled);
+ return this;
+ }
+
+ /**
+ * To use an existing configured AWS Security Hub client.
+ *
+ * The option is a:
+ * <code>software.amazon.awssdk.services.securityhub.SecurityHubClient</code> type.
+ *
+ * Group: advanced
+ *
+ * @param securityHubClient the value to set
+ * @return the dsl builder
+ */
+ default AwsSecurityHubComponentBuilder securityHubClient(software.amazon.awssdk.services.securityhub.SecurityHubClient securityHubClient) {
+ doSetProperty("securityHubClient", securityHubClient);
+ return this;
+ }
+
+
+ /**
+ * Used for enabling or disabling all consumer based health checks from
+ * this component.
+ *
+ * The option is a: <code>boolean</code> type.
+ *
+ * Default: true
+ * Group: health
+ *
+ * @param healthCheckConsumerEnabled the value to set
+ * @return the dsl builder
+ */
+ default AwsSecurityHubComponentBuilder healthCheckConsumerEnabled(boolean healthCheckConsumerEnabled) {
+ doSetProperty("healthCheckConsumerEnabled", healthCheckConsumerEnabled);
+ return this;
+ }
+
+
+ /**
+ * Used for enabling or disabling all producer based health checks from
+ * this component. Notice: Camel has by default disabled all producer
+ * based health-checks. You can turn on producer checks globally by
+ * setting camel.health.producersEnabled=true.
+ *
+ * The option is a: <code>boolean</code> type.
+ *
+ * Default: true
+ * Group: health
+ *
+ * @param healthCheckProducerEnabled the value to set
+ * @return the dsl builder
+ */
+ default AwsSecurityHubComponentBuilder healthCheckProducerEnabled(boolean healthCheckProducerEnabled) {
+ doSetProperty("healthCheckProducerEnabled", healthCheckProducerEnabled);
+ return this;
+ }
+
+ /**
+ * To define a proxy host when instantiating the Security Hub client.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: proxy
+ *
+ * @param proxyHost the value to set
+ * @return the dsl builder
+ */
+ default AwsSecurityHubComponentBuilder proxyHost(java.lang.String proxyHost) {
+ doSetProperty("proxyHost", proxyHost);
+ return this;
+ }
+
+ /**
+ * To define a proxy port when instantiating the Security Hub client.
+ *
+ * The option is a: <code>java.lang.Integer</code> type.
+ *
+ * Group: proxy
+ *
+ * @param proxyPort the value to set
+ * @return the dsl builder
+ */
+ default AwsSecurityHubComponentBuilder proxyPort(java.lang.Integer proxyPort) {
+ doSetProperty("proxyPort", proxyPort);
+ return this;
+ }
+
+
+ /**
+ * To define a proxy protocol when instantiating the Security Hub
+ * client.
+ *
+ * The option is a:
+ * <code>software.amazon.awssdk.core.Protocol</code> type.
+ *
+ * Default: HTTPS
+ * Group: proxy
+ *
+ * @param proxyProtocol the value to set
+ * @return the dsl builder
+ */
+ default AwsSecurityHubComponentBuilder proxyProtocol(software.amazon.awssdk.core.Protocol proxyProtocol) {
+ doSetProperty("proxyProtocol", proxyProtocol);
+ return this;
+ }
+
+ /**
+ * Amazon AWS Access Key.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: security
+ *
+ * @param accessKey the value to set
+ * @return the dsl builder
+ */
+ default AwsSecurityHubComponentBuilder accessKey(java.lang.String accessKey) {
+ doSetProperty("accessKey", accessKey);
+ return this;
+ }
+
+ /**
+ * If using a profile credentials provider this parameter will set the
+ * profile name.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: security
+ *
+ * @param profileCredentialsName the value to set
+ * @return the dsl builder
+ */
+ default AwsSecurityHubComponentBuilder profileCredentialsName(java.lang.String profileCredentialsName) {
+ doSetProperty("profileCredentialsName", profileCredentialsName);
+ return this;
+ }
+
+ /**
+ * Amazon AWS Secret Key.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: security
+ *
+ * @param secretKey the value to set
+ * @return the dsl builder
+ */
+ default AwsSecurityHubComponentBuilder secretKey(java.lang.String secretKey) {
+ doSetProperty("secretKey", secretKey);
+ return this;
+ }
+
+ /**
+ * Amazon AWS Session Token used when the user needs to assume an IAM
+ * role.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: security
+ *
+ * @param sessionToken the value to set
+ * @return the dsl builder
+ */
+ default AwsSecurityHubComponentBuilder sessionToken(java.lang.String sessionToken) {
+ doSetProperty("sessionToken", sessionToken);
+ return this;
+ }
+
+
+ /**
+ * If we want to trust all certificates in case of overriding the
+ * endpoint.
+ *
+ * The option is a: <code>boolean</code> type.
+ *
+ * Default: false
+ * Group: security
+ *
+ * @param trustAllCertificates the value to set
+ * @return the dsl builder
+ */
+ default AwsSecurityHubComponentBuilder trustAllCertificates(boolean trustAllCertificates) {
+ doSetProperty("trustAllCertificates", trustAllCertificates);
+ return this;
+ }
+
+
+ /**
+ * Set whether the Security Hub client should expect to load credentials
+ * through a default credentials provider or to expect static
+ * credentials to be passed in.
+ *
+ * The option is a: <code>boolean</code> type.
+ *
+ * Default: false
+ * Group: security
+ *
+ * @param useDefaultCredentialsProvider the value to set
+ * @return the dsl builder
+ */
+ default AwsSecurityHubComponentBuilder useDefaultCredentialsProvider(boolean useDefaultCredentialsProvider) {
+ doSetProperty("useDefaultCredentialsProvider", useDefaultCredentialsProvider);
+ return this;
+ }
+
+
+ /**
+ * Set whether the Security Hub client should expect to load credentials
+ * through a profile credentials provider.
+ *
+ * The option is a: <code>boolean</code> type.
+ *
+ * Default: false
+ * Group: security
+ *
+ * @param useProfileCredentialsProvider the value to set
+ * @return the dsl builder
+ */
+ default AwsSecurityHubComponentBuilder useProfileCredentialsProvider(boolean useProfileCredentialsProvider) {
+ doSetProperty("useProfileCredentialsProvider", useProfileCredentialsProvider);
+ return this;
+ }
+
+
+ /**
+ * Set whether the Security Hub client should expect to use Session
+ * Credentials. This is useful in a situation in which the user needs to
+ * assume an IAM role for doing operations in Security Hub.
+ *
+ * The option is a: <code>boolean</code> type.
+ *
+ * Default: false
+ * Group: security
+ *
+ * @param useSessionCredentials the value to set
+ * @return the dsl builder
+ */
+ default AwsSecurityHubComponentBuilder useSessionCredentials(boolean useSessionCredentials) {
+ doSetProperty("useSessionCredentials", useSessionCredentials);
+ return this;
+ }
+ }
+
+ class AwsSecurityHubComponentBuilderImpl
+ extends AbstractComponentBuilder<SecurityHubComponent>
+ implements AwsSecurityHubComponentBuilder {
+ @Override
+ protected SecurityHubComponent buildConcreteComponent() {
+ return new SecurityHubComponent();
+ }
+ private org.apache.camel.component.aws.securityhub.SecurityHubConfiguration getOrCreateConfiguration(SecurityHubComponent component) {
+ if (component.getConfiguration() == null) {
+ component.setConfiguration(new org.apache.camel.component.aws.securityhub.SecurityHubConfiguration());
+ }
+ return component.getConfiguration();
+ }
+ @Override
+ protected boolean setPropertyOnComponent(
+ Component component,
+ String name,
+ Object value) {
+ switch (name) {
+ case "configuration": ((SecurityHubComponent) component).setConfiguration((org.apache.camel.component.aws.securityhub.SecurityHubConfiguration) value); return true;
+ case "lazyStartProducer": ((SecurityHubComponent) component).setLazyStartProducer((boolean) value); return true;
+ case "operation": getOrCreateConfiguration((SecurityHubComponent) component).setOperation((org.apache.camel.component.aws.securityhub.SecurityHubOperations) value); return true;
+ case "overrideEndpoint": getOrCreateConfiguration((SecurityHubComponent) component).setOverrideEndpoint((boolean) value); return true;
+ case "pojoRequest": getOrCreateConfiguration((SecurityHubComponent) component).setPojoRequest((boolean) value); return true;
+ case "region": getOrCreateConfiguration((SecurityHubComponent) component).setRegion((java.lang.String) value); return true;
+ case "uriEndpointOverride": getOrCreateConfiguration((SecurityHubComponent) component).setUriEndpointOverride((java.lang.String) value); return true;
+ case "autowiredEnabled": ((SecurityHubComponent) component).setAutowiredEnabled((boolean) value); return true;
+ case "securityHubClient": getOrCreateConfiguration((SecurityHubComponent) component).setSecurityHubClient((software.amazon.awssdk.services.securityhub.SecurityHubClient) value); return true;
+ case "healthCheckConsumerEnabled": ((SecurityHubComponent) component).setHealthCheckConsumerEnabled((boolean) value); return true;
+ case "healthCheckProducerEnabled": ((SecurityHubComponent) component).setHealthCheckProducerEnabled((boolean) value); return true;
+ case "proxyHost": getOrCreateConfiguration((SecurityHubComponent) component).setProxyHost((java.lang.String) value); return true;
+ case "proxyPort": getOrCreateConfiguration((SecurityHubComponent) component).setProxyPort((java.lang.Integer) value); return true;
+ case "proxyProtocol": getOrCreateConfiguration((SecurityHubComponent) component).setProxyProtocol((software.amazon.awssdk.core.Protocol) value); return true;
+ case "accessKey": getOrCreateConfiguration((SecurityHubComponent) component).setAccessKey((java.lang.String) value); return true;
+ case "profileCredentialsName": getOrCreateConfiguration((SecurityHubComponent) component).setProfileCredentialsName((java.lang.String) value); return true;
+ case "secretKey": getOrCreateConfiguration((SecurityHubComponent) component).setSecretKey((java.lang.String) value); return true;
+ case "sessionToken": getOrCreateConfiguration((SecurityHubComponent) component).setSessionToken((java.lang.String) value); return true;
+ case "trustAllCertificates": getOrCreateConfiguration((SecurityHubComponent) component).setTrustAllCertificates((boolean) value); return true;
+ case "useDefaultCredentialsProvider": getOrCreateConfiguration((SecurityHubComponent) component).setUseDefaultCredentialsProvider((boolean) value); return true;
+ case "useProfileCredentialsProvider": getOrCreateConfiguration((SecurityHubComponent) component).setUseProfileCredentialsProvider((boolean) value); return true;
+ case "useSessionCredentials": getOrCreateConfiguration((SecurityHubComponent) component).setUseSessionCredentials((boolean) value); return true;
+ default: return false;
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilderFactory.java b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilderFactory.java
index 7b2a95d783f8..0eb3e41ce504 100644
--- a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilderFactory.java
+++ b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilderFactory.java
@@ -316,6 +316,7 @@ public interface EndpointBuilderFactory
org.apache.camel.builder.endpoint.dsl.SchematronEndpointBuilderFactory.SchematronBuilders,
org.apache.camel.builder.endpoint.dsl.ScpEndpointBuilderFactory.ScpBuilders,
org.apache.camel.builder.endpoint.dsl.SecretsManagerEndpointBuilderFactory.SecretsManagerBuilders,
+ org.apache.camel.builder.endpoint.dsl.SecurityHubEndpointBuilderFactory.SecurityHubBuilders,
org.apache.camel.builder.endpoint.dsl.SedaEndpointBuilderFactory.SedaBuilders,
org.apache.camel.builder.endpoint.dsl.ServerEndpointBuilderFactory.ServerBuilders,
org.apache.camel.builder.endpoint.dsl.ServiceBusEndpointBuilderFactory.ServiceBusBuilders,
diff --git a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilders.java b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilders.java
index 11c627a0888d..4180f0b97a2d 100644
--- a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilders.java
+++ b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilders.java
@@ -313,6 +313,7 @@ public interface EndpointBuilders
org.apache.camel.builder.endpoint.dsl.SchematronEndpointBuilderFactory,
org.apache.camel.builder.endpoint.dsl.ScpEndpointBuilderFactory,
org.apache.camel.builder.endpoint.dsl.SecretsManagerEndpointBuilderFactory,
+ org.apache.camel.builder.endpoint.dsl.SecurityHubEndpointBuilderFactory,
org.apache.camel.builder.endpoint.dsl.SedaEndpointBuilderFactory,
org.apache.camel.builder.endpoint.dsl.ServerEndpointBuilderFactory,
org.apache.camel.builder.endpoint.dsl.ServiceBusEndpointBuilderFactory,
diff --git a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java
index a6152e9da069..e1792d65f1ec 100644
--- a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java
+++ b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java
@@ -696,6 +696,46 @@ public class StaticEndpointBuilders {
public static SecretsManagerEndpointBuilderFactory.SecretsManagerEndpointBuilder awsSecretsManager(String componentName, String path) {
return SecretsManagerEndpointBuilderFactory.endpointBuilder(componentName, path);
}
+ /**
+ * AWS Security Hub (camel-aws-security-hub)
+ * Manage and interact with AWS Security Hub for security findings.
+ *
+ * Category: cloud,security
+ * Since: 4.18
+ * Maven coordinates: org.apache.camel:camel-aws-security-hub
+ *
+ * Syntax: <code>aws-security-hub:label</code>
+ *
+ * Path parameter: label (required)
+ * Logical name
+ *
+ * @param path label
+ * @return the dsl builder
+ */
+ public static SecurityHubEndpointBuilderFactory.SecurityHubEndpointBuilder awsSecurityHub(String path) {
+ return awsSecurityHub("aws-security-hub", path);
+ }
+ /**
+ * AWS Security Hub (camel-aws-security-hub)
+ * Manage and interact with AWS Security Hub for security findings.
+ *
+ * Category: cloud,security
+ * Since: 4.18
+ * Maven coordinates: org.apache.camel:camel-aws-security-hub
+ *
+ * Syntax: <code>aws-security-hub:label</code>
+ *
+ * Path parameter: label (required)
+ * Logical name
+ *
+ * @param componentName to use a custom component name for the endpoint
+ * instead of the default name
+ * @param path label
+ * @return the dsl builder
+ */
+ public static SecurityHubEndpointBuilderFactory.SecurityHubEndpointBuilder awsSecurityHub(String componentName, String path) {
+ return SecurityHubEndpointBuilderFactory.endpointBuilder(componentName, path);
+ }
/**
* AWS Athena (camel-aws2-athena)
* Access AWS Athena.
diff --git a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/SecurityHubEndpointBuilderFactory.java b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/SecurityHubEndpointBuilderFactory.java
new file mode 100644
index 000000000000..11bb46e37e43
--- /dev/null
+++ b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/SecurityHubEndpointBuilderFactory.java
@@ -0,0 +1,865 @@
+/* Generated by camel build tools - do NOT edit this file! */
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.builder.endpoint.dsl;
+
+import java.util.*;
+import java.util.concurrent.*;
+import java.util.function.*;
+import java.util.stream.*;
+import javax.annotation.processing.Generated;
+import org.apache.camel.builder.EndpointConsumerBuilder;
+import org.apache.camel.builder.EndpointProducerBuilder;
+import org.apache.camel.builder.endpoint.AbstractEndpointBuilder;
+
+/**
+ * Manage and interact with AWS Security Hub for security findings.
+ *
+ * Generated by camel build tools - do NOT edit this file!
+ */
+@Generated("org.apache.camel.maven.packaging.EndpointDslMojo")
+public interface SecurityHubEndpointBuilderFactory {
+
+ /**
+ * Builder for endpoint for the AWS Security Hub component.
+ */
+ public interface SecurityHubEndpointBuilder
+ extends
+ EndpointProducerBuilder {
+ default AdvancedSecurityHubEndpointBuilder advanced() {
+ return (AdvancedSecurityHubEndpointBuilder) this;
+ }
+
+ /**
+ * The operation to perform.
+ *
+ * The option is a:
+ * <code>org.apache.camel.component.aws.securityhub.SecurityHubOperations</code> type.
+ *
+ * Required: true
+ * Default: batchImportFindings
+ * Group: producer
+ *
+ * @param operation the value to set
+ * @return the dsl builder
+ */
+ default SecurityHubEndpointBuilder operation(org.apache.camel.component.aws.securityhub.SecurityHubOperations operation) {
+ doSetProperty("operation", operation);
+ return this;
+ }
+ /**
+ * The operation to perform.
+ *
+ * The option will be converted to a
+ * <code>org.apache.camel.component.aws.securityhub.SecurityHubOperations</code> type.
+ *
+ * Required: true
+ * Default: batchImportFindings
+ * Group: producer
+ *
+ * @param operation the value to set
+ * @return the dsl builder
+ */
+ default SecurityHubEndpointBuilder operation(String operation) {
+ doSetProperty("operation", operation);
+ return this;
+ }
+ /**
+ * Set the need for overriding the endpoint. This option needs to be
+ * used in combination with the uriEndpointOverride option.
+ *
+ * The option is a: <code>boolean</code> type.
+ *
+ * Default: false
+ * Group: producer
+ *
+ * @param overrideEndpoint the value to set
+ * @return the dsl builder
+ */
+ default SecurityHubEndpointBuilder overrideEndpoint(boolean overrideEndpoint) {
+ doSetProperty("overrideEndpoint", overrideEndpoint);
+ return this;
+ }
+ /**
+ * Set the need for overriding the endpoint. This option needs to be
+ * used in combination with the uriEndpointOverride option.
+ *
+ * The option will be converted to a <code>boolean</code> type.
+ *
+ * Default: false
+ * Group: producer
+ *
+ * @param overrideEndpoint the value to set
+ * @return the dsl builder
+ */
+ default SecurityHubEndpointBuilder overrideEndpoint(String overrideEndpoint) {
+ doSetProperty("overrideEndpoint", overrideEndpoint);
+ return this;
+ }
+ /**
+ * If we want to use a POJO request as body or not.
+ *
+ * The option is a: <code>boolean</code> type.
+ *
+ * Default: false
+ * Group: producer
+ *
+ * @param pojoRequest the value to set
+ * @return the dsl builder
+ */
+ default SecurityHubEndpointBuilder pojoRequest(boolean pojoRequest) {
+ doSetProperty("pojoRequest", pojoRequest);
+ return this;
+ }
+ /**
+ * If we want to use a POJO request as body or not.
+ *
+ * The option will be converted to a <code>boolean</code> type.
+ *
+ * Default: false
+ * Group: producer
+ *
+ * @param pojoRequest the value to set
+ * @return the dsl builder
+ */
+ default SecurityHubEndpointBuilder pojoRequest(String pojoRequest) {
+ doSetProperty("pojoRequest", pojoRequest);
+ return this;
+ }
+ /**
+ * The region in which the Security Hub client needs to work. When using
+ * this parameter, the configuration will expect the lowercase name of
+ * the region (for example, ap-east-1) You'll need to use the name
+ * Region.EU_WEST_1.id().
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: producer
+ *
+ * @param region the value to set
+ * @return the dsl builder
+ */
+ default SecurityHubEndpointBuilder region(String region) {
+ doSetProperty("region", region);
+ return this;
+ }
+ /**
+ * Set the overriding uri endpoint. This option needs to be used in
+ * combination with overrideEndpoint option.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: producer
+ *
+ * @param uriEndpointOverride the value to set
+ * @return the dsl builder
+ */
+ default SecurityHubEndpointBuilder uriEndpointOverride(String uriEndpointOverride) {
+ doSetProperty("uriEndpointOverride", uriEndpointOverride);
+ return this;
+ }
+ /**
+ * To define a proxy host when instantiating the Security Hub client.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: proxy
+ *
+ * @param proxyHost the value to set
+ * @return the dsl builder
+ */
+ default SecurityHubEndpointBuilder proxyHost(String proxyHost) {
+ doSetProperty("proxyHost", proxyHost);
+ return this;
+ }
+ /**
+ * To define a proxy port when instantiating the Security Hub client.
+ *
+ * The option is a: <code>java.lang.Integer</code> type.
+ *
+ * Group: proxy
+ *
+ * @param proxyPort the value to set
+ * @return the dsl builder
+ */
+ default SecurityHubEndpointBuilder proxyPort(Integer proxyPort) {
+ doSetProperty("proxyPort", proxyPort);
+ return this;
+ }
+ /**
+ * To define a proxy port when instantiating the Security Hub client.
+ *
+ * The option will be converted to a <code>java.lang.Integer</code>
+ * type.
+ *
+ * Group: proxy
+ *
+ * @param proxyPort the value to set
+ * @return the dsl builder
+ */
+ default SecurityHubEndpointBuilder proxyPort(String proxyPort) {
+ doSetProperty("proxyPort", proxyPort);
+ return this;
+ }
+ /**
+ * To define a proxy protocol when instantiating the Security Hub
+ * client.
+ *
+ * The option is a: <code>software.amazon.awssdk.core.Protocol</code>
+ * type.
+ *
+ * Default: HTTPS
+ * Group: proxy
+ *
+ * @param proxyProtocol the value to set
+ * @return the dsl builder
+ */
+ default SecurityHubEndpointBuilder proxyProtocol(software.amazon.awssdk.core.Protocol proxyProtocol) {
+ doSetProperty("proxyProtocol", proxyProtocol);
+ return this;
+ }
+ /**
+ * To define a proxy protocol when instantiating the Security Hub
+ * client.
+ *
+ * The option will be converted to a
+ * <code>software.amazon.awssdk.core.Protocol</code> type.
+ *
+ * Default: HTTPS
+ * Group: proxy
+ *
+ * @param proxyProtocol the value to set
+ * @return the dsl builder
+ */
+ default SecurityHubEndpointBuilder proxyProtocol(String proxyProtocol) {
+ doSetProperty("proxyProtocol", proxyProtocol);
+ return this;
+ }
+ /**
+ * Amazon AWS Access Key.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: security
+ *
+ * @param accessKey the value to set
+ * @return the dsl builder
+ */
+ default SecurityHubEndpointBuilder accessKey(String accessKey) {
+ doSetProperty("accessKey", accessKey);
+ return this;
+ }
+ /**
+ * If using a profile credentials provider this parameter will set the
+ * profile name.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: security
+ *
+ * @param profileCredentialsName the value to set
+ * @return the dsl builder
+ */
+ default SecurityHubEndpointBuilder profileCredentialsName(String profileCredentialsName) {
+ doSetProperty("profileCredentialsName", profileCredentialsName);
+ return this;
+ }
+ /**
+ * Amazon AWS Secret Key.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: security
+ *
+ * @param secretKey the value to set
+ * @return the dsl builder
+ */
+ default SecurityHubEndpointBuilder secretKey(String secretKey) {
+ doSetProperty("secretKey", secretKey);
+ return this;
+ }
+ /**
+ * Amazon AWS Session Token used when the user needs to assume an IAM
+ * role.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: security
+ *
+ * @param sessionToken the value to set
+ * @return the dsl builder
+ */
+ default SecurityHubEndpointBuilder sessionToken(String sessionToken) {
+ doSetProperty("sessionToken", sessionToken);
+ return this;
+ }
+ /**
+ * If we want to trust all certificates in case of overriding the
+ * endpoint.
+ *
+ * The option is a: <code>boolean</code> type.
+ *
+ * Default: false
+ * Group: security
+ *
+ * @param trustAllCertificates the value to set
+ * @return the dsl builder
+ */
+ default SecurityHubEndpointBuilder trustAllCertificates(boolean trustAllCertificates) {
+ doSetProperty("trustAllCertificates", trustAllCertificates);
+ return this;
+ }
+ /**
+ * If we want to trust all certificates in case of overriding the
+ * endpoint.
+ *
+ * The option will be converted to a <code>boolean</code> type.
+ *
+ * Default: false
+ * Group: security
+ *
+ * @param trustAllCertificates the value to set
+ * @return the dsl builder
+ */
+ default SecurityHubEndpointBuilder trustAllCertificates(String trustAllCertificates) {
+ doSetProperty("trustAllCertificates", trustAllCertificates);
+ return this;
+ }
+ /**
+ * Set whether the Security Hub client should expect to load credentials
+ * through a default credentials provider or to expect static
+ * credentials to be passed in.
+ *
+ * The option is a: <code>boolean</code> type.
+ *
+ * Default: false
+ * Group: security
+ *
+ * @param useDefaultCredentialsProvider the value to set
+ * @return the dsl builder
+ */
+ default SecurityHubEndpointBuilder useDefaultCredentialsProvider(boolean useDefaultCredentialsProvider) {
+ doSetProperty("useDefaultCredentialsProvider", useDefaultCredentialsProvider);
+ return this;
+ }
+ /**
+ * Set whether the Security Hub client should expect to load credentials
+ * through a default credentials provider or to expect static
+ * credentials to be passed in.
+ *
+ * The option will be converted to a <code>boolean</code> type.
+ *
+ * Default: false
+ * Group: security
+ *
+ * @param useDefaultCredentialsProvider the value to set
+ * @return the dsl builder
+ */
+ default SecurityHubEndpointBuilder useDefaultCredentialsProvider(String useDefaultCredentialsProvider) {
+ doSetProperty("useDefaultCredentialsProvider", useDefaultCredentialsProvider);
+ return this;
+ }
+ /**
+ * Set whether the Security Hub client should expect to load credentials
+ * through a profile credentials provider.
+ *
+ * The option is a: <code>boolean</code> type.
+ *
+ * Default: false
+ * Group: security
+ *
+ * @param useProfileCredentialsProvider the value to set
+ * @return the dsl builder
+ */
+ default SecurityHubEndpointBuilder useProfileCredentialsProvider(boolean useProfileCredentialsProvider) {
+ doSetProperty("useProfileCredentialsProvider", useProfileCredentialsProvider);
+ return this;
+ }
+ /**
+ * Set whether the Security Hub client should expect to load credentials
+ * through a profile credentials provider.
+ *
+ * The option will be converted to a <code>boolean</code> type.
+ *
+ * Default: false
+ * Group: security
+ *
+ * @param useProfileCredentialsProvider the value to set
+ * @return the dsl builder
+ */
+ default SecurityHubEndpointBuilder useProfileCredentialsProvider(String useProfileCredentialsProvider) {
+ doSetProperty("useProfileCredentialsProvider", useProfileCredentialsProvider);
+ return this;
+ }
+ /**
+ * Set whether the Security Hub client should expect to use Session
+ * Credentials. This is useful in a situation in which the user needs to
+ * assume an IAM role for doing operations in Security Hub.
+ *
+ * The option is a: <code>boolean</code> type.
+ *
+ * Default: false
+ * Group: security
+ *
+ * @param useSessionCredentials the value to set
+ * @return the dsl builder
+ */
+ default SecurityHubEndpointBuilder useSessionCredentials(boolean useSessionCredentials) {
+ doSetProperty("useSessionCredentials", useSessionCredentials);
+ return this;
+ }
+ /**
+ * Set whether the Security Hub client should expect to use Session
+ * Credentials. This is useful in a situation in which the user needs to
+ * assume an IAM role for doing operations in Security Hub.
+ *
+ * The option will be converted to a <code>boolean</code> type.
+ *
+ * Default: false
+ * Group: security
+ *
+ * @param useSessionCredentials the value to set
+ * @return the dsl builder
+ */
+ default SecurityHubEndpointBuilder useSessionCredentials(String useSessionCredentials) {
+ doSetProperty("useSessionCredentials", useSessionCredentials);
+ return this;
+ }
+ }
+
+ /**
+ * Advanced builder for endpoint for the AWS Security Hub component.
+ */
+ public interface AdvancedSecurityHubEndpointBuilder
+ extends
+ EndpointProducerBuilder {
+ default SecurityHubEndpointBuilder basic() {
+ return (SecurityHubEndpointBuilder) this;
+ }
+
+ /**
+ * Whether the producer should be started lazy (on the first message).
+ * By starting lazy you can use this to allow CamelContext and routes to
+ * startup in situations where a producer may otherwise fail during
+ * starting and cause the route to fail being started. By deferring this
+ * startup to be lazy then the startup failure can be handled during
+ * routing messages via Camel's routing error handlers. Beware that when
+ * the first message is processed then creating and starting the
+ * producer may take a little time and prolong the total processing time
+ * of the processing.
+ *
+ * The option is a: <code>boolean</code> type.
+ *
+ * Default: false
+ * Group: producer (advanced)
+ *
+ * @param lazyStartProducer the value to set
+ * @return the dsl builder
+ */
+ default AdvancedSecurityHubEndpointBuilder lazyStartProducer(boolean lazyStartProducer) {
+ doSetProperty("lazyStartProducer", lazyStartProducer);
+ return this;
+ }
+ /**
+ * Whether the producer should be started lazy (on the first message).
+ * By starting lazy you can use this to allow CamelContext and routes to
+ * startup in situations where a producer may otherwise fail during
+ * starting and cause the route to fail being started. By deferring this
+ * startup to be lazy then the startup failure can be handled during
+ * routing messages via Camel's routing error handlers. Beware that when
+ * the first message is processed then creating and starting the
+ * producer may take a little time and prolong the total processing time
+ * of the processing.
+ *
+ * The option will be converted to a <code>boolean</code> type.
+ *
+ * Default: false
+ * Group: producer (advanced)
+ *
+ * @param lazyStartProducer the value to set
+ * @return the dsl builder
+ */
+ default AdvancedSecurityHubEndpointBuilder lazyStartProducer(String lazyStartProducer) {
+ doSetProperty("lazyStartProducer", lazyStartProducer);
+ return this;
+ }
+ /**
+ * To use an existing configured AWS Security Hub client.
+ *
+ * The option is a:
+ * <code>software.amazon.awssdk.services.securityhub.SecurityHubClient</code> type.
+ *
+ * Group: advanced
+ *
+ * @param securityHubClient the value to set
+ * @return the dsl builder
+ */
+ default AdvancedSecurityHubEndpointBuilder securityHubClient(software.amazon.awssdk.services.securityhub.SecurityHubClient securityHubClient) {
+ doSetProperty("securityHubClient", securityHubClient);
+ return this;
+ }
+ /**
+ * To use an existing configured AWS Security Hub client.
+ *
+ * The option will be converted to a
+ * <code>software.amazon.awssdk.services.securityhub.SecurityHubClient</code> type.
+ *
+ * Group: advanced
+ *
+ * @param securityHubClient the value to set
+ * @return the dsl builder
+ */
+ default AdvancedSecurityHubEndpointBuilder securityHubClient(String securityHubClient) {
+ doSetProperty("securityHubClient", securityHubClient);
+ return this;
+ }
+ }
+
+ public interface SecurityHubBuilders {
+ /**
+ * AWS Security Hub (camel-aws-security-hub)
+ * Manage and interact with AWS Security Hub for security findings.
+ *
+ * Category: cloud,security
+ * Since: 4.18
+ * Maven coordinates: org.apache.camel:camel-aws-security-hub
+ *
+ * @return the dsl builder for the headers' name.
+ */
+ default SecurityHubHeaderNameBuilder awsSecurityHub() {
+ return SecurityHubHeaderNameBuilder.INSTANCE;
+ }
+ /**
+ * AWS Security Hub (camel-aws-security-hub)
+ * Manage and interact with AWS Security Hub for security findings.
+ *
+ * Category: cloud,security
+ * Since: 4.18
+ * Maven coordinates: org.apache.camel:camel-aws-security-hub
+ *
+ * Syntax: <code>aws-security-hub:label</code>
+ *
+ * Path parameter: label (required)
+ * Logical name
+ *
+ * @param path label
+ * @return the dsl builder
+ */
+ default SecurityHubEndpointBuilder awsSecurityHub(String path) {
+ return SecurityHubEndpointBuilderFactory.endpointBuilder("aws-security-hub", path);
+ }
+ /**
+ * AWS Security Hub (camel-aws-security-hub)
+ * Manage and interact with AWS Security Hub for security findings.
+ *
+ * Category: cloud,security
+ * Since: 4.18
+ * Maven coordinates: org.apache.camel:camel-aws-security-hub
+ *
+ * Syntax: <code>aws-security-hub:label</code>
+ *
+ * Path parameter: label (required)
+ * Logical name
+ *
+ * @param componentName to use a custom component name for the endpoint
+ * instead of the default name
+ * @param path label
+ * @return the dsl builder
+ */
+ default SecurityHubEndpointBuilder awsSecurityHub(String componentName, String path) {
+ return SecurityHubEndpointBuilderFactory.endpointBuilder(componentName, path);
+ }
+
+ }
+ /**
+ * The builder of headers' name for the AWS Security Hub component.
+ */
+ public static class SecurityHubHeaderNameBuilder {
+ /**
+ * The internal instance of the builder used to access to all the
+ * methods representing the name of headers.
+ */
+ private static final SecurityHubHeaderNameBuilder INSTANCE = new SecurityHubHeaderNameBuilder();
+
+ /**
+ * The operation we want to perform.
+ *
+ * The option is a: {@code String} type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code AwsSecurityHubOperation}.
+ */
+ public String awsSecurityHubOperation() {
+ return "CamelAwsSecurityHubOperation";
+ }
+ /**
+ * The list of findings to import.
+ *
+ * The option is a: {@code List<AwsSecurityFinding>} type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code AwsSecurityHubFindings}.
+ */
+ public String awsSecurityHubFindings() {
+ return "CamelAwsSecurityHubFindings";
+ }
+ /**
+ * The finding identifiers for batch update.
+ *
+ * The option is a: {@code List<AwsSecurityFindingIdentifier>} type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code
+ * AwsSecurityHubFindingIdentifiers}.
+ */
+ public String awsSecurityHubFindingIdentifiers() {
+ return "CamelAwsSecurityHubFindingIdentifiers";
+ }
+ /**
+ * The filters to apply when retrieving findings.
+ *
+ * The option is a: {@code AwsSecurityFindingFilters} type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code AwsSecurityHubFilters}.
+ */
+ public String awsSecurityHubFilters() {
+ return "CamelAwsSecurityHubFilters";
+ }
+ /**
+ * The note to add to findings during update.
+ *
+ * The option is a: {@code NoteUpdate} type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code AwsSecurityHubNote}.
+ */
+ public String awsSecurityHubNote() {
+ return "CamelAwsSecurityHubNote";
+ }
+ /**
+ * The severity to set on findings during update.
+ *
+ * The option is a: {@code SeverityUpdate} type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code AwsSecurityHubSeverity}.
+ */
+ public String awsSecurityHubSeverity() {
+ return "CamelAwsSecurityHubSeverity";
+ }
+ /**
+ * The workflow status to set on findings.
+ *
+ * The option is a: {@code WorkflowUpdate} type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code AwsSecurityHubWorkflow}.
+ */
+ public String awsSecurityHubWorkflow() {
+ return "CamelAwsSecurityHubWorkflow";
+ }
+ /**
+ * The verification state to set on findings.
+ *
+ * The option is a: {@code String} type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code
+ * AwsSecurityHubVerificationState}.
+ */
+ public String awsSecurityHubVerificationState() {
+ return "CamelAwsSecurityHubVerificationState";
+ }
+ /**
+ * The confidence level to set on findings.
+ *
+ * The option is a: {@code Integer} type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code AwsSecurityHubConfidence}.
+ */
+ public String awsSecurityHubConfidence() {
+ return "CamelAwsSecurityHubConfidence";
+ }
+ /**
+ * The criticality level to set on findings.
+ *
+ * The option is a: {@code Integer} type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code AwsSecurityHubCriticality}.
+ */
+ public String awsSecurityHubCriticality() {
+ return "CamelAwsSecurityHubCriticality";
+ }
+ /**
+ * User-defined fields to add to findings.
+ *
+ * The option is a: {@code Map<String, String>} type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code
+ * AwsSecurityHubUserDefinedFields}.
+ */
+ public String awsSecurityHubUserDefinedFields() {
+ return "CamelAwsSecurityHubUserDefinedFields";
+ }
+ /**
+ * Related findings to associate.
+ *
+ * The option is a: {@code List<RelatedFinding>} type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code AwsSecurityHubRelatedFindings}.
+ */
+ public String awsSecurityHubRelatedFindings() {
+ return "CamelAwsSecurityHubRelatedFindings";
+ }
+ /**
+ * The types to assign to findings.
+ *
+ * The option is a: {@code List<String>} type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code AwsSecurityHubTypes}.
+ */
+ public String awsSecurityHubTypes() {
+ return "CamelAwsSecurityHubTypes";
+ }
+ /**
+ * The token for the next set of results.
+ *
+ * The option is a: {@code String} type.
+ *
+ * Group: getFindings listEnabledProductsForImport getFindingHistory
+ *
+ * @return the name of the header {@code AwsSecurityHubNextToken}.
+ */
+ public String awsSecurityHubNextToken() {
+ return "CamelAwsSecurityHubNextToken";
+ }
+ /**
+ * The maximum number of results to return.
+ *
+ * The option is a: {@code Integer} type.
+ *
+ * Group: getFindings
+ *
+ * @return the name of the header {@code AwsSecurityHubMaxResults}.
+ */
+ public String awsSecurityHubMaxResults() {
+ return "CamelAwsSecurityHubMaxResults";
+ }
+ /**
+ * The count of findings that failed to import.
+ *
+ * The option is a: {@code Integer} type.
+ *
+ * Group: batchImportFindings
+ *
+ * @return the name of the header {@code AwsSecurityHubFailedCount}.
+ */
+ public String awsSecurityHubFailedCount() {
+ return "CamelAwsSecurityHubFailedCount";
+ }
+ /**
+ * The count of findings that were successfully imported.
+ *
+ * The option is a: {@code Integer} type.
+ *
+ * Group: batchImportFindings
+ *
+ * @return the name of the header {@code AwsSecurityHubSuccessCount}.
+ */
+ public String awsSecurityHubSuccessCount() {
+ return "CamelAwsSecurityHubSuccessCount";
+ }
+ /**
+ * The list of findings that were not updated.
+ *
+ * The option is a: {@code List<BatchUpdateFindingsUnprocessedFinding>}
+ * type.
+ *
+ * Group: batchUpdateFindings
+ *
+ * @return the name of the header {@code
+ * AwsSecurityHubUnprocessedFindings}.
+ */
+ public String awsSecurityHubUnprocessedFindings() {
+ return "CamelAwsSecurityHubUnprocessedFindings";
+ }
+ /**
+ * The list of findings that were updated successfully.
+ *
+ * The option is a: {@code List<AwsSecurityFindingIdentifier>} type.
+ *
+ * Group: batchUpdateFindings
+ *
+ * @return the name of the header {@code
+ * AwsSecurityHubProcessedFindings}.
+ */
+ public String awsSecurityHubProcessedFindings() {
+ return "CamelAwsSecurityHubProcessedFindings";
+ }
+ /**
+ * The finding ID to get history for.
+ *
+ * The option is a: {@code String} type.
+ *
+ * Group: getFindingHistory
+ *
+ * @return the name of the header {@code AwsSecurityHubFindingId}.
+ */
+ public String awsSecurityHubFindingId() {
+ return "CamelAwsSecurityHubFindingId";
+ }
+ /**
+ * The product ARN for the finding.
+ *
+ * The option is a: {@code String} type.
+ *
+ * Group: getFindingHistory
+ *
+ * @return the name of the header {@code AwsSecurityHubProductArn}.
+ */
+ public String awsSecurityHubProductArn() {
+ return "CamelAwsSecurityHubProductArn";
+ }
+ }
+ static SecurityHubEndpointBuilder endpointBuilder(String componentName, String path) {
+ class SecurityHubEndpointBuilderImpl extends AbstractEndpointBuilder implements SecurityHubEndpointBuilder, AdvancedSecurityHubEndpointBuilder {
+ public SecurityHubEndpointBuilderImpl(String path) {
+ super(componentName, path);
+ }
+ }
+ return new SecurityHubEndpointBuilderImpl(path);
+ }
+}
\ No newline at end of file
diff --git a/dsl/camel-kamelet-main/src/generated/resources/camel-component-known-dependencies.properties b/dsl/camel-kamelet-main/src/generated/resources/camel-component-known-dependencies.properties
index 61e59ed3a897..86e73d3af1d1 100644
--- a/dsl/camel-kamelet-main/src/generated/resources/camel-component-known-dependencies.properties
+++ b/dsl/camel-kamelet-main/src/generated/resources/camel-component-known-dependencies.properties
@@ -29,6 +29,7 @@ org.apache.camel.component.avro.AvroComponent=camel:avro-rpc
org.apache.camel.component.aws.cloudtrail.CloudtrailComponent=camel:aws-cloudtrail
org.apache.camel.component.aws.config.AWSConfigComponent=camel:aws-config
org.apache.camel.component.aws.secretsmanager.SecretsManagerComponent=camel:aws-secrets-manager
+org.apache.camel.component.aws.securityhub.SecurityHubComponent=camel:aws-security-hub
org.apache.camel.component.aws2.athena.Athena2Component=camel:aws2-athena
org.apache.camel.component.aws2.bedrock.agent.BedrockAgentComponent=camel:aws-bedrock
org.apache.camel.component.aws2.bedrock.agentruntime.BedrockAgentRuntimeComponent=camel:aws-bedrock
diff --git a/parent/pom.xml b/parent/pom.xml
index c88e18309be7..cdb3390a2ee9 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -834,6 +834,11 @@
<artifactId>camel-aws-secrets-manager</artifactId>
<version>${project.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-aws-security-hub</artifactId>
+ <version>${project.version}</version>
+ </dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-aws-xray</artifactId>
diff --git a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/MojoHelper.java b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/MojoHelper.java
index fe1ed8dfef99..9014bc770ebf 100644
--- a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/MojoHelper.java
+++ b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/MojoHelper.java
@@ -126,7 +126,7 @@ public final class MojoHelper {
dir.resolve("camel-aws-xray"), dir.resolve("camel-aws-secrets-manager"),
dir.resolve("camel-aws-cloudtrail"), dir.resolve("camel-aws-config"), dir.resolve("camel-aws-bedrock"),
dir.resolve("camel-aws2-textract"), dir.resolve("camel-aws2-transcribe"),
- dir.resolve("camel-aws2-s3-vectors"));
+ dir.resolve("camel-aws2-s3-vectors"), dir.resolve("camel-aws-security-hub"));
case "camel-vertx":
return Arrays.asList(dir.resolve("camel-vertx"),
dir.resolve("camel-vertx-http"),