Configure and instantiate a `ClientPublicKeys` data store/manager
This commit is contained in:
parent
6c13193623
commit
852b285d84
|
@ -123,6 +123,8 @@ dynamoDbTables:
|
||||||
tableName: Example_ReportMessage
|
tableName: Example_ReportMessage
|
||||||
subscriptions:
|
subscriptions:
|
||||||
tableName: Example_Subscriptions
|
tableName: Example_Subscriptions
|
||||||
|
clientPublicKeys:
|
||||||
|
tableName: Example_ClientPublicKeys
|
||||||
verificationSessions:
|
verificationSessions:
|
||||||
tableName: Example_VerificationSessions
|
tableName: Example_VerificationSessions
|
||||||
|
|
||||||
|
|
|
@ -181,6 +181,8 @@ import org.whispersystems.textsecuregcm.storage.AccountLockManager;
|
||||||
import org.whispersystems.textsecuregcm.storage.Accounts;
|
import org.whispersystems.textsecuregcm.storage.Accounts;
|
||||||
import org.whispersystems.textsecuregcm.storage.AccountsManager;
|
import org.whispersystems.textsecuregcm.storage.AccountsManager;
|
||||||
import org.whispersystems.textsecuregcm.storage.ChangeNumberManager;
|
import org.whispersystems.textsecuregcm.storage.ChangeNumberManager;
|
||||||
|
import org.whispersystems.textsecuregcm.storage.ClientPublicKeys;
|
||||||
|
import org.whispersystems.textsecuregcm.storage.ClientPublicKeysManager;
|
||||||
import org.whispersystems.textsecuregcm.storage.ClientReleaseManager;
|
import org.whispersystems.textsecuregcm.storage.ClientReleaseManager;
|
||||||
import org.whispersystems.textsecuregcm.storage.ClientReleases;
|
import org.whispersystems.textsecuregcm.storage.ClientReleases;
|
||||||
import org.whispersystems.textsecuregcm.storage.DynamicConfigurationManager;
|
import org.whispersystems.textsecuregcm.storage.DynamicConfigurationManager;
|
||||||
|
@ -380,6 +382,8 @@ public class WhisperServerService extends Application<WhisperServerConfiguration
|
||||||
dynamoDbClient,
|
dynamoDbClient,
|
||||||
dynamoDbAsyncClient
|
dynamoDbAsyncClient
|
||||||
);
|
);
|
||||||
|
ClientPublicKeys clientPublicKeys =
|
||||||
|
new ClientPublicKeys(dynamoDbAsyncClient, config.getDynamoDbTables().getClientPublicKeys().getTableName());
|
||||||
|
|
||||||
final VerificationSessions verificationSessions = new VerificationSessions(dynamoDbAsyncClient,
|
final VerificationSessions verificationSessions = new VerificationSessions(dynamoDbAsyncClient,
|
||||||
config.getDynamoDbTables().getVerificationSessions().getTableName(), clock);
|
config.getDynamoDbTables().getVerificationSessions().getTableName(), clock);
|
||||||
|
@ -547,6 +551,7 @@ public class WhisperServerService extends Application<WhisperServerConfiguration
|
||||||
messageDeletionAsyncExecutor);
|
messageDeletionAsyncExecutor);
|
||||||
AccountLockManager accountLockManager = new AccountLockManager(dynamoDbClient,
|
AccountLockManager accountLockManager = new AccountLockManager(dynamoDbClient,
|
||||||
config.getDynamoDbTables().getDeletedAccountsLock().getTableName());
|
config.getDynamoDbTables().getDeletedAccountsLock().getTableName());
|
||||||
|
ClientPublicKeysManager clientPublicKeysManager = new ClientPublicKeysManager(clientPublicKeys);
|
||||||
AccountsManager accountsManager = new AccountsManager(accounts, phoneNumberIdentifiers, cacheCluster,
|
AccountsManager accountsManager = new AccountsManager(accounts, phoneNumberIdentifiers, cacheCluster,
|
||||||
accountLockManager, keysManager, messagesManager, profilesManager,
|
accountLockManager, keysManager, messagesManager, profilesManager,
|
||||||
secureStorageClient, secureValueRecovery2Client,
|
secureStorageClient, secureValueRecovery2Client,
|
||||||
|
|
|
@ -49,6 +49,7 @@ public class DynamoDbTables {
|
||||||
private final AccountsTableConfiguration accounts;
|
private final AccountsTableConfiguration accounts;
|
||||||
|
|
||||||
private final Table backups;
|
private final Table backups;
|
||||||
|
private final Table clientPublicKeys;
|
||||||
private final Table clientReleases;
|
private final Table clientReleases;
|
||||||
private final Table deletedAccounts;
|
private final Table deletedAccounts;
|
||||||
private final Table deletedAccountsLock;
|
private final Table deletedAccountsLock;
|
||||||
|
@ -72,6 +73,7 @@ public class DynamoDbTables {
|
||||||
public DynamoDbTables(
|
public DynamoDbTables(
|
||||||
@JsonProperty("accounts") final AccountsTableConfiguration accounts,
|
@JsonProperty("accounts") final AccountsTableConfiguration accounts,
|
||||||
@JsonProperty("backups") final Table backups,
|
@JsonProperty("backups") final Table backups,
|
||||||
|
@JsonProperty("clientPublicKeys") final Table clientPublicKeys,
|
||||||
@JsonProperty("clientReleases") final Table clientReleases,
|
@JsonProperty("clientReleases") final Table clientReleases,
|
||||||
@JsonProperty("deletedAccounts") final Table deletedAccounts,
|
@JsonProperty("deletedAccounts") final Table deletedAccounts,
|
||||||
@JsonProperty("deletedAccountsLock") final Table deletedAccountsLock,
|
@JsonProperty("deletedAccountsLock") final Table deletedAccountsLock,
|
||||||
|
@ -94,6 +96,7 @@ public class DynamoDbTables {
|
||||||
|
|
||||||
this.accounts = accounts;
|
this.accounts = accounts;
|
||||||
this.backups = backups;
|
this.backups = backups;
|
||||||
|
this.clientPublicKeys = clientPublicKeys;
|
||||||
this.clientReleases = clientReleases;
|
this.clientReleases = clientReleases;
|
||||||
this.deletedAccounts = deletedAccounts;
|
this.deletedAccounts = deletedAccounts;
|
||||||
this.deletedAccountsLock = deletedAccountsLock;
|
this.deletedAccountsLock = deletedAccountsLock;
|
||||||
|
@ -127,6 +130,12 @@ public class DynamoDbTables {
|
||||||
return backups;
|
return backups;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@NotNull
|
||||||
|
@Valid
|
||||||
|
public Table getClientPublicKeys() {
|
||||||
|
return clientPublicKeys;
|
||||||
|
}
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
@Valid
|
@Valid
|
||||||
public Table getClientReleases() {
|
public Table getClientReleases() {
|
||||||
|
|
Loading…
Reference in New Issue