diff --git a/java-securitycenter/README.md b/java-securitycenter/README.md index b4398a21015b..fb2ddfc64ff9 100644 --- a/java-securitycenter/README.md +++ b/java-securitycenter/README.md @@ -19,20 +19,20 @@ If you are using Maven, add this to your pom.xml file: com.google.cloud google-cloud-securitycenter - 2.14.0 + 2.15.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-securitycenter:2.14.0' +implementation 'com.google.cloud:google-cloud-securitycenter:2.15.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-securitycenter" % "2.14.0" +libraryDependencies += "com.google.cloud" % "google-cloud-securitycenter" % "2.15.0" ``` ## Authentication diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Access.java b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Access.java index af73e419b335..f1fc66341106 100644 --- a/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Access.java +++ b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Access.java @@ -46,6 +46,7 @@ private Access() { principalSubject_ = ""; serviceAccountKeyName_ = ""; serviceAccountDelegationInfo_ = java.util.Collections.emptyList(); + userName_ = ""; } @java.lang.Override @@ -238,7 +239,7 @@ public com.google.cloud.securitycenter.v1.GeolocationOrBuilder getCallerIpGeoOrB * * *
-   * What kind of user agent is associated, e.g. operating system shells,
+   * What kind of user agent is associated, for example operating system shells,
    * embedded or stand-alone applications, etc.
    * 
* @@ -262,7 +263,7 @@ public java.lang.String getUserAgentFamily() { * * *
-   * What kind of user agent is associated, e.g. operating system shells,
+   * What kind of user agent is associated, for example operating system shells,
    * embedded or stand-alone applications, etc.
    * 
* @@ -603,6 +604,67 @@ public int getServiceAccountDelegationInfoCount() { return serviceAccountDelegationInfo_.get(index); } + public static final int USER_NAME_FIELD_NUMBER = 11; + private volatile java.lang.Object userName_; + /** + * + * + *
+   * A string that represents the username of a user, user account, or other
+   * entity involved in the access event. What the entity is and what its role
+   * in the access event is depends on the finding that this field appears in.
+   * The entity is likely not an IAM principal, but could be a user that is
+   * logged into an operating system, if the finding is VM-related, or a user
+   * that is logged into some type of application that is involved in the
+   * access event.
+   * 
+ * + * string user_name = 11; + * + * @return The userName. + */ + @java.lang.Override + public java.lang.String getUserName() { + java.lang.Object ref = userName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userName_ = s; + return s; + } + } + /** + * + * + *
+   * A string that represents the username of a user, user account, or other
+   * entity involved in the access event. What the entity is and what its role
+   * in the access event is depends on the finding that this field appears in.
+   * The entity is likely not an IAM principal, but could be a user that is
+   * logged into an operating system, if the finding is VM-related, or a user
+   * that is logged into some type of application that is involved in the
+   * access event.
+   * 
+ * + * string user_name = 11; + * + * @return The bytes for userName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUserNameBytes() { + java.lang.Object ref = userName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + userName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -644,6 +706,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < serviceAccountDelegationInfo_.size(); i++) { output.writeMessage(9, serviceAccountDelegationInfo_.get(i)); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(userName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 11, userName_); + } getUnknownFields().writeTo(output); } @@ -682,6 +747,9 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 9, serviceAccountDelegationInfo_.get(i)); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(userName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, userName_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -711,6 +779,7 @@ public boolean equals(final java.lang.Object obj) { if (!getServiceAccountKeyName().equals(other.getServiceAccountKeyName())) return false; if (!getServiceAccountDelegationInfoList().equals(other.getServiceAccountDelegationInfoList())) return false; + if (!getUserName().equals(other.getUserName())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -744,6 +813,8 @@ public int hashCode() { hash = (37 * hash) + SERVICE_ACCOUNT_DELEGATION_INFO_FIELD_NUMBER; hash = (53 * hash) + getServiceAccountDelegationInfoList().hashCode(); } + hash = (37 * hash) + USER_NAME_FIELD_NUMBER; + hash = (53 * hash) + getUserName().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -909,6 +980,8 @@ public Builder clear() { serviceAccountDelegationInfoBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000001); + userName_ = ""; + return this; } @@ -959,6 +1032,7 @@ public com.google.cloud.securitycenter.v1.Access buildPartial() { } else { result.serviceAccountDelegationInfo_ = serviceAccountDelegationInfoBuilder_.build(); } + result.userName_ = userName_; onBuilt(); return result; } @@ -1067,6 +1141,10 @@ public Builder mergeFrom(com.google.cloud.securitycenter.v1.Access other) { } } } + if (!other.getUserName().isEmpty()) { + userName_ = other.userName_; + onChanged(); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -1155,6 +1233,12 @@ public Builder mergeFrom( } break; } // case 74 + case 90: + { + userName_ = input.readStringRequireUtf8(); + + break; + } // case 90 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -1607,7 +1691,7 @@ public com.google.cloud.securitycenter.v1.GeolocationOrBuilder getCallerIpGeoOrB * * *
-     * What kind of user agent is associated, e.g. operating system shells,
+     * What kind of user agent is associated, for example operating system shells,
      * embedded or stand-alone applications, etc.
      * 
* @@ -1630,7 +1714,7 @@ public java.lang.String getUserAgentFamily() { * * *
-     * What kind of user agent is associated, e.g. operating system shells,
+     * What kind of user agent is associated, for example operating system shells,
      * embedded or stand-alone applications, etc.
      * 
* @@ -1653,7 +1737,7 @@ public com.google.protobuf.ByteString getUserAgentFamilyBytes() { * * *
-     * What kind of user agent is associated, e.g. operating system shells,
+     * What kind of user agent is associated, for example operating system shells,
      * embedded or stand-alone applications, etc.
      * 
* @@ -1675,7 +1759,7 @@ public Builder setUserAgentFamily(java.lang.String value) { * * *
-     * What kind of user agent is associated, e.g. operating system shells,
+     * What kind of user agent is associated, for example operating system shells,
      * embedded or stand-alone applications, etc.
      * 
* @@ -1693,7 +1777,7 @@ public Builder clearUserAgentFamily() { * * *
-     * What kind of user agent is associated, e.g. operating system shells,
+     * What kind of user agent is associated, for example operating system shells,
      * embedded or stand-alone applications, etc.
      * 
* @@ -2669,6 +2753,142 @@ public Builder removeServiceAccountDelegationInfo(int index) { return serviceAccountDelegationInfoBuilder_; } + private java.lang.Object userName_ = ""; + /** + * + * + *
+     * A string that represents the username of a user, user account, or other
+     * entity involved in the access event. What the entity is and what its role
+     * in the access event is depends on the finding that this field appears in.
+     * The entity is likely not an IAM principal, but could be a user that is
+     * logged into an operating system, if the finding is VM-related, or a user
+     * that is logged into some type of application that is involved in the
+     * access event.
+     * 
+ * + * string user_name = 11; + * + * @return The userName. + */ + public java.lang.String getUserName() { + java.lang.Object ref = userName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A string that represents the username of a user, user account, or other
+     * entity involved in the access event. What the entity is and what its role
+     * in the access event is depends on the finding that this field appears in.
+     * The entity is likely not an IAM principal, but could be a user that is
+     * logged into an operating system, if the finding is VM-related, or a user
+     * that is logged into some type of application that is involved in the
+     * access event.
+     * 
+ * + * string user_name = 11; + * + * @return The bytes for userName. + */ + public com.google.protobuf.ByteString getUserNameBytes() { + java.lang.Object ref = userName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + userName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A string that represents the username of a user, user account, or other
+     * entity involved in the access event. What the entity is and what its role
+     * in the access event is depends on the finding that this field appears in.
+     * The entity is likely not an IAM principal, but could be a user that is
+     * logged into an operating system, if the finding is VM-related, or a user
+     * that is logged into some type of application that is involved in the
+     * access event.
+     * 
+ * + * string user_name = 11; + * + * @param value The userName to set. + * @return This builder for chaining. + */ + public Builder setUserName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + userName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A string that represents the username of a user, user account, or other
+     * entity involved in the access event. What the entity is and what its role
+     * in the access event is depends on the finding that this field appears in.
+     * The entity is likely not an IAM principal, but could be a user that is
+     * logged into an operating system, if the finding is VM-related, or a user
+     * that is logged into some type of application that is involved in the
+     * access event.
+     * 
+ * + * string user_name = 11; + * + * @return This builder for chaining. + */ + public Builder clearUserName() { + + userName_ = getDefaultInstance().getUserName(); + onChanged(); + return this; + } + /** + * + * + *
+     * A string that represents the username of a user, user account, or other
+     * entity involved in the access event. What the entity is and what its role
+     * in the access event is depends on the finding that this field appears in.
+     * The entity is likely not an IAM principal, but could be a user that is
+     * logged into an operating system, if the finding is VM-related, or a user
+     * that is logged into some type of application that is involved in the
+     * access event.
+     * 
+ * + * string user_name = 11; + * + * @param value The bytes for userName to set. + * @return This builder for chaining. + */ + public Builder setUserNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + userName_ = value; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/AccessOrBuilder.java b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/AccessOrBuilder.java index a8a4b86d3df4..0f9b710d1b2a 100644 --- a/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/AccessOrBuilder.java +++ b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/AccessOrBuilder.java @@ -124,7 +124,7 @@ public interface AccessOrBuilder * * *
-   * What kind of user agent is associated, e.g. operating system shells,
+   * What kind of user agent is associated, for example operating system shells,
    * embedded or stand-alone applications, etc.
    * 
* @@ -137,7 +137,7 @@ public interface AccessOrBuilder * * *
-   * What kind of user agent is associated, e.g. operating system shells,
+   * What kind of user agent is associated, for example operating system shells,
    * embedded or stand-alone applications, etc.
    * 
* @@ -351,4 +351,41 @@ com.google.cloud.securitycenter.v1.ServiceAccountDelegationInfo getServiceAccoun */ com.google.cloud.securitycenter.v1.ServiceAccountDelegationInfoOrBuilder getServiceAccountDelegationInfoOrBuilder(int index); + + /** + * + * + *
+   * A string that represents the username of a user, user account, or other
+   * entity involved in the access event. What the entity is and what its role
+   * in the access event is depends on the finding that this field appears in.
+   * The entity is likely not an IAM principal, but could be a user that is
+   * logged into an operating system, if the finding is VM-related, or a user
+   * that is logged into some type of application that is involved in the
+   * access event.
+   * 
+ * + * string user_name = 11; + * + * @return The userName. + */ + java.lang.String getUserName(); + /** + * + * + *
+   * A string that represents the username of a user, user account, or other
+   * entity involved in the access event. What the entity is and what its role
+   * in the access event is depends on the finding that this field appears in.
+   * The entity is likely not an IAM principal, but could be a user that is
+   * logged into an operating system, if the finding is VM-related, or a user
+   * that is logged into some type of application that is involved in the
+   * access event.
+   * 
+ * + * string user_name = 11; + * + * @return The bytes for userName. + */ + com.google.protobuf.ByteString getUserNameBytes(); } diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/AccessProto.java b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/AccessProto.java index 93ae5a0fee69..5c0979a76602 100644 --- a/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/AccessProto.java +++ b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/AccessProto.java @@ -49,7 +49,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { static { java.lang.String[] descriptorData = { "\n+google/cloud/securitycenter/v1/access." - + "proto\022\036google.cloud.securitycenter.v1\"\342\002" + + "proto\022\036google.cloud.securitycenter.v1\"\365\002" + "\n\006Access\022\027\n\017principal_email\030\001 \001(\t\022\021\n\tcal" + "ler_ip\030\002 \001(\t\022B\n\rcaller_ip_geo\030\003 \001(\0132+.go" + "ogle.cloud.securitycenter.v1.Geolocation" @@ -58,16 +58,17 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "pal_subject\030\007 \001(\t\022 \n\030service_account_key" + "_name\030\010 \001(\t\022e\n\037service_account_delegatio" + "n_info\030\t \003(\0132<.google.cloud.securitycent" - + "er.v1.ServiceAccountDelegationInfo\"R\n\034Se" - + "rviceAccountDelegationInfo\022\027\n\017principal_" - + "email\030\001 \001(\t\022\031\n\021principal_subject\030\002 \001(\t\"\"" - + "\n\013Geolocation\022\023\n\013region_code\030\001 \001(\tB\347\001\n\"c" - + "om.google.cloud.securitycenter.v1B\013Acces" - + "sProtoP\001ZLgoogle.golang.org/genproto/goo" - + "gleapis/cloud/securitycenter/v1;security" - + "center\252\002\036Google.Cloud.SecurityCenter.V1\312" - + "\002\036Google\\Cloud\\SecurityCenter\\V1\352\002!Googl" - + "e::Cloud::SecurityCenter::V1b\006proto3" + + "er.v1.ServiceAccountDelegationInfo\022\021\n\tus" + + "er_name\030\013 \001(\t\"R\n\034ServiceAccountDelegatio" + + "nInfo\022\027\n\017principal_email\030\001 \001(\t\022\031\n\021princi" + + "pal_subject\030\002 \001(\t\"\"\n\013Geolocation\022\023\n\013regi" + + "on_code\030\001 \001(\tB\347\001\n\"com.google.cloud.secur" + + "itycenter.v1B\013AccessProtoP\001ZLgoogle.gola" + + "ng.org/genproto/googleapis/cloud/securit" + + "ycenter/v1;securitycenter\252\002\036Google.Cloud" + + ".SecurityCenter.V1\312\002\036Google\\Cloud\\Securi" + + "tyCenter\\V1\352\002!Google::Cloud::SecurityCen" + + "ter::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -87,6 +88,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "PrincipalSubject", "ServiceAccountKeyName", "ServiceAccountDelegationInfo", + "UserName", }); internal_static_google_cloud_securitycenter_v1_ServiceAccountDelegationInfo_descriptor = getDescriptor().getMessageTypes().get(1); diff --git a/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/proto/google/cloud/securitycenter/v1/access.proto b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/proto/google/cloud/securitycenter/v1/access.proto index 799b84fcccb8..159a6ef6f888 100644 --- a/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/proto/google/cloud/securitycenter/v1/access.proto +++ b/java-securitycenter/proto-google-cloud-securitycenter-v1/src/main/proto/google/cloud/securitycenter/v1/access.proto @@ -42,7 +42,7 @@ message Access { // The caller IP's geolocation, which identifies where the call came from. Geolocation caller_ip_geo = 3; - // What kind of user agent is associated, e.g. operating system shells, + // What kind of user agent is associated, for example operating system shells, // embedded or stand-alone applications, etc. string user_agent_family = 4; @@ -76,6 +76,15 @@ message Access { // authorities are present, they are guaranteed to be sorted based on the // original ordering of the identity delegation events. repeated ServiceAccountDelegationInfo service_account_delegation_info = 9; + + // A string that represents the username of a user, user account, or other + // entity involved in the access event. What the entity is and what its role + // in the access event is depends on the finding that this field appears in. + // The entity is likely not an IAM principal, but could be a user that is + // logged into an operating system, if the finding is VM-related, or a user + // that is logged into some type of application that is involved in the + // access event. + string user_name = 11; } // Identity delegation history of an authenticated service account. @@ -97,4 +106,4 @@ message ServiceAccountDelegationInfo { message Geolocation { // A CLDR. string region_code = 1; -} +} \ No newline at end of file diff --git a/versions.txt b/versions.txt index a7c8d4a2bf0f..26acef5dc131 100644 --- a/versions.txt +++ b/versions.txt @@ -599,4 +599,4 @@ google-cloud-monitoring-metricsscope:0.1.0:0.1.0 proto-google-cloud-monitoring-metricsscope-v1:0.1.0:0.1.0 grpc-google-cloud-monitoring-metricsscope-v1:0.1.0:0.1.0 proto-google-cloud-tpu-v2:2.8.0:2.8.0 -grpc-google-cloud-tpu-v2:2.8.0:2.8.0 \ No newline at end of file +grpc-google-cloud-tpu-v2:2.8.0:2.8.0