Skip to content

Commit 6947808

Browse files
JinyuChen97claude
andcommitted
Fixes #5566. Add AWS CloudTrail native extension
Add native support for the AWS CloudTrail component, enabling users to interact with AWS CloudTrail service in native mode. This implementation includes: - Runtime and deployment modules for native compilation - Integration tests with WireMock for testing CloudTrail operations - Consumer support for polling CloudTrail events - Documentation and extension metadata Co-Authored-By: Jinyu Chen Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent f627430 commit 6947808

28 files changed

Lines changed: 1120 additions & 0 deletions

File tree

catalog/pom.xml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,19 @@
227227
</exclusion>
228228
</exclusions>
229229
</dependency>
230+
<dependency>
231+
<groupId>org.apache.camel.quarkus</groupId>
232+
<artifactId>camel-quarkus-aws-cloudtrail</artifactId>
233+
<version>${project.version}</version>
234+
<type>pom</type>
235+
<scope>test</scope>
236+
<exclusions>
237+
<exclusion>
238+
<groupId>*</groupId>
239+
<artifactId>*</artifactId>
240+
</exclusion>
241+
</exclusions>
242+
</dependency>
230243
<dependency>
231244
<groupId>org.apache.camel.quarkus</groupId>
232245
<artifactId>camel-quarkus-aws-secrets-manager</artifactId>
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Do not edit directly!
2+
# This file was generated by camel-quarkus-maven-plugin:update-extension-doc-page
3+
cqArtifactId: camel-quarkus-aws-cloudtrail
4+
cqArtifactIdBase: aws-cloudtrail
5+
cqNativeSupported: true
6+
cqStatus: Stable
7+
cqDeprecated: false
8+
cqJvmSince: 3.37.0
9+
cqNativeSince: 3.37.0
10+
cqCamelPartName: aws-cloudtrail
11+
cqCamelPartTitle: AWS Cloudtrail
12+
cqCamelPartDescription: Consume events from Amazon Cloudtrail using AWS SDK version 2.x.
13+
cqExtensionPageTitle: AWS Cloudtrail

docs/modules/ROOT/nav.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
*** xref:reference/extensions/aws2-sqs.adoc[AWS 2 Simple Queue Service (SQS)]
5454
*** xref:reference/extensions/aws2-translate.adoc[AWS 2 Translate]
5555
*** xref:reference/extensions/aws-bedrock.adoc[AWS Bedrock]
56+
*** xref:reference/extensions/aws-cloudtrail.adoc[AWS Cloudtrail]
5657
*** xref:reference/extensions/aws-secrets-manager.adoc[AWS Secrets Manager]
5758
*** xref:reference/extensions/aws-xray.adoc[AWS XRay]
5859
*** xref:reference/extensions/activemq.adoc[ActiveMQ]
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
// Do not edit directly!
2+
// This file was generated by camel-quarkus-maven-plugin:update-extension-doc-page
3+
[id="extensions-aws-cloudtrail"]
4+
= AWS Cloudtrail
5+
:linkattrs:
6+
:cq-artifact-id: camel-quarkus-aws-cloudtrail
7+
:cq-native-supported: true
8+
:cq-status: Stable
9+
:cq-status-deprecation: Stable
10+
:cq-description: Consume events from Amazon Cloudtrail using AWS SDK version 2.x.
11+
:cq-deprecated: false
12+
:cq-jvm-since: 3.37.0
13+
:cq-native-since: 3.37.0
14+
15+
ifeval::[{doc-show-badges} == true]
16+
[.badges]
17+
[.badge-key]##JVM since##[.badge-supported]##3.37.0## [.badge-key]##Native since##[.badge-supported]##3.37.0##
18+
endif::[]
19+
20+
Consume events from Amazon Cloudtrail using AWS SDK version 2.x.
21+
22+
[id="extensions-aws-cloudtrail-whats-inside"]
23+
== What's inside
24+
25+
* xref:{cq-camel-components}::aws-cloudtrail-component.adoc[AWS Cloudtrail component], URI syntax: `aws-cloudtrail:label`
26+
27+
Please refer to the above link for usage and configuration details.
28+
29+
[id="extensions-aws-cloudtrail-maven-coordinates"]
30+
== Maven coordinates
31+
32+
https://{link-quarkus-code-generator}/?extension-search=camel-quarkus-aws-cloudtrail[Create a new project with this extension on {link-quarkus-code-generator}, window="_blank"]
33+
34+
Or add the coordinates to your existing project:
35+
36+
[source,xml]
37+
----
38+
<dependency>
39+
<groupId>org.apache.camel.quarkus</groupId>
40+
<artifactId>camel-quarkus-aws-cloudtrail</artifactId>
41+
</dependency>
42+
----
43+
ifeval::[{doc-show-user-guide-link} == true]
44+
Check the xref:user-guide/index.adoc[User guide] for more information about writing Camel Quarkus applications.
45+
endif::[]
46+
47+
[id="extensions-aws-cloudtrail-ssl-in-native-mode"]
48+
== SSL in native mode
49+
50+
This extension auto-enables SSL support in native mode. Hence you do not need to add
51+
`quarkus.ssl.native=true` to your `application.properties` yourself. See also
52+
https://quarkus.io/guides/native-and-ssl[Quarkus SSL guide].
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
4+
Licensed to the Apache Software Foundation (ASF) under one or more
5+
contributor license agreements. See the NOTICE file distributed with
6+
this work for additional information regarding copyright ownership.
7+
The ASF licenses this file to You under the Apache License, Version 2.0
8+
(the "License"); you may not use this file except in compliance with
9+
the License. You may obtain a copy of the License at
10+
11+
http://www.apache.org/licenses/LICENSE-2.0
12+
13+
Unless required by applicable law or agreed to in writing, software
14+
distributed under the License is distributed on an "AS IS" BASIS,
15+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
See the License for the specific language governing permissions and
17+
limitations under the License.
18+
19+
-->
20+
<project xmlns="http://maven.apache.org/POM/4.0.0"
21+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
22+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
23+
<modelVersion>4.0.0</modelVersion>
24+
<parent>
25+
<groupId>org.apache.camel.quarkus</groupId>
26+
<artifactId>camel-quarkus-aws-cloudtrail-parent</artifactId>
27+
<version>3.37.0-SNAPSHOT</version>
28+
<relativePath>../pom.xml</relativePath>
29+
</parent>
30+
31+
<artifactId>camel-quarkus-aws-cloudtrail-deployment</artifactId>
32+
<name>Camel Quarkus :: AWS Cloudtrail :: Deployment</name>
33+
34+
<dependencies>
35+
<dependency>
36+
<groupId>org.apache.camel.quarkus</groupId>
37+
<artifactId>camel-quarkus-core-deployment</artifactId>
38+
</dependency>
39+
<dependency>
40+
<groupId>org.apache.camel.quarkus</groupId>
41+
<artifactId>camel-quarkus-aws-cloudtrail</artifactId>
42+
</dependency>
43+
<dependency>
44+
<groupId>org.apache.camel.quarkus</groupId>
45+
<artifactId>camel-quarkus-support-aws2-deployment</artifactId>
46+
</dependency>
47+
</dependencies>
48+
49+
<build>
50+
<plugins>
51+
<plugin>
52+
<groupId>org.apache.maven.plugins</groupId>
53+
<artifactId>maven-compiler-plugin</artifactId>
54+
<configuration>
55+
<annotationProcessorPaths>
56+
<path>
57+
<groupId>io.quarkus</groupId>
58+
<artifactId>quarkus-extension-processor</artifactId>
59+
<version>${quarkus.version}</version>
60+
</path>
61+
</annotationProcessorPaths>
62+
</configuration>
63+
</plugin>
64+
</plugins>
65+
</build>
66+
67+
</project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one or more
3+
* contributor license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright ownership.
5+
* The ASF licenses this file to You under the Apache License, Version 2.0
6+
* (the "License"); you may not use this file except in compliance with
7+
* the License. You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
package org.apache.camel.quarkus.component.aws.cloudtrail.deployment;
18+
19+
import io.quarkus.deployment.annotations.BuildStep;
20+
import io.quarkus.deployment.builditem.FeatureBuildItem;
21+
22+
class AwsCloudtrailProcessor {
23+
24+
private static final String FEATURE = "camel-aws-cloudtrail";
25+
26+
@BuildStep
27+
FeatureBuildItem feature() {
28+
return new FeatureBuildItem(FEATURE);
29+
}
30+
}

extensions/aws-cloudtrail/pom.xml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
4+
Licensed to the Apache Software Foundation (ASF) under one or more
5+
contributor license agreements. See the NOTICE file distributed with
6+
this work for additional information regarding copyright ownership.
7+
The ASF licenses this file to You under the Apache License, Version 2.0
8+
(the "License"); you may not use this file except in compliance with
9+
the License. You may obtain a copy of the License at
10+
11+
http://www.apache.org/licenses/LICENSE-2.0
12+
13+
Unless required by applicable law or agreed to in writing, software
14+
distributed under the License is distributed on an "AS IS" BASIS,
15+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
See the License for the specific language governing permissions and
17+
limitations under the License.
18+
19+
-->
20+
<project xmlns="http://maven.apache.org/POM/4.0.0"
21+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
22+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
23+
<modelVersion>4.0.0</modelVersion>
24+
<parent>
25+
<groupId>org.apache.camel.quarkus</groupId>
26+
<artifactId>camel-quarkus-extensions</artifactId>
27+
<version>3.37.0-SNAPSHOT</version>
28+
<relativePath>../pom.xml</relativePath>
29+
</parent>
30+
31+
<artifactId>camel-quarkus-aws-cloudtrail-parent</artifactId>
32+
<name>Camel Quarkus :: AWS Cloudtrail</name>
33+
<packaging>pom</packaging>
34+
35+
<modules>
36+
<module>deployment</module>
37+
<module>runtime</module>
38+
</modules>
39+
</project>
Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
4+
Licensed to the Apache Software Foundation (ASF) under one or more
5+
contributor license agreements. See the NOTICE file distributed with
6+
this work for additional information regarding copyright ownership.
7+
The ASF licenses this file to You under the Apache License, Version 2.0
8+
(the "License"); you may not use this file except in compliance with
9+
the License. You may obtain a copy of the License at
10+
11+
http://www.apache.org/licenses/LICENSE-2.0
12+
13+
Unless required by applicable law or agreed to in writing, software
14+
distributed under the License is distributed on an "AS IS" BASIS,
15+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
See the License for the specific language governing permissions and
17+
limitations under the License.
18+
19+
-->
20+
<project xmlns="http://maven.apache.org/POM/4.0.0"
21+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
22+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
23+
<modelVersion>4.0.0</modelVersion>
24+
<parent>
25+
<groupId>org.apache.camel.quarkus</groupId>
26+
<artifactId>camel-quarkus-aws-cloudtrail-parent</artifactId>
27+
<version>3.37.0-SNAPSHOT</version>
28+
<relativePath>../pom.xml</relativePath>
29+
</parent>
30+
31+
<artifactId>camel-quarkus-aws-cloudtrail</artifactId>
32+
<name>Camel Quarkus :: AWS Cloudtrail :: Runtime</name>
33+
<description>Consume events from Amazon Cloudtrail using AWS SDK version 2.x.</description>
34+
35+
<properties>
36+
<camel.quarkus.jvmSince>3.37.0</camel.quarkus.jvmSince>
37+
<camel.quarkus.nativeSince>3.37.0</camel.quarkus.nativeSince>
38+
</properties>
39+
40+
<dependencies>
41+
<dependency>
42+
<groupId>org.apache.camel.quarkus</groupId>
43+
<artifactId>camel-quarkus-core</artifactId>
44+
</dependency>
45+
<dependency>
46+
<groupId>org.apache.camel</groupId>
47+
<artifactId>camel-aws-cloudtrail</artifactId>
48+
</dependency>
49+
<dependency>
50+
<groupId>org.jboss.logging</groupId>
51+
<artifactId>commons-logging-jboss-logging</artifactId>
52+
</dependency>
53+
<dependency>
54+
<groupId>org.apache.camel.quarkus</groupId>
55+
<artifactId>camel-quarkus-support-aws2</artifactId>
56+
</dependency>
57+
</dependencies>
58+
59+
<build>
60+
<plugins>
61+
<plugin>
62+
<groupId>io.quarkus</groupId>
63+
<artifactId>quarkus-extension-maven-plugin</artifactId>
64+
</plugin>
65+
<plugin>
66+
<groupId>org.apache.maven.plugins</groupId>
67+
<artifactId>maven-compiler-plugin</artifactId>
68+
<configuration>
69+
<annotationProcessorPaths>
70+
<path>
71+
<groupId>io.quarkus</groupId>
72+
<artifactId>quarkus-extension-processor</artifactId>
73+
<version>${quarkus.version}</version>
74+
</path>
75+
</annotationProcessorPaths>
76+
</configuration>
77+
</plugin>
78+
</plugins>
79+
</build>
80+
81+
82+
<profiles>
83+
<profile>
84+
<id>full</id>
85+
<activation>
86+
<property>
87+
<name>!quickly</name>
88+
</property>
89+
</activation>
90+
<build>
91+
<plugins>
92+
<plugin>
93+
<groupId>org.apache.camel.quarkus</groupId>
94+
<artifactId>camel-quarkus-maven-plugin</artifactId>
95+
<executions>
96+
<execution>
97+
<id>update-extension-doc-page</id>
98+
<goals>
99+
<goal>update-extension-doc-page</goal>
100+
</goals>
101+
<phase>process-classes</phase>
102+
</execution>
103+
</executions>
104+
</plugin>
105+
</plugins>
106+
</build>
107+
</profile>
108+
</profiles>
109+
</project>
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
#
2+
# Licensed to the Apache Software Foundation (ASF) under one or more
3+
# contributor license agreements. See the NOTICE file distributed with
4+
# this work for additional information regarding copyright ownership.
5+
# The ASF licenses this file to You under the Apache License, Version 2.0
6+
# (the "License"); you may not use this file except in compliance with
7+
# the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
#
17+
18+
# This is a generated file. Do not edit directly!
19+
# To re-generate, run the following command from the top level directory:
20+
#
21+
# mvn -N cq:update-quarkus-metadata
22+
#
23+
---
24+
name: "Camel AWS Cloudtrail"
25+
description: "Consume events from Amazon Cloudtrail using AWS SDK version 2.x"
26+
metadata:
27+
icon-url: "https://raw.githubusercontent.com/apache/camel-website/main/antora-ui-camel/src/img/logo-d.svg"
28+
sponsor: "Apache Software Foundation"
29+
guide: "https://camel.apache.org/camel-quarkus/latest/reference/extensions/aws-cloudtrail.html"
30+
categories:
31+
- "integration"
32+
status: "stable"
33+
integrates:
34+
- name: "Camel"
35+
artifact: "org.apache.camel:camel-base"
36+
version: "${camel.version}"

extensions/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
<module>avro</module>
4545
<!--<module>avro-rpc</module> https://github.com/apache/camel-quarkus/issues/4462 -->
4646
<module>aws-bedrock</module>
47+
<module>aws-cloudtrail</module>
4748
<module>aws-secrets-manager</module>
4849
<module>aws2-athena</module>
4950
<module>aws2-cw</module>

0 commit comments

Comments
 (0)