Commit Graph

2997 Commits

Author SHA1 Message Date
Jon Chambers b115e95da4 Add an AWS SDK metric publisher 2024-09-26 15:00:10 -04:00
Chris Eager ab0892cc41 Set executor shutdown time in ProcessScheduledJobsServiceCommand 2024-09-26 13:57:20 -05:00
Chris Eager e25291c74c Move MRM content parsing outside of “withBinaryClusterReactive” 2024-09-26 13:57:02 -05:00
Ravi Khadiwala 0e552bd602 Cancel play subscriptions when replacing them 2024-09-26 13:56:10 -05:00
Ameya Lokare e9b3e15556 Return report spam token from spam check instead of separate call 2024-09-26 11:53:40 -07:00
Ravi Khadiwala 237d0fd4e2 remove HTTP layer exceptions from Stripe/Braintree managers 2024-09-24 17:22:38 -05:00
Ravi Khadiwala 50bd30fb1f Fix cancelAtPeriodEnd calculation 2024-09-24 17:14:08 -05:00
Ravi Khadiwala 9fb4e2d272 set billingCycleAnchor in play billing responses 2024-09-24 17:14:08 -05:00
Jon Chambers 3e51366921
Narrow selection criterial for "notify idle devices with messages" experiment 2024-09-23 16:01:44 -04:00
Jonathan Klabunde Tomer 2d184b1ab6
return user's own username link handle in /whoami response 2024-09-23 12:46:10 -07:00
adel-signal befcdf55fe
Balance TURN routing options across datacenters 2024-09-23 12:43:43 -07:00
Ravi Khadiwala ba12d39121 URLEncode shortCode paths 2024-09-23 14:43:15 -05:00
Ravi Khadiwala bf0f553ced Don't return 204s as exceptions
The jersey LoggingExceptionMapper automatically adds an entity to
WebApplicationExceptions. Jersey's HTTP server later strips the body on
204 responses, but our custom WebSocketResourceProvider does not
2024-09-23 14:43:04 -05:00
Jon Chambers 315fc00eac Lazily evaluate jobs to give max concurrency meaningful "teeth" 2024-09-23 08:43:44 -05:00
Jonathan Klabunde Tomer c47141ffda
yield json errors from 500s in sendMultiRecipientMessage 2024-09-19 12:36:52 -07:00
Jon Chambers 6c8566db60 Align "allocate device" and "verify device" default rate limits 2024-09-19 14:59:06 -04:00
Jonathan Klabunde Tomer aa60fae3b1
install RateLimitByIpFilter in soft-enforcement mode 2024-09-18 15:38:21 -07:00
Ravi Khadiwala 8cb9c60a3c Relax configured currency checks 2024-09-17 14:27:11 -05:00
Ameya Lokare dd7a20a774 Log IOException from assessCaptcha 2024-09-17 12:01:13 -07:00
Chris Eager 374fe087bc Use destination service ID from the envelope when removing views from shared MRM data 2024-09-16 13:19:11 -05:00
Chris Eager 11691c3122 Update fields in HCaptchaResponse
This reverts commit 8d129b10ca.
2024-09-16 13:12:36 -05:00
Chris Eager 8d129b10ca Revert "Update field names in HCaptchaResponse"
This reverts commit 42d4574213.
2024-09-13 15:28:42 -05:00
Katherine d6e03f50b9
Fix bug in ignoring svr errors in account deletion flow 2024-09-13 12:28:31 -04:00
Chris Eager f60c9f2a15 Use destination service ID from the envelope when looking up in shared MRM data 2024-09-13 11:21:18 -05:00
Chris Eager 1c617284f3 Add MRM views experiment to `MessagesCache.getMessagesToPersist()` 2024-09-13 11:21:18 -05:00
Chris Eager 5bc6ff0e77 Add check for existing key to MessagesCacheInsertSharedMultiRecipientPayloadAndViewsScript 2024-09-13 11:21:18 -05:00
Jonathan Klabunde Tomer 020c21f4ef
remove support for deprecated messages DynamoDB key schema 2024-09-13 09:18:41 -07:00
Katherine bd57c1c7e7
Introduce configurable way to ignore SVR errors in the account deletion flow 2024-09-13 10:57:09 -04:00
ravi-signal b666b66160
Add missing `@Valid` annotations 2024-09-13 10:54:32 -04:00
ameya-signal 8bafb1a641
Update code style in `MessageController.sendMessage()` 2024-09-13 10:53:40 -04:00
Chris Eager 42d4574213
Update field names in HCaptchaResponse 2024-09-13 10:53:23 -04:00
Alex Konradi 9ef6f8aec9
Add a metric for requests of ZKC auth credentials 2024-09-13 10:53:04 -04:00
Jon Chambers 556eec649d Add platform and push token presence dimensions to account creation metrics 2024-09-06 12:37:23 -05:00
Ameya Lokare e160025cfc Clean up OpenAPI annotations on PUT /v1/challenge
* Remove 413 response since we no longer send it
* Add missing 428 response for when invalid captcha is submitted
2024-09-06 10:36:02 -07:00
Chris Eager 0602149c52 Skip removeRecipientViewFromMrmData pipeline if there are no keys 2024-09-06 12:35:03 -05:00
Chris Eager ad17c6e40d Wait for MRM experiment mono to complete before returning default message 2024-09-05 18:02:33 -05:00
Chris Eager b95a766888 For ephemeral messages, remove recipient view from shared MRM data if recipient is offline 2024-09-05 18:02:33 -05:00
Chris Eager a0770db179 Add timer to removeRecipientViewFromMrmData 2024-09-05 18:02:33 -05:00
Ameya Lokare d6acfa56c2 Add platform tag to invalid HCaptcha reason metric 2024-09-04 15:28:36 -07:00
Chris Eager 11601fd091
Multi-recipient message views
This adds support for storing multi-recipient message payloads and recipient views in Redis, and only fanning out on delivery or persistence. Phase 1: confirm storage and retrieval correctness.
2024-09-04 13:58:20 -05:00
Chris Eager d78c8370b6 Add timer to removeByGuid script 2024-09-03 12:33:39 -04:00
Jon Chambers 46e0f5da74 Fix swapped placeholders in a log message 2024-08-30 17:01:11 -04:00
Jon Chambers f09cc03164
Detect message delivery loops 2024-08-30 16:27:21 -04:00
Jon Chambers 4c628b1cd9 Change the range for the "notify idle devices without messages" job to 30–45 days 2024-08-30 16:24:39 -04:00
Chris Eager 5122271750 Configure keyspace notifications in LocalFaultTolerantRedisClusterFactory 2024-08-30 13:00:31 -05:00
ravi-signal 7df978390f
Add playProductId to backup level configuration 2024-08-30 12:59:09 -05:00
ravi-signal 564dba3053
Add `playbilling` endpoint to `/v1/subscriptions` 2024-08-30 12:50:18 -05:00
Ravi Khadiwala 3b4d445ca8 Don't try to update a cancelled stripe subscription 2024-08-30 12:47:26 -05:00
ravi-signal 176a15dace
Add GooglePlayBillingManager 2024-08-28 14:22:37 -05:00
Jonathan Klabunde Tomer a049eda7e6
remove configuration for no-longer-used "metrics" redis cluster 2024-08-21 14:49:05 -07:00
Katherine 9eafa118d5
Return key transparency protobufs encoded as base64 strings 2024-08-21 17:08:06 -04:00
Katherine 8699d94de6
Give mock devices unique IDs when testing whether a capability is supported 2024-08-21 11:40:02 -04:00
Katherine 4c0a5ac3b2
Add `versionedExpirationTimer` capability 2024-08-21 11:39:43 -04:00
Ameya Lokare 7cbbf73cc9 Add registration recovery checker 2024-08-19 11:43:19 -07:00
Jon Chambers 0b1ec1e50b Make push notification senders available via `CommandDependencies` 2024-08-16 16:52:07 -04:00
Jon Chambers 659ac2c107
Generalize push notification scheduler and add support for delayed "new messages" notifications 2024-08-16 16:16:55 -04:00
Jon Chambers 5892dc71fa Allow linked devices to unlink themselves via the gRPC API 2024-08-16 16:14:13 -04:00
Jon Chambers fc3e547dce Remove an obsolete client version check when changing phone numbers 2024-08-16 16:14:00 -04:00
Ravi Khadiwala e4f9f949f0 Serialize subscription errors as json 2024-08-15 18:30:48 -05:00
Fedor Indutny 7605462d48 Allow device to unlink itself 2024-08-15 13:54:07 -05:00
Ravi Khadiwala fd10b9723d Add source length validation on backup media copy 2024-08-15 13:52:50 -05:00
Ravi Khadiwala 6cdfb7ab63 Reject authenticated one-time donation requests 2024-08-15 13:51:55 -05:00
Ravi Khadiwala e5fdab1bc8 Return 400 if a client specifies paypal where it's not supported 2024-08-15 13:49:25 -05:00
Katherine 2aa1eee29d
Align chat endpoints with "distinguished key" changes in key transparency service 2024-08-15 14:35:15 -04:00
Ravi Khadiwala 97e566d470 Move common subscription management out of controller 2024-08-15 13:29:26 -05:00
ravi-signal a8eaf2d0ad
Group one-time donation methods together 2024-08-15 13:25:09 -05:00
Ravi Khadiwala b5f9564e13 Validate that sourceAttachments are valid base64 strings 2024-08-14 17:36:30 -05:00
Jon Chambers 0075e94a42 Rename `AuthenticatedAccount` to `AuthenticatedDevice` 2024-08-14 12:44:48 -04:00
Katherine 1ea9e38fea
Use a separate virtual executor instead of the one used for async jersey tasks 2024-08-14 12:28:16 -04:00
Jon Chambers 3b405a53d0
Move "push notifications on close" logic to `WebSocketConnection` 2024-08-14 12:24:49 -04:00
Katherine 84c329e911
Key transparency `search` and `monitor` endpoints 2024-08-12 13:14:42 -07:00
Ravi Khadiwala acdf37561f Count requests that supply auth to boost endpoints 2024-08-12 13:40:58 -05:00
Jon Chambers 9128d4cc49 Correct a counter name 2024-08-12 14:39:31 -04:00
Jon Chambers 206e97d374 Use queries instead of scans when fetching experiment samples (again) 2024-08-12 14:39:22 -04:00
Jonathan Klabunde Tomer f682af2fe0
build a multi-architecture docker manifest list 2024-08-12 11:38:59 -07:00
Jon Chambers ecf7e60d98
Add an experiment for sending push notifications to idle devices that DO have pending messages 2024-08-07 16:41:19 -04:00
Ravi Khadiwala 68ddc070ca Count old version authentication tokens 2024-08-07 15:41:08 -05:00
Ravi Khadiwala 096bb8e6e5 Remove deprecated SubscriptionController methods 2024-08-06 16:09:44 -05:00
Jon Chambers 1af8bb494e Generalize "is idle?" check in idle device notification scheduler 2024-08-05 15:19:39 -04:00
Jon Chambers 46d04d9d1a Add a command to schedule notifications for idle devices without messages 2024-08-05 15:19:39 -04:00
Jon Chambers c0ca4ffbcc Retire "notify idle devices without messages" push notification experiment 2024-08-05 15:19:39 -04:00
Jon Chambers 8c61d45206
Tune the "finish push notification experiment" command 2024-08-05 15:02:24 -04:00
Katherine 0e4625ef88
Migrate to `429` for all ratelimit responses 2024-08-05 12:02:11 -07:00
Ravi Khadiwala 10d559bbb5 Return backup info at `/v1/subscription/configuration`
- Return the free tier media duration and storage allowance for backups
- Add openapi annotations
- Update default media storage allowance
2024-08-02 14:08:00 -05:00
Jonathan Klabunde Tomer 65b2892de5
Simplify unlink-device-on-full-DB process 2024-08-02 12:03:43 -07:00
Chris Eager 6fa6c3c81c Ensure multi-recipient messages are addressed to ACI service IDs 2024-08-01 12:31:27 -05:00
Chris Eager e4ffc932a9 Check for IdentityType.PNI in OptionalAccess#verify 2024-08-01 12:31:27 -05:00
Jon Chambers 822092044b Add a method to check for the presence of persisted messages, skipping the cache 2024-07-31 10:50:47 -04:00
Jon Chambers f1c153f39f Log max concurrency when starting/finishing experiments 2024-07-31 10:50:31 -04:00
Jon Chambers 7e62dc64dc Replace `filterWhen` with `flatMap` 2024-07-31 10:50:31 -04:00
Jon Chambers 2104a60703 Also check legacy parittion keys for message presence 2024-07-31 10:50:19 -04:00
Jon Chambers 97785fa570 Remove unused metrics and arguments 2024-07-31 10:50:19 -04:00
Chris Eager 9341fe9584 Add `endpoint` tag and `story` to auth type tag values 2024-07-31 09:38:14 -05:00
Ravi Khadiwala 3a582721cf Throw error for oversized inbound noise messages 2024-07-30 11:25:09 -05:00
Ravi Khadiwala 3d96d73169 Break up large outbound noise messages 2024-07-30 11:25:09 -05:00
Ravi Khadiwala 542422b7b8 Replace XX/NX handshakes with IK/NK 2024-07-30 11:25:09 -05:00
Jon Chambers 56ada7f0e9 Add a "dry run" mode for the "start push notification experiment" command 2024-07-30 12:19:00 -04:00
Jon Chambers 56fdebde75 Check for cached/persisted messages in parallel 2024-07-30 12:18:46 -04:00
Jon Chambers 4ee67064bb Remove a pair of unused methods 2024-07-30 12:18:34 -04:00
Jon Chambers 045ec9689d
Introduce a job scheduler and experiment for sending notifications to idle devices 2024-07-29 11:16:53 -04:00
Jon Chambers 4ebad2c473
Add a framework for running experiments to improve push notification reliability 2024-07-25 11:36:05 -04:00
Jonathan Klabunde Tomer 1fe6dac760
read old new key and new new key 2024-07-24 07:44:44 -07:00
Jonathan Klabunde Tomer f12a6ff73f
Remove migration paths for lazy message deletion 2024-07-23 14:07:19 -07:00
Chris Eager 6eed458ceb Use server timestamp for delivery duration metrics 2024-07-18 12:22:59 -05:00
Jon Chambers 54fb0a6acb
Add a general job scheduler 2024-07-18 13:22:31 -04:00
Jon Chambers 5147d9cb6d Mark old attachment endpoints as `@Deprecated` 2024-07-17 15:01:44 -04:00
Jon Chambers 37369929f3 Retire `PushLatencyManager` 2024-07-17 15:01:23 -04:00
Jon Chambers 4f10014902 Add an "is primary" dimension to message latency measurements 2024-07-17 15:01:08 -04:00
Ravi Khadiwala 0ef3e00ba7 Use non-legacy rate limit error in BackupAuthManager 2024-07-11 16:39:11 -05:00
Chris Eager a63e0e0390 Remove unused RateLimiters 2024-07-11 16:37:55 -05:00
Jon Chambers 5e8a0b2cfa
Introduce a utility class for finding reasonable times to send push notifications 2024-07-11 17:36:54 -04:00
Chris Eager eac75aad03 Add distribution of multi-recipient message recipient counts 2024-07-09 15:04:47 -05:00
Chris Eager b05fbc2102 Add metric for group send token adoption 2024-07-09 15:04:12 -05:00
Jon Chambers 6d166fdfc5 Return futures from "send push notification" operations 2024-07-08 15:36:17 -04:00
Ravi Khadiwala 2e36673702 Add warn log if changeNumber messages fail 2024-07-08 15:28:08 -04:00
ravi-signal 0c81ffe8b7
Count unregistered APNS tokens with a recent update 2024-07-08 15:27:48 -04:00
Jon Chambers 02b9ceb4c7 Discard APNs tokens if the APNs server reports that the token is expired 2024-07-08 15:27:23 -04:00
Chris Eager 775889c0b6 Remove deprecated PUT /v2/keys/signed endpoint 2024-07-08 15:26:26 -04:00
Chris Eager 98f2cdaf5a Reduce DynamoDB test client API timeouts 2024-07-08 15:26:11 -04:00
Jon Chambers ff5cc3cb4f Avoid duplicate metric registry configuration in commands 2024-07-08 15:25:16 -04:00
Jon Chambers ebecb1caec Throw an exception if metric registries are configured more than once 2024-07-08 15:25:16 -04:00
Jon Chambers 73e0aea85c Retire `Device#hasMessageDeliveryChannel()` 2024-06-26 14:46:39 -04:00
Ameya Lokare ec009a2bba Pass AccountAndAuthenticatedDeviceHolder to spam filter 2024-06-26 11:32:49 -07:00
Jon Chambers 1959c059ed Rename `AuthEnablementRefreshRequirementProvider` to `LinkedDeviceRefreshRequirementProvider` 2024-06-25 11:57:25 -04:00
Jon Chambers 2d1610b075 Stop monitoring device "enabled" state changes from auth enablement refresh requirement provider
Device enabled states no longer affect anything at an authentication level
2024-06-25 11:57:25 -04:00
Jon Chambers 2f76738b50 Expire APNs tokens if they haven't been updated since the expiration timestamp 2024-06-25 11:53:23 -04:00
Jon Chambers 1cf174a613 Include "token invalidation timestamp" in push notification responses 2024-06-25 11:53:23 -04:00
Jon Chambers d743454d07 Store updated APNs tokens unconditionally 2024-06-25 11:53:23 -04:00
Jon Chambers 1cd16eaa08 Delete FCM tokens immediately if FCM reports that they're no longer active 2024-06-25 11:53:23 -04:00
Jon Chambers 90e622b307 Require that message bundles include all linked devices 2024-06-25 11:51:09 -04:00
Jon Chambers cb5cd64c05
Gracefully handle `NotPushRegisteredException` 2024-06-25 11:23:16 -04:00
Jon Chambers d306cafbcc
Allow, but do not require, message delivery to devices without active delivery channels 2024-06-25 09:53:31 -04:00
Jon Chambers dbeba4f173 Reduce "delete after idle" time for accounts from 180 days to 120 days 2024-06-24 15:20:35 -04:00
Jon Chambers 86f83635bc Document a missing "capability downgrade" response 2024-06-24 15:20:06 -04:00
Jon Chambers fceda00d83 Consider all device when checking device capabilities 2024-06-24 15:20:06 -04:00
Jon Chambers 9b7af00cf5
Add methods to test whether a device may have unread messages 2024-06-24 15:19:48 -04:00
Chris Eager fa1281ae86 Update maven plugin versions 2024-06-24 14:16:05 -05:00
Chris Eager f5de4d7b71 Update various library dependencies 2024-06-24 14:16:05 -05:00
Chris Eager 1134df88e2 Remove obsolete "recaptcha" 2024-06-24 14:15:27 -05:00
ravi-signal 4aadabfac0
Make copy/delete streaming friendly 2024-06-20 16:00:09 -05:00
Katherine 0414da8c32
Add delete sync capability 2024-06-12 13:54:06 -04:00
Jon Chambers 155450380e Fix weird indentation 2024-06-12 13:53:48 -04:00
Jon Chambers 09bc4ef1d6 Measure sizes of group messages 2024-06-12 13:53:48 -04:00
Jon Chambers 3aa4d8713c Switch to a remote-aggregated distribution for message size metrics 2024-06-12 13:53:48 -04:00
Jon Chambers 5fc926271f Remove a metrics tag for "has spam reporting token" 2024-06-12 13:53:33 -04:00
Katherine f435b612c9
Remove stale `pni`, `pnp`, and `giftBadges` capabilities 2024-06-12 13:42:18 -04:00
Jon Chambers 6a14bf70e0 Extend push token removal grace period from 3 days to 14 2024-06-10 17:16:49 -04:00
Jon Chambers 138b368951 Add an explicit "incorrect password" authentication failure reason 2024-06-10 17:16:32 -04:00
Jon Chambers 0871d6ebc1 Add a log filter for spurious warnings about unsupported channel options 2024-06-10 17:16:10 -04:00
Jon Chambers 2f55747601
Remove expiration check from `Device#isEnabled()` 2024-06-07 10:39:11 -07:00
Jonathan Klabunde Tomer b376458963
include deleted-messages counter on both message deletion paths 2024-06-07 10:24:42 -07:00
Jon Chambers 64ac22a918 Resolve warnings/suggestions throughout `MessageControllerTest` 2024-06-06 14:11:44 -04:00
Alan Liu ffb81e4ff7
Retrieve Cloudflare Turn Credentials from Cloudflare 2024-06-05 12:03:40 -04:00
Jonathan Klabunde Tomer 01743e5c88
Delete messages lazily on account and device deletion to prevent timeouts when deleting accounts/devices with large queues 2024-06-04 12:16:43 -07:00
ravi-signal afa1899dc9 Add a require.proto presence annotation 2024-06-03 14:07:02 -05:00
Ravi Khadiwala cea2abcf6e Fix some accidentally sync async methods 2024-06-03 14:07:02 -05:00
Jonathan Klabunde Tomer c7d1ad56ff
support local-filesystem-based dynamic config for tests 2024-05-31 15:25:47 -07:00
ravi-signal a5f490cc53
return nonzero exit code when check-dynamic-config fails 2024-05-30 16:21:51 -05:00
ravi-signal abe29fa6ee
document gRPC error strategy 2024-05-30 16:20:34 -05:00
Chris Eager f6d1e566e7 Add validation annotations to DynamicExperimentEnrollmentConfiguration 2024-05-24 09:11:48 -04:00
Jon Chambers 9ec4f0b2f5
Gracefully handle proxy protocol messages at the beginning of TCP connections 2024-05-24 09:11:19 -04:00
Chris Eager 7286e724dc Add SIGNAL_SERVER_CONFIG override to LocalWhisperServerService 2024-05-23 12:08:48 -05:00
Jon Chambers e59a1e9efd Add support for TLS 1.2 for the benefit of load balancers performing health checks 2024-05-23 08:31:23 -04:00
Jon Chambers 097bedcb9b Add a health check handler to the Noise-over-WebSocket pipeline 2024-05-22 14:46:05 -04:00
Jon Chambers 907ff89011 Use complete certificate chains from the TLS keystore 2024-05-22 12:38:29 -04:00
Chris Eager 08faa0c009 Only register metrics for connections to upstream nodes 2024-05-22 11:17:52 -05:00
Ravi Khadiwala dd4759487b Specify `AuthCheckResponseV3` serialization 2024-05-22 09:42:05 -04:00
Jon Chambers 7980da9ce5 Set client public keys in the scope of a pessimistic account lock 2024-05-22 09:40:48 -04:00
Jon Chambers 0e43524dac Remove client public keys when deleting accounts/devices 2024-05-22 09:40:48 -04:00
Jon Chambers c5c5f642e8 Configure and instantiate a Noise-over-WebSocket tunnel 2024-05-22 09:37:25 -04:00
Jon Chambers e096c608ee Make Noise-over-WebSocket component names more consistent 2024-05-22 09:37:25 -04:00
Jon Chambers 9a2bfe1180 Add a plaintext mode to the Noise-over-WebSocket server for local testing 2024-05-22 09:25:28 -04:00
ravi-signal ce1c5be940
Add svr3 share-set store/retrieve 2024-05-17 10:45:18 -05:00
Ravi Khadiwala 1182d159aa Move command boilerplate into a base class 2024-05-17 10:44:58 -05:00
Ravi Khadiwala 7d95926f02 Add a crawler for backup usage metrics 2024-05-17 10:38:00 -05:00
Jon Chambers 101ecf342f Remove now-unused rate limiters 2024-05-16 16:56:42 -05:00
Jon Chambers 4efba94662
Add an API endpoint for storing public keys 2024-05-16 17:53:16 -04:00
Ravi Khadiwala 1855d661e8 Add maximum length to ProvisioningMessage 2024-05-16 16:47:47 -05:00
Ravi Khadiwala 438abc4cf9 Remove unused entity 2024-05-16 16:47:47 -05:00
Ravi Khadiwala 40639f70f4 Fix flaky MessageMetricsTest
Make the MeterRegistry in MessageMetrics configurable
2024-05-16 13:39:17 -05:00
Ravi Khadiwala a80c020146 Remove AssignUsernameCommand 2024-05-13 16:43:02 -05:00
Ravi Khadiwala 4d8fe0b6b2 Fix a flaky test 2024-05-07 13:52:35 -05:00
Max Moiseev 411087ff1a Add a testcase with real libsignal User Agent 2024-05-07 14:51:01 -04:00
ravi-signal 10bb2a6a10
Add finer grain rollouts to experiments 2024-05-06 13:28:32 -05:00
Ravi Khadiwala 7aff81547a Manage some unmanaged executors 2024-05-06 13:25:18 -05:00
Ravi Khadiwala fc097db2a0 Use storage-manager's copy implementation 2024-05-06 13:15:42 -05:00
Alan Liu 843151859d
Adding hostname property to cloudflare turn config 2024-05-02 12:35:32 -07:00
adel-signal 854ab353b3
calling: update TurnCallRouter to shuffle instance IPs to prevent allocation skew
Co-authored-by: Jonathan Klabunde Tomer <125505367+jkt-signal@users.noreply.github.com>
2024-05-02 12:34:34 -07:00
Chris Eager cf307db31d Update JsonMappingExceptionMapper “Early EOF” logic 2024-05-01 10:31:11 -05:00
Chris Eager 567c368a81 Add DiscoverableSubtypeResolver to static YAML_MAPPER 2024-05-01 10:21:55 -05:00
Chris Eager 223b2fc263 Add javax.validation.Validator to SpamFilter#configure 2024-05-01 10:21:55 -05:00
Chris Eager 4a28ab6317 Add support to trial Cloudflare TURN beta 2024-05-01 10:15:01 -05:00
Ravi Khadiwala 37aa3b8e49 Default to 0 `usedBytes` in `GET /v1/archives` 2024-05-01 10:10:46 -05:00
Chris Eager 0e4be0c85a
Add tests for `WhisperServerService#run`
Additionally, `LocalWhisperServerService` may be used for integration testing.
2024-04-29 11:05:35 -05:00
Jon Chambers 9d3e3c7312
Use a common utility for turning Google API futures into `CompletableFutures` 2024-04-26 15:27:59 -04:00
Ravi Khadiwala 88e2687e23 Add a check for missing uak in `OptionalAccess` 2024-04-26 15:24:54 -04:00
Ravi Khadiwala 19944bfdb2 Update to libsignal 0.45 and use libsignal's BackupLevel 2024-04-25 16:54:41 -05:00
Ravi Khadiwala c8efcf5105 Don't map a `Mono<Void>` 2024-04-25 16:47:34 -05:00
Jon Chambers 7f6da52349 Publish donation events for immediately-successful donations 2024-04-24 13:16:37 -04:00
Jon Chambers 8999f0104f Trigger pub/sub events for one-time donations via Braintree (PayPal) 2024-04-24 09:19:21 -04:00
Jon Chambers 516c481e94 Pass a `CurrencyConversionManager` to `BraintreeManager` 2024-04-24 09:19:21 -04:00
Jon Chambers 3266c2cd8f Add cloud pubsub as a dependency 2024-04-24 09:19:21 -04:00
Jonathan Klabunde Tomer f0dcd8e07b
Group Send Endorsement support for unversioned profile fetch 2024-04-23 14:58:19 -07:00
ravi-signal 9ef1fee172
Add DELETE `v1/archives` 2024-04-23 16:50:11 -05:00
Jonathan Klabunde Tomer b3bd4ccc17
simplify profile auth 2024-04-23 14:49:04 -07:00
Chris Eager fba7686390 Remove `shard` tag from Lettuce circuit breaker metrics 2024-04-23 16:00:46 -05:00
Ameya Lokare 2d314e5309 Minor: Return exception instead of throwing it in .orElseThrow()
Gets rid of an IntelliJ warning about it. No difference in behavior, there is
a test that already covers this path.
2024-04-22 09:32:12 -04:00
Jon Chambers ed72d7f9ec
Attach client platforms when creating donations 2024-04-22 09:31:57 -04:00
Jonathan Klabunde Tomer b8f64fe3d4
Group Send Endorsement support for pre-key fetch endpoint 2024-04-19 15:40:46 -07:00
Chris Eager ab64828661 Update custom Gauges to Micrometer MeterBinders 2024-04-17 17:43:34 -05:00
Chris Eager a38bf25e68
Migrate remaining custom metrics from Dropwizard to Micrometer
And remove some that are obsolete or duplicative.
2024-04-17 15:35:04 -05:00
Jonathan Klabunde Tomer ada589d0c3
accept Group Send Endorsements for single-recipient message send
Co-authored-by: Jon Chambers <63609320+jon-signal@users.noreply.github.com>
2024-04-16 15:06:40 -07:00
Chris Eager a302275187 Use a single cluster instance in MessagesCache 2024-04-16 12:04:18 -05:00
Chris Eager b734d58ab7 Coalesce all Redis clusters to per-shard circuit breakers 2024-04-16 12:04:18 -05:00
Ravi Khadiwala 2046b02bd8 Rename `RedeemReceiptRequest` to help openapi 2024-04-16 11:16:18 -05:00
Chris Eager 1df824db7c Remap some JsonMappingExceptions to 408 and 400 2024-04-15 16:01:09 -05:00
Chris Eager 9cad2c6b7d Improve test Redis cluster setup and teardown 2024-04-15 15:58:23 -05:00
ravi-signal 00ca7d5942
Add cdn number query parameter to `/archives/auth/read` 2024-04-15 13:59:14 -05:00
ravi-signal d36df3eaa9
Add new upload-for-copy backup endpoint 2024-04-15 13:47:46 -05:00
ravi-signal e5d654f0c7
Add `/v1/archives/redeem-receipt` 2024-04-15 13:47:02 -05:00
Chris Eager fc1f471369 Use per-shard circuit breakers for additional Redis clusters 2024-04-15 13:45:24 -05:00
Chris Eager 2dc707d86e
Add per-shard Redis circuit breakers 2024-04-12 11:22:41 -05:00
Chris Eager 05a92494bb Remove X-Forwarded-For from RemoteAddressFilter 2024-04-11 11:03:37 -05:00
Alex Konradi 39fd955f13 Allow clients to request zkc-based auth creds
Allow clients to pass a zkcCredential=true query parameter to request the new
auth credential format implemented with the zkcredential Rust library.
2024-04-11 11:00:10 -05:00
ravi-signal 4863e1d227
Add backup levels to subscription configuration response 2024-04-11 10:58:40 -05:00
Jonathan Klabunde Tomer 2b652fe2a9
accept group send endorsements for multi-recipient sends 2024-04-10 16:51:09 -07:00
Ravi Khadiwala cdd2082b07 Decrease logging level in RemoveExpiredBackupsCommand 2024-04-10 18:41:29 -05:00
Chris Eager 5b97bc04e0 Add ExternalRequestFilter 2024-04-04 16:24:20 -05:00
Ravi Khadiwala 63c8b275d1 Return 401 instead of 404 on unknown backup-ids 2024-04-04 10:56:48 -05:00
Ravi Khadiwala 1ebc17352f Check presentation before verifying the signature 2024-04-04 10:56:48 -05:00
Ravi Khadiwala 268c8382ee Fix Backup expiration purge time 2024-04-04 10:55:55 -05:00
ravi-signal 498dcbbfe8
Make media encrypter stream ordered
Co-authored-by: Chris Eager <79161849+eager-signal@users.noreply.github.com>
2024-04-04 10:53:45 -05:00
Ravi Khadiwala 3a1ecb342f allow striping clients in FaultTolerantHttpClient 2024-04-04 10:47:34 -05:00
ravi-signal bb0da69c9e
Set the shutdown gauge earlier in the shutdown process
Co-authored-by: Chris Eager <79161849+eager-signal@users.noreply.github.com>
2024-04-02 09:39:55 -05:00
Jon Chambers 796dce3cd3 Always use the "peek" strategy for counting one-time pre-keys 2024-04-02 10:31:20 -04:00
Jon Chambers f59c34004d De-idiom-ize a "wait for everything to finish" idiom 2024-04-02 10:30:44 -04:00
Katherine d002e5dda8
Hardcode `paymentActivation` flag to `true` 2024-04-01 15:07:11 -07:00
Chris Eager 89cb821c97 Remove vavr dependency 2024-04-01 17:06:55 -05:00
Chris Eager fcc77052a6 Add org.eclipse.jetty.io.EofException to expected measureSendMessageErrors 2024-04-01 17:06:29 -05:00
Ravi Khadiwala 831c9ff5bf Make backupDir/mediaDir indirect 2024-04-01 13:45:21 -05:00
Ravi Khadiwala de37141812 Add a crawler that expires old backups 2024-04-01 13:45:21 -05:00
Ravi Khadiwala a550caf63f Make sure we close the HTTP/2 stream after cdn read errors 2024-03-27 17:00:37 -05:00
Ravi Khadiwala de9eaa98db 404 instead of 400 on unknown source cdn 2024-03-27 17:00:37 -05:00
ravi-signal 37b657cbbd
avoid baos::writeTo on virtual threads 2024-03-27 16:58:38 -05:00
Jon Chambers a733f5c615 Add debugging context to signature validation failures 2024-03-27 17:58:02 -04:00
Jon Chambers 8a587d1d12 Rename `NoiseStreamHandler` to `NoiseTransportHandler` for consistency with Noise specification terminology 2024-03-27 17:57:46 -04:00
Chris Eager 75bb22f08b Include HTTP2ServerConnectionFactory in JettyHttpConfigurationCustomizer 2024-03-27 16:56:19 -05:00
Jon Chambers d10da39e5b Pare back debug-oriented metrics around fetching pre-keys 2024-03-26 16:44:34 -04:00
adel-signal 54e9b839bd
update TurnTokenGenerator to add whether this is with ip or url turn allocation 2024-03-26 13:40:53 -07:00
Jon Chambers aec6ac019f
Introduce a Noise-over-WebSocket client connection manager 2024-03-22 15:20:55 -04:00
Ravi Khadiwala 075a08884b Preserve backupCredentialRequest across rereg 2024-03-22 14:19:35 -05:00
Jon Chambers 6fcb2ab5dd Remove username phased rollout plumbing (usernames are now available to everybody) 2024-03-21 13:42:20 -04:00
ameya-signal 7f0f045f29
Minor cleanup of report spam endpoint (#1979) 2024-03-21 10:41:25 -07:00
Ravi Khadiwala e7d1eadf8e Fix experiments in BackupAuthManager 2024-03-20 11:43:07 -05:00
Chris Eager 9df6e19204 Ignored EofException response failure in MetricsHttpChannelListener 2024-03-18 17:38:19 -05:00
Chris Eager 5eaae184c9 Set request failure to debug in MetricsHttpChannelListener 2024-03-18 17:38:19 -05:00
Chris Eager 459882e6fa Add JettyHttpConfigurationCustomizer 2024-03-18 17:38:19 -05:00
Chris Eager 2c2b5d555e Rename obsolete uses of recaptcha 2024-03-13 16:40:32 -05:00
Alex Konradi 0ab2428d87
Don't produce zkgroup auth creds with PNI as ACI 2024-03-13 16:22:45 -05:00
Chris Eager 8574494573 Support "captcha" rename in AnswerChallengeRequest.type 2024-03-13 16:19:05 -05:00
Chris Eager a4d4a9c686 Remove RecaptchaClient 2024-03-13 16:19:05 -05:00
Chris Eager fd9eb462cc Replace extraneous SecureRandom with empty byte array 2024-03-12 16:49:57 -05:00
Ravi Khadiwala f9533e016f Adjust metrics in RemoveExpiredUsernameHoldsCommand 2024-03-11 13:50:08 -05:00
Jon Chambers 85b15fa63b Actually increment the "get group credentials" counter 2024-03-08 17:07:16 -05:00
Chris Eager 3dadaf9334 Migrate DynamicConfigurationManager to use java.util.concurrent 2024-03-08 13:53:28 -06:00
Ravi Khadiwala 9e510a678c disable response buffering on the websocket
Jersey buffers responses (by default up to 8192 bytes) just so it can
add a content length to responses. We already buffer our responses to
serialize them as protos, so we can compute the content length
ourselves. Setting the buffer to zero disables buffering.
2024-03-08 13:46:00 -06:00
Chris Eager 2dc0ea2b89 Address potential NullPointerException when calling Collection#contains 2024-03-08 13:43:31 -06:00
Alex Konradi 7d364ca7ce
Count group auth reqs without pniAsServiceId=true 2024-03-06 15:41:48 -05:00
Chris Eager 9f6a6d7f5b Include HTTP/2 stream idle timeouts in IOExceptionMapper 2024-03-06 11:11:39 -06:00
Ravi Khadiwala 3cc740cda3 Temporarily hold a username after an account releases it 2024-03-06 11:09:25 -06:00
Ravi Khadiwala 47b24b5dff Simplify username operations in `Accounts`
- Group username table constants together
- Rethrow JsonProcessingException earlier
- Use UpdateAccountSpec.forAccount in username operations
- Inline confirm/clear transaction helpers
2024-03-06 11:09:25 -06:00
adel-signal 8f100a792e
calling: update TurnCallRouter to reduce returned options 2024-03-05 11:26:19 -08:00
Chris Eager 1f1de353de Reapply "Update to Dropwizard 3.0.6"
This reverts commit 95e83c52fa.
2024-02-29 16:56:25 -06:00
Ravi Khadiwala 95e83c52fa Revert "Update to Dropwizard 3.0.6"
This reverts commit 2ad5d33251.
2024-02-28 15:58:55 -06:00
Chris Eager 88a68e883e Update various `<exclusions>` in POM 2024-02-28 15:25:33 -06:00
Chris Eager 2ad5d33251 Update to Dropwizard 3.0.6 2024-02-28 15:25:33 -06:00
Ravi Khadiwala 4e5dd914dd Add varargs variant to HmacUtil 2024-02-28 15:18:39 -06:00
ravi-signal 2adf1e5017
Avoid modification of Account from `@ReadOnly` endpoint 2024-02-28 15:18:12 -06:00
Jon Chambers d1d03f45c5 Resolve warnings throughout `AccountControllerTest` 2024-02-26 16:11:03 -05:00
Ravi Khadiwala 436bd891bd Don't register SpamFilter as a request filter 2024-02-26 09:33:36 -06:00
Chris Eager a7c28fe5ed Rename "name" tags to be more distinguishing 2024-02-26 09:32:50 -06:00
Chris Eager 60814d1ff0 Configure metrics registries earlier in background command setup 2024-02-26 09:32:01 -06:00
Jon Chambers d018efe2a5
Require non-null proofs in "confirm username hash" requests 2024-02-26 10:30:52 -05:00
Jon Chambers 6fd0cba06a Temporarily restore the `giftBadges` capability for backward compatibility 2024-02-26 10:30:29 -05:00
Katherine 12c6af23ee
Map TransactionConflict to ContestedOptimisticLockException in username flows 2024-02-23 14:06:03 -08:00
Ravi Khadiwala 69330f47fd Explicitly call spam-filter for verification session updates
Pass in the same information to the spam-filter, but just use explicit
method calls rather than jersey request filters.
2024-02-23 16:04:24 -06:00
Ravi Khadiwala 4f40c128bf Explicitly call spam-filter for challenges
Pass in the same information to the spam-filter, but just use explicit
method calls rather than jersey request filters.
2024-02-23 15:58:52 -06:00
Jon Chambers 30b5ad1515 Fix an incorrectly-named "check keys" method 2024-02-23 13:17:10 -05:00
adel-signal 665a26d164
update call routing to return ipv6 ips in RFC3986 format 2024-02-23 11:57:58 -05:00
Jon Chambers a5774bf6ff
Introduce a (dormant) Noise/WebSocket for future client/server communication 2024-02-23 11:42:42 -05:00
Jon Chambers d2716fe5cf Add an endpoint for checking that clients and the server have a common view of the client's repeated-use keys 2024-02-23 11:41:58 -05:00
Jon Chambers 279f877bf2 Validate pre-key signatures via the legacy "set signed pre-key" endpoint 2024-02-23 11:33:41 -05:00
Ravi Khadiwala df69d9f195 Annotate authenticated endpoints with `@ReadOnly` or `@Mutable` 2024-02-22 12:05:32 -06:00
Ravi Khadiwala 26ffa19f36 Lifecycle management for Account objects reused accross websocket requests 2024-02-22 12:05:32 -06:00
Jon Chambers 29ef3f0b41 Add tests and metrics for parsing invalid keys 2024-02-21 15:32:25 -05:00
Jon Chambers 106d5e54c7 Extract a common base class for public key serializers/deserializers 2024-02-21 15:32:25 -05:00
Jon Chambers 6ac2460eb0 Drop the "key without version byte" counter 2024-02-21 15:32:25 -05:00
dependabot[bot] 79c030b138
Bump org.apache.commons:commons-compress from 1.24.0 to 1.26.0 in /service 2024-02-21 11:52:41 -08:00
Chris Eager c8d649e8c2 Update MetricsHttpChannelListener to share MetricsRequestEventListener namespace 2024-02-21 13:32:47 -06:00
Ravi Khadiwala 1fdf82dd6c Remove unused ChangePhoneNumberRequest object
Actual request object is ChangeNumberRequest
2024-02-21 13:32:27 -06:00
Jon Chambers 4aa4246695 Clear account records from the account cache after username operations 2024-02-20 12:11:29 -05:00
Chris Eager 1bebceb29c Actually fix flaky test in MetricsHttpChannelListenerIntegrationTest 2024-02-20 10:52:04 -06:00
Jon Chambers a2139ee236 Revert "Add diagnostic dimensions to the "get keys" counter"
This reverts commit cd64390141.
2024-02-18 20:14:05 -05:00
Jon Chambers 8c55f39cdf Revert "Use a phased enrollment strategy for the `pnp` compatibility flag"
This reverts commit 3e12a8780d.
2024-02-18 20:08:39 -05:00
Chris Eager 0329184c94 Fix flaky test in MetricsHttpChannelListenerIntegrationTest 2024-02-18 20:08:29 -05:00
Jon Chambers cd64390141 Add diagnostic dimensions to the "get keys" counter 2024-02-18 18:10:58 -05:00
Jon Chambers 3e12a8780d Use a phased enrollment strategy for the `pnp` compatibility flag 2024-02-18 17:59:00 -05:00
Jon Chambers 11e6ff1bbe Introduce a `pnp` capability for backward compatibility 2024-02-18 17:59:00 -05:00
Jon Chambers 36f85fc97e Fix an inverted boolean in a counter 2024-02-16 15:18:18 -05:00
Jon Chambers 9040cfd200 Count "store key" attempts by key type/platform 2024-02-16 13:09:55 -05:00
Jon Chambers 757da3b15a Fully-qualify OpenAPI `Tag`, allowing for imported Micrometer `Tag` 2024-02-16 13:09:55 -05:00
Jon Chambers d162590a32 Record a remote-aggregated distribution of one-time pre-key counts 2024-02-16 13:09:55 -05:00
Jon Chambers f41e1716c6 Combine/expand existing "get keys" counter 2024-02-16 13:09:55 -05:00
Jon Chambers 4dce0f1b9d Add identity type/"stale" dimensions to the "pre-key unavailable" counter 2024-02-16 13:09:55 -05:00
Jonathan Klabunde Tomer fef57dce0d
use explicit `Timer` rather than micrometer annotation for send-message latency distribution 2024-02-15 14:58:43 -08:00
Jon Chambers d884700b61 Significantly reduce default Redis command timeout 2024-02-15 17:57:17 -05:00
Jonathan Klabunde Tomer ff9ad4bd1d
export 1:1 message send latency as a full distribution 2024-02-15 10:33:02 -08:00
Chris Eager 9ce2b7555c Add static servlet paths to MetricsHttpChannelListener 2024-02-14 17:09:30 -06:00
Jon Chambers f90ccd3391 Count attempts to fetch a one-time EC pre-key that result in a "key unavailable" response 2024-02-14 18:04:31 -05:00
Jon Chambers 5ff092e541 Retire the `pni` device capability 2024-02-14 18:04:23 -05:00
Ravi Khadiwala dcdf401f64 Make DELETE /v1/device synchronous 2024-02-14 15:30:10 -05:00
Chris Eager e4fb80b39b Add onResponseFailure handler to MetricsHttpChannelListener 2024-02-14 13:43:23 -06:00
Chris Eager 9745854ab8 Switch MetricsHttpChannelListener to ContainerResponseFilter 2024-02-14 13:43:23 -06:00
Jon Chambers 7124621f66
Use pre-calculated pre-key counts when possible 2024-02-14 14:28:33 -05:00
Jon Chambers 47fd8f5793 Assume that all devices are PNI-capable 2024-02-14 14:27:48 -05:00
Jonathan Klabunde Tomer 40d698f2db Remove last vestiges of stale capabilities.
Not for deployment until 2024-02-06!
2024-02-14 14:23:05 -05:00
adel-signal 74abe98706
initialize call routing data syncs 2024-02-13 17:05:08 -08:00
Chris Eager 86787f3bc8 Start DynamicConfigurationManager directly after construction 2024-02-13 13:08:20 -06:00
Chris Eager 699b0c775a Add dynamic configuration to enable detailed Lettuce metrics 2024-02-13 10:33:43 -06:00
Chris Eager ff59ef8094 Add MetricHttpChannelListener 2024-02-13 10:29:03 -06:00
Jonathan Klabunde Tomer 089af7cc1f
correct metric name in MaxMindDatabaseManager timer 2024-02-09 13:37:39 -08:00
Jonathan Klabunde Tomer 1591a2d9a3 CallRoutingTableManager: fix crash on startup due to typo in metric naming 2024-02-09 12:27:51 -08:00
Jonathan Klabunde Tomer f7984ed642
CallDnsRecordsManager: fix crash on startup due to typo in metric naming 2024-02-09 12:14:50 -08:00
adel-signal d1f68eacd9
Add call routing API endpoint for turn servers 2024-02-09 11:12:23 -08:00
Jon Chambers 4f45f23094 Prevent old versions of the Android app from carrying out "change phone number" requests 2024-02-09 09:58:38 -05:00
Jon Chambers c5dc01ee11 Restore high-cardinality Lettuce metrics for debugging 2024-02-08 19:27:56 -05:00
Chris Eager e944306a28 Remove obsolete dropwizard-db dependency 2024-02-07 14:35:23 -06:00
Ravi Khadiwala 3b44ed6d16 Explicitly call spam-filter for messages
Pass in the same information to the spam-filter, but just use explicit
method calls rather than jersey request filters.
2024-02-07 14:30:32 -06:00
Chris Eager 0965ab8063 Move HeaderUtils#getMostRecentyProxy to RemoteAddressFilter 2024-02-07 14:28:37 -06:00
Chris Eager fcae100df1 Add dropwizard-http2 dependency 2024-02-07 14:28:20 -06:00
Fedor Indutny 24a7762873
Add `identityType` tag to `SENT_MESSAGE_COUNTER_NAME` 2024-02-06 17:39:00 -06:00
Chris Eager e441ab60a2 Add metric for IPv4/IPv6 requests count 2024-02-06 17:38:25 -06:00
Chris Eager 2ab14ca59e Refactor remote address/X-Forwarded-For handling 2024-02-05 13:37:06 -06:00
Chris Eager 4475d65780 Make Accounts#changeNumber exception handling more resilient to future changes 2024-02-01 15:14:15 -06:00
Ravi Khadiwala b1d10f5817 Add lifecycle management for AwsCrt for commands 2024-02-01 15:08:45 -06:00
Chris Eager c838df90ef Add HttpServletRequestUtil 2024-01-31 17:53:47 -06:00
Chris Eager fb39af67e5 Allow for more TransactWriteItems when inspecting TransactionCanceledException 2024-01-31 17:46:32 -06:00
Chris Eager 2d4d37f96a Translate TransactionCanceledException to ContestedOptimisticLockException in Accounts#changeNumber 2024-01-31 17:27:16 -06:00
Jonathan Klabunde Tomer 84af984c4b
remove unversioned and libsignal-0.36 versioned zk secrets from sample bundle 2024-01-31 15:25:23 -08:00
Jon Chambers 26adf20ee8 Make "fetch profile" endpoints `@ManagedAsync` 2024-01-31 14:38:50 -06:00
Jon Chambers 72668ed0a2 Make "send individual message" endpoint `@ManagedAsync` 2024-01-31 14:38:50 -06:00
Ravi Khadiwala 50f1ed7851 Add a virtual-thread backed `@ManagedAsyncExecutor` 2024-01-31 14:38:50 -06:00
ravi-signal cf8f2a3463
remove synchronized locks that may be held while blocking 2024-01-31 14:29:15 -06:00
ravi-signal b483159b3a
reintroduce VirtualThreadPinEventMonitor 2024-01-31 14:28:12 -06:00
ravi-signal 480abebf7e
Offload account lock updates to accountLockExecutor 2024-01-31 14:27:16 -06:00
Ravi Khadiwala b924dea045 Remove VirtualThreadPinEventMonitor 2024-01-30 13:49:39 -06:00
Ravi Khadiwala 2c1e7e5ed6 Disable flaky VirtualThreadPinEventMonitorTest 2024-01-30 13:29:58 -06:00
Ravi Khadiwala 4dfd74906c Add timeouts to VirtualThreadPinEventMonitorTest 2024-01-30 13:10:43 -06:00
Chris Eager c80225a18c Remove `NoneHealthResponder` 2024-01-30 12:51:43 -06:00
ravi-signal 0e6242373e
Add a monitor for virtual thread pin events 2024-01-30 12:48:07 -06:00
ravi-signal 4305db5579
Update to aws sdk 2.23.8 and use AwsCrtHttpClient 2024-01-30 12:46:27 -06:00
ravi-signal 36e7772f74
Put some validation on to profile version strings
Co-authored-by: Jon Chambers <63609320+jon-signal@users.noreply.github.com>
2024-01-26 15:24:38 -06:00
Chris Eager ca05df5172 Revert "Add support for secondary credentials for registration service"
This reverts commit 4b8fc2950f.
2024-01-26 11:42:35 -06:00
Chris Eager 422e8e6f3e Remove CommandStopListener 2024-01-26 11:31:04 -06:00
Jon Chambers 852b285d84 Configure and instantiate a `ClientPublicKeys` data store/manager 2024-01-26 10:29:59 -05:00
Jon Chambers 6c13193623 Add a data store for client public keys for transport-level authentication/encryption 2024-01-26 10:29:59 -05:00
Ravi Khadiwala 6bda9d8604 Set destination account on the request context 2024-01-25 13:02:28 -06:00
Ravi Khadiwala 1428ca73de Make identity token fetcher more async friendly
After the identity token expires a subsequent call would do a blocking
operation to retrieve the new token. Since we're making use of an async
gRPC client, this tends to block a thread we don't want to be blocking
on.

Instead, switch to periodically refreshing the token on a dedicated
thread.
2024-01-25 13:01:21 -06:00
Katherine 498ace0488
Remove iOS special case handling logic for SEPA/iDEAL 2024-01-25 10:52:17 -08:00
Chris Eager 4b8fc2950f Add support for secondary credentials for registration service 2024-01-24 13:52:23 -06:00
Jon Chambers 595cc55578 Retire the `returnPqKey` flag when fetching pre-keys 2024-01-23 16:01:40 -05:00
Ravi Khadiwala 91b0c368b4 Remove unused table configuration parameter 2024-01-23 14:48:52 -06:00
Jonathan Klabunde Tomer 21d0ffc990
Allow "reserving" one's own committed username hash 2024-01-23 12:44:55 -08:00
Chris Eager 55b9d84956 Add `host` to `DogstatsdConfiguration` 2024-01-22 15:59:52 -06:00
Chris Eager ffdb0db6c6 Migrate from `host` tag to `dd.internal.entity_id` 2024-01-22 15:59:52 -06:00
Chris Eager a5ed07a666 Support environment variable substitution in configuration 2024-01-22 11:25:18 -06:00
Chris Eager da02c90bad Remove AWS instance profile credentials provider 2024-01-22 11:24:03 -06:00
Ravi Khadiwala 3820a231ec Strictly enforce ACI service identifier strings have no prefix 2024-01-22 11:23:33 -06:00
Dimitris Apostolou 408b065b9e Fix typos 2024-01-20 12:40:08 -05:00
hduelme 238ab84749 use StandardCharsets UTF_8 instead of String 2024-01-20 12:39:43 -05:00
Ravi Khadiwala f5080f9bd6 Support configurable verification code sender overrides 2024-01-19 13:58:17 -06:00
Ravi Khadiwala db4aa99ce0 Make the ServiceIdentifier interface sealed 2024-01-19 13:57:20 -06:00
ravi-signal 70134507f8
Add metric for ServiceId string parsing 2024-01-19 13:56:47 -06:00
Ravi Khadiwala 360a4793ae Remove global lock in RateLimitChallengeManager 2024-01-19 13:56:09 -06:00
Jon Chambers 47bfb25f2c Retire a now-unused transacational update method for accounts 2024-01-18 16:40:21 -05:00
Jon Chambers b048b0bf65 Remove signed pre-keys from `Device` entities 2024-01-18 12:13:00 -05:00
Jonathan Klabunde Tomer 394f9929ad
limit size of multi-recipient messages 2024-01-11 16:31:37 -08:00
ravi-signal bf39be3320
Add Content-Type header for copy uploads 2024-01-11 14:59:35 -06:00
Chris Eager 4a2cbb9ec7 Stop timers on Flux termination 2024-01-11 14:57:31 -06:00
Ravi Khadiwala cc6cf8194f Add media deletion endpoint 2024-01-11 10:19:06 -06:00
Ravi Khadiwala e934ead85c Fix incorrect comparison in archive usage metric 2024-01-11 10:19:06 -06:00
Ravi Khadiwala 323bfd9a6e Remove some secondary keys from account cache
Remove e164, usernameHash, and usernameLink secondary mappings from the
accounts redis cache.
2024-01-11 10:10:32 -06:00
Jon Chambers bf05e47e26 Get accounts asynchronously when checking SVR credentials via gRPC 2024-01-11 11:09:49 -05:00
Jon Chambers d18f576239 Revert "Revert "Treat the stand-alone signed pre-keys table as the source of truth for signed pre-keys""
This reverts commit 3f9edfe597.
2024-01-10 11:22:10 -05:00
Jon Chambers 7d483c711a Revert "Revert "Retire "migrate signed pre-keys" configuration""
This reverts commit a024949311.
2024-01-10 11:22:10 -05:00
Jon Chambers 61256d49cd Revert "Revert "Retire the "migrate signed pre-keys" command""
This reverts commit f738bc97e7.
2024-01-10 11:22:10 -05:00
Jonathan Klabunde Tomer 184cdc0331
Remove two-stage check of username availability in reserve/confirm 2024-01-09 14:01:42 -08:00
Ravi Khadiwala ed972a0037 Fix archive listing directory prefix order 2024-01-09 16:01:11 -06:00
Ravi Khadiwala a62a6c1cb6 Change type of Cdn3StorageManagerConfiguration.clientSecret to SecretString 2024-01-08 16:06:54 -06:00
Ravi Khadiwala f66566aa17 Fix default configuratiton in MonitoredS3ObjectConfiguration 2024-01-08 14:52:14 -06:00
ravi-signal b6ecfc7131
Add archive listing 2024-01-08 13:54:57 -06:00
adel-signal 2b688b1a60
Refactor spam filter's S3MonitoredObject to server parent module.
Allows other parts of server to use S3MonitoredObjects.
2024-01-08 10:34:12 -08:00
Jon Chambers 3c64d9292f Revert "Expand the default max packet size for Dogstatsd"
This reverts commit 0f52d2e464.
2024-01-08 12:23:16 -05:00
Jon Chambers 0f52d2e464 Expand the default max packet size for Dogstatsd 2024-01-08 11:43:50 -05:00
Jonathan Klabunde Tomer 1e5fadc440
Allow reserving a hash previously reserved (but not committed) by the same user 2024-01-05 15:38:45 -08:00
Chris Eager f495ff483a
Update RemoveExpiredLinkedDevicesCommand to retry failures 2024-01-05 15:38:34 -08:00
Jonathan Klabunde Tomer d1a80cc880 fix build-breaking typo 2024-01-04 11:46:07 -08:00
Jonathan Klabunde Tomer e1ad25cee0
Group Send Credential support in chat 2024-01-04 11:38:57 -08:00
Chris Eager 195f23c347
Add `/v1/accounts` and `/v2/keys` to the WebSocket 2024-01-02 15:51:57 -06:00
Chris Eager ad6b99be6a Dispatch client presence operations after device deletion to a dedicated executor 2023-12-22 10:51:17 -06:00
Chris Eager b9dd9fc47d Reduce fan-out by processing a single stream of expired linked devices 2023-12-22 10:51:06 -06:00
Chris Eager 637792c6d4 Move `RemoveExpiredLinkedDevicesCommand` error handling for more accurate metrics 2023-12-21 16:06:41 -06:00
Jon Chambers 4d1bca2d97 Dispatch client presence operations after account deletion to a dedicated executor 2023-12-21 13:40:49 -05:00
Chris Eager f33a2eba50
Add buffer + shuffle and configurable concurrency to `RemoveExpiredLinkedDevicesCommand` 2023-12-21 11:14:02 -06:00
Jon Chambers 5d6bea5ec9 Clear Redis cache entries strictly after removing accounts from DynamoDB 2023-12-21 12:08:03 -05:00
Jon Chambers 057d1f07a8 Remove bulk "set repeated-use signed pre-keys" methods because they were only ever used for single devices 2023-12-21 12:07:42 -05:00
Jon Chambers 95bb9a9780 Log signed pre-key retrieval errors and mismatches 2023-12-20 14:55:12 -05:00
Chris Eager 06c391cbf6 Add counter for failed account updates to RemoveExpiredLinkedDevicesCommand 2023-12-20 13:51:28 -06:00
Chris Eager d90dff95b1 Move MeterRegistry#close calls to after the lifecycle has fully stopped 2023-12-20 13:51:16 -06:00
Ravi Khadiwala ca47a7b663 handle new RegistrationService proto error 2023-12-19 18:19:26 -06:00
Jonathan Klabunde Tomer 9d3d4a3698
Add phone-number-sharing field to versioned profile
Co-authored-by: Katherine <katherine@signal.org>
2023-12-19 11:20:04 -08:00
Chris Eager 3b509bf820 Add command to remove expired linked devices 2023-12-19 13:11:26 -06:00
Jon Chambers 5b7f91827a
Remove signed pre-keys transactionally when removing devices 2023-12-19 14:11:05 -05:00
Chris Eager 06800043a9 Set TLS keystore password in secondary persistent services 2023-12-15 13:39:58 -06:00
Chris Eager 3090de56b8 Set TLS keystore password from secrets configuration 2023-12-15 12:47:27 -06:00
Katherine a37acd1f42
Add ttl for braintree writes to onetime donation table 2023-12-15 13:37:35 -05:00
Jonathan Klabunde Tomer e9a130f976
add versioned zkconfig secrets to sample secrets bundle 2023-12-14 17:38:49 -08:00
Jonathan Klabunde Tomer 43f17414ff
Make key-setting methods asynchronous again 2023-12-14 16:49:16 -08:00
Jon Chambers b259eea8ce
Refactor/clarify account creation/reclamation process 2023-12-14 16:48:57 -08:00
Katherine 9cfc2ba09a
Persist onetime donation payment success timestamps for Braintree transactions 2023-12-14 16:48:29 -08:00
Chris Eager bb347999ce
Propagate another subscription processor error to clients 2023-12-14 15:40:08 -05:00
Katherine 3548c3df15
Calculate onetime badge expiration from payment success timestamp 2023-12-14 15:39:46 -05:00
Jon Chambers 1167d0ac2e Make key-setting methods synchronous 2023-12-13 17:49:55 -05:00
Jon Chambers f738bc97e7 Revert "Retire the "migrate signed pre-keys" command"
This reverts commit c7cc3002d5.
2023-12-13 17:49:55 -05:00
Jon Chambers 3f9edfe597 Revert "Treat the stand-alone signed pre-keys table as the source of truth for signed pre-keys"
This reverts commit feb933b4df.
2023-12-13 17:49:55 -05:00
Jon Chambers a024949311 Revert "Retire "migrate signed pre-keys" configuration"
This reverts commit 44145073f1.
2023-12-13 17:49:55 -05:00
Jon Chambers 609c901867 Refactor key-fetching to be reactive 2023-12-13 12:46:48 -05:00
Jon Chambers 4ce060a963 Count wildcard "get keys" requests by platform 2023-12-13 12:46:48 -05:00
Jon Chambers c4ca0fee40 Synchronize access to `responseItems` when assembling a "get keys" response 2023-12-13 12:46:48 -05:00
Chris Eager 8d4acf0330 Remove `ForkJoinPool.managedBlock` in favor of async updates 2023-12-13 10:18:04 -05:00
Jon Chambers 28a981f29f Assume that all devices have signed pre-keys 2023-12-13 10:17:51 -05:00
Jon Chambers c29113d17a Reject requests with missing device capabilities 2023-12-12 11:37:44 -05:00
Katherine 951f978447
Use start of subscription period as fallback timestamp 2023-12-12 11:34:44 -05:00
Jon Chambers 07899f35bd Return `DeviceController#linkDevice` to synchronous processing 2023-12-12 11:34:23 -05:00
Katherine 3cbbf37468
Use payment success timestamp to calculate recurring donation badge expiration 2023-12-12 10:01:20 -05:00
Jon Chambers 6c7a3df5ae Retire non-atomic device-linking pathways 2023-12-12 09:53:51 -05:00
Jon Chambers 2054ab2771 Revert "Count requests with missing device capabilities"
This reverts commit 6cdf8ebd2c.
2023-12-12 09:53:51 -05:00
Jon Chambers 44145073f1 Retire "migrate signed pre-keys" configuration 2023-12-12 09:53:34 -05:00
Jon Chambers feb933b4df Treat the stand-alone signed pre-keys table as the source of truth for signed pre-keys 2023-12-11 11:39:54 -05:00
Jon Chambers c7cc3002d5 Retire the "migrate signed pre-keys" command 2023-12-11 11:07:00 -05:00