Commit Graph

1455 Commits

Author SHA1 Message Date
Jon Chambers c9ae991aa3 Add an experiment to allow a phased transition from the old GCM API to the current FCM API 2022-08-02 15:34:09 -04:00
Jon Chambers 421d594507 Introduce an `FcmSender` 2022-08-02 15:34:09 -04:00
Jon Chambers 9c03f2e468
Add support for receiving, storing, and returning `urgent` flags on messages 2022-08-02 12:05:23 -04:00
Chris Eager 1175ff5867 Log cause when queue processing hits max retries 2022-08-02 08:36:16 -07:00
Chris Eager 55df593561 Clean up `MessageAvailabilityListener` if the websocket client is closed 2022-08-02 08:35:16 -07:00
Chris Eager a06a663b94 Use the envelope’s destination UUID for receipt source UUID 2022-08-02 08:34:20 -07:00
Chris Eager 3d2f7e731f Remove `Envelope.source` 2022-08-02 08:34:20 -07:00
Chris Eager 2575372639 Add missing `increment()` to displacement counter 2022-08-02 08:30:54 -07:00
Jon Chambers faa6e8324a Fix a test issue where we were ignoring some test parameters 2022-08-01 11:02:33 -04:00
Jon Chambers d0e3fb1901 Unconditionally write messages to the messages table as envelopes 2022-08-01 10:44:27 -04:00
Jon Chambers 04287c5073 Optionally write messages as envelopes to the messages table 2022-07-29 11:10:50 -04:00
Jon Chambers 0c76fdd36c Read bare envelopes from the messages table if possible 2022-07-29 11:10:50 -04:00
Jon Chambers 3636626e09 Make `Envelope` the main unit of currency when working with stored messages 2022-07-29 10:59:02 -04:00
Jon Chambers 3e0919106d Add a method to build an `OutgoingMessageEntity` from an `Envelope` 2022-07-29 10:59:02 -04:00
Jon Chambers d385838dc1 Add methods to convert `IncomingMessage`/`OutgoingMessageEntity` instances into `Envelope` entities 2022-07-29 10:59:02 -04:00
Jon Chambers e28f1e8ceb Remove the unused `destination` property from `IncomingMessage` 2022-07-29 10:59:02 -04:00
Jon Chambers 3d875f1ce5 Convert incoming/outgoing message entities to records 2022-07-29 10:59:02 -04:00
Jon Chambers c4c5397b44 Convert group credential redemption time to a `long` 2022-07-28 10:08:25 -04:00
Jon Chambers 6b6f9b2405 Add PNI to `GroupCredentials` responses that contain `AuthCredentialWithPni` instances 2022-07-28 10:08:25 -04:00
Jon Chambers 7d4a8d03a4 Mark old group credential getter as `@Deprecated` 2022-07-28 10:08:25 -04:00
Jon Chambers e9119da040 Retire the (unused!) binary message format 2022-07-28 09:59:00 -04:00
Chris Eager aa36dc95ef Add `MicrometerCommandLatencyRecorder` to Redis clusters 2022-07-27 14:23:14 -07:00
Chris Eager a6f9409a39 Remove dynamic configuration feature flags; add `DynamicMessagePersisterConfiguration` 2022-07-27 14:19:10 -07:00
Chris Eager 41a113e22c Stop queue persistence attempt if items aren’t removed from cache 2022-07-27 14:19:10 -07:00
Chris Eager 4cfcdb0c96 editorconfig formatting 2022-07-27 14:19:10 -07:00
Ravi Khadiwala 36050f580e Handle duplicate device ids more gracefully 2022-07-27 11:15:32 -05:00
Jon Chambers 98760b631b Don't wrap "change number" arguments in `Optional` 2022-07-27 10:55:37 -04:00
Jon Chambers d00aa1e77a Fix an inconsistent check for the presence/absence of "change number" arguments 2022-07-27 10:55:37 -04:00
Jon Chambers dce391a248
Add support for setting PNI-associated registration IDs and identity keys when changing numbers 2022-07-26 15:19:27 -04:00
Antonin Tritz c252118cfc External links in comments from http to https 2022-07-26 15:17:58 -04:00
Chris Eager e9fd32de79 Only attempt to unsubscribe if the queue name is not null 2022-07-26 10:20:10 -07:00
Chris Eager bc02fe3831 Only unsubscribe from keyspace notifications if the node has the slot 2022-07-26 09:21:50 -07:00
Jon Chambers d290aad27b Associate source/destination country codes for reported messages 2022-07-14 09:31:12 -04:00
Jon Chambers 6754ec5e10 Pass disconnection reason (if known) to clients 2022-07-13 15:30:03 -04:00
Jon Chambers 1ba00a66eb Pass the reason for displacement to presence displacement listeners 2022-07-13 15:30:03 -04:00
Jon Chambers 1dd7d33e23
Simplify `Device` entity 2022-07-13 13:55:20 -04:00
Jon Chambers e200548e35 Introduce an account change validator 2022-07-13 12:24:39 -04:00
Jon Chambers fdf7b69996 Remove a temporary workaround for incorrect envelope types from iOS clients 2022-07-13 11:30:52 -04:00
Jon Chambers 92d36b725f Allow presence keys to expire if not periodically renewed 2022-07-13 11:28:55 -04:00
Jon Chambers 4e131858ca Generalize scope of and expand size of websocket scheduled executor service 2022-07-13 11:28:55 -04:00
Ravi Khadiwala a45d95905e Be permissive in account-create accept-language
Currently, if we fail to parse a user's accept-language in account
creation, creation will fail. While it's a suboptimal experience to get
a verify code in the wrong language, it might be better than not being
able to sign up at all.
2022-07-13 11:22:31 -04:00
Ehren Kret 0fdfdabf2a merge GroupController into CertificateController 2022-07-01 13:04:24 -05:00
Jon Chambers a25e967978 Remove spurious mocking 2022-07-01 12:26:22 -05:00
Jon Chambers 38e30c7513 Allow callers to get an expiring profile key credential 2022-07-01 12:26:22 -05:00
Jon Chambers e38e5fa17d Allow callers to request a combined group auth credential 2022-07-01 12:26:22 -05:00
Ehren Kret 42fd29d38b Update badge description text to remove boost & sustainer language 2022-06-21 13:36:12 -05:00
Ehren Kret bf6d3aa324 Fix batching issue that was causing duplication in large queries 2022-06-20 12:41:10 -05:00
Ehren Kret 023ccc6563 Add a unit test for the batch identity check endpoint 2022-06-20 12:32:31 -05:00
Ehren Kret da49db5b9e Move batch identity checks off the common fork join pool 2022-06-20 11:07:33 -05:00
Ehren Kret cc8dda28cc Simplify logic for batching bulk identity check request 2022-06-20 10:28:20 -05:00
Ehren Kret d31550d444 Only wrap Base64 decode with the exception catch 2022-06-20 09:42:33 -05:00
Ehren Kret 51f37350eb Because one shouldn't take the size of null things 2022-06-17 15:03:25 -05:00
Ehren Kret ecfa161da8 Validate the request 2022-06-17 14:32:38 -05:00
Ehren Kret e3778c17ea Use POST not GET for request requiring body 2022-06-17 14:31:15 -05:00
Ehren Kret cbc95415b7 Add endpoint to batch check identity keys 2022-06-17 12:20:30 -05:00
Ravi Khadiwala 327eb0219d Bypass account registration captcha on test devices 2022-06-13 15:01:46 -07:00
gram-signal a853748303
Revert "Update ChangeNumber to allow reset of registration IDs."
This reverts commit 7001ad1445.
2022-06-09 11:51:50 -06:00
gram-signal 7001ad1445
Update ChangeNumber to allow reset of registration IDs. 2022-06-02 16:37:32 -06:00
Ravi Khadiwala 5cfb133f79 Use redis for abusive hosts autoblock
Also delete postgres dependencies that we no longer need
2022-05-31 10:08:10 -05:00
Ehren Kret 5df24edebf Remove all unused imports remaining in project 2022-05-25 17:15:20 -05:00
Ehren Kret 95d0293a96 Remove unused counter 2022-05-25 16:57:01 -05:00
Ehren Kret f5a2efb57c Clarify hidden static method call 2022-05-25 16:51:12 -05:00
Ehren Kret e4b9ae4eee Clear up warnings 2022-05-25 16:50:58 -05:00
Ehren Kret bc1ac5a37f Remove unused fields 2022-05-25 16:50:43 -05:00
Ehren Kret 96ac56faac Remove unused import 2022-05-25 16:38:11 -05:00
Ehren Kret f0bc444388 Remove unused timer 2022-05-25 16:37:51 -05:00
Ravi Khadiwala 8584f47d95 Add more metrics to createAccount captcha 2022-05-25 15:50:11 -04:00
Jon Chambers f6235b8c08 Check for newly-expired accounts before previously-expired accounts for metric accuracy 2022-05-25 15:49:54 -04:00
Jon Chambers d452e90470 Move `AccountCleaner` into its own crawler 2022-05-25 15:46:18 -04:00
Jon Chambers 418a869451 Increase max deletions per chunk to 256 2022-05-25 14:19:04 -04:00
Jon Chambers cf89e2215c Fully delete already-expired accounts 2022-05-25 14:19:04 -04:00
Jon Chambers a4ca1ef1a8 Move `AccountCleanerTest` out of the `test` package; reduce visibility of test-only fields 2022-05-25 14:19:04 -04:00
Ehren Kret c38572307d Remove unused imports 2022-05-20 10:20:45 -07:00
Fedor Indutny 20902df122
Fix ZRANGE arguments in get_items.lua 2022-05-19 12:14:02 -07:00
Fedor Indutny d31ddb72f3
Optimize message deletion by skipping lookup 2022-05-18 13:02:21 -07:00
Jon Chambers 75c92eaa93 Drop high-cardinality distribution summaries 2022-05-11 14:26:38 -04:00
Chris Eager 0445adcac3 Conclude `ReportMessageManager` ACI migration 2022-05-11 11:26:24 -07:00
gram-signal 06dd4c5026
Derive username from ACI for CDS{H,I} (#989)
* Derive username from ACI for CDS{H,I}

* Update sample YAML.
2022-05-02 08:41:38 -06:00
Ehren Kret 058caadf4f Use BigDecimal#compareTo for numeric equality testing 2022-04-29 14:20:09 -05:00
Ehren Kret 7b7d309105 Apply stripe conversion factor to gift badge amount check 2022-04-29 13:48:10 -05:00
Ehren Kret 63be7b93ce Record level on boost payment intent 2022-04-29 12:06:15 -05:00
Ehren Kret 578ea12b59 Add gift badges to user capabilities 2022-04-29 11:08:36 -05:00
Ehren Kret 364e59be57 Add shape to duration to ensure it's render as an integer 2022-04-29 10:14:39 -05:00
Ehren Kret fece4dac9e Add duration to boost badges
Lets clients know how long the badge will last for after purchase.
2022-04-29 10:14:39 -05:00
Ehren Kret ce85c1aabc Add name and description for gift badge 2022-04-29 10:14:39 -05:00
Ehren Kret 0ac2ce5e72 Add gift badge to the level output for boost badges 2022-04-29 10:14:39 -05:00
Ehren Kret 391c800bf5 Add gift configuration to subscription controller 2022-04-29 10:14:39 -05:00
Ehren Kret f6471cf8f9 Add gift configuration source 2022-04-29 10:14:39 -05:00
Jon Chambers 1eaff753a6 Count "forbidden identity key change" events 2022-04-22 15:53:43 -04:00
Ehren Kret c29d5de1eb Refactor two more switch statements to new switch style 2022-04-19 13:39:38 -05:00
Ehren Kret d94c171d63 Use new style switch statement 2022-04-19 13:35:26 -05:00
Ehren Kret 53203dbcef Refactor common pattern for checking Account capabilities 2022-04-19 10:33:54 -05:00
Ehren Kret 9e66f8ac11 Add gift badges device capability 2022-04-19 10:33:54 -05:00
Ehren Kret 796fb3b4cd Refactor Device#equals method 2022-04-19 10:33:54 -05:00
gram-signal 473ecbdf2d
Allow primary to set and provide new signed prekeys for linked devices (#950) 2022-04-15 12:39:47 -06:00
Chris Eager 7b3703506b Remove number from `ReportMessageManager#store` 2022-04-13 16:41:32 -04:00
Jon Chambers 5816f76bbe Add support for getting (limited) profiles by phone number identifier 2022-04-13 16:27:57 -04:00
Ehren Kret 355996bafc Add outcome type to subscription information endpoint 2022-04-08 12:31:31 -05:00
Ehren Kret c2bb46f41d Add outcome network status and outcome reason to subscription info 2022-04-08 12:31:31 -05:00
Ehren Kret 12f76c24b1 Add failure information for the latest charge on a subscription 2022-04-08 12:31:31 -05:00
Jon Chambers 3dc0d0bb92 Revert "Revert "Replace curve25519-java with libsignal-server""
This reverts commit c06a5ac96c.
2022-03-29 12:24:45 -04:00
Jon Chambers 2bb8f92af1 Revert "Revert "Replace zkgroup with libsignal-server""
This reverts commit fa3a9570d6.
2022-03-29 12:24:45 -04:00
Jon Chambers 5b7d5d2b93 Reduce "unrecoverable error" messages when sending GCM notifications from WARN to DEBUG 2022-03-25 14:34:44 -07:00
Jon Chambers 2b27db18d8 Count GCM failures by error code 2022-03-25 14:34:44 -07:00
Jon Chambers f3c811cc03 Move "no local subscription" warnings from WARN to DEBUG 2022-03-25 14:34:44 -07:00
Chris Eager 77fd01bd9f Accept source ACI at `/v1/messages/report` 2022-03-25 14:27:09 -07:00
Jon Chambers fa3a9570d6 Revert "Replace zkgroup with libsignal-server"
This reverts commit 86a09b16ff.
2022-03-24 12:11:46 -04:00
Jon Chambers c06a5ac96c Revert "Replace curve25519-java with libsignal-server"
This reverts commit 06a57ef811.
2022-03-24 12:11:46 -04:00
Jon Chambers 33467b42da Remove a deprecated/unused field 2022-03-24 10:50:49 -04:00
Jon Chambers 13fb641113 Make field name casing consistent 2022-03-24 10:50:49 -04:00
Jon Chambers 53f17c2baa Drop the legacy message and relay fields from message entities 2022-03-24 10:50:49 -04:00
Jordan Rose 06a57ef811 Replace curve25519-java with libsignal-server
These APIs stemmed from a common source long ago, so there's not much
to change!
2022-03-24 10:50:18 -04:00
Jordan Rose 86a09b16ff Replace zkgroup with libsignal-server 2022-03-24 10:50:18 -04:00
Ravi Khadiwala c70d7535b9 Make TURN configuration dynamic
Also enables conditionally including more TURN servers for gradual
rollouts
2022-03-23 14:38:02 -05:00
Jon Chambers 2a832d36d7 Remove AcceptNumericOnlineFlagRequestFilter 2022-03-23 14:31:01 -05:00
gram-signal 1578c89475
Only allow primary device to update identity key. 2022-03-22 14:39:04 -06:00
Jon Chambers bab6b36e4d Count reported messages by destination country code in addition to source country code 2022-03-22 09:56:27 -04:00
Jon Chambers f75e616397 Introduce a listener pattern for reported messages 2022-03-22 09:56:27 -04:00
Jon Chambers 7ba0f604e6 Tag the push challenge request counter by country 2022-03-17 16:07:48 -04:00
Chris Eager cf8a4cc939 Decrease receipt sender executor thread pool 2022-03-17 13:07:03 -07:00
Jon Chambers 2f6b0b1a55 Tag push challenge attempt metrics by country code 2022-03-16 15:00:04 -04:00
Jon Chambers c048074c31 Tag captcha attempt metrics with UA platform 2022-03-16 15:00:04 -04:00
Ravi Khadiwala 5a88ff0811 Use the async dynamo client to batch uak updates 2022-03-14 14:02:16 -05:00
Chris Eager de68c251f8 Instrument the receipt sender executor 2022-03-11 17:20:52 -08:00
Chris Eager 7c9ae3561d Send delivery receipts asynchronously 2022-03-11 16:34:22 -08:00
Chris Eager b608ece57e Remove `supportsAnnouncementGroups` metric 2022-03-11 16:18:00 -08:00
Chris Eager 8dfffebaf1 Remove unnecessary check for destination UUID 2022-03-11 16:17:54 -08:00
Chris Eager fef37f739b Remove unused classes and methods 2022-03-10 11:08:38 -05:00
Ravi Khadiwala 1571f14815 Add a feature flag to disable account normalization 2022-03-09 14:03:21 -06:00
Ravi Khadiwala 9cb098ad8a Add a top-level uak to existing items
Items wirtten before we started storing the uak at
the top level only store the uak in the
account blob. The will be updated on account
crawl
2022-03-09 14:03:21 -06:00
Jon Chambers 9b9edbae0e Drop `DeadLetterHandler` (which is functionally unused) 2022-03-08 10:03:06 -05:00
Chris Eager 491155d1cf Remove `@Consumes` from GET/DELETE in `/v1/subscriptions` 2022-03-04 15:36:02 -08:00
Chris Eager 54207254f1 Remove unused configuration 2022-03-04 11:44:17 -08:00
Chris Eager 1395dcc0be Make the enterprise client canonical 2022-03-04 11:44:17 -08:00
Chris Eager 2a68d9095d Remove transitional and legacy client 2022-03-04 11:44:17 -08:00
Chris Eager a984b3640e Further refine score distribution summary 2022-03-04 11:44:17 -08:00
Jon Chambers f6cbc32ee7 Align "link device" and "fetch pre-keys" rate limits 2022-03-04 10:45:06 -05:00
Chris Eager 602614acf6 Refine assessment metrics 2022-03-03 16:09:49 -08:00
Chris Eager 3854b7d472 Remove `@Consumes` from `GET /v1/config` 2022-03-03 16:08:55 -08:00
Jon Chambers 5e25481088 Fix a trivial typo in a constant's name 2022-03-03 10:59:19 -05:00
Jon Chambers fe86e15d80 Remove PNI repair code 2022-03-03 10:25:11 -05:00
Jon Chambers 179b4a69eb Clear one-time pre-keys when PNIs are assigned 2022-03-03 10:24:54 -05:00
Chris Eager eee6307789
Move score floor to dynamic configuration, add distribution summary 2022-03-02 15:18:33 -08:00
Chris Eager 9fc5002619
Add stories capability 2022-03-02 15:16:21 -08:00
Ravi Khadiwala faa6ae284a Add uak as a top level attribute 2022-03-02 10:41:09 -06:00
Jon Chambers 8b4355b21d Add a "challenge issued" counter tagged by country and platform 2022-03-02 10:40:47 -06:00
Jon Chambers e8835da740 Tag captcha success rate counter by country 2022-03-02 10:40:47 -06:00
Dimitris Apostolou 93d06e3f4d Fix typos 2022-03-01 14:14:52 -08:00
Chris Eager 935e268dec Parameterize sitekey 2022-03-01 10:40:42 -08:00
Jon Chambers 3a1c716c73 Remove an unused rate limiter 2022-02-25 13:50:17 -08:00