Skip to content

Commit

Permalink
Fixed client side keypair issue
Browse files Browse the repository at this point in the history
  • Loading branch information
cody-constine-ttd committed Dec 11, 2024
1 parent 18b99bf commit d0d58fc
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<!-- check micrometer.version vertx-micrometer-metrics consumes before bumping up -->
<micrometer.version>1.12.2</micrometer.version>
<junit-jupiter.version>5.11.2</junit-jupiter.version>
<uid2-shared.version>8.0.12-alpha-174-SNAPSHOT</uid2-shared.version>
<uid2-shared.version>8.0.13-alpha-175-SNAPSHOT</uid2-shared.version>
<okta-jwt.version>0.5.10</okta-jwt.version>
<image.version>${project.version}</image.version>
</properties>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,13 @@ public StoreWriter<Collection<ClientSideKeypair>> getEncryptedWriter(Integer sit
fileManager,
versionGenerator,
clock,
new EncryptedScope(rootMetadataPath, siteId, isPublic));
new EncryptedScope(rootMetadataPath, siteId, isPublic),
cloudEncryptionKeyProvider);
}

@Override
public StoreReader<Collection<ClientSideKeypair>> getEncryptedReader(Integer siteId, boolean isPublic) {
return new RotatingClientSideKeypairStore(fileStreamProvider, new EncryptedScope(rootMetadataPath, siteId, isPublic));
return new RotatingClientSideKeypairStore(fileStreamProvider, new EncryptedScope(rootMetadataPath, siteId, isPublic), cloudEncryptionKeyProvider);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import com.uid2.admin.store.version.VersionGenerator;
import com.uid2.shared.model.ClientSideKeypair;
import com.uid2.shared.store.reader.RotatingClientSideKeypairStore;
import com.uid2.shared.store.reader.RotatingCloudEncryptionKeyProvider;
import com.uid2.shared.store.reader.StoreReader;
import com.uid2.shared.store.scope.StoreScope;
import io.vertx.core.json.JsonArray;
Expand All @@ -24,6 +25,13 @@ public ClientSideKeypairStoreWriter(StoreReader<Collection<ClientSideKeypair>> s
writer = new ScopedStoreWriter(store, fileManager, versionGenerator, clock, scope, dataFile, dataType);
}

public ClientSideKeypairStoreWriter(StoreReader<Collection<ClientSideKeypair>> store, FileManager fileManager,
VersionGenerator versionGenerator, Clock clock, StoreScope scope, RotatingCloudEncryptionKeyProvider cloudEncryptionKeyProvider) {
FileName dataFile = new FileName("client_side_keypairs", ".json");
String dataType = "client_side_keypairs";
writer = new EncryptedScopedStoreWriter(store, fileManager, versionGenerator, clock, scope, dataFile, dataType, cloudEncryptionKeyProvider, scope.getId());
}

@Override
public void upload(Collection<ClientSideKeypair> data, JsonObject extraMeta) throws Exception {
JsonArray jsonKeypairs = new JsonArray();
Expand Down

0 comments on commit d0d58fc

Please sign in to comment.