Skip to content

Commit 6ef0c0d

Browse files
committed
'Version 1.6.1 of the AWS CloudTrail Processing Library'
1 parent cdf5e9c commit 6ef0c0d

File tree

10 files changed

+222
-132
lines changed

10 files changed

+222
-132
lines changed

META-INF/MANIFEST.MF

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ Manifest-Version: 1.0
22
Bundle-ManifestVersion: 2
33
Bundle-Name: AWS CloudTrail Processing Library for Java
44
Bundle-SymbolicName: com.amazonaws.awscloudtrailprocessinglibrary;singleton:=true
5-
Bundle-Version: 1.5.1
5+
Bundle-Version: 1.6.1
66
Bundle-Vendor: Amazon Technologies, Inc
77
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
8-
Require-Bundle: com.amazonaws.sdk;bundle-version="1.12.1"
8+
Require-Bundle: com.amazonaws.sdk;bundle-version="1.12.261"
99
Export-Package: com.amazonaws.services.cloudtrail,
1010
com.amazonaws.services.cloudtrail.processinglibrary,
1111
com.amazonaws.services.cloudtrail.processinglibrary.configuration,

README.rst

+14-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Getting Started
3232
Minimum Requirements
3333
~~~~~~~~~~~~~~~~~~~~
3434

35-
* **AWS Java SDK 1.12.1**: To use the |library|, you'll need the `AWS Java SDK`__.
35+
* **AWS Java SDK 1.12.261**: To use the |library|, you'll need the `AWS Java SDK`__.
3636
* **Java 1.8**: The |library| requires `Java 1.8 (Java SE 8)`__ or later.
3737

3838
.. __: https://github.com/aws/aws-sdk-java
@@ -65,6 +65,19 @@ build, use this command::
6565
Release Notes
6666
-------------
6767

68+
Release 1.6.1 (May19,2023)
69+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
70+
* Added Ssupport for test scenario for UserType IdentityCenterUser
71+
72+
Release 1.6.0 (May8,2023)
73+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
74+
* Updated CloudTrailEvent version to 1.12
75+
* Added support for USerIdentity
76+
77+
Release 1.5.2 (Sep 6, 2022)
78+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
79+
* Update AWS Java SDK (S3/SQS) version to 1.12.261.
80+
6881
Release 1.5.1 (July 26, 2022)
6982
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7083
* Update AWS Java SDK (S3/SQS) version to 1.12.x

pom.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<artifactId>aws-cloudtrail-processing-library</artifactId>
66
<packaging>jar</packaging>
77
<name>AWS CloudTrail Processing Library for Java</name>
8-
<version>1.5.1</version>
8+
<version>1.6.1</version>
99
<description>AWS CloudTrail Processing Library for Java helps Java
1010
developers to easily consume and process log files from AWS
1111
CloudTrail.
@@ -26,7 +26,7 @@
2626
</licenses>
2727

2828
<properties>
29-
<aws-java-sdk.version>1.12.1</aws-java-sdk.version>
29+
<aws-java-sdk.version>1.12.261</aws-java-sdk.version>
3030
</properties>
3131

3232
<dependencies>

src/main/java/com/amazonaws/services/cloudtrail/processinglibrary/model/internal/AttributeValue.java

+11
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,15 @@ public String getValue() {
3939
public Double getAverage() {
4040
return (Double) this.get(CloudTrailEventField.average.name());
4141
}
42+
43+
public static class OnBehalfOf extends CloudTrailDataStore {
44+
45+
public String getUserId() {
46+
return (String) this.get(CloudTrailEventField.onBehalfOfUserId.name());
47+
}
48+
49+
public String getIdentityStoreArn() {
50+
return (String) this.get(CloudTrailEventField.onBehalfOfIdentityStoreArn.name());
51+
}
52+
}
4253
}

src/main/java/com/amazonaws/services/cloudtrail/processinglibrary/model/internal/CloudTrailDataStore.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -106,4 +106,5 @@ public boolean equals(Object obj) {
106106
return false;
107107
return true;
108108
}
109-
}
109+
110+
}

src/main/java/com/amazonaws/services/cloudtrail/processinglibrary/model/internal/CloudTrailEventField.java

+4
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ public enum CloudTrailEventField {
3838
baselineDuration,
3939
cipherSuite,
4040
clientProvidedHostHeader,
41+
credentialId,
4142
edgeDeviceDetails,
4243
errorCode,
4344
errorMessage,
@@ -59,6 +60,9 @@ public enum CloudTrailEventField {
5960
managementEvent,
6061
originalRequestID,
6162
originalEventID,
63+
onBehalfOf,
64+
onBehalfOfUserId,
65+
onBehalfOfIdentityStoreArn,
6266
principalId,
6367
readOnly,
6468
reason,
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
package com.amazonaws.services.cloudtrail.processinglibrary.model.internal;
2+
3+
import com.amazonaws.services.cloudtrail.processinglibrary.model.internal.CloudTrailDataStore;
4+
import com.amazonaws.services.cloudtrail.processinglibrary.model.internal.CloudTrailEventField;
5+
6+
public class OnBehalfOf extends CloudTrailDataStore {
7+
8+
public String getUserId() {
9+
return (String) this.get(CloudTrailEventField.onBehalfOfUserId.name());
10+
}
11+
12+
public String getIdentityStoreArn() {
13+
return (String) this.get(CloudTrailEventField.onBehalfOfIdentityStoreArn.name());
14+
}
15+
}

src/main/java/com/amazonaws/services/cloudtrail/processinglibrary/model/internal/UserIdentity.java

+15-2
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,16 @@
1616
package com.amazonaws.services.cloudtrail.processinglibrary.model.internal;
1717

1818

19+
import com.amazonaws.services.cloudtrail.processinglibrary.model.internal.CloudTrailDataStore;
20+
import com.amazonaws.services.cloudtrail.processinglibrary.model.internal.CloudTrailEventField;
21+
import com.amazonaws.services.cloudtrail.processinglibrary.model.internal.OnBehalfOf;
22+
import com.amazonaws.services.cloudtrail.processinglibrary.model.internal.SessionContext;
23+
1924
/**
2025
* Information about the user that made a request is included in the userIdentity element.
2126
* This information can help you determine how your AWS resources have been accessed.
2227
*/
23-
public class UserIdentity extends CloudTrailDataStore{
28+
public class UserIdentity extends CloudTrailDataStore {
2429
/**
2530
* Get identity type.
2631
*
@@ -105,9 +110,17 @@ public SessionContext getSessionContext() {
105110
* Get identity provider.
106111
*
107112
* @return The principal name of the external identity provider.
108-
* This field appears only for SAMLUser or WebIdentityUser types.
113+
* This field appears only for SAMLUser or WebIdentityUser types.
109114
*/
110115
public String getIdentityProvider() {
111116
return (String) this.get(CloudTrailEventField.identityProvider.name());
112117
}
118+
public String getCredentialId() {
119+
return (String) this.get(CloudTrailEventField.credentialId.name());
120+
}
121+
public OnBehalfOf getOnBehalfOf() {
122+
return (OnBehalfOf) this.get(CloudTrailEventField.onBehalfOf.name());
123+
}
113124
}
125+
126+

src/main/java/com/amazonaws/services/cloudtrail/processinglibrary/reader/EventReader.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ private void emitEvents(EventSerializer serializer) throws IOException, Callback
259259
logger.debug("AWSCloudTrailEvent " + event + " has been filtered out.");
260260
}
261261
} catch (Exception e) {
262-
logger.error("AWSCloudTrailEvent " + event + " caused the following Exception: " + e.toString());
262+
logger.error("AWSCloudTrailEvent " + event + " caused the following Exception:", e);
263263
throw e;
264264
}
265265
}

0 commit comments

Comments
 (0)