Skip to content

Commit 3679295

Browse files
committed
Merge branch 'main' of github.com:IABTechLab/uid2-shared into wzh-UID2-5185-add-more-failure-logging
2 parents b57e1ba + 20bc153 commit 3679295

File tree

13 files changed

+33
-758
lines changed

13 files changed

+33
-758
lines changed

.trivyignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
# List any vulnerability that are to be accepted
22
# See https://aquasecurity.github.io/trivy/v0.35/docs/vulnerability/examples/filter/
33
# for more details
4+
5+
# UID2-6128
6+
CVE-2025-55163 exp:2025-10-30

pom.xml

Lines changed: 7 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
<groupId>com.uid2</groupId>
77
<artifactId>uid2-shared</artifactId>
8-
<version>11.1.69</version>
8+
<version>11.1.91</version>
99
<name>${project.groupId}:${project.artifactId}</name>
1010
<description>Library for all the shared uid2 operations</description>
1111
<url>https://github.com/IABTechLab/uid2docs</url>
@@ -169,35 +169,20 @@
169169
<artifactId>sts</artifactId>
170170
</dependency>
171171
<dependency>
172-
<groupId>com.google.api-client</groupId>
173-
<artifactId>google-api-client</artifactId>
174-
<version>2.6.0</version>
172+
<groupId>com.google.http-client</groupId>
173+
<artifactId>google-http-client</artifactId>
174+
<version>1.45.0</version>
175175
</dependency>
176176
<dependency>
177-
<groupId>com.google.apis</groupId>
178-
<artifactId>google-api-services-compute</artifactId>
179-
<version>v1-rev20221205-2.0.0</version>
177+
<groupId>com.google.http-client</groupId>
178+
<artifactId>google-http-client-gson</artifactId>
179+
<version>1.45.0</version>
180180
</dependency>
181181
<dependency>
182182
<groupId>com.google.auth</groupId>
183183
<artifactId>google-auth-library-oauth2-http</artifactId>
184184
<version>1.30.0</version>
185185
</dependency>
186-
<dependency>
187-
<groupId>com.google.auth</groupId>
188-
<artifactId>google-auth-library-credentials</artifactId>
189-
<version>1.30.0</version>
190-
</dependency>
191-
<dependency>
192-
<groupId>com.google.cloud</groupId>
193-
<artifactId>google-cloud-logging</artifactId>
194-
<version>3.15.12</version>
195-
</dependency>
196-
<dependency>
197-
<groupId>com.google.protobuf</groupId>
198-
<artifactId>protobuf-java</artifactId>
199-
<version>3.25.5</version>
200-
</dependency>
201186
<dependency>
202187
<groupId>com.azure</groupId>
203188
<artifactId>azure-security-attestation</artifactId>

src/main/java/com/uid2/shared/Const.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,6 @@ public static class Config {
3232

3333
public static final String UidInstanceIdPrefixProp = "uid_instance_id_prefix";
3434

35-
// GCP
36-
public static final String GoogleCredentialsProp = "google_credentials";
37-
public static final String GcpEnclaveParamsProp = "gcp_enclave_params";
38-
3935
// Azure
4036
public static final String MaaServerBaseUrlProp = "maa_server_base_url";
4137

@@ -91,7 +87,7 @@ public static class Config {
9187

9288
// Others
9389
public static final String SaltsExpiredShutdownHours = "salts_expired_shutdown_hours";
94-
public static final String KeysetKeyShutdownHours = "keyset_key_shutdown_hours";
90+
public static final String StoreRefreshStaleShutdownHours = "store_refresh_stale_shutdown_hours";
9591
public static final String encryptionSupportVersion = "encryption_support_version";
9692
}
9793

src/main/java/com/uid2/shared/attest/AttestationFactory.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,6 @@ public static IAttestationProvider getNitroAttestation() throws Exception {
1212
return (IAttestationProvider) c.newInstance();
1313
}
1414

15-
public static IAttestationProvider getGcpVmidAttestation() throws Exception {
16-
Class<?> cls = Class.forName("com.uid2.attestation.gcp.VmidAttestationProvider");
17-
Constructor<?> c = cls.getConstructor();
18-
return (IAttestationProvider) c.newInstance();
19-
}
20-
2115
public static IAttestationProvider getGcpOidcAttestation() throws Exception {
2216
Class<?> cls = Class.forName("com.uid2.attestation.gcp.OidcAttestationProvider");
2317
Constructor<?> c = cls.getConstructor();

src/main/java/com/uid2/shared/cloud/CloudUtils.java

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,12 @@
11
package com.uid2.shared.cloud;
22

3-
import com.google.api.services.compute.ComputeScopes;
4-
import com.google.auth.oauth2.GoogleCredentials;
53
import com.uid2.shared.Const;
6-
import com.uid2.shared.Utils;
74
import io.vertx.core.json.JsonObject;
85
import org.slf4j.Logger;
96
import org.slf4j.LoggerFactory;
107

11-
import java.io.ByteArrayInputStream;
128
import java.net.*;
139
import java.nio.file.Path;
14-
import java.util.Collections;
1510

1611
public class CloudUtils {
1712
private static final Logger LOGGER = LoggerFactory.getLogger(CloudUtils.class);
@@ -49,42 +44,6 @@ public static TaggableCloudStorage createStorage(String cloudBucket) {
4944
);
5045
}
5146

52-
public static GoogleCredentials getGoogleCredentialsFromConfig(JsonObject jsonConfig) {
53-
GoogleCredentials credentials = getGoogleCredentialsFromConfigInternal(jsonConfig);
54-
if (credentials != null && credentials.createScopedRequired()) {
55-
// only needs compute readonly scope
56-
LOGGER.info("Requesting scope: " + ComputeScopes.COMPUTE_READONLY);
57-
credentials.createScoped(Collections.singletonList(ComputeScopes.COMPUTE_READONLY));
58-
}
59-
return credentials;
60-
}
61-
62-
private static GoogleCredentials getGoogleCredentialsFromConfigInternal(JsonObject jsonConfig) {
63-
if (System.getenv("GOOGLE_APPLICATION_CREDENTIALS") != null) {
64-
try {
65-
GoogleCredentials ret = GoogleCredentials.getApplicationDefault();
66-
LOGGER.info("Using GOOGLE_APPLICATION_CREDENTIALS from environment");
67-
return ret;
68-
69-
} catch (Exception ex) {
70-
LOGGER.error("Unable to read google credentials " + ex.getMessage(), ex);
71-
return null;
72-
}
73-
}
74-
75-
try {
76-
String encodedCreds = jsonConfig.getString(Const.Config.GoogleCredentialsProp);
77-
if (encodedCreds == null) return null;
78-
byte[] credentials = Utils.decodeBase64String(encodedCreds);
79-
if (credentials == null) return null;
80-
GoogleCredentials ret = GoogleCredentials.fromStream(new ByteArrayInputStream(credentials));
81-
LOGGER.info("Using google_credentials provided through vertx-config (env or config)");
82-
return ret;
83-
} catch (Exception ex) {
84-
LOGGER.error("Unable to read google credentials " + ex.getMessage(), ex);
85-
return null;
86-
}
87-
}
8847

8948
public static String normalizeFilePath(Path path) {
9049
return normalizFilePath(path.toString());

src/main/java/com/uid2/shared/secure/GcpVmidCoreAttestationService.java

Lines changed: 0 additions & 125 deletions
This file was deleted.

src/main/java/com/uid2/shared/secure/gcp/InstanceDocument.java

Lines changed: 0 additions & 82 deletions
This file was deleted.

src/main/java/com/uid2/shared/secure/gcp/InstanceDocumentVerifier.java

Lines changed: 0 additions & 32 deletions
This file was deleted.

0 commit comments

Comments
 (0)