Compare commits

...
1414 Commits
Author SHA1 Message Date
Documentation Updater 1357c7043f Updating documentation 2026-11-19 18:42:37 +00:00
Documentation Updater b6f3eb1a93 Updating documentation 2026-11-16 15:48:13 +00:00
Documentation Updater 1adab829fe Updating documentation 2026-11-04 21:46:29 +00:00
Documentation Updater e3edc45480 Updating documentation 2026-10-28 22:35:56 +00:00
Documentation Updater f293d6c952 Updating documentation 2026-10-27 19:36:10 +00:00
Documentation Updater c2e521329b Updating documentation 2026-10-21 20:52:47 +00:00
Documentation Updater 9d75ba49c3 Updating documentation 2026-10-19 22:05:41 +00:00
Documentation Updater a0077947f4 Updating documentation 2026-10-19 16:09:21 +00:00
Documentation Updater 069632510a Updating documentation 2026-10-15 22:41:27 +00:00
Documentation Updater 816519febb Updating documentation 2026-10-14 16:40:48 +00:00
Documentation Updater c3c3da65eb Updating documentation 2026-10-13 18:17:54 +00:00
Documentation Updater f542352851 Updating documentation 2026-10-07 21:06:18 +00:00
Documentation Updater bf048d196e Updating documentation 2026-10-02 17:11:38 +00:00
Documentation Updater c1a1fdaa98 Updating documentation 2026-09-30 22:18:58 +00:00
Documentation Updater 14b256671b Updating documentation 2026-09-25 19:32:46 +00:00
Documentation Updater 7c8719b22d Updating documentation 2026-09-25 17:24:08 +00:00
Documentation Updater 434beb2120 Updating documentation 2026-09-23 19:40:59 +00:00
Documentation Updater 2e4c7405b2 Updating documentation 2026-09-21 20:27:32 +00:00
Documentation Updater a0d04a44a8 Updating documentation 2026-09-16 20:20:29 +00:00
Documentation Updater df4dba5ee9 Updating documentation 2026-09-16 15:27:25 +00:00
Documentation Updater a0fdf6ee78 Updating documentation 2026-09-14 17:18:24 +00:00
Documentation Updater 8e1387e419 Updating documentation 2026-09-09 16:03:43 +00:00
Documentation Updater 0837da8781 Updating documentation 2026-09-08 20:01:31 +00:00
Documentation Updater 49c1ed5d92 Updating documentation 2026-09-08 15:00:07 +00:00
Documentation Updater d709167465 Updating documentation 2026-09-02 22:42:14 +00:00
Documentation Updater 168b202dbf Updating documentation 2026-08-31 20:13:27 +00:00
Documentation Updater 4f8d89145a Updating documentation 2026-08-27 23:24:30 +00:00
Documentation Updater a99a71f436 Updating documentation 2026-08-26 20:51:25 +00:00
Documentation Updater c30450bd57 Updating documentation 2026-08-25 16:52:17 +00:00
Documentation Updater db913b95cc Updating documentation 2026-08-25 15:30:34 +00:00
Documentation Updater f648ed8311 Updating documentation 2026-08-20 22:18:56 +00:00
Documentation Updater 05018238b2 Updating documentation 2026-08-18 17:52:58 +00:00
Documentation Updater fa164dfc1d Updating documentation 2026-08-13 21:17:38 +00:00
Documentation Updater 5206d07f54 Updating documentation 2026-08-12 22:37:58 +00:00
Documentation Updater d4d3a99d76 Updating documentation 2026-08-12 21:44:48 +00:00
Documentation Updater 0946871ecc Updating documentation 2026-08-12 16:51:26 +00:00
Documentation Updater facdd79b4c Updating documentation 2026-08-07 21:28:18 +00:00
Documentation Updater e138ba98c4 Updating documentation 2026-08-05 19:52:52 +00:00
Documentation Updater e608d1a8e1 Updating documentation 2026-08-03 15:16:37 +00:00
Documentation Updater f12648c67f Updating documentation 2026-07-30 00:04:58 +00:00
Documentation Updater c8c086cabb Updating documentation 2026-07-29 19:25:35 +00:00
Documentation Updater 9bba301565 Updating documentation 2026-07-29 13:22:16 +00:00
Documentation Updater bad6a13fd1 Updating documentation 2026-07-23 21:16:11 +00:00
Documentation Updater 3af21eab02 Updating documentation 2026-07-22 20:01:25 +00:00
Documentation Updater 62086d1ed2 Updating documentation 2026-07-21 15:53:59 +00:00
Documentation Updater 4f836d3910 Updating documentation 2026-07-17 20:57:00 +00:00
Documentation Updater 1a1c39d4c0 Updating documentation 2026-07-14 21:41:02 +00:00
Documentation Updater afd2564ea4 Updating documentation 2026-07-10 18:30:33 +00:00
Documentation Updater 20d09491c9 Updating documentation 2026-07-10 15:12:03 +00:00
Documentation Updater a98a7b4981 Updating documentation 2026-07-09 14:16:08 +00:00
Documentation Updater 24a9d54a58 Updating documentation 2026-07-06 18:42:22 +00:00
Documentation Updater 0c6383d0e2 Updating documentation 2026-07-02 19:54:13 +00:00
Documentation Updater cd8479e67a Updating documentation 2026-07-02 17:23:17 +00:00
Documentation Updater 99a66dc51b Updating documentation 2026-07-01 23:55:53 +00:00
Documentation Updater 1ced66e001 Updating documentation 2026-06-29 18:48:02 +00:00
Documentation Updater af4397d00e Updating documentation 2026-06-25 22:07:05 +00:00
Documentation Updater 87cd46d42f Updating documentation 2026-06-23 21:13:57 +00:00
Documentation Updater 05e38de854 Updating documentation 2026-06-18 19:40:17 +00:00
Documentation Updater 4d57da79ac Updating documentation 2026-06-18 15:07:21 +00:00
Documentation Updater 8309273cdb Updating documentation 2026-06-16 13:51:53 +00:00
Documentation Updater 394467b694 Updating documentation 2026-06-11 18:18:11 +00:00
Documentation Updater 251fa186dc Updating documentation 2026-06-04 13:25:59 +00:00
Documentation Updater 45fab90a00 Updating documentation 2026-06-02 20:36:54 +00:00
Documentation Updater 5d2ff7fd3b Updating documentation 2026-05-14 17:10:26 +00:00
Documentation Updater f7b0357563 Updating documentation 2026-04-29 18:13:05 +00:00
Documentation Updater 75dabfcd86 Updating documentation 2026-04-17 18:11:56 +00:00
Documentation Updater fa0efcaebb Updating documentation 2026-04-17 15:49:37 +00:00
Documentation Updater 7c2d482afe Updating documentation 2026-04-15 22:06:16 +00:00
Documentation Updater 624e45ec8f Updating documentation 2026-04-14 16:03:59 +00:00
Documentation Updater 8d0a494bee Updating documentation 2026-04-14 14:54:00 +00:00
Documentation Updater cb0dae7ae1 Updating documentation 2026-04-10 00:41:51 +00:00
Documentation Updater 53c520c1ef Updating documentation 2026-04-02 00:57:28 +00:00
Documentation Updater 662ceda87b Updating documentation 2026-04-01 20:32:18 +00:00
Documentation Updater cbe51139f9 Updating documentation 2026-04-01 17:56:56 +00:00
Documentation Updater 252666b020 Updating documentation 2026-03-31 17:02:57 +00:00
Documentation Updater 2d78b484a4 Updating documentation 2026-03-30 17:36:08 +00:00
Documentation Updater 1155ad62ba Updating documentation 2026-03-24 20:21:57 +00:00
Documentation Updater 8239f0ec89 Updating documentation 2026-03-19 18:45:16 +00:00
Documentation Updater 89036535c7 Updating documentation 2026-03-18 14:49:39 +00:00
Documentation Updater aadf492a17 Updating documentation 2026-03-17 18:42:04 +00:00
Documentation Updater 49ac4472c4 Updating documentation 2026-03-16 14:33:30 +00:00
Documentation Updater 6fa4d87ec2 Updating documentation 2026-03-13 23:26:25 +00:00
Documentation Updater 229d1bd89c Updating documentation 2026-03-12 22:34:17 +00:00
Documentation Updater 6bde704cc1 Updating documentation 2026-03-12 16:49:36 +00:00
Documentation Updater ddc0649111 Updating documentation 2026-03-12 16:13:38 +00:00
Documentation Updater de80d7a3c1 Updating documentation 2026-03-11 18:33:39 +00:00
Documentation Updater 19ca8bf94d Updating documentation 2026-03-06 21:56:28 +00:00
Documentation Updater c4008500da Updating documentation 2026-03-06 17:47:01 +00:00
Documentation Updater b6b543d09b Updating documentation 2026-03-03 00:20:38 +00:00
Documentation Updater ca98e0c45a Updating documentation 2026-02-27 22:49:39 +00:00
Documentation Updater b672a344e3 Updating documentation 2026-02-24 22:57:28 +00:00
Documentation Updater 29c4694842 Updating documentation 2026-02-17 21:53:40 +00:00
Documentation Updater 22e449dc81 Updating documentation 2026-01-30 20:31:03 +00:00
Documentation Updater 020af68951 Updating documentation 2026-01-29 18:29:03 +00:00
Documentation Updater 8939188dac Updating documentation 2026-01-28 23:59:43 +00:00
Documentation Updater 8ec6cd5ae0 Updating documentation 2026-01-23 22:08:20 +00:00
Documentation Updater 7373d1da32 Updating documentation 2026-01-23 21:37:34 +00:00
Documentation Updater 847ecdb24f Updating documentation 2026-01-22 19:17:14 +00:00
Documentation Updater f5af61304c Updating documentation 2026-01-13 21:04:51 +00:00
Documentation Updater 4891ef94e2 Updating documentation 2026-01-13 21:02:52 +00:00
Documentation Updater fb865d9c6c Updating documentation 2026-01-10 16:57:42 +00:00
Documentation Updater 00750c1c41 Updating documentation 2025-12-10 23:28:55 +00:00
Documentation Updater 11bd3ce19c Updating documentation 2025-12-10 16:44:16 +00:00
Documentation Updater de8d93bfb4 Updating documentation 2025-12-10 15:51:59 +00:00
Documentation Updater ae190638d8 Updating documentation 2025-12-03 22:17:55 +00:00
Documentation Updater afaa10b176 Updating documentation 2025-12-02 21:35:45 +00:00
Documentation Updater d42e45b43c Updating documentation 2025-11-18 19:26:47 +00:00
Documentation Updater 4d464a762a Updating documentation 2025-10-30 15:34:18 +00:00
Documentation Updater ffd1c80885 Updating documentation 2025-10-24 20:09:56 +00:00
Documentation Updater bfbfe93af0 Updating documentation 2025-10-16 20:32:43 +00:00
Documentation Updater f6f38e2fbd Updating documentation 2025-10-06 19:17:37 +00:00
Documentation Updater 2473ac8e62 Updating documentation 2025-10-01 18:42:55 +00:00
Documentation Updater 30e65782a2 Updating documentation 2025-09-17 15:59:49 +00:00
Documentation Updater 4c9a1be489 Updating documentation 2025-09-12 22:38:09 +00:00
Documentation Updater d53f1dc247 Updating documentation 2025-09-02 20:41:53 +00:00
Documentation Updater 772688cc9a Updating documentation 2025-08-04 19:13:23 +00:00
Documentation Updater 813e390a6e Updating documentation 2025-08-04 14:34:02 +00:00
Documentation Updater 358795ca77 Updating documentation 2025-08-01 18:01:50 +00:00
Documentation Updater 5d145d020f Updating documentation 2025-07-30 20:33:11 +00:00
Documentation Updater 63db4a6770 Updating documentation 2025-07-29 16:25:24 +00:00
Documentation Updater 62d91a3f25 Updating documentation 2025-07-23 16:19:55 +00:00
Documentation Updater dbfaa1187d Updating documentation 2025-07-21 18:24:40 +00:00
Documentation Updater 9e131743c5 Updating documentation 2025-07-18 23:14:57 +00:00
Documentation Updater 2d3de3a988 Updating documentation 2025-07-16 23:32:35 +00:00
Documentation Updater bec414bd5c Updating documentation 2025-07-16 17:41:07 +00:00
Documentation Updater 8b5f8bf427 Updating documentation 2025-07-15 22:09:12 +00:00
Documentation Updater 69a14de876 Updating documentation 2025-07-11 19:51:09 +00:00
Documentation Updater 0f5256b758 Updating documentation 2025-07-09 15:28:32 +00:00
Documentation Updater 1fa8ece0b0 Updating documentation 2025-07-07 16:57:19 +00:00
Documentation Updater f3256f8c29 Updating documentation 2025-06-23 14:50:57 +00:00
Documentation Updater 2dba844a59 Updating documentation 2025-06-18 19:49:28 +00:00
Documentation Updater 66d53cf6f0 Updating documentation 2025-06-17 15:42:10 +00:00
Documentation Updater 2eab162f8c Updating documentation 2025-06-10 23:19:02 +00:00
Documentation Updater 0feab732e3 Updating documentation 2025-06-04 18:23:19 +00:00
Documentation Updater 7e7e3a5c25 Updating documentation 2025-05-30 00:11:05 +00:00
Documentation Updater 61aeb30a8a Updating documentation 2025-05-28 21:51:33 +00:00
Documentation Updater 50901473db Updating documentation 2025-05-15 16:19:11 +00:00
Documentation Updater b95564ccc4 Updating documentation 2025-04-28 19:32:18 +00:00
Documentation Updater 633755e3e5 Updating documentation 2025-04-25 16:01:42 +00:00
Documentation Updater 55485ed6f6 Updating documentation 2025-04-24 17:47:35 +00:00
Documentation Updater 898e9de371 Updating documentation 2025-04-17 16:23:11 +00:00
Documentation Updater 52399585a6 Updating documentation 2025-04-10 02:10:39 +00:00
Documentation Updater 666850cc2b Updating documentation 2025-04-09 18:49:41 +00:00
Documentation Updater 45987d101b Updating documentation 2025-04-08 15:44:54 +00:00
Documentation Updater 131af1a147 Updating documentation 2025-04-07 16:05:03 +00:00
Documentation Updater 4db5e34305 Updating documentation 2025-04-07 14:04:42 +00:00
Documentation Updater e1bc6c18d2 Updating documentation 2025-04-02 20:14:08 +00:00
Documentation Updater 4250869835 Updating documentation 2025-04-02 13:44:30 +00:00
Documentation Updater 4e2fcfce5f Updating documentation 2025-03-27 17:22:32 +00:00
Documentation Updater edfc25832b Updating documentation 2025-03-24 18:44:00 +00:00
Documentation Updater bbdcb82e86 Updating documentation 2025-03-19 22:10:06 +00:00
Documentation Updater 253ea3a5ba Updating documentation 2025-03-08 17:47:54 +00:00
Documentation Updater a618c44f4b Updating documentation 2025-02-24 22:15:17 +00:00
Documentation Updater 2407391557 Updating documentation 2025-02-11 00:13:30 +00:00
Documentation Updater 3e1d117b68 Updating documentation 2025-02-10 17:48:55 +00:00
Documentation Updater 6f7bbe3d77 Updating documentation 2025-02-07 20:42:24 +00:00
Documentation Updater 0c1e7d842c Updating documentation 2025-02-03 22:29:28 +00:00
Documentation Updater c92559c7cf Updating documentation 2025-01-31 16:57:46 +00:00
Documentation Updater b13b94bc99 Updating documentation 2025-01-14 21:42:03 +00:00
Documentation Updater 138316ab33 Updating documentation 2025-01-10 15:58:03 +00:00
Documentation Updater 9e603380fb Updating documentation 2025-01-03 15:43:50 +00:00
Documentation Updater 85d2ea9eef Updating documentation 2024-12-27 23:50:47 +00:00
Documentation Updater 1d63384de9 Updating documentation 2024-12-20 19:27:04 +00:00
Documentation Updater c7d628ee62 Updating documentation 2024-12-19 17:12:22 +00:00
Documentation Updater 6662ce651b Updating documentation 2024-12-17 20:57:18 +00:00
Documentation Updater 9366e19014 Updating documentation 2024-12-12 23:16:37 +00:00
Documentation Updater 7af2433167 Updating documentation 2024-12-04 17:55:33 +00:00
Documentation Updater 6fa6b64d9c Updating documentation 2024-11-27 17:49:17 +00:00
Documentation Updater 3da371107d Updating documentation 2024-11-27 00:54:04 +00:00
Documentation Updater d953f5cde3 Updating documentation 2024-11-26 23:24:32 +00:00
Documentation Updater 36d86e83cf Updating documentation 2024-11-25 21:40:54 +00:00
Documentation Updater 238f896837 Updating documentation 2024-11-23 00:09:55 +00:00
Documentation Updater 605dcb95db Updating documentation 2024-11-22 21:16:07 +00:00
Documentation Updater 7ac354918d Updating documentation 2024-11-15 21:01:07 +00:00
Documentation Updater 6bdda194ff Updating documentation 2024-11-12 17:58:45 +00:00
Documentation Updater 837c97a15a Updating documentation 2024-11-11 17:43:25 +00:00
Documentation Updater c03b35cc5a Updating documentation 2024-11-06 21:08:01 +00:00
Documentation Updater c3213b6d39 Updating documentation 2024-11-06 19:26:30 +00:00
Documentation Updater eeec613888 Updating documentation 2024-11-06 15:17:41 +00:00
Documentation Updater ff83f19ee9 Updating documentation 2024-11-05 17:02:16 +00:00
Documentation Updater 17f72be3ea Updating documentation 2024-11-01 21:14:22 +00:00
Documentation Updater f0ba2c9804 Updating documentation 2024-10-31 22:35:50 +00:00
Documentation Updater e27c12b3a0 Updating documentation 2024-10-31 15:13:49 +00:00
Documentation Updater fbe5a0babb Updating documentation 2024-10-30 21:18:44 +00:00
Documentation Updater d75cf059c0 Updating documentation 2024-10-29 20:46:38 +00:00
Documentation Updater 06b039dac4 Updating documentation 2024-10-29 14:58:52 +00:00
Documentation Updater c99691fca5 Updating documentation 2024-10-24 19:26:37 +00:00
Documentation Updater baffa0703d Updating documentation 2024-10-23 21:45:59 +00:00
Documentation Updater 78e76338c8 Updating documentation 2024-10-21 19:48:25 +00:00
Documentation Updater d7e42ae922 Updating documentation 2024-10-17 17:48:49 +00:00
Documentation Updater 420e1d089c Updating documentation 2024-10-15 17:24:29 +00:00
Documentation Updater 1bdbe67a54 Updating documentation 2024-10-10 22:00:09 +00:00
Documentation Updater 39dda7c410 Updating documentation 2024-10-10 15:08:34 +00:00
Documentation Updater 18d1069418 Updating documentation 2024-10-09 15:30:44 +00:00
Documentation Updater e7c54b3225 Updating documentation 2024-10-04 22:17:59 +00:00
Documentation Updater 9f89e84b58 Updating documentation 2024-10-01 19:50:52 +00:00
Documentation Updater 68b7d824ab Updating documentation 2024-09-27 22:00:09 +00:00
Documentation Updater e75e38271b Updating documentation 2024-09-26 23:34:16 +00:00
Documentation Updater 1834229177 Updating documentation 2024-09-24 23:34:35 +00:00
Documentation Updater 52bbdbd953 Updating documentation 2024-09-23 20:49:17 +00:00
Documentation Updater 309dd31165 Updating documentation 2024-09-19 00:23:41 +00:00
Documentation Updater 96ab308e6c Updating documentation 2024-09-17 21:23:37 +00:00
Documentation Updater b2b4e20817 Updating documentation 2024-09-16 19:46:49 +00:00
Documentation Updater d9d91ed53e Updating documentation 2024-09-13 21:08:03 +00:00
Documentation Updater bad3a266fb Updating documentation 2024-09-06 18:40:57 +00:00
Documentation Updater eb97cb07c0 Updating documentation 2024-08-30 19:18:07 +00:00
Documentation Updater 1dd2050c47 Updating documentation 2024-08-28 22:01:56 +00:00
Documentation Updater 578e9b6501 Updating documentation 2024-08-21 22:56:29 +00:00
Documentation Updater 48ca510fb2 Updating documentation 2024-08-16 21:27:40 +00:00
Documentation Updater 4ecb26203c Updating documentation 2024-08-16 00:10:28 +00:00
Documentation Updater 465e8b8449 Updating documentation 2024-08-14 17:19:54 +00:00
Documentation Updater d9a89c26f9 Updating documentation 2024-08-12 22:58:14 +00:00
Documentation Updater 99a12d3e76 Updating documentation 2024-08-12 22:19:31 +00:00
Documentation Updater 1e07ef8daa Updating documentation 2024-08-07 21:14:33 +00:00
Documentation Updater 6f5fc324ce Updating documentation 2024-08-06 22:00:13 +00:00
Documentation Updater 749a7a43b4 Updating documentation 2024-08-02 21:30:15 +00:00
Documentation Updater 0bf04a27fa Updating documentation 2024-07-25 16:01:13 +00:00
Documentation Updater 1ee2032a38 Updating documentation 2024-07-24 15:08:10 +00:00
Documentation Updater 25ebf298a0 Updating documentation 2024-07-23 22:28:22 +00:00
Documentation Updater da2727bd42 Updating documentation 2024-07-18 18:57:14 +00:00
Documentation Updater ee8936c96a Updating documentation 2024-07-17 20:36:43 +00:00
Documentation Updater 4f2018d416 Updating documentation 2024-07-08 21:23:47 +00:00
Documentation Updater bd29d93293 Updating documentation 2024-06-25 15:49:45 +00:00
Documentation Updater f1c599a166 Updating documentation 2024-06-24 20:06:40 +00:00
Documentation Updater f4d35aefb7 Updating documentation 2024-06-20 22:08:49 +00:00
Documentation Updater 135363068f Updating documentation 2024-06-20 15:56:38 +00:00
Documentation Updater 8e8bc2b827 Updating documentation 2024-06-14 14:46:37 +00:00
Documentation Updater f916e61533 Updating documentation 2024-06-14 14:35:32 +00:00
Documentation Updater b05f40c33d Updating documentation 2024-06-12 19:07:29 +00:00
Documentation Updater 05ec2d3479 Updating documentation 2024-06-05 16:41:01 +00:00
Documentation Updater 0bd1ace8b5 Updating documentation 2024-06-04 21:28:16 +00:00
Documentation Updater 267aabb361 Updating documentation 2024-05-22 14:51:54 +00:00
Documentation Updater e83703ee63 Updating documentation 2024-05-17 17:32:34 +00:00
Documentation Updater 22d3fe0c5a Updating documentation 2024-05-01 16:15:18 +00:00
Documentation Updater b6b719e8b9 Updating documentation 2024-04-29 17:20:10 +00:00
Documentation Updater ec3ca97994 Updating documentation 2024-04-24 14:04:48 +00:00
Documentation Updater e37ab06fa3 Updating documentation 2024-04-23 22:24:52 +00:00
Documentation Updater e522f30140 Updating documentation 2024-04-22 14:17:26 +00:00
Documentation Updater 1b710afb49 Updating documentation 2024-04-20 05:49:37 +00:00
Documentation Updater ca80ce3806 Updating documentation 2024-04-16 22:43:58 +00:00
Documentation Updater 6ffb8264a2 Updating documentation 2024-04-16 18:08:16 +00:00
Documentation Updater aaf5f4250b Updating documentation 2024-04-15 21:34:22 +00:00
Documentation Updater f4a49617f3 Updating documentation 2024-04-12 17:21:38 +00:00
Documentation Updater c08d412edb Updating documentation 2024-04-11 17:22:13 +00:00
Documentation Updater 6ea5aa0494 Updating documentation 2024-04-11 01:00:34 +00:00
Documentation Updater 61ee38f3f2 Updating documentation 2024-04-04 21:45:29 +00:00
Documentation Updater 09065420ed Updating documentation 2024-04-02 15:37:58 +00:00
Documentation Updater 6a39482216 Updating documentation 2024-04-01 23:02:56 +00:00
Documentation Updater 640a47bafc Updating documentation 2024-04-01 20:31:39 +00:00
Documentation Updater c02e8928df Updating documentation 2024-03-27 22:52:52 +00:00
Documentation Updater 834fdb5088 Updating documentation 2024-03-26 22:04:17 +00:00
Documentation Updater 4c99d4c328 Updating documentation 2024-03-20 17:53:41 +00:00
Documentation Updater 3f89143650 Updating documentation 2024-03-19 19:05:09 +00:00
Documentation Updater 652cfd16ab Updating documentation 2024-03-13 22:49:46 +00:00
Documentation Updater 63afc00660 Updating documentation 2024-03-08 21:03:06 +00:00
Documentation Updater 3eb49ad7b6 Updating documentation 2024-02-26 16:04:55 +00:00
Documentation Updater 6911de3e7a Updating documentation 2024-02-23 17:42:15 +00:00
Documentation Updater 673c3bff0e Updating documentation 2024-02-21 21:11:28 +00:00
Documentation Updater afd4b8a87b Updating documentation 2024-02-20 18:09:25 +00:00
Documentation Updater 37e7fcf699 Updating documentation 2024-02-19 01:34:21 +00:00
Documentation Updater 23a95d617b Updating documentation 2024-02-19 00:17:50 +00:00
Documentation Updater bfeac37ef4 Updating documentation 2024-02-16 18:34:38 +00:00
Documentation Updater dc2195d8a9 Updating documentation 2024-02-16 00:00:51 +00:00
Documentation Updater 760ca33abc Updating documentation 2024-02-15 23:58:28 +00:00
Documentation Updater 9debf45ed4 Updating documentation 2024-02-15 00:12:01 +00:00
Documentation Updater 92d07a3446 Updating documentation 2024-02-14 22:57:11 +00:00
Documentation Updater 11213d0e50 Updating documentation 2024-02-09 22:16:00 +00:00
Documentation Updater a69b382190 Updating documentation 2024-02-09 16:46:44 +00:00
Documentation Updater 1f43ed5d8d Updating documentation 2024-02-07 23:58:05 +00:00
Documentation Updater 191477645d Updating documentation 2024-02-07 00:15:16 +00:00
Documentation Updater b3190b2b8a Updating documentation 2024-02-05 20:46:36 +00:00
Documentation Updater 2818e5f3ef Updating documentation 2024-01-30 21:28:28 +00:00
Documentation Updater 6696213bbd Updating documentation 2024-01-26 15:54:35 +00:00
Documentation Updater 9fe35de833 Updating documentation 2024-01-25 21:46:00 +00:00
Documentation Updater 8f2ad5972d Updating documentation 2024-01-24 22:07:22 +00:00
Documentation Updater 7aec08439a Updating documentation 2024-01-23 22:24:12 +00:00
Documentation Updater ca326c934f Updating documentation 2024-01-22 18:17:01 +00:00
Documentation Updater 254d5b286a Updating documentation 2024-01-20 17:40:54 +00:00
Documentation Updater ad2bb0abb1 Updating documentation 2024-01-20 17:40:27 +00:00
Documentation Updater a36d86d0d7 Updating documentation 2024-01-19 21:33:53 +00:00
Documentation Updater 165141acaf Updating documentation 2024-01-18 17:45:16 +00:00
Documentation Updater 56e0ffbc24 Updating documentation 2024-01-12 19:27:22 +00:00
Documentation Updater 0a41391984 Updating documentation 2024-01-11 17:55:42 +00:00
Documentation Updater 1f2619cbd8 Updating documentation 2024-01-08 23:03:22 +00:00
Documentation Updater 0d0d2daee0 Updating documentation 2024-01-08 16:42:40 +00:00
Documentation Updater 3166b79356 Updating documentation 2024-01-04 21:35:13 +00:00
Documentation Updater 72e1c95ebf Updating documentation 2024-01-02 23:05:41 +00:00
Documentation Updater aa886b6dfc Updating documentation 2023-12-22 17:32:23 +00:00
Documentation Updater 9cad167f85 Updating documentation 2023-12-19 20:53:10 +00:00
Documentation Updater b6f78a3549 Updating documentation 2023-12-18 21:27:53 +00:00
Documentation Updater 3b792a4496 Updating documentation 2023-12-15 20:36:44 +00:00
Documentation Updater 03e5a58c75 Updating documentation 2023-12-15 02:00:35 +00:00
Documentation Updater a80f44b833 Updating documentation 2023-12-13 23:43:21 +00:00
Documentation Updater 37bc1086b5 Updating documentation 2023-12-13 18:16:01 +00:00
Documentation Updater 8ff089ec91 Updating documentation 2023-12-12 21:18:04 +00:00
Documentation Updater a1da27dea8 Updating documentation 2023-12-12 15:02:47 +00:00
Documentation Updater ff4f9f77f2 Updating documentation 2023-12-08 17:46:34 +00:00
Documentation Updater 8eaf4b97b9 Updating documentation 2023-12-07 19:20:43 +00:00
Documentation Updater 835a90813a Updating documentation 2023-12-07 17:23:34 +00:00
Documentation Updater a26bdb0666 Updating documentation 2023-12-06 22:25:53 +00:00
Documentation Updater 1a25b65d0d Updating documentation 2023-12-06 22:02:54 +00:00
Documentation Updater bc87852873 Updating documentation 2023-12-06 18:16:32 +00:00
Documentation Updater 44af128526 Updating documentation 2023-12-06 17:41:22 +00:00
Documentation Updater ab8b1a45e3 Updating documentation 2023-12-01 00:49:39 +00:00
Documentation Updater c0111255d7 Updating documentation 2023-11-29 22:27:29 +00:00
Documentation Updater 335164df8b Updating documentation 2023-11-29 16:08:59 +00:00
Documentation Updater 488e55ab2c Updating documentation 2023-11-28 18:40:39 +00:00
Documentation Updater d92d8d5e0f Updating documentation 2023-11-28 17:42:54 +00:00
Documentation Updater 5d97bc9d20 Updating documentation 2023-11-27 15:32:51 +00:00
Documentation Updater 8347ca3201 Updating documentation 2023-11-22 16:02:52 +00:00
Documentation Updater 34033e7cec Updating documentation 2023-11-17 00:55:15 +00:00
Documentation Updater 214bc53fae Updating documentation 2023-11-16 18:18:19 +00:00
Documentation Updater 6ce63945c4 Updating documentation 2023-11-16 02:12:09 +00:00
Documentation Updater 31c862b230 Updating documentation 2023-11-15 07:05:42 +00:00
Documentation Updater 64c5638706 Updating documentation 2023-11-13 19:03:27 +00:00
Documentation Updater 53dd49a25b Updating documentation 2023-11-11 01:56:19 +00:00
Documentation Updater 6cb93fc4f9 Updating documentation 2023-11-02 18:05:27 +00:00
Documentation Updater ff90f7d9f6 Updating documentation 2023-11-01 21:25:16 +00:00
Documentation Updater 3d5f737b53 Updating documentation 2023-11-01 15:58:14 +00:00
Documentation Updater 029634df06 Updating documentation 2023-10-30 21:32:40 +00:00
Documentation Updater 79f47536f1 Updating documentation 2023-10-30 18:37:43 +00:00
Documentation Updater 27a57e0259 Updating documentation 2023-10-27 14:53:36 +00:00
Documentation Updater fdca7ea9f1 Updating documentation 2023-10-24 20:58:09 +00:00
Documentation Updater 8f2f872113 Updating documentation 2023-10-20 22:09:44 +00:00
Documentation Updater 46d3d5d4d8 Updating documentation 2023-10-20 18:34:59 +00:00
Documentation Updater 5717ea3b5d Updating documentation 2023-10-20 15:43:29 +00:00
Documentation Updater 809a9f99f1 Updating documentation 2023-10-19 18:58:58 +00:00
Documentation Updater 67c780482b Updating documentation 2023-10-19 18:47:33 +00:00
Documentation Updater df4263a7ae Updating documentation 2023-10-18 16:33:47 +00:00
Documentation Updater 624cf453bc Updating documentation 2023-10-17 16:59:33 +00:00
Documentation Updater 18bd04b502 Updating documentation 2023-10-12 17:24:49 +00:00
Documentation Updater eaad560404 Updating documentation 2023-10-11 22:51:14 +00:00
Documentation Updater 07daec5e7e Updating documentation 2023-10-05 23:10:44 +00:00
Documentation Updater 24dc9509fe Updating documentation 2023-10-04 15:09:43 +00:00
Documentation Updater cd18291036 Updating documentation 2023-10-03 20:20:36 +00:00
Documentation Updater 073c172b4c Updating documentation 2023-09-29 16:42:00 +00:00
Documentation Updater cbc1296898 Updating documentation 2023-09-27 19:55:25 +00:00
Documentation Updater 2828ce0f6c Updating documentation 2023-09-26 16:41:12 +00:00
Documentation Updater bd5c8cb450 Updating documentation 2023-09-25 20:48:57 +00:00
Documentation Updater eb05f2cad4 Updating documentation 2023-09-19 17:54:12 +00:00
Documentation Updater 37bdfa2332 Updating documentation 2023-09-14 23:15:14 +00:00
Documentation Updater 49f7d8b712 Updating documentation 2023-09-13 23:32:01 +00:00
Documentation Updater 5ce8a1f59a Updating documentation 2023-09-13 20:37:26 +00:00
Documentation Updater 61c36b7f4d Updating documentation 2023-09-11 21:06:16 +00:00
Documentation Updater 2fb13541b0 Updating documentation 2023-09-07 22:35:33 +00:00
Documentation Updater 4b3c6de61b Updating documentation 2023-09-07 22:07:10 +00:00
Documentation Updater 5fe3f04ba9 Updating documentation 2023-09-07 17:39:58 +00:00
Documentation Updater d6098f2c9c Updating documentation 2023-09-06 22:01:56 +00:00
Documentation Updater fa021ff3e5 Updating documentation 2023-09-05 21:29:38 +00:00
Documentation Updater 8f2cd859e1 Updating documentation 2023-09-05 18:26:38 +00:00
Documentation Updater 9df8b4ef19 Updating documentation 2023-08-31 21:22:29 +00:00
Documentation Updater 17c8a79cf7 Updating documentation 2023-08-30 23:14:35 +00:00
Documentation Updater 74211590b5 Updating documentation 2023-08-29 23:23:36 +00:00
Documentation Updater 27f46c8bf8 Updating documentation 2023-08-25 23:02:39 +00:00
Documentation Updater e109ff7397 Updating documentation 2023-08-24 17:44:31 +00:00
Documentation Updater daa0ef3352 Updating documentation 2023-08-24 16:58:59 +00:00
Documentation Updater a10365e30d Updating documentation 2023-08-17 21:37:59 +00:00
Documentation Updater 6f1c94c84f Updating documentation 2023-08-17 16:59:13 +00:00
Documentation Updater c06286b0f4 Updating documentation 2023-08-15 18:37:36 +00:00
Documentation Updater 00367022a7 Updating documentation 2023-08-10 18:58:20 +00:00
Documentation Updater 1281831d1c Updating documentation 2023-08-09 18:23:29 +00:00
Documentation Updater d17f5906d2 Updating documentation 2023-08-09 16:45:16 +00:00
Documentation Updater d04124a42e Updating documentation 2023-08-04 21:52:28 +00:00
Documentation Updater c149d1e962 Updating documentation 2023-08-04 20:21:16 +00:00
Documentation Updater 9cb5bfcf2a Updating documentation 2023-08-04 17:24:50 +00:00
Documentation Updater d709cc4ed3 Updating documentation 2023-08-02 21:40:41 +00:00
Documentation Updater a95fafde1a Updating documentation 2023-07-28 20:09:03 +00:00
Documentation Updater 16fe53a281 Updating documentation 2023-07-26 23:15:16 +00:00
Documentation Updater 3c7632a9dc Updating documentation 2023-07-21 18:15:28 +00:00
Documentation Updater ab6b6ab09d Updating documentation 2023-07-19 18:50:27 +00:00
Documentation Updater 652e3b1e06 Updating documentation 2023-07-12 20:57:04 +00:00
Documentation Updater 4eb3cc9d97 Updating documentation 2023-07-07 00:55:02 +00:00
Documentation Updater 6e7a06d7be Updating documentation 2023-07-05 18:43:05 +00:00
Documentation Updater 4215ef6aa9 Updating documentation 2023-06-30 18:25:24 +00:00
Documentation Updater cff83d8124 Updating documentation 2023-06-30 14:20:13 +00:00
Documentation Updater 1467fce54c Updating documentation 2023-06-28 22:32:21 +00:00
Documentation Updater 9be7bacb18 Updating documentation 2023-06-27 03:26:00 +00:00
Documentation Updater b76b4ffcc4 Updating documentation 2023-06-16 19:32:43 +00:00
Documentation Updater 687e3bcb18 Updating documentation 2023-06-14 22:40:28 +00:00
Documentation Updater 41b02d4e90 Updating documentation 2023-06-09 15:32:43 +00:00
Documentation Updater 19854af8d8 Updating documentation 2023-06-08 17:43:47 +00:00
Documentation Updater ca7b63743e Updating documentation 2023-06-06 22:31:49 +00:00
Documentation Updater 9d5cdf11ae Updating documentation 2023-06-05 17:13:59 +00:00
Documentation Updater d4a24f152a Updating documentation 2023-06-02 18:58:43 +00:00
Documentation Updater e7c24f1f01 Updating documentation 2023-06-01 05:27:23 +00:00
Documentation Updater c40c1fafc9 Updating documentation 2023-05-31 21:19:52 +00:00
Documentation Updater 431d6d6f59 Updating documentation 2023-05-26 22:52:40 +00:00
Documentation Updater 2e67c13fe3 Updating documentation 2023-05-26 13:58:18 +00:00
Documentation Updater 87bcacdeb4 Updating documentation 2023-05-25 16:25:03 +00:00
Documentation Updater 728757fbdd Updating documentation 2023-05-18 15:09:42 +00:00
Documentation Updater 9404dfb89e Updating documentation 2023-05-17 18:11:55 +00:00
Documentation Updater 075b268805 Updating documentation 2023-05-12 17:12:35 +00:00
Documentation Updater 632941602b Updating documentation 2023-05-09 21:15:08 +00:00
Documentation Updater 4ea1d13d26 Updating documentation 2023-05-09 19:32:24 +00:00
Documentation Updater d3f68e7d52 Updating documentation 2023-05-05 18:42:54 +00:00
Documentation Updater 5e1ae88b74 Updating documentation 2023-05-04 17:44:02 +00:00
Documentation Updater a36f20558f Updating documentation 2023-05-03 19:32:42 +00:00
Documentation Updater 926503fa3f Updating documentation 2023-05-01 21:39:07 +00:00
Documentation Updater 5d0e6ff464 Updating documentation 2023-04-21 20:28:41 +00:00
Documentation Updater c81cbe9550 Updating documentation 2023-04-10 20:40:53 +00:00
Documentation Updater 4e26676290 Updating documentation 2023-03-29 19:49:59 +00:00
Documentation Updater 5159a594c3 Updating documentation 2023-03-22 21:50:15 +00:00
Documentation Updater d130ec5785 Updating documentation 2023-03-20 20:42:44 +00:00
Documentation Updater 252b9f6f8b Updating documentation 2023-03-17 19:47:30 +00:00
Documentation Updater 50dfd34754 Updating documentation 2023-02-27 22:42:19 +00:00
Documentation Updater a1a9db6357 Updating documentation 2023-02-27 22:34:32 +00:00
Documentation Updater a75fa16527 Updating documentation 2023-02-27 22:34:19 +00:00
Documentation Updater a67e5ef83b Updating documentation 2023-02-24 23:42:09 +00:00
Documentation Updater f4ba415202 Updating documentation 2023-02-24 21:26:41 +00:00
Documentation Updater 98e7efa9a0 Updating documentation 2023-02-24 20:31:05 +00:00
Sergey Skrobotov 7dd2e1184b initial commit for the documentation branch 2023-02-22 11:57:41 -08:00
Jon Chambers e1ea3795bb Reuse registration sessions if possible when requesting pre-auth codes 2023-02-22 12:45:26 -05:00
erik-signal 95237a22a9 Relax validation to allow null reporting tokens. 2023-02-22 11:06:51 -05:00
Katherine Yen 11c93c5f53 Keep username hash during reregistration 2023-02-21 09:07:30 -08:00
Jon Chambers b59b8621c5 Add reporter platform as a reported message dimension 2023-02-17 16:44:13 -05:00
Chris Eager 44c61d9a58 Allow updates if the profile already has a payment address 2023-02-17 16:44:01 -05:00
Ehren Kret 63a17bc14b add support for running tests from aarch64 2023-02-16 09:57:34 -06:00
Jon Chambers f4f93bb24d Update to the latest version of the spam filter 2023-02-14 12:36:34 -05:00
Jon Chambers 7561622bc8 Log cases where we fall back to a no-op spam-reporting token provider 2023-02-14 12:35:56 -05:00
Jon Chambers b041566aba Simplify construction of spam reporting token providers 2023-02-14 12:35:56 -05:00
Jon Chambers cb72158abc Add the presence of spam reporting tokens as a dimension 2023-02-14 12:35:21 -05:00
Jon Chambers 5c432d094f Fix a typo in a metric name 2023-02-14 12:34:48 -05:00
Chris Eager 24ac48b3b1 Update counter name 2023-02-10 14:54:02 -06:00
Katherine Yen c03060fe3c Phone number discoverability update endpoint 2023-02-10 11:52:51 -08:00
Chris Eager 3ebd5141ae Update to the latest version of the spam filter 2023-02-10 12:15:10 -06:00
Chris Eager c16006dc4b Add PUT /v2/account/number 2023-02-10 12:09:03 -06:00
Sergey Skrobotov 8fc465b3e8 removing redundant logic in new registration flow 2023-02-09 09:06:48 -08:00
Chris Eager ce689bdff3 Use DisabledPermittedAuthenticatedAccount at DELETE /v1/accounts/me 2023-02-09 09:05:29 -08:00
Chris Eager e23386ddc7 Remove unused JUnit extension from test 2023-02-09 09:05:11 -08:00
Jon Chambers 0f17d63774 Add tests for ProvisioningController 2023-02-09 09:04:52 -08:00
Katherine Yen 4fc3949367 Add zkproof validation in username flow 2023-02-09 09:02:53 -08:00
Katherine Yen e19c04377b Update to the latest version of the spam filter 2023-02-09 09:00:38 -08:00
Sergey Skrobotov 7c3f429c56 Update E164 constraint message 2023-02-08 13:22:00 -08:00
Sergey Skrobotov 7558489ad0 Registration Recovery Password support in /v1/registration 2023-02-08 13:20:23 -08:00
Katherine Yen 4a3880b5ae usernameHashes on reserve request can't be null 2023-02-07 08:44:04 -08:00
Chris Eager ca7a4abd30 Update to the latest version of the spam filter 2023-02-06 16:40:09 -06:00
Chris Eager a4a45de161 Add /v1/registration 2023-02-06 16:11:59 -06:00
Chris Eager 358a286523 Use java.util Hex and Base64 codecs 2023-02-06 12:16:59 -06:00
Sergey Skrobotov 3bbab0027b Update to the latest version of the spam filter 2023-02-03 16:39:34 -08:00
Sergey Skrobotov 8afe917a6c Registration recovery passwords store and manager 2023-02-03 16:33:03 -08:00
Erik Osheim f5fec5e6bb Update to the latest version of the spam filter 2023-02-03 16:24:35 -05:00
Erik Osheim 0b81743683 Update to the latest version of the spam filter 2023-02-02 18:06:43 -05:00
Erik Osheim 9f715c3224 Update to the latest version of the spam filter 2023-02-02 18:05:02 -05:00
Katherine Yen 24f515ccb4 Revert "Revert "Stored hashed username"" 2023-02-02 11:20:44 -08:00
Erik Osheim fd531242c9 Update to the latest version of the spam filter 2023-02-02 12:20:45 -05:00
Erik Osheim 3855bd257d Update to the latest version of the spam filter 2023-02-01 17:41:58 -05:00
Katherine Yen c98b54ff15 Revert "Stored hashed username" 2023-02-01 14:31:44 -08:00
Katherine Yen d93d50d038 Stored hashed username 2023-02-01 12:08:25 -08:00
Jon Chambers 448365c7a0 Preserve legacy registration API error handling 2023-01-31 15:45:23 -05:00
Sergey Skrobotov 515a863195 Update .gitmodules 2023-01-30 15:45:41 -08:00
Sergey Skrobotov 8d0e23bde1 AuthenticationCredentials name changed to SaltedTokenHash 2023-01-30 15:45:24 -08:00
Sergey Skrobotov dc8f62a4ad /v1/backup/auth/check endpoint added 2023-01-30 15:39:42 -08:00
Jon Chambers 896e65545e Update to the latest version of the spam filter 2023-01-30 16:30:14 -05:00
Jon Chambers cd4a4b1dcf Retire VoiceVerificationController 2023-01-30 16:28:14 -05:00
Jon Chambers 38a0737afb Retire ReportSpamTokenHandler interface in favor of ReportedMessageListener 2023-01-30 16:27:54 -05:00
Jon Chambers 4a2768b81d Add spam report token support to ReportedMessageListener 2023-01-30 16:27:54 -05:00
Jon Chambers 00e08b8402 Simplify parsing/validation of spam report tokens 2023-01-30 16:27:54 -05:00
Erik Osheim 48e8584e13 Update to current version of the spam-filter. 2023-01-27 11:41:27 -05:00
erik-signal a89e30fe75 Clarify naming around spam filtering. 2023-01-27 11:40:33 -05:00
gram-signal a01fcdad28 Add in controller for SVR2 auth. 2023-01-27 09:15:52 -07:00
Chris Eager 2a99529921 Remove old badge strings 2023-01-26 09:23:11 -06:00
Sergey Skrobotov c934405a3e fixing config field names 2023-01-25 17:28:03 -08:00
Sergey Skrobotov b8d922fcb7 Update to latest version of the spam module 2023-01-25 15:41:54 -08:00
Sergey Skrobotov eb499833c6 refactoring of ExternalServiceCredentialGenerator 2023-01-25 15:20:28 -08:00
Chris Eager dd98f7f043 Support changing just the currency of an existing subscription 2023-01-25 15:14:17 -06:00
Chris Eager e8978ef91c Add tests for SubscriptionController#setSubscriptionLevel 2023-01-25 15:14:17 -06:00
Chris Eager 669ff1cadf DynamoDB Local Release Repository: snapshots.enabled = false 2023-01-25 15:12:02 -06:00
Jon Chambers 4ce85fdb19 Treat "check code" exceptions as false for legacy API compatibility 2023-01-25 14:39:29 -05:00
Jon Chambers 035ddc4834 Fix a mistake where we're looking for verification codes in place that hasn't been deployed yet (but will be soon!) 2023-01-25 11:43:06 -05:00
Chris Eager c2f40b8503 Remove duplicate code 2023-01-25 11:09:23 -05:00
Jon Chambers cf738a1c14 Look for registration service errors in response bodies in addition to status responses 2023-01-25 10:49:36 -05:00
erik-signal 52d40c2321 Add metrics for spam report tokens received. 2023-01-24 10:25:40 -05:00
Erik Osheim cbf12d6b46 Update to latest version of the spam module 2023-01-19 11:20:08 -05:00
erik-signal ab26a65b6a Introduce spam report tokens 2023-01-19 11:13:43 -05:00
erik-signal ee5aaf5383 Ignore files created by emacs / lsp. 2023-01-18 15:44:29 -05:00
Jon Chambers 1c1714b2c2 Clarify a counter name 2023-01-17 17:13:06 -05:00
Jon Chambers accb017ec5 Use a longer expiration window for quantile calculation 2023-01-17 17:13:06 -05:00
Chris Eager 304782d583 Use processor from SubscriptionProcessorManager for issued receipts 2023-01-17 16:12:03 -06:00
Chris Eager f361f436d8 Support PayPal for recurring donations 2023-01-17 12:20:17 -06:00
Chris Eager a34b5a6122 grpc, guava: use version from google cloud libraries-bom 2023-01-17 11:20:46 -06:00
Chris Eager f75ea18ccb Add test for GoogleCloudAdminEventLogger 2023-01-17 11:20:46 -06:00
Dimitris Apostolou 9a06c40a28 Fix typos 2023-01-13 16:05:06 -06:00
Chris Eager e6ab97dc5a Update enabled-required authenticator metrics 2023-01-13 14:05:56 -06:00
Chris Eager ba73f757e2 Update google libraries-bom to 26.1.3, firebase-admin to 9.1.1 2023-01-13 12:22:55 -06:00
Chris Eager 30f131096d Update AWS SDK v1 to 1.12.376 2023-01-13 12:17:39 -06:00
Chris Eager b8ce922f92 Update logstash-logback-encoder to 7.2 2023-01-13 12:17:39 -06:00
Chris Eager 11b62345e1 Update mockito to 4.11.0 2023-01-13 12:17:39 -06:00
Chris Eager 77289ecb51 Update micrometer to 1.10.3 2023-01-13 12:17:39 -06:00
Chris Eager dfb0b68997 Update DynamoDBLocal to 1.20.0 2023-01-13 12:17:39 -06:00
Chris Eager d545f60fc4 Update wiremock to 2.35.0 2023-01-13 12:17:39 -06:00
Chris Eager 5cda6e9d84 Update pushy to 0.15.2 2023-01-13 12:17:39 -06:00
Chris Eager 7caba89210 Update AWS SDK v2 to 2.19.8 2023-01-13 12:17:39 -06:00
Chris Eager b8967b75c6 Update dropwizard to 2.0.34 2023-01-13 12:17:39 -06:00
Chris Eager 74d9849472 Update badge strings 2023-01-13 12:08:05 -06:00
Fedor Indutny 96b753cfd0 Add an extra kb to max sticker size 2023-01-13 12:07:45 -06:00
Jon Chambers 5a89e66fc0 Convert AccountIdentityResponse to a record 2023-01-13 12:36:17 -05:00
Jon Chambers b4a143b9de Convert RegistrationLockFailure to a record 2023-01-13 12:36:02 -05:00
Jon Chambers 050035dd52 Convert ExternalServiceCredentials to a record 2023-01-13 12:36:02 -05:00
Jon Chambers 7018062606 Explicitly create registration sessions 2023-01-09 15:27:07 -05:00
Jon Chambers 9e1485de0a Assume stored verification codes will always have a session ID instead of a verification code 2023-01-09 15:27:07 -05:00
Jon Chambers 4e358b891f Retire StoredVerificationCode#twilioVerificationSid 2023-01-09 15:27:07 -05:00
Ehren Kret 4044a9df30 stop warning about lack of syntax specification during proto generation 2023-01-09 12:20:07 -06:00
Ehren Kret 5a7b675001 import cleanup on controllers package 2023-01-09 12:20:07 -06:00
Ehren Kret 3be4e4bc57 remove unused exception type 2023-01-09 12:20:07 -06:00
Chris Eager 5de51919bb Remove Subscriptions.PCI 2023-01-05 12:02:34 -06:00
Chris Eager b02b00818b Remove Subscriptions.PCI attribute 2023-01-04 11:31:46 -06:00
Chris Eager 010f88a2ad Remove Subscriptions.C attribute 2023-01-04 11:31:46 -06:00
Jon Chambers 60edf4835f Add a pni capability to UserCapabilities 2022-12-21 16:26:07 -05:00
Jon Chambers a60450d931 Convert UserCapabilities to a record 2022-12-21 16:26:07 -05:00
erik-signal d138fa45df Handle edge cases of Math.abs on integers. 2022-12-20 12:25:04 -05:00
Katherine Yen 2c2c497c12 Define reregistrationIdleDays DistributionSummary with custom expiry 2022-12-20 09:21:24 -08:00
Katherine Yen cb5d3840d9 Add paymentActivation capability 2022-12-20 09:20:42 -08:00
Fedor Indutny 9aceaa7a4d Introduce ArtController 2022-12-19 11:58:16 -08:00
Katherine Yen 636c8ba384 Add metric for distribution of account idle time at reregistration 2022-12-16 13:50:29 -08:00
Ravi Khadiwala ac78eb1425 Update to the latest version of the abusive message filter 2022-12-16 11:28:30 -06:00
Ravi Khadiwala 65ad3fe623 Add hCaptcha support 2022-12-16 11:28:30 -06:00
Sergey Skrobotov dcec90fc52 Update to the latest version of the abusive message filter 2022-12-13 13:30:47 -08:00
Chris Eager 24ac32e6e6 Add PayPalExperienceProfileInput.userAction 2022-12-13 10:03:58 -06:00
Katherine Yen 26f5ffdde3 Enable case-sensitive usernames 2022-12-13 07:59:37 -08:00
Jon Chambers a883426402 Simplify account cleaner 2022-12-06 16:21:25 -06:00
Chris Eager 2f21e930e2 Add minimum one-time donation amont to validation error map 2022-12-06 16:21:15 -06:00
Chris Eager 5fb158635c Use existing WebApplicationException entity, if available 2022-12-06 16:21:15 -06:00
Chris Eager 6f844f9ebb Update to the latest version of the abusive message filter 2022-12-06 16:20:17 -06:00
Sergey Skrobotov d88e358016 Update to the latest version of the abusive message filter 2022-12-05 10:07:40 -08:00
Sergey Skrobotov 9cf2635528 some accounts classes refactorings 2022-12-05 09:30:40 -08:00
Chris Eager d0e7579f13 Revert transaction descriptor 2022-12-01 18:52:45 -06:00
Chris Eager cda82b0ea0 Update kotlin + Apollo 2022-12-01 18:11:35 -06:00
Chris Eager 2ecbb18fe5 Add support for one-time PayPal donations 2022-12-01 18:11:35 -06:00
Chris Eager d40d2389a9 Update to Maven 3.8.6 2022-12-01 18:09:38 -06:00
Chris Eager df8fb5cab7 Move messages cache stale discard to a separate scheduler 2022-12-01 18:09:28 -06:00
katherine-signal 99ad211c01 Enforce minimum amount by currency for one time donations 2022-11-28 11:44:59 -08:00
katherine-signal fb4ed20ff5 Remove groups v2 capability
* wip removing groups v2 capabilities

* comments

* finish removing groups v2 references

* hardcode gv1migration flag on user capability, remove other references
2022-11-21 09:31:47 -08:00
Jon Chambers cb50b44d8f Allow the account cleaner to operate on multiple accounts in parallel 2022-11-18 11:15:00 -05:00
Jon Chambers ae57853ec4 Simplify deletion reason reporting 2022-11-18 11:15:00 -05:00
Jon Chambers 2881c0fd7e Allow the account cleaner to act on all accounts in a crawled chunk 2022-11-18 11:15:00 -05:00
Chris Eager 483fb0968b Use badge name in level configuration for one-time donations 2022-11-18 11:05:23 -05:00
Jon Chambers 4d37418c15 Update to the latest version of the abusive message filter 2022-11-18 10:55:15 -05:00
Jon Chambers e8ee4b50ff Retire the legacy "abusive hosts" system in favor of newer tools 2022-11-18 10:54:25 -05:00
Chris Eager 4f8aa2eee2 Mark flaky test @Disabled 2022-11-17 13:23:42 -06:00
Chris Eager 397d3cb45a Add consolidated subscription configuration API 2022-11-16 12:27:00 -06:00
Chris Eager e883d727fb Note deprecation of localized string 2022-11-16 12:09:00 -06:00
Chris Eager 986545a140 Set error_if_incomplete for subscription payment behavior 2022-11-16 12:08:21 -06:00
Sergey Skrobotov 836307b0c7 adding a metric for ipv4/ipv6 requests count 2022-11-15 11:17:01 -08:00
Sergey Skrobotov b5a75d3079 Update to the latest version of the abusive message filter 2022-11-15 11:16:55 -08:00
Sergey Skrobotov c32067759c refactoring: use constants for header names 2022-11-15 11:16:49 -08:00
Chris Eager 7fb7abb593 Update to micrometer 1.10.0 2022-11-15 11:16:41 -08:00
Erik Osheim 0d50b58c60 Update to the latest version of the abusive message filter 2022-11-11 17:09:24 -05:00
Chris Eager bdf4e24266 Update to the latest version of the abusive message filter 2022-11-11 13:54:19 -06:00
Chris Eager f41bdf1acb Make MessagesController#getPendingMessages fully async 2022-11-11 13:19:57 -06:00
Chris Eager 77d691df59 Always use reactived message processing in WebSocketConnection 2022-11-11 13:14:39 -06:00
Chris Eager 12300761ab Update reactor-bom to 2020.0.24 2022-11-11 13:14:26 -06:00
Chris Eager 25efcbda81 Update lettuce to 6.2.1.RELEASE 2022-11-11 13:14:26 -06:00
Jon Chambers a01f96e0e4 Temporarily disable account freezing on contention 2022-11-10 18:53:58 -05:00
erik-signal 1d1e3ba79d Add metric to track newly-locked accounts. 2022-11-10 12:55:08 -05:00
Jon Chambers 2c9c50711f Avoid reading from a stale Account after a contested reglock event 2022-11-10 12:41:50 -05:00
Jon Chambers d3f0ab8c6d Introduce an alternative exchange rate data provider 2022-11-10 10:25:06 -05:00
erik-signal 80a3a8a43c Lock account when number owner lacks registration lock. 2022-11-09 14:03:09 -05:00
Chris Eager e6e6eb323d Update metric name 2022-11-08 11:15:42 -06:00
Chris Eager 681a5bafb4 Update MessagesManager#getMessagesForDevice
- add `subscribeOn()`
- use `CompletableFuture` for consistency
2022-11-08 09:38:52 -06:00
Chris Eager 5bec89ecc8 Measure individual message timeouts 2022-11-08 09:37:37 -06:00
Chris Eager 69ed0edb74 Revert "Add more detailed queue processing rate metrics"
This reverts commit bbbab4b8a4.
2022-11-08 09:35:39 -06:00
Chris Eager ad5925908e Change dispatch queues to LinkedBlockingQueues 2022-11-04 11:08:17 -05:00
Chris Eager d186245c5c Move all receipt sending work to executor 2022-11-04 11:08:06 -05:00
Chris Eager bbbab4b8a4 Add more detailed queue processing rate metrics 2022-11-04 11:06:38 -05:00
Chris Eager f83080eb8d Update metric name 2022-11-03 14:50:20 -05:00
Chris Eager e0178fa0ea Move additional handling of MessagesManager#delete to executor 2022-11-03 13:02:25 -05:00
Chris Eager c6a79ca176 Enable metrics on messages fluxes 2022-11-03 13:02:25 -05:00
Chris Eager 6426e6cc49 Enable reactor Schedulers metrics 2022-11-03 13:02:25 -05:00
Chris Eager b13cb098ce lettuce: set publishOnScheduler to true 2022-11-03 13:02:25 -05:00
Jon Chambers afda5ca98f Add a test for checking push challenge tokens 2022-11-03 11:14:59 -05:00
Chris Eager eb57d87513 Remove message listener key only after successfully unsubscribing 2022-11-03 11:09:11 -05:00
Chris Eager fbf6b9826e tests: only call SQLite.setLibraryPath once 2022-11-03 11:08:43 -05:00
Chris Eager a01b29a6bd set off_session=true for subscription updates 2022-11-02 14:34:26 -05:00
Chris Eager 102992b095 Set off_session=true when creating subscriptions 2022-11-02 11:30:29 -05:00
Chris Eager bd69905f2e Remove obsolete donation endpoint 2022-11-02 11:29:03 -05:00
Chris Eager ce5a4bd94a Update wiremock to 2.34.0 2022-11-02 11:24:54 -05:00
Chris Eager f65a613815 Update jackson to 2.13.4 2022-11-02 11:24:54 -05:00
sergey-signal d87c8468bd Update to the latest version of the abusive message filter (#1138) 2022-11-02 09:23:38 -07:00
Chris Eager aa829af43b Handle expected case of empty flux in message deletion 2022-10-31 12:29:25 -05:00
Chris Eager c10fda8363 Use reactive streams for WebSocket message queue
Initially, uses `ExperimentEnrollmentManager` to do a safe rollout.
2022-10-31 10:35:37 -05:00
Jon Chambers 4252284405 Update to the latest version of the abusive message filter 2022-10-28 10:50:49 -04:00
Jon Chambers 74d65b37a8 Discard old Twilio machinery and rely entirely on the stand-alone registration service 2022-10-28 10:40:37 -04:00
sergey-signal 78f95e4859 Update to the latest version of the abusive message filter (#1132) 2022-10-27 14:01:16 -07:00
Jon Chambers 91626dea45 Count accounts rather than devices that are stories-capable 2022-10-25 16:36:05 -04:00
sergey-signal 5868d9969a minor changes to utility classes (#1127) 2022-10-25 08:48:56 -07:00
erik-signal 90490c9c84 Clean up the TestClock code a bit more. 2022-10-21 15:27:15 -04:00
Chris Eager 8ea794baef Add additional handling for nullable field in recurring donation record 2022-10-21 12:56:39 -05:00
Chris Eager 70a6c3e8e5 Update to libsignal-server 0.21.1 2022-10-21 12:54:18 -05:00
Jon Chambers 4813803c49 Add .java-version to .gitignore 2022-10-21 12:40:11 -04:00
erik-signal fe60cf003f Clean up testing with clocks. 2022-10-21 12:39:47 -04:00
erik-signal 0c357bc340 Add metrics tracking story capability adoption. 2022-10-20 12:25:03 -04:00
Chris Eager b711288faa Run GitHub Action in a container 2022-10-18 16:59:35 -05:00
Jon Chambers 44a5d86641 Revert "Update to libsignal-server 0.21.0"
This reverts commit cccccb4dd6.
2022-10-18 11:44:50 -04:00
Jon Chambers e7048aa9cf Allow the reconciliation client to trust multiple CA certificates to facilitate certificate rotation 2022-10-18 11:17:47 -04:00
Jon Chambers 0120a85c39 Allow HTTP clients to trust multiple certificates to support certificate rollover 2022-10-18 11:17:47 -04:00
Jon Chambers a41d047f58 Retire CertificateExpirationGauge in favor of other expiration monitoring tools 2022-10-18 11:17:47 -04:00
Chris Eager cccccb4dd6 Update to libsignal-server 0.21.0 2022-10-18 11:17:29 -04:00
Jon Chambers 0a64e31625 Check verification codes for changing phone numbers against the stand-alone registration service when possible 2022-10-18 11:17:15 -04:00
Jon Chambers 3c6c6c3706 Use the gRPC BOM instead of calling out dependencies individually 2022-10-18 11:16:56 -04:00
Jon Chambers 8088b58b3b Clarify default value for includeE164 2022-10-18 11:16:06 -04:00
erik-signal a7d5d51fb4 Improve testing of MultiRecipientMessageProvider 2022-10-17 16:50:39 -04:00
Chris Eager 378d7987a8 device capabilities: prevent stories downgrade 2022-10-17 15:25:13 -04:00
erik-signal 3e0baf82a4 Filter unknown UUIDs for /multi_recipient&story=true. 2022-10-13 15:33:51 -04:00
Chris Eager 7a2683a06b Remove /.tx/config from .gitignore 2022-10-11 15:04:50 -05:00
erik-signal 17a3c90286 Add "urgent" query parameter to /v1/messages/multi_recipient endpoint. 2022-10-11 11:10:11 -04:00
Chris Eager 6341770768 Update SubscriptionManager to store processor+customerId in a single attribute and a map
- add `type` query parameter to `/v1/subscription/{subscriberId}/create_payment_method`
2022-10-07 14:26:17 -05:00
Jon Chambers 308437ec93 Resolve gRPC/Netty version conflicts 2022-10-06 16:23:47 -04:00
Jon Chambers d3d4916d6c Update to the latest version of the abusive message filter 2022-10-06 15:43:37 -04:00
Jon Chambers d2fa00f0c6 Add experiment to test standalone registration service 2022-10-06 15:42:53 -04:00
erik-signal d6c9652a70 Fix internal server error when sending stories to unknown recipient. 2022-10-06 13:53:57 -04:00
Jon Chambers 0d20b73e76 Update to the latest version of the abusive message filter 2022-10-05 15:20:49 -04:00
Jon Chambers 3c655cdd5a Migrate to "regionCode" instead of "region" to avoid tag name conflicts 2022-10-05 15:15:46 -04:00
Jon Chambers fc5cd3a9ca Update to protobuf-java 3.21.7 2022-10-05 15:15:34 -04:00
Jon Chambers 83ab926f96 Add a dimension for story messages 2022-10-05 15:15:22 -04:00
erik-signal 56e54e0724 Update to the latest version of the abusive message filter 2022-10-05 13:19:47 -04:00
erik-signal 544e4fb89a Adjust routing for stories. 2022-10-05 12:20:42 -04:00
erik-signal 966c3a8f47 Add routing for stories. 2022-10-05 10:44:50 -04:00
Ravi Khadiwala c2ab72c77e Update to the latest version of the abusive message filter 2022-09-30 12:57:21 -05:00
Ravi Khadiwala 4468ee3142 Update to the latest version of the abusive message filter 2022-09-30 12:10:02 -05:00
Ravi Khadiwala c82c2c0ba4 Add country tag to twilio failures 2022-09-30 12:03:46 -05:00
Ravi Khadiwala 6e595a0959 add an optionals utility and fix push challenge metric 2022-09-30 12:02:47 -05:00
Ravi Khadiwala a79d709039 Return 403 when a push challenge is incorrect 2022-09-30 12:02:47 -05:00
Ravi Khadiwala 538a07542e Update to the latest version of the abusive message filter 2022-09-22 11:20:48 -05:00
Ravi Khadiwala 07ed765250 Update abusive message filter and filter account creates 2022-09-20 14:52:18 -05:00
Ravi Khadiwala 2e497b5834 Fix operator order in metric calculation 2022-09-15 14:04:18 -05:00
Ravi Khadiwala 61b3cecd17 Fix missing increment on recaptcha counter 2022-09-14 17:07:26 -05:00
Ravi Khadiwala a4a666bb80 Add metrics for recaptcha reasons 2022-09-14 16:00:11 -05:00
Ravi Khadiwala c14621a09f Add metrics for captcha scores 2022-09-14 16:00:11 -05:00
Ravi Khadiwala d0a8899daf Change discriminator seperator and default width 2022-09-14 15:53:15 -05:00
Chris Eager 65dbcb3e5f Remove duplicate bom from dependencyManagement 2022-09-12 16:54:31 -05:00
Chris Eager 7f725b67c4 Update to the latest version of the abusive message filter 2022-09-12 11:24:37 -05:00
Chris Eager e25252dc69 Remove unused exception 2022-09-12 11:19:15 -05:00
Chris Eager 8b65c11e1e Update batch check entities from two optional fields to a single field 2022-09-12 11:19:01 -05:00
Chris Eager 320c5eac53 Add support for PNIs at v1/profile/identity_check/batch 2022-09-09 10:55:34 -05:00
Ehren Kret 8199e0d2d5 Set resource field on log entry 2022-09-07 19:37:26 -05:00
Ehren Kret 53387f5a0c Register polymorphic serialization 2022-09-07 19:37:26 -05:00
Ehren Kret 7d171a79d7 Remove redundant @NotNull annotation 2022-09-07 19:37:26 -05:00
Ehren Kret 3b99bb9e78 Log remote config delete events 2022-09-07 19:37:26 -05:00
Ehren Kret 132f026c75 Improve readability of event code 2022-09-07 19:37:26 -05:00
Ehren Kret abd0f9630c Create GCP Logging implementation of AdminEventLogger 2022-09-07 19:37:26 -05:00
Ehren Kret a4508ec84f Add new event logging module 2022-09-07 19:37:26 -05:00
Ehren Kret 6119b6ab89 Upgrade java-uuid-generator dependency 2022-09-07 19:37:26 -05:00
Ehren Kret 307ac47ce0 Update DynamoDBLocal dependency version 2022-09-07 19:37:26 -05:00
Ravi Khadiwala 4032ddd4fd Add reserve/confirm for usernames 2022-09-07 11:49:49 -05:00
Chris Eager 98c8dc05f1 Update to the latest version of the abusive message filter 2022-09-07 11:49:01 -05:00
Chris Eager 4c677ec2da Remove deprecated /v1/attachments 2022-09-07 11:48:16 -05:00
Chris Eager c05692e417 Update deprecated CircuitBreakerConfig usage 2022-09-07 11:47:15 -05:00
Chris Eager 1e7aa89664 Update resilience4j to 1.7.0 2022-09-07 11:47:15 -05:00
gram-signal ae1edf3c5c Remove experiment associated with auth1->auth2 rollout. 2022-08-31 12:10:46 -06:00
gram-signal b17f41c3e8 Check if dashes work in dynamic configuration keys. 2022-08-29 15:51:37 -06:00
gram-signal 08db4ba54b Update authentication to use HKDF_SHA256. 2022-08-29 14:20:47 -06:00
gram-signal cb6cc39679 Ignore null identity key. 2022-08-29 13:26:49 -06:00
Jon Chambers b6bf6c994c Remove a spurious @Nullable annotation 2022-08-26 15:22:23 -04:00
Jon Chambers 3bb4709563 Add CLDR region as a dimension 2022-08-26 12:41:51 -04:00
Jon Chambers b280c768a4 Allow signup captchas to target CLDR two-letter region codes 2022-08-26 12:41:51 -04:00
Chris Eager d23e89fb9c Update micrometer to 1.9.3 2022-08-25 13:46:36 -07:00
Chris Eager 3a27bd0318 Update test dependencies 2022-08-25 13:40:46 -07:00
Chris Eager 616513edaf Remove unused jdbi dependency 2022-08-25 13:40:46 -07:00
Chris Eager 09a51020e9 Update stripe-java to 21.2.0 2022-08-25 13:40:46 -07:00
Chris Eager cb8cb94d1a Update aws java v1 SDK to 1.12.287 2022-08-25 13:40:46 -07:00
Chris Eager 2440dc0089 Update netty to 4.1.79.Final 2022-08-25 13:40:46 -07:00
Chris Eager 2336eef333 Update aws java v2 SDK to 2.17.258 2022-08-25 13:40:46 -07:00
Chris Eager a0e948627c Update jackson to 2.13.3 2022-08-25 13:40:46 -07:00
Chris Eager 88159af588 Update dropwizard to 2.0.32 2022-08-25 13:40:46 -07:00
Chris Eager 38b77bb550 Update libphonenumber to 8.12.54 2022-08-25 13:40:32 -07:00
Jon Chambers e72d1d0b6f Stop reading attribute-based messages from the messages table 2022-08-22 13:37:39 -07:00
Ravi Khadiwala 1891622e69 Zero-pad discriminators less than initial width 2022-08-22 13:36:38 -07:00
Chris Eager 628a112b38 Include country code for verify failure 2022-08-19 12:21:05 -07:00
Jon Chambers 50f5d760c9 Use existing tagging tools for keepalive counters 2022-08-16 13:16:19 -07:00
Jon Chambers 7292a88ea3 Record table performance metrics around reported messages 2022-08-16 13:15:30 -07:00
Jon Chambers 07cb3ab576 Add a "sealed sender" dimension to the sent message counter 2022-08-16 13:11:12 -07:00
Chris Eager 27b749abbd Filter expired items from Dynamo 2022-08-16 13:09:47 -07:00
Chris Eager 27f67a077c Add metrics for report-verification-succeeded response 2022-08-16 13:08:16 -07:00
Ravi Khadiwala 393e15815b Rename secondary account key namespace for usernames 2022-08-15 10:51:52 -05:00
Ravi Khadiwala a7f1cd25b9 Remove UAK normalization code
All accounts now have UAKs in top-level attributes
2022-08-15 10:47:52 -05:00
Ravi Khadiwala 953cd2ae0c Revert "Delete any leftover usernames in the accounts db"
This reverts commit a44c18e9b7.

Old username cleanup is finished.
2022-08-15 10:45:38 -05:00
ravi-signal a84a7dbc3d Add support for generating discriminators
- adds `PUT accounts/username` endpoint
- adds `GET accounts/username/{username}` to lookup aci by username
- deletes `PUT accounts/username/{username}`, `GET profile/username/{username}`
- adds randomized discriminator generation
2022-08-15 10:44:36 -05:00
Chris Eager 24d01f1ab2 Revert "device capabilities: prevent stories downgrade"
This reverts commit 1c67233eb0.
2022-08-12 14:21:27 -05:00
Chris Eager 06eb890761 Improve e164 normalization check by re-parsing without country code 2022-08-12 10:52:55 -07:00
Chris Eager 6d0345d327 Clean up Util 2022-08-12 10:52:55 -07:00
Chris Eager 1c67233eb0 device capabilities: prevent stories downgrade 2022-08-12 10:51:16 -07:00
Jon Chambers b4281c5a70 Send non-urgent push notifications with lower priority 2022-08-12 11:06:31 -04:00
Jon Chambers 5f6b66dad6 Add support for scheduling background push notifications 2022-08-12 10:57:59 -04:00
Jon Chambers c2be0af9d9 Refactor ApnPushNotificationSchedulerTest to use a Clock 2022-08-12 10:57:59 -04:00
Jon Chambers c111e9a35a Update to the latest version of the abusive message filter 2022-08-12 10:50:53 -04:00
Jon Chambers a53a85d788 Refactor scheduled APNs notifications in preparation for future development 2022-08-12 10:47:49 -04:00
Ravi Khadiwala a44c18e9b7 Delete any leftover usernames in the accounts db
The account username field should not currently be populated
2022-08-11 16:23:51 -05:00
Jon Chambers 4d78437fe4 Add a country code dimension to the non-normalized number counter 2022-08-10 15:03:01 -04:00
Jon Chambers 2bfe2c8ff8 Add an "urgent" dimension to the "sent messages" counter 2022-08-10 15:00:46 -04:00
Chris Eager 65da844d70 Small test cleanup 2022-08-09 15:32:44 -05:00
Chris Eager 5275c27ee1 Fix incorrect test Javadoc 2022-08-09 13:06:15 -07:00
Chris Eager 390580a19d Count cases when the a message’s destination UUID doesn’t match the account’s PNI 2022-08-09 13:06:15 -07:00
Jon Chambers 147917454f Measure the depth of the queue for the FCM executor 2022-08-04 15:53:26 -04:00
Jon Chambers 39562775d9 Use a fixed-size thread pool for sending FCM notifications 2022-08-04 15:37:22 -04:00
Jon Chambers 4a0ef1f834 Measure the time taken to send APNs push notifications 2022-08-04 10:43:07 -04:00
Jon Chambers 85b16b674d Measure the time taken to send FCM push notifications 2022-08-04 10:43:07 -04:00
Jon Chambers ab5d8ba120 Use ApiFutures#addCallback for FCM futures 2022-08-04 10:43:07 -04:00
Jon Chambers 28076335e0 Generate APNs payloads using a payload builder 2022-08-04 10:37:30 -04:00
Jon Chambers 9e9333424f Retire RetryingApnsClient 2022-08-04 09:59:18 -04:00
Jon Chambers 6f0faae4ce Introduce common push notification interfaces/pathways 2022-08-03 10:07:53 -04:00
Jon Chambers 0d24828539 Drop the gcm-sender-async module 2022-08-02 17:31:35 -04:00
Jon Chambers 0a6d724f2c Remove GCMSender 2022-08-02 17:31:35 -04:00
Jon Chambers 8956e1e0cf Check for null FCM error codes 2022-08-02 17:29:31 -04:00
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 d582942244 Update to the latest version of the abusive message filter 2022-07-29 10:59:02 -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 788246a56f Update Lettuce to 6.1.9 2022-07-26 09:22:13 -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
Jon Chambers c1f9bedf2f Update to libsignal-server 0.18 2022-06-23 14:25:28 -04:00
Jon Chambers dd5d0ea2b3 Update to the latest version of the abusive message filter 2022-06-23 08:37:27 -04: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 47300c1d44 Upgrade vavr to 0.10.4 from 0.10.2 2022-06-20 10:27:50 -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
Ehren Kret 776c0aa488 Don't use inner class imports 2022-06-17 11:21:30 -05:00
Ravi Khadiwala 327eb0219d Bypass account registration captcha on test devices 2022-06-13 15:01:46 -07:00
Jon Chambers 8507b6a1f0 Update to libphonenumber 8.12.50 2022-06-13 14:46:57 -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
Jon Chambers 192e884e4a Update to embedded-redis 0.8.3 2022-06-03 09:31:32 -04: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
Ehren Kret d5f2d86bd2 Add Maven Wrapper 2022-05-13 14:14:37 -05:00
Jon Chambers 2ce8bcd565 Update to the latest version of the abusive message filter 2022-05-11 14:27:32 -04: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
Sgn-32 c45ff61954 Update libphonenumber to 8.12.48 2022-05-11 14:17:13 -04: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 9c27b58194 Update sample configuration file 2022-04-29 10:14:39 -05:00
Ehren Kret f6471cf8f9 Add gift configuration source 2022-04-29 10:14:39 -05:00
Ehren Kret f21e9bcc4d Upgrade jackson dependencies 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
JanLukasGithub 9b3a8897cd Change copyright to 2022 2022-04-22 14:20:34 -04:00
Jon Chambers 40f8cddfb2 Update to libsignal-server 0.16.0 2022-04-20 16:00:12 -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 2717967d61 Revert submodule change from 473ecbdf2d 2022-04-19 10:53:58 -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
amit 4b8ebc9a17 Revert "newlines for a test."
I had expected this to be rejected -- whoops!

This reverts commit 42a109e593.
2022-03-29 12:47:34 -07:00
amit 42a109e593 newlines for a test. 2022-03-29 11:29:43 -07:00
Jon Chambers 8064e68873 Update libsignal-server to 0.15.1 to resolve a glibc version conflict 2022-03-29 12:24:45 -04: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 df415208a4 Update to the latest version of the abusive message filter 2022-03-25 14:32:55 -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
Ravi Khadiwala 8541360bf3 Update to the latest version of the abusive message filter 2022-03-23 14:32:55 -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
Chris Eager 5c13e54149 Various dependency updates
- protobuf-java to 3.19.4
- libphonenumber to 8.12.45
- logstash-logback-encoder to 7.0.1
- mockito to 4.3.1
2022-03-22 09:58:08 -04:00
Jon Chambers 8e74cf6633 Update to the latest version of the abusive message filter 2022-03-22 09:56:27 -04: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 941a9c3b39 Update to the latest version of the abusive message filter 2022-03-17 16:08:20 -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 ee78daeeef Update to the latest version of the abusive message filter 2022-03-16 15:30:43 -04: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 5ca89709e3 Update to the latest version of the abusive message filter 2022-03-14 14:15:51 -05: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
Jon Chambers 109a3bb2b9 Update to Pushy 0.15.1 2022-03-10 11:08:53 -05:00
Chris Eager fef37f739b Remove unused classes and methods 2022-03-10 11:08:38 -05:00
Jon Chambers 7a5615182a Update to the latest version of the abusive message filter 2022-03-10 11:06:04 -05:00
Ravi Khadiwala 02a7003ffe Update to the latest version of the abusive message filter 2022-03-09 14:14:47 -06: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 6283f5952d Update to the latest version of the abusive message filter 2022-03-08 10:03:38 -05: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 f9c1e411aa Remove netty-tcnative as a dependency 2022-03-04 10:45:18 -05: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 ApostolouandChris Eager 75854e104e Fix typo
Co-authored-by: Chris Eager <79161849+eager-signal@users.noreply.github.com>
2022-03-01 14:14:52 -08:00
Dimitris Apostolou 93d06e3f4d Fix typos 2022-03-01 14:14:52 -08:00
Chris Eager c560b9229c Update to the latest version of the abusive message filter 2022-03-01 10:43:12 -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
Chris Eager f3457502a6 Support different v2 captcha actions 2022-02-25 13:49:47 -08:00
Ravi Khadiwala 7ded802df4 Update to the latest version of the abusive message filter 2022-02-24 17:30:02 -06:00
Ravi Khadiwala d3cd1d1b15 Use GetLatestConfiguration in config manager
Use StartConfigurationSession/GetLatestConfiguration instead of
GetConfiguration since the latter has been deprecated
2022-02-23 15:36:33 -06:00
Ravi Khadiwala f5a75c6319 Simplify RateLimitExceeded with no retry-duration
- Avoid passing negative durations in error cases
- Drop unused message
- Return a duration for a bad forwarded-for
2022-02-23 15:25:24 -06:00
Ravi Khadiwala ae3a5c5f5e Return a Retry-After on rate-limited responses
Previously, only endpoints throwing a RetryLaterException would include
a Retry-After header in the 413 response. Now, by default, all
RateLimitExceededExceptions will be marshalled into a 413 with a
Retry-After included if possible.
2022-02-23 15:25:24 -06:00
Jon Chambers 43792e2426 Update to the latest version of the abusive message filter 2022-02-22 11:03:41 -05:00
Jon Chambers 551d639951 Update Postgres driver to 42.3.3 2022-02-18 10:41:29 -05:00
Jordan Rose c367a71223 APNS: include a collapse-id for non-VOIP notifications
This has two benefits:

- The APNS server should only send an iOS client a single push
  notification for any missed messages while the device is offline
  (server-side coalescing). Note that the client can still turn that
  into multiple "user notifications" as it pulls from its queue.

- If multiple notifications get delivered but iOS is unable to process
  them (say, because the phone just restarted and hasn't been unlocked
  yet), the user should only get one "You may have received messages"
  notification (client-side coalescing).
2022-02-18 10:41:10 -05:00
Chris Eager d259ef0348 Update rate limit exceeded counter 2022-02-17 13:23:48 -08:00
Chris Eager 288cbf4a80 Clean up null-ability of incoming message entity fields 2022-02-17 13:23:48 -08:00
Chris Eager ba5e5a780f Throw an exception instead of using Optional<Resposne> 2022-02-17 13:23:48 -08:00
Chris Eager 73fa3c3fe4 Add test for content length validation 2022-02-17 13:23:48 -08:00
Chris Eager 579eb85175 Reject invalid envelope types 2022-02-17 13:23:48 -08:00
Chris Eager b2b20072ae Add MicrometerRegistryManager 2022-02-17 13:18:30 -08:00
Chris Eager a2c4d3fe95 Use a strong reference to the application shutdown gauge 2022-02-17 13:18:30 -08:00
Ravi Khadiwala 31e2be2e4d Fixup invalid accept-language counter
- Fix name
- Add platform/version tags to the counter
2022-02-10 11:57:25 -06:00
Ravi Khadiwala 9f5d97e1c6 Silence noisy warnings for invalid Accept-Language 2022-02-10 11:57:25 -06:00
Ravi Khadiwala baaae6cd9f Add @NotNull to controller args where appropriate
Notably, `@Valid` doesn't imply `@NotNull`
2022-02-10 11:57:04 -06:00
Chris Eager ed398aa7b9 Add DeviceCapabilities.pni 2022-02-09 15:56:01 -08:00
Chris Eager 6e2ae42dab Add platform to metrics 2022-02-09 15:55:07 -08:00
Chris Eager 7f832ad783 Update to AWS SDK 2.17.125, 1.12.154 2022-02-07 16:46:25 -08:00
Chris Eager 2ce6f8cb6c Update to Dropwizard 2.0.28 2022-02-07 16:46:18 -08:00
Chris Eager 2574125199 Update libphonenumber to 8.12.42 2022-02-07 16:45:48 -08:00
Jordan Rose 41bf2b2c42 Add a binary format for incoming messages
The existing, general incoming message endpoint accepts messages as
JSON strings containing base64 data, along with all the metadata as
other JSON keys. That's not very efficient, and we don't make use of
that full generality anyway. This commit introduces a new binary
format that supports everything we're using from the old format (with
the help of some query parameters like multi-recipient messages).
2022-02-07 16:05:03 -08:00
Jon Chambers 51bac394ec Update to the latest version of the abusive message filter 2022-02-02 17:32:45 -05:00
Jon Chambers b696649c9d Update to the latest version of the abusive message filter 2022-01-31 16:24:09 -05:00
Chris Eager b4828ad8de Update embedded-redis to 0.8.2 2022-01-31 13:01:52 -08:00
Chris Eager 639d634426 Restore displaced UUID from deleted accounts table when present 2022-01-31 13:01:36 -08:00
Chris Eager 5358fc4f43 Use setRegistrationLockFromAttributes 2022-01-31 12:56:59 -08:00
Jon Chambers 6a654ab90b Update to the latest version of the abusive message filter 2022-01-28 11:26:40 -05:00
Jon Chambers 99eda80a78 Measure rate limit challenge responses by platform 2022-01-27 16:05:52 -05:00
Chris Eager a6182acc9c Require any transitive dependencies on log4j to use 2.17.1 2022-01-27 10:25:13 -08:00
Jon Chambers 2241e4d8ea Update to the latest version of the abusive message filter 2022-01-26 16:30:45 -05:00
Jon Chambers cbbdea1ba4 Impose more stringent requirements on cardinality checks 2022-01-26 16:13:12 -05:00
Jon Chambers 05e7c98620 Return an AccountIdentityResponse when changing phone numbers 2022-01-26 14:44:53 -05:00
Jon Chambers 1f1d618dea Rename AccountCreationResult to AccountIdentityResponse (since it's not just for account creation any more) 2022-01-26 14:44:53 -05:00
Jon Chambers b18117ef89 Add tests for unidentified access when requesting profiles 2022-01-25 14:07:44 -05:00
Jon Chambers 44cb796574 Add more detail to "could not get acceptable languages" logging 2022-01-25 12:21:35 -05:00
Jon Chambers ccf60ffc4b Update to the latest version of the abusive message filter 2022-01-25 10:39:50 -05:00
Jon Chambers f69db11f42 Drop some unused dynamic configuration properties 2022-01-21 18:46:37 -05:00
Chris Eager 96a680dcf0 Remove displaced account from directory when changing numbers 2022-01-21 18:46:11 -05:00
Jon Chambers c8367c9b7a Update to the latest version of the abusive message filter 2022-01-14 14:48:08 -05:00
Jon Chambers c612663490 Handle null AccountAttributes when verifying linked devices 2022-01-14 14:47:46 -05:00
Jon Chambers de5d967d18 Track metrics for dynamic config load failures 2022-01-14 14:47:12 -05:00
Jon Chambers 7fc63f7847 Allow callers to specify one or more dynamic config classes 2022-01-14 14:45:29 -05:00
Ehren Kret 49009cbcad Apply GitHub stale application 2022-01-07 11:37:52 -06:00
Chris Eager b5fbeffb86 Remove obsolete deployment files 2022-01-06 12:52:37 -08:00
Jordan Rose 146655e997 Add a "sameAvatar" flag to CreateProfileRequest
If sameAvatar is set (and "avatar" is also set), the avatar field for
a profile will be copied from the existing profile. This saves S3
churn and client bandwidth.
2022-01-04 13:57:41 -08:00
Chris Eager 87d66f04d8 Update to the latest abusive message filter 2022-01-03 15:16:29 -08:00
Chris Eager bb27dd0c3b Migrate from Object[] parameters to Stream<Arguments> 2022-01-03 15:10:02 -08:00
Chris Eager f45a1c232f Exclude junit from transitive dependencies 2022-01-03 15:10:02 -08:00
Chris Eager d7a3c12bbe Drop unused DynamoDB class rules 2022-01-03 15:10:02 -08:00
Chris Eager a1e84f5a88 Migrate service tests to JUnit 5 2022-01-03 15:10:02 -08:00
Chris Eager b758737907 Migrate remaining JUnit 4 Redis cluster tests to RedisClusterExtension
* Increase redis cluster initialization wait to 10 seconds
* Move to JUnit 5 `Assumptions`
2022-01-03 14:59:39 -08:00
Chris Eager c488c14d25 Migrate gcm-sender-async tests to JUnit 5 2021-12-21 09:39:02 -08:00
Chris Eager 5e0cca0702 Migrate redis-dispatch to JUnit 5 2021-12-21 09:39:02 -08:00
Chris Eager 8559e46e4a Use JUnit 5 by default for all sub projects 2021-12-21 09:39:02 -08:00
Chris Eager 4bc00e00e3 Update to the latest abusive message filter 2021-12-20 11:33:04 -08:00
Chris Eager 3e777df86c Timeout sendNextMessagePage after 5 minutes 2021-12-20 11:31:11 -08:00
Chris Eager 278b4e810d Add (failing) test for send message timeouts 2021-12-20 11:31:11 -08:00
Chris Eager 346c7cd743 Remove null-check of destination UUID 2021-12-20 11:31:11 -08:00
Ehren Kret 867bf97d8f Require any transitive dependencies on log4j to use 2.17.0 2021-12-19 07:21:00 -06:00
Jon Chambers 8a67949168 Trivial typo fix 2021-12-16 12:44:58 -05:00
Jon Chambers 5baa51d547 Migrate challenge-issuing configuration into the abusive message filter module 2021-12-16 12:22:19 -05:00
Jon Chambers 616db337e1 Remove an old rate limiting feature flag 2021-12-16 12:22:19 -05:00
Jon Chambers 3895871462 Repair missing PNIs in JSON blobs on account load 2021-12-16 11:17:51 -05:00
Jon Chambers a87b84fbe2 Return an empty response if somebody requests a profile key credential with a non-existent version 2021-12-16 10:30:55 -05:00
Chris Eager b2f0ace9db Update dropwizard to 2.0.26 2021-12-15 16:34:52 -08:00
Jon Chambers 20c95e2606 Register ApplicationShutdownMonitor last
This will make it start last and shut down first, which is pretty much what we want for shutdown state monitoring
2021-12-15 19:27:23 -05:00
Jon Chambers 22dccaeddb Count cases where we can find a given account, but not the given profile version 2021-12-15 15:53:47 -05:00
Jon Chambers e611a70ba4 Remove usernames from profile responses 2021-12-15 15:53:47 -05:00
Jon Chambers 66845d7080 Refactor: separate the various types of profile responses 2021-12-15 15:53:47 -05:00
Jon Chambers 4ea7278c6f Remove unversioned profile properties from Account entities 2021-12-15 15:53:47 -05:00
Jon Chambers 2b2e26f14b Remove deprecated, unversioned profile setters 2021-12-15 15:53:47 -05:00
Jon Chambers b496ef8d6f Fix an issue where the deleted accounts lock client was trying to talk to the deleted accounts table 2021-12-15 13:16:32 -05:00
Jon Chambers 7f5e83141d Consolidate DynamoDB clients/configuration 2021-12-15 12:43:57 -05:00
Jon Chambers 2d1ca98605 Consolidate DynamoDB clients/configuration 2021-12-15 12:42:41 -05:00
Jon Chambers eaa4c318e3 Add usernames to whoami and account creation responses 2021-12-15 11:47:10 -05:00
Jon Chambers 31373fd1ba Add a command for assigning usernames to individual users 2021-12-15 11:46:33 -05:00
Ehren Kret 9086246947 Require any transitive dependencies on log4j to use 2.16.0 2021-12-15 01:16:10 -06:00
Ehren Kret 7855b70682 Require any transitive dependencies on log4j to use 2.15.0 2021-12-10 01:16:48 -06:00
Chris Eager 0ce87153e5 Remove second database for AbusiveHostRules 2021-12-08 16:03:02 -08:00
Chris Eager dba1711e8d Convert AbusiveHostRule to a record 2021-12-08 14:43:21 -08:00
Chris Eager a70b057e1c Add second (migration) database to AbusiveHostRules 2021-12-08 12:46:05 -08:00
Chris Eager 9a5ffea0ad Move ossrh-snapshots to project aggregate pom 2021-12-07 15:14:47 -08:00
Chris Eager 96f4b771ea Update wiremock to 2.32.0 2021-12-07 10:34:49 -08:00
Ehren Kret 3df143dd3d Switch to zonky test embedded postgres and use postgres 11.13.0 2021-12-03 16:07:07 -05:00
Jon Chambers d78d7c726e Fix a UUID transposition when requesting profile key credentials 2021-12-03 16:06:26 -05:00
Jon Chambers d0ad580c7d Add (failing!) tests for getting a profile key credentials for somebody else 2021-12-03 16:06:26 -05:00
Ehren Kret 4a8a2a70b5 Return 400 instead of 500 when amount is too small 2021-12-03 12:24:16 -06:00
Jon Chambers 20a71b7df2 Add tests for generating profile key credentials 2021-12-03 12:16:13 -05:00
Jon Chambers 68412b3901 Allow the "get profile" endpoint to include a PNI credential 2021-12-03 12:16:13 -05:00
Jon Chambers 93a7c60a15 Update to zkgroup 0.9.0 2021-12-03 12:16:13 -05:00
Chris Eager 31e5058b15 Make temporary iOS envelope type adaptation a little wider 2021-12-03 12:06:31 -05:00
Jon Chambers 14cff958e9 Migrate challenge-issuing rate limiters to the abusive message filter 2021-12-03 11:52:58 -05:00
Jon Chambers 9628f147f1 Separate statically- and dynamically-configured rate limiters 2021-12-03 11:01:15 -05:00
Chris Eager 13e346d4eb Distinguish local vs remote in ClientPresenceManager#disconnectPresence 2021-12-02 14:32:42 -08:00
Fedor Indutny e507ce2f26 Include ACI and PNI in DeviceResponse 2021-12-02 17:21:05 -05:00
Jon Chambers 9c62622733 Handle cases where a message might be missing a destination UUID 2021-12-02 14:06:49 -05:00
Jon Chambers 62aa0cef39 Set destination UUIDs for receipts 2021-12-02 14:06:49 -05:00
Jon Chambers 401953313a Remove all vestiges of the relational account database 2021-12-02 12:46:43 -05:00
Chris Eager 4d2403d619 Use assertTimeoutPreemptively instead of assertTimeout 2021-12-02 12:17:08 -05:00
Jon Chambers c5f261305d Store destination UUIDs when persisting messages to DynamoDB 2021-12-02 12:17:08 -05:00
Jon Chambers 394f58f6cc Add a (failing!) check for destination UUIDs 2021-12-02 12:17:08 -05:00
Jon Chambers 674bf1b0e0 Drop a myserious empty test 2021-12-02 12:17:08 -05:00
Jon Chambers 606ddd8a9b Populate destination UUID for messages delivered via websocket 2021-12-02 12:17:08 -05:00
Jon Chambers e23a1fac50 Remove old Postgres-backed remote config machinery 2021-12-02 12:16:43 -05:00
Jon Chambers 342323a7e6 Use canonical usernames throughout AccountsManager 2021-12-02 12:02:29 -05:00
Jon Chambers efb410444b Introduce a username validator 2021-12-02 12:02:29 -05:00
Jon Chambers 17c9b4c5d3 Transition from Postgres-backed remote config store to Dynamo-backed store 2021-12-02 11:13:07 -05:00
Jon Chambers 706de8e2f1 Add a command to migrate remote configuration entries from Postgres to DynamoDB 2021-12-02 11:13:07 -05:00
Jon Chambers 23bc11f3b6 Introduce a DynamoDB-backed remote config store 2021-12-02 11:13:07 -05:00
Jon Chambers 4eb7dde1c8 Migrate RemoteConfigsTest to Junit 5 2021-12-02 11:13:07 -05:00
Jon Chambers 064861b930 Consolidate profiles store tests and discard ProfilesStore interface 2021-12-02 10:49:54 -05:00
Jon Chambers afa910bbd7 Drop relational profiles store 2021-12-02 10:49:54 -05:00
Jon Chambers 6aceb24fd2 Drop profile migration tools 2021-12-02 10:49:54 -05:00
Jon Chambers d94e86781f Migrate username storage from a relational database to DynamoDB 2021-12-01 16:50:18 -05:00
Daniel Gospodinow 0d4a3b1ad4 Fix typo in .gitmodules 2021-12-01 13:26:32 -05:00
Jon Chambers acfcb18f29 Allow overwriting of previously-delted profiles 2021-12-01 11:59:18 -05:00
Jon Chambers f7ff8e3837 Add a (failing!) test for deleting, then resetting profiles 2021-12-01 11:59:18 -05:00
Jon Chambers 048e17c62b Use a memoizing supplier instead of a looping thread to cache remote config entries 2021-11-30 16:35:42 -07:00
Jon Chambers d89b4f7e95 Compare versioned profiles synchronously; log a subset of mismatches for further investigation 2021-11-30 16:35:29 -07:00
Chris Eager 795b226b90 Mark methods that update SignedPreKeys as @ChangesDeviceEnabledState 2021-11-30 10:40:12 -07:00
Jon Chambers e485c380e0 Change the name of the CSV file argument to avoid upstream naming collisions 2021-11-30 11:31:12 -05:00
Jon Chambers bb4f4bc441 Modify the "migrate profiles" command to accept a list of UUIDs/versions from a CSV file 2021-11-30 11:22:51 -05:00
Jon Chambers 65b49b2d9c Use a "for each" strategy in profile migration methods 2021-11-24 16:54:30 -05:00
Jon Chambers 9e7010f185 Migrate profiles from a relational database to DynamoDB 2021-11-24 14:48:41 -05:00
Jon Chambers 3bb8e5bb00 Set a TTL for Account entries in the general cache 2021-11-24 14:47:36 -05:00
Jon Chambers 2a4d1da2ca Delete accounts from Redis after they've been deleted from Dynamo 2021-11-24 13:47:53 -05:00
Jon Chambers 6b71b66bd2 Take no action if badge list is omitted entirely 2021-11-24 13:47:39 -05:00
Jon Chambers ebf24fb125 Add a (failing!) test for clients omitting badges in profile update requests 2021-11-24 13:47:39 -05:00
Jon Chambers 46d64b949e Don't read "soft-deleted" profiles
Nothing is actually "soft-deleting" profiles yet, and this
is a first step toward migrating profiles to a new data
store.
2021-11-24 12:02:07 -05:00
Jon Chambers 6919354520 Fix a counting bug with reported messages 2021-11-23 17:28:39 -05:00
Jon Chambers a42fe9bfb0 Add crawler names to log messages 2021-11-23 16:22:09 -05:00
Jon Chambers ee1f8b34ea Add a command for reserving usernames 2021-11-23 16:21:03 -05:00
Jon Chambers c910fa406d Migrate reserved usernames from a relational database to DynamoDB 2021-11-23 16:21:03 -05:00
Jon Chambers 559205e33f Log cases where accounts are missing or have inconsistent PNIs 2021-11-23 15:40:31 -05:00
Chris Eager c0756e9c60 Attempt an orderly websocket close on displacement before a hard disconnect 2021-11-23 11:36:32 -07:00
Ehren Kret bf1190696e Add badge workaround for old Android builds 2021-11-23 09:58:06 -06:00
Jon Chambers 71dd0890de Restore an accidentally-removed PNI consistency check 2021-11-23 10:53:40 -05:00
Jon Chambers e5acdf1402 Don't update the PNI attribute during general account updates 2021-11-23 10:53:40 -05:00
Jon Chambers 0f08b6bb59 Drop "got successful captcha" messages from INFO to DEBUG 2021-11-22 17:06:34 -05:00
Jon Chambers 6198a7b69a Remove spurious @JsonProperty annotations 2021-11-22 15:43:09 -05:00
Jon Chambers 067aee6664 Remove unused properties from OutgoingMessageEntity 2021-11-22 15:43:09 -05:00
Jon Chambers 138a2ebbd0 Drop transactional logic from phone number identifier migration 2021-11-22 15:32:24 -05:00
Jon Chambers 296f6a7a88 Make phone number identifiers non-optional 2021-11-22 15:32:24 -05:00
Jon Chambers 069ffa9921 Drop PNI migration tools 2021-11-22 15:32:24 -05:00
Jon Chambers f42fd8a840 Retire unused diagnostic metrics 2021-11-22 15:31:16 -05:00
Jon Chambers 10f27af6f2 Retire old unsealed-sender meters 2021-11-22 15:31:16 -05:00
Jon Chambers 0bbd34d060 Use text blocks where possible 2021-11-22 15:30:31 -05:00
Jon Chambers 282daeb0dc Add a command to assign PNIs to accounts that don't already have one 2021-11-22 15:03:19 -05:00
Jon Chambers d33b313c11 Break down legacy "get profile" requests by platform 2021-11-19 12:37:39 -05:00
Ehren Kret fb7316c9ae Return subscription status string in GET 2021-11-19 11:36:01 -06:00
Ehren Kret 279b0a51d9 Use latest invoice on subscription to generate receipts 2021-11-19 11:25:38 -06:00
Ehren Kret 6547d5ebf3 More consistent naming of receipt credentials endpoints 2021-11-19 10:14:00 -06:00
Ehren Kret 4f1ef9a039 Add additional http status codes to /v1/subscription/boost/receipt_credentials 2021-11-19 10:11:33 -06:00
Ehren Kret 4c80714d19 Update sample.yml 2021-11-18 10:49:30 -06:00
Jon Chambers 077ead71a5 Rename legacy profile methods to separate them in metrics 2021-11-18 11:31:15 -05:00
Ehren Kret caba110266 Revert "Revert "Remove transparent SVG for badging""
This reverts commit 0fdb23c1e9.
2021-11-18 10:23:09 -06:00
Ehren Kret 0fdb23c1e9 Revert "Remove transparent SVG for badging"
This reverts commit 13a84f0c72.
2021-11-18 10:09:34 -06:00
Ehren Kret 13a84f0c72 Remove transparent SVG for badging 2021-11-18 10:04:42 -06:00
Jon Chambers 669bd58e33 Drop the unused Key utility class 2021-11-17 10:57:29 -05:00
Chris Eager 6e82740a9b Update sample.yml 2021-11-16 17:25:45 -07:00
Ehren Kret 7ea43a728d Set boost description from configuration 2021-11-16 17:21:57 -06:00
Chris Eager 71b38356b1 Update to Mockito 4.0.0 2021-11-16 15:56:35 -07:00
Chris Eager 5a99708f56 Update some deprecated usages 2021-11-16 15:56:13 -07:00
Chris Eager 24191d9599 Update Dropwizard to 2.0.25 2021-11-16 15:56:00 -07:00
Chris Eager 482ea8eb40 Update minimum required maven to 3.8.3 2021-11-16 15:55:52 -07:00
Jon Chambers 1dae05651f Add PNIs to account creation and whoami responses 2021-11-16 15:08:10 -05:00
Jon Chambers 5164e92538 Shorten metric names 2021-11-16 15:08:10 -05:00
Jon Chambers f89a20dbc7 Allow callers to set/retrieve keys by ACI or PNI 2021-11-16 15:08:10 -05:00
Jon Chambers 3a4c5a2bfb Store and retrieve one-time pre-keys by UUID 2021-11-16 15:08:10 -05:00
Jon Chambers 5e1334e8de s/KeysDynamoDb/Keys/ 2021-11-16 15:08:10 -05:00
Jon Chambers fa6e3d3690 Allow clients to request PNI-based group credentials 2021-11-16 15:08:10 -05:00
Jon Chambers 9383e7716b Resolve CertificateControllerTest warnings and recommendations 2021-11-16 15:08:10 -05:00
Jon Chambers cfe34fbf0f Allow unsealed-sender messages to be addressed by PNI 2021-11-16 15:08:10 -05:00
Jon Chambers 9fe110625c Add a destinationUuid field to envelopes 2021-11-16 15:08:10 -05:00
Jon Chambers 975f753c2b Add an endpoint for testing whether an account with a given ACI or PNI exists 2021-11-16 15:08:10 -05:00
Jon Chambers e6237480f8 Require that unidentified access keys be exactly 16 bytes 2021-11-16 15:08:10 -05:00
Chris Eager 966d4e29d4 Update sample.yml config to pass mvn verify 2021-11-16 11:43:07 -07:00
Chris Eager 26f876a2cb Check service configurations in verify phase 2021-11-16 11:43:07 -07:00
Jon Chambers ab9e6ac48a Revert "Replace zkgroup with libsignal-client"
This reverts commit 73ea6e4251.
2021-11-16 11:35:10 -05:00
Jon Chambers c1d6c04ab2 Revert "Replace curve25519-java with libsignal-client"
This reverts commit 0011b8925b.
2021-11-16 11:35:10 -05:00
Jon Chambers 888cec3d56 Introduce a filter for correcting numeric "online" flags 2021-11-16 10:15:14 -05:00
Jon Chambers 1461bcc2c2 Correct envelope types for certain iOS builds 2021-11-16 10:15:14 -05:00
Jon Chambers 11f1cf80bd Move MessageControllerTest out of the tests sub-package to expose package-private elements from the class under test 2021-11-16 10:15:14 -05:00
Jordan Rose c675cc8b26 Test the response code for invalid serialized zkgroup objects
Test by Jon, making sure this is consistent even without up-front size
checking.
2021-11-16 09:52:38 -05:00
Jordan Rose 0011b8925b Replace curve25519-java with libsignal-client
These APIs stemmed from a common source long ago, so there's not much
to change!
2021-11-16 09:52:38 -05:00
Jordan Rose 73ea6e4251 Replace zkgroup with libsignal-client 2021-11-16 09:52:38 -05:00
Jon Chambers e4441dddbb Consolidate Redis client resources 2021-11-16 09:52:12 -05:00
Chris Eager 8d1d56f694 Update to Java 17 2021-11-15 16:42:43 -07:00
Jon Chambers 2015ba77ca Switch to a disallowed prefix model instead of a disallowed country code model 2021-11-15 15:44:55 -05:00
Chris Eager 7033a0f68f Set checkStaleness to true for protoc 2021-11-12 13:34:15 -07:00
Jon Chambers 6ada76da7f Parallelize assignment of phone number identifiers 2021-11-12 11:03:46 -05:00
Jon Chambers cbdec0cb22 Remove legacy push latency measurement pathways 2021-11-11 15:44:07 -05:00
Chris Eager de6e9d31c9 Add dedicated crawler for directory reconciler 2021-11-11 13:38:13 -07:00
Jon Chambers f0a6be32fc Add a crawler to assign PNIs to existing accounts 2021-11-10 11:15:05 -05:00
Ehren Kret 5c4855cca6 Remove trailing space 2021-11-10 10:11:49 -06:00
Ehren Kret 2e1e380418 Also update description text of boost badge 2021-11-10 10:10:53 -06:00
Ehren Kret d07f0b4f71 Update badge description text 2021-11-10 09:51:51 -06:00
Jon Chambers aaa2a6eef1 Break down push latency metrics by VOIP/not-VOIP and optionally by client version 2021-11-10 10:35:41 -05:00
Jon Chambers b1f56c3324 Resolve formatting complaints 2021-11-10 10:15:14 -05:00
Jon Chambers da5c0ae4b6 Enable Payments Beta for more country codes 2021-11-10 10:15:14 -05:00
Jon Chambers 1e1394560d Check length of cancellation reason list before getting reason codes 2021-11-09 11:42:44 -05:00
Jon Chambers bae0196bcf Tolerate null UUID attribute values 2021-11-09 11:00:27 -05:00
Jon Chambers 3398955c1a Add basic support for phone number identifiers 2021-11-09 10:23:08 -05:00
Chris Eager a1b925d1e0 Reduce visiblity on one constructor 2021-11-08 14:30:52 -07:00
Chris Eager 31c0c3275f Use the latest and in config, @JsonCreator 2021-11-08 14:30:52 -07:00
Chris Eager 0a4392f700 Streamline ExternalServiceCredentialsGenerator construction 2021-11-08 14:30:52 -07:00
Chris Eager eb86986cf4 Add /v2/directory/auth endpoint 2021-11-08 14:30:52 -07:00
Ehren Kret 1053a47e42 Add an exception mapper for CompletionExceptions 2021-11-04 19:12:31 -05:00
Ehren Kret 99b1f48e0e Copy badges from existing account on re-reg 2021-11-04 18:00:47 -05:00
Jon Chambers c21eb6aa50 Update to the latest abusive message filter 2021-11-01 15:27:14 -04:00
Jon Chambers 6dddf54222 Consolidate rate-limit counters 2021-11-01 14:33:05 -04:00
Jon Chambers 9e3eb2319e Update to the latest abusive message filter 2021-11-01 13:12:23 -04:00
Jon Chambers 1d8dcda815 Update to the latest abusive message filter 2021-11-01 12:45:50 -04:00
Jon Chambers ee52a84262 Update to the latest abusive message filter 2021-11-01 12:19:21 -04:00
Jon Chambers eb51e81faa Configuration-only change 2021-11-01 11:41:26 -04:00
Jon Chambers d41ef1df18 Configuration-only change 2021-11-01 11:27:02 -04:00
Jon Chambers 66d47aff2c Update deployment configuration 2021-11-01 11:10:19 -04:00
Jon Chambers c931103712 Remove unused utility classes 2021-11-01 10:51:47 -04:00
Jon Chambers ad1aeea74b Add an abusive message filter interface and submodule 2021-11-01 10:51:47 -04:00
Ehren Kret ae7f8af03e Mark boost and subscription configuration as not null 2021-10-28 16:12:23 -07:00
Ehren Kret a52c91a665 Add names to subscription levels 2021-10-28 14:48:44 -07:00
Ehren Kret 94bf3a3902 Extract logic for created header controlled resource bundles 2021-10-28 14:26:53 -07:00
Ehren Kret f5a539e128 Add subscriptions resource bundle 2021-10-28 14:15:20 -07:00
Ehren Kret 24480b2090 Add endpoint to fetch information on boost badges 2021-10-26 14:05:59 -07:00
Ehren Kret a124b3abe9 Fix encoding of boost amounts 2021-10-26 08:08:09 -07:00
Ehren Kret 090d722b61 Add method to retrieve receipt credentials for a boost payment 2021-10-25 14:54:40 -07:00
Ehren Kret d27ec6fe8d Create boost create endpoint 2021-10-25 12:58:32 -07:00
Jon Chambers 8d34f3447b Drop an unused registration meter 2021-10-25 14:52:21 -04:00
Ehren Kret 72b52965b9 Expand definition of badge SVGs 2021-10-25 10:28:02 -07:00
Jon Chambers ae7077c643 Refresh accounts from storage when checking for device state changes after requests 2021-10-22 14:02:28 -04:00
Jon Chambers 11598e855f Count non-normalized or impossible numbers 2021-10-22 14:01:54 -04:00
Jon Chambers 534c577f59 Enforce phone number normalization when creating accounts or changing numbers 2021-10-22 14:01:54 -04:00
Jon Chambers 7762afc497 Add a method for verifying that numbers are normalized in addition to being dialable 2021-10-22 14:01:54 -04:00
Jon Chambers a3fe4b9980 Update/parameterize ValidNumberTest 2021-10-22 14:01:54 -04:00
Jon Chambers 598599cd14 Use a default reportMessage configuration if not specified 2021-10-21 15:34:57 -05:00
Ehren Kret 07cd69ab34 Add endpoint for fetching boost amounts 2021-10-21 13:56:35 -05:00
Jon Chambers 3b764bed7a Make DynamicConfigurationManager generic 2021-10-19 11:52:29 -04:00
Jon Chambers c91d5c2fdb Count reported messages per sender 2021-10-19 11:47:54 -04:00
Jon Chambers 40f7e6e994 Remove unused imports 2021-10-19 11:47:54 -04:00
Ehren Kret ee9aa9ce12 Round up by days on receipt expiration 2021-10-18 12:11:27 -05:00
Ehren Kret 08304bf375 Validate GetReceiptCredentialsRequest 2021-10-18 11:57:18 -05:00
Ehren Kret 8b8c6237be Use last subscription created at time as a subscription generation number 2021-10-14 12:06:19 -05:00
Ehren Kret c0837104cd Bring badge configuration into levels information 2021-10-14 11:35:18 -05:00
Jon Chambers fe21d014f7 Remove legacy rate-limiting tools 2021-10-14 11:43:18 -04:00
Ehren Kret 75c5032cd3 Add method to set default payment method 2021-10-14 10:37:12 -05:00
Jon Chambers f84e7aebd0 Count numbers that can't be normalized because another account has the normalized form of the number 2021-10-14 11:10:12 -04:00
Jon Chambers c379a3d297 Remove deprecated counters 2021-10-14 10:52:20 -04:00
Jon Chambers eedeaaecee Update rate-limiting for requests matching specific criteria 2021-10-14 10:42:16 -04:00
Ehren Kret 64eeb1e361 Move to using collections for sprites and svgs for badges 2021-10-13 23:25:39 -05:00
Ehren Kret e07597eba7 Add initial text for donation badges 2021-10-13 23:08:02 -05:00
Ehren Kret 5f2656710c Update badge configuration to new style 2021-10-13 22:58:57 -05:00
Ehren Kret 1af53f2612 Simplify getLevels API 2021-10-13 13:28:31 -05:00
Ehren Kret c89cfa4927 Move property setting above servlet construction 2021-10-13 13:17:07 -05:00
Ehren Kret bbde93a3c7 Enable unwrapping of CompletionStage 2021-10-13 11:46:20 -05:00
Ehren Kret b01b76d78f First pass at subscriptions API
This is an incomplete first pass at building the subscriptions API. More API endpoints are still to be added along with controller tests.
2021-10-12 21:23:20 -05:00
Ehren Kret 75c22038eb Create empty Badges_en.properties file 2021-10-11 22:27:30 -05:00
Jon Chambers 3c1705994d Count accounts with non-normalized phone numbers 2021-10-11 10:13:08 -04:00
Jon Chambers 439d2f5df8 Update to libphonenumber 8.12.33 2021-10-05 15:19:59 -04:00
Chris Eager d2bc3c7360 Add dynamic configuration to disable directory reconciler 2021-10-04 14:38:47 -07:00
Jon Chambers 9734433f00 Use the default SecureRandom algorithm for tests 2021-10-04 11:37:32 -04:00
Ehren Kret 5bd08800bb Remove public modifier from test class 2021-10-01 14:27:07 -05:00
Ehren Kret 3032415141 Add receipt redemption API to chat server 2021-10-01 12:44:47 -05:00
Jon Chambers ba58a95a0f Add support for changing phone numbers 2021-10-01 10:15:33 -04:00
Jon Chambers aa4bd92fee Lazy-load scripts; fall back to eval if evalsha returns NOSCRIPT 2021-09-29 16:08:17 -04:00
Jon Chambers f37c76dab1 Drop LuaScript 2021-09-29 16:08:17 -04:00
Jon Chambers 863969c77c Resolve ClusterLuaScript warnings/suggestions 2021-09-29 16:08:17 -04:00
Jon Chambers 2383aaaa3d Update ClusterLuaScript formatting 2021-09-29 16:08:17 -04:00
Jon Chambers 715d1157ad Reject Redis commands when disconnected 2021-09-29 16:07:26 -04:00
Jon Chambers 4aaae3f445 Use a single configuration URI for Redis clusters 2021-09-29 14:46:09 -04:00
Jon Chambers 8359ef73f4 Cycle all connected websockets on any device or account enabled state change 2021-09-29 14:18:35 -04:00
Jon Chambers c6bb649adb Simplify map-building logic 2021-09-29 14:18:35 -04:00
Jon Chambers e333cbd94d Close websockets on account deletion 2021-09-29 14:11:16 -04:00
Ehren Kret cc9a825279 Remove checked in generated code 2021-09-29 13:10:27 -05:00
Chris Eager 5189cbe5c7 apply editorconfig formatting 2021-09-29 10:31:39 -07:00
Chris Eager d1d6e5c652 Filter stale ephemeral messages from cache 2021-09-29 10:31:39 -07:00
Chris Eager 3e5087e60b Remove obsolete ephemeral queue handling 2021-09-29 10:31:39 -07:00
Chris Eager 93c3cea912 Clean up old "ephemeral" metrics 2021-09-29 10:31:39 -07:00
Chris Eager e824b861d4 Drop accounts table 2021-09-29 10:31:20 -07:00
Chris Eager e8dd1e0bf2 Fixup formatting 2021-09-29 10:31:20 -07:00
Ehren Kret 533afa4c6e Upgrade to zkgroup 0.8.1 2021-09-28 09:28:28 -05:00
Ehren Kret 559026933d Add low and high detail svgs to badges 2021-09-27 17:00:09 -05:00
Ehren Kret 7864405efd Remove single URL in favor of density based sprite sheets 2021-09-27 16:50:18 -05:00
Jon Chambers a5575902de Pause if we bump into an exception while trying to persist messages 2021-09-27 13:38:17 -04:00
Ehren Kret 5b9bce59e1 Upgrade to zkgroup 0.8.0 2021-09-24 15:56:28 -05:00
Ehren Kret 041aed2d72 Remove zkgroup enabled flag
The last remnants of a time before zkgroup have been swept away.
2021-09-23 09:24:06 -05:00
Jon Chambers 02a296e500 Use a MIME Base64 decoder for provisioning messages 2021-09-22 16:30:44 -04:00
Jon Chambers 98e41f9a37 Improve Redis exception handling 2021-09-22 10:31:39 -04:00
Chris Eager 6a71d369e2 More Accounts cleanup
* Remove `AccountStore`
* Clean up `AccountsDynamoDb#delete`
* Rename `AccountsDynamoDb` → `Accounts`
* Remove unused configuration
* Move Accounts scan page size to static configuration
* Remove disabled tests and related methods
2021-09-21 15:25:16 -07:00
Ehren Kret 75661fa800 Add JavaTimeModule 2021-09-20 16:42:38 -05:00
Ehren Kret df5498e1c0 Add test for self badge fetching 2021-09-20 16:42:38 -05:00
Ehren Kret c0af911197 Show invisible badges to query for self 2021-09-20 16:42:38 -05:00
Ehren Kret 44bc90e5ab Return a badge with additional properties when fetching your own profile 2021-09-20 16:42:38 -05:00
Ehren Kret 5c1cde1b28 Add visibility modifying helper method in AccountBadge 2021-09-20 16:41:09 -05:00
Ehren Kret 3172b571c6 Move "testing" string into BadgeConfiguration 2021-09-20 16:41:09 -05:00
Ehren Kret 17e8b77e88 Add unit test for setting badges 2021-09-20 16:41:09 -05:00
Ehren Kret 8011935a3b Fix compilation issues created by constructor changes 2021-09-20 16:41:09 -05:00
Ehren Kret 3f3052c23c Remove isZkEnabled 2021-09-20 16:41:09 -05:00
Ehren Kret 8f17f45339 Reorder creating of testing badges
Need their expiration time to always get refreshed on set so reorder
how they're created to ensure that's the case.
2021-09-20 16:41:09 -05:00
Ehren Kret 009e2eeb97 Enable editing of badges on profiles 2021-09-20 16:41:09 -05:00
Ehren Kret c70fa48835 Fix indentation of ProfileController#setProfile 2021-09-20 16:41:09 -05:00
Ehren Kret bd5f5c407b Add method to merge badge ids list into a profile 2021-09-20 16:41:09 -05:00
Ehren Kret 2bc573a53d Add additional test badges for translation 2021-09-20 16:41:09 -05:00
Ehren Kret 537d61d5bd Add badges to CreateProfileRequest
This will permit users to set the order and visibility of badges on
their profile.
2021-09-20 16:41:09 -05:00
Jon Chambers 09519ae942 Only retry websocket sending if the client is still connected 2021-09-20 14:24:07 -04:00
Chris Eager 2a67b2e610 Remove Accounts Postgres 2021-09-20 11:10:24 -07:00
Chris Eager 8161f55a82 Add dynamic configuration for setting Dynamo as primary 2021-09-17 13:28:45 -07:00
Chris Eager ecee189ad8 Add AccountDatabaseCrawler.dedicatedDynamoMigrationCrawler 2021-09-17 11:27:20 -07:00
Jon Chambers ef0900f3ac Add .tx/ to .gitignore 2021-09-17 13:43:52 -04:00
Fedor Indutny 383d744bd8 Log the error message when retrying queue send 2021-09-16 18:03:42 -04:00
Jon Chambers c2ba8ab562 Identify receipt destinations by UUID instead of e164 2021-09-16 10:47:03 -04:00
Chris Eager cd49ea43c0 Use queryPaginator when loading messages 2021-09-16 10:46:37 -04:00
Chris Eager 53aa45a2bb Use queryPaginator when deleting messages 2021-09-16 10:46:37 -04:00
Chris Eager 83e0a19561 Migrate MessagesDynamoDbRule to MessagesDynamoDbExtension 2021-09-16 10:46:37 -04:00
Jon Chambers 6a5d475198 Add a "refresh websocket on number change" provider 2021-09-16 10:37:34 -04:00
Jon Chambers 49ccbba2e3 Generalize the "watch for websockets that need to be refreshed" listener 2021-09-16 10:37:34 -04:00
Fedor Indutnyy 41735ed40e Introduce queueDrainRetry counter metric 2021-09-16 10:30:19 -04:00
Ehren Kret 2d11a433c9 Wrap all calls to getAcceptableLanguages
ContainerRequestContext#getAcceptableLanguages throws a
ProcessingException if the header has invalid values in it. Rather than
error out of the request entirely with the exception handler for that
exception, we just treat it as though no Accept-Languages header was
specified.
2021-09-16 09:28:21 -05:00
Ehren Kret e79ab2521f Rename field in ConfiguredProfileBadgeConverter 2021-09-16 09:28:21 -05:00
Ehren Kret fb1f99da87 Add a method to enable a badge for all accounts 2021-09-16 09:28:21 -05:00
Ehren Kret 08c6a8c2e5 Add category to badges 2021-09-16 09:28:21 -05:00
Ehren Kret ce3835e176 Rename id to name in the configuration 2021-09-16 09:28:21 -05:00
Ehren Kret 39f6eadbb9 Add test for add and remove badges 2021-09-16 09:28:21 -05:00
Ehren Kret 16dba09b61 Handle merging badges when adding to account 2021-09-16 09:28:21 -05:00
Ehren Kret d5ebf2f2ed Rename name to id in Account#removeBadge 2021-09-16 09:28:21 -05:00
Ehren Kret 8a8e6e7b49 Rename name to id in the stored badge information and expose id in the profile endpoint 2021-09-16 09:28:21 -05:00
Ehren Kret 34e21b9f7b Change name to id on AccountBadge
This makes it distinct from the localized name field on the Badge
entity that is returned.
2021-09-16 09:28:21 -05:00
Ehren Kret 98a31d1474 Switch ProfileController to the actual badge converter 2021-09-16 09:28:21 -05:00
Chris Eager 72a0c1be0f Tune mismatch logging 2021-09-15 16:46:10 -07:00
Ehren Kret 5b25e38e41 Ensure badges are in ordered collections 2021-09-15 16:20:15 -05:00
Chris Eager 2fb400280b Remove unused parameter from deleteMessageByDestinationAndGuid 2021-09-15 10:14:08 -07:00
Ehren Kret 79ad09524e Implement the ProfileBadgeConverter interface 2021-09-15 10:32:20 -05:00
Chris Eager 5f8accb492 Add acceptable languages from request to variable 2021-09-14 17:43:39 -07:00
Chris Eager 6fcadc2297 Handle exception reading Accept-Language header 2021-09-13 18:07:16 -07:00
Chris Eager 3f4e1522eb Only put accounts that exhaust optimistic lock retries in migration retry table 2021-09-13 15:00:01 -07:00
Graeme Connell 6304c84cdb Add ContactDiscoveryWriterTest based on mock. 2021-09-13 15:20:21 -06:00
Chris Eager 894297efa9 Add dynamic configuration for doing a mismatch post-check 2021-09-13 13:54:19 -07:00
Chris Eager a51a7a0901 Add MigrationMismatchedAccounts to AccountsManager 2021-09-13 13:54:19 -07:00
Chris Eager 372e131e25 Update PaymentsControllerTest 2021-09-13 09:58:42 -07:00
Chris Eager 6c6e6a4975 Switch to actions/setup-java’s built-in caching 2021-09-13 09:40:44 -07:00
Sophiah Ho cd66a1ceb7 fix merge issue after 2021 Aug 15 commit d1735c7e57 (#137) 2021-09-13 09:39:11 -07:00
Sophiah Ho feb59deb28 Use BigDecimal instead of Double for currency rate calculations (#134)
use BigDecimal instead of double for accuracy
2021-09-10 16:15:57 -05:00
Nicolas Remond 489519a982 Use Map.of() for statically defined map 2021-09-10 14:27:18 -05:00
Dambar Pun a96865d0f5 Update RedisInputStream.java
Fix code style
2021-09-10 14:24:52 -05:00
Blake Irvin 12e11609a9 pin 3rd-party Actions dep by full SHA
This change follows GitHub's security-hardening guidance. By pinning to a full SHA, we reduce our exposure to supply-chain attacks where a malicious party could compromise the 3rd-party Actions repo, commit malicious code, and then mutate an existing git tag to redirect to a SHA containing the malicious commit.

See https://docs.github.com/en/actions/learn-github-actions/security-hardening-for-github-actions#using-third-party-actions for more.
2021-09-10 14:22:11 -05:00
F2theK 5b404095b0 Added missing config entries
Starting server with sample.yml throws errors because of missing elements in config - not just empty ones
2021-09-10 14:19:10 -05:00
Chris Eager 6a6555e2d5 Add metrics for AuthEnablementRequestEventListener displacements 2021-09-10 12:01:05 -07:00
Chris Eager 49489a6021 Re-check mismatched accounts after a delay, to avoid false positives from concurrent requests 2021-09-10 11:31:44 -07:00
Chris Eager 8cd93d68e4 Add MetricsUtil 2021-09-10 11:31:44 -07:00
Chris Eager f3b9a8d97f Add account to migration retry table on transient dynamo failure 2021-09-10 11:30:49 -07:00
Chris Eager b91a69d8b3 Add asynchronous chunk pre-read to AccountDatabaseCrawler 2021-09-10 11:14:11 -07:00
Chris Eager 624e40e3b7 Add separate AccountsDatabaseCrawler for DynamoDB migration 2021-09-10 11:14:11 -07:00
Chris Eager 23a076a204 Update Account#getNextDeviceId to not reuse disable device’s IDs 2021-09-10 10:48:48 -07:00
Chris Eager 016141a05d Add DevicesHelper 2021-09-10 10:48:48 -07:00
Graeme Connell a064b25a14 Fix CDS writer to use AccountsManager. 2021-09-10 11:36:06 -06:00
Ehren Kret bd40e32f3b Send acceptable languages instead of request into the profile badge converter 2021-09-10 10:53:04 -05:00
Ehren Kret 81a21c0d5f Use @NotNull since @NotEmpty doesn't support URL 2021-09-10 10:49:31 -05:00
Ehren Kret 6478210330 Update configuration for badges to use URL instead of String 2021-09-10 10:49:31 -05:00
Ehren Kret aa1c37fe26 Create configuration for badges 2021-09-10 10:14:16 -05:00
Ehren Kret 6ee23b0186 Create resource bundle for badges 2021-09-10 10:11:56 -05:00
Jon Chambers 40eb445592 Add a command to set a user's discoverability in CDS 2021-09-10 10:34:20 -04:00
Jon Chambers ce7d687205 Add a shutdown monitor that publishes shutdown state as a metric 2021-09-08 16:37:05 -04:00
Chris Eager 758900b7a8 Register AuthEnablementApplicationEventListener 2021-09-08 13:11:09 -07:00
Chris Eager 539b62a829 Add request event listener that handles device.isEnabled changes 2021-09-08 13:11:09 -07:00
Jon Chambers 2866f1b213 Include e164 in account creation (whoami) responses 2021-09-07 16:52:32 -04:00
Ehren Kret fc1465c05d Wire up stored account badges to the profile endpoints 2021-09-07 15:51:29 -05:00
Ehren Kret bc887ec6fa Add visibility flag to badge storage 2021-09-07 15:50:29 -05:00
Ehren Kret 84b3d324bb Creates a storage object for badges 2021-09-07 15:49:41 -05:00
Ehren Kret fc10108788 Make fields final in Badge entity 2021-09-07 15:39:48 -05:00
Ehren Kret fbbc1bec58 Add badge entity to profile 2021-09-07 15:39:48 -05:00
Graeme Connell 2059bb5ef8 Update test to handle read-then-write in ContactDiscoveryWriter. 2021-09-07 13:41:47 -06:00
gram-signalandChris Eager b080a5db4d Get-and-set accounts, since other updates may have made them stale.
Co-authored-by: Chris Eager <79161849+eager-signal@users.noreply.github.com>
2021-09-07 13:41:47 -06:00
Graeme Connell b4aabd799b Canonical discoverability writing. 2021-09-07 13:41:47 -06:00
Jon Chambers 92f035bc2a Add a "change number" device/account capability 2021-09-07 15:07:30 -04:00
Chris Eager 18a6df34bd Add timers to processChunk and deleteRecentlyDeletedUuids 2021-09-03 14:54:51 -07:00
Chris Eager b1274125c9 Add start/chunk/sleep logging to crawler 2021-09-03 14:54:51 -07:00
Chris Eager dceebc1c8d Consistently use whenCompleteAsync(…, migrationThreadPool) 2021-09-03 14:02:51 -07:00
Chris Eager 6aadb4b458 Parameterize registration lock constructor when updating account attributes 2021-09-03 14:02:27 -07:00
Fedor Indutnyy 703405b874 Start WebSocket before registering its presence 2021-08-27 16:41:07 -04:00
Jon Chambers d1735c7e57 Retire AmbiguousIdentifier 2021-08-27 13:40:46 -04:00
Jon Chambers 1f815b49dd Measure APNs rejections by reason 2021-08-27 11:52:29 -04:00
Jon Chambers a9339b7037 Update to Pushy 0.15.0 2021-08-27 11:52:29 -04:00
Jon Chambers f2c6ca182d Include the current server version in the tag list for Dropwizard metrics 2021-08-27 11:52:11 -04:00
Jon Chambers b946c27a20 Remove a metric aggregator 2021-08-27 11:52:11 -04:00
Ehren Kret 9fd6358518 Add missing section to end of LICENSE file 2021-08-26 12:55:56 -05:00
Jon Chambers 8a8a848fac Record error metrics from Twilio Verify 2021-08-26 12:22:17 -04:00
Chris Eager aeb9f67266 Migrate MessageSenderTest to JUnit 5 2021-08-25 12:25:10 -05:00
Chris Eager e08c5a412e Insert ephemeral messages in the standard cache queue 2021-08-25 12:25:10 -05:00
Chris Eager a7443a9ece Don’t persist ephemeral messages; clear ephemeral field when sending to clients 2021-08-25 11:17:00 -05:00
Chris Eager 54fe3b9a43 Update TextSecure.proto 2021-08-25 11:17:00 -05:00
Ehren Kret ba522b1691 Clean redis message cache structure 2021-08-24 10:30:52 -05:00
Jon Chambers 739c5bf22c Add a counter to estimate announcement group adoption 2021-08-23 17:31:34 -04:00
Chris Eager 7cdadeb791 Register circuit breaker metrics for FaultTolerantPubSubConnection 2021-08-23 15:49:19 -05:00
Chris Eager dadf43b93e Consolidate directory reconciliation on v3 endpoints 2021-08-19 14:18:38 -05:00
Chris Eager bd820e6d2e Migrate websocket-resources test to JUnit 5 and .editorconfig 2021-08-19 14:09:57 -05:00
Chris Eager 19f7b207b7 Extract configuration for WebSocket max message sizes 2021-08-19 14:09:57 -05:00
Chris Eager a398e2269c Update AccountsManager mismatch comparison 2021-08-19 14:08:48 -05:00
Chris Eager 2e28fb97a4 Delete DynamoDB accounts with invalid UUIDs in AccountsManager#create 2021-08-19 14:05:21 -05:00
Chris Eager 5c68d83a93 Add integration test for re-registration with and without Dynamo DB 2021-08-19 14:05:21 -05:00
Chris Eager 0b7c3ad745 .editorconfig formatting 2021-08-16 16:32:26 -05:00
Chris Eager 0cde06557d Catch and log unexpected exceptions keyspace notification executor service 2021-08-16 16:32:26 -05:00
Chris Eager 27844fe692 Add JUnit 5 RedisClusterExtension 2021-08-13 12:07:04 -05:00
Ehren Kret 779051ef9f Add minThreads(64) to multiRecipientMessageExecutor 2021-08-12 13:03:40 -05:00
Ehren Kret d13741fbd5 Change from using parallel streams to using an ExecutorService 2021-08-12 12:05:01 -05:00
Ehren Kret f7f870fe62 Execute send multi-recipient message loop in parallel 2021-08-12 12:05:01 -05:00
Chris Eager de59aa099d Add uncaught exception handler 2021-08-12 11:10:05 -05:00
Ehren Kret 57a478b898 Remove unused local variable 2021-08-12 10:26:23 -05:00
Ehren Kret 3e8d79e147 Remove unused lua script to delete by sender and timestamp 2021-08-11 17:38:55 -05:00
Ehren Kret a46045d987 Remove unused methods that delete messages by sender and timestamp 2021-08-11 17:30:39 -05:00
Ehren Kret 662c905b80 Remove deprecated delete messages endpoint
DELETE /v1/messages/{source}/{timestamp} has been deprecated a long
time and has minimal usage each day at this point. Dropping support
for this endpoint to improve message cache storage flexibility.
2021-08-11 16:17:44 -05:00
Chris Eager 31022aeb79 Use refreshing AuthenticatedAccount for @Auth 2021-08-11 14:52:25 -05:00
Chris Eager b3e6a50dee Send 508 status code for legacy clients that produce rate limit challenges 2021-08-11 11:57:30 -05:00
Chris Eager d29764d11f Only process updates for enabled devices in PushFeedbackProcessor 2021-08-11 11:54:42 -05:00
Chris Eager f8e4f6727a Reorder crawler listeners so updates happen after read-only processing 2021-08-11 11:54:20 -05:00
Ehren Kret 63d05df8a3 Fix indentation 2021-08-10 10:02:04 -05:00
Ehren Kret 52d13d1d62 Remove unused lua script 2021-08-10 10:02:04 -05:00
Ehren Kret f58a320223 Remove unused method from MessagesCache 2021-08-10 10:02:04 -05:00
Chris Eager 3e01bc1174 Add metric for content-length header distribution 2021-08-06 14:41:16 -05:00
Jon Chambers d1ada7f998 Revert "Continue to verify rate limiters by e164 during UUID migration period"
This reverts commit ce5edbb7fc.
2021-08-06 14:33:59 -05:00
Chris Eager 095fc8140e Increase from default binary message size 2021-08-06 12:56:34 -05:00
Jon Chambers 73c368ea86 Use UUIDs instead of e164s to associate accounts with push notifications. 2021-08-04 14:38:28 -04:00
Jon Chambers ce5edbb7fc Continue to verify rate limiters by e164 during UUID migration period 2021-08-04 14:15:21 -04:00
Jon Chambers a680639718 Use UUIDs as rate limiter keys. 2021-08-04 14:15:21 -04:00
Ehren Kret becf6afbdd Block until all UUID bytes are read or EOF 2021-08-03 17:59:48 -05:00
Ehren Kret 1dda015c6a Update multi-recipient message sending to handle unrestricted destinations 2021-08-03 17:31:39 -05:00
Chris Eager a0427ecf8c Update s3-upload-maven-plugin to 1.6-SNAPSHOT 2021-08-03 11:04:29 -05:00
Chris Eager cfd31e98ff Move version comparison to after more meaningful checks 2021-08-03 11:03:41 -05:00
Jon Chambers bcb89924b4 Simplify optimistic write logic 2021-08-03 11:54:26 -04:00
Ehren Kret 23f9199439 Fix dependency resolution error for commons-logging 2021-08-02 13:14:44 -05:00
Ehren Kret 1f6318a919 Rename constant 2021-08-02 13:14:44 -05:00
Ehren Kret b0667b258b Implement EnterpriseRecaptchaClient 2021-08-02 13:14:44 -05:00
Ehren Kret 4c3a48f5be Use more specific prefix for recaptcha transition 2021-08-02 13:14:44 -05:00
Ehren Kret 33fb7a72de Use RecaptchaClient interface 2021-08-02 13:14:44 -05:00
Ehren Kret 2c808e369c Create a transitional recaptcha client for upgrading 2021-08-02 13:14:44 -05:00
Ehren Kret 906d0be382 Setup recaptcha client interface 2021-08-02 13:14:44 -05:00
Ehren Kret 1c9a3c6105 Bringing in Google Cloud Recaptcha Enterprise libraries 2021-08-02 13:14:44 -05:00
Ehren Kret 2aaddd721f Rename existing captcha client 2021-08-02 13:14:44 -05:00
Jon Chambers 4e2284b83f Retire old GV2 adoption metrics. 2021-08-02 12:51:49 -05:00
Chris Eager d5d9978e48 Use non-stale account in mutator when adding a new device 2021-08-02 11:38:03 -05:00
Chris Eager d45659ac76 Reduce contention when updating device.lastSeen 2021-08-02 11:26:15 -05:00
Jon Chambers 13a07dc6cd Drop the active user counter. 2021-07-29 15:40:27 -04:00
Chris Eager 51b7a8d868 Add excluded E164s configuration to pre-registration experiment 2021-07-29 14:16:40 -05:00
Chris Eager df9c0051c9 Reconcile inactive and undiscoverable accounts when using v3 endpoints 2021-07-29 10:56:44 -05:00
Jon Chambers 331ff83cd5 Drop legacy PIN-based registration lock plumbing 2021-07-29 11:51:14 -04:00
Jon Chambers 44838d6238 Verify that nobody's addressing API calls by e164 any more. 2021-07-29 11:50:36 -04:00
Chris Eager 5400abb065 Better support unhandled exception logging on websocket requests 2021-07-28 14:06:09 -05:00
Jon Chambers f47fefb73e Lock accounts for the duration of deletion operations. 2021-07-27 13:12:39 -04:00
Jon Chambers cdef745a7a Drop a not-very-helpful metric (logging works better in this case). 2021-07-27 13:12:39 -04:00
Jon Chambers 1a1eab4ec0 Also clear profiles on re-registration. 2021-07-27 13:05:54 -04:00
Jon Chambers 3a966ef345 Reuse account UUIDs when registering an account with a recently-deleted e164. 2021-07-27 13:05:54 -04:00
Jon Chambers be20c04cd8 Identify accounts for which to delete keys by UUID. 2021-07-27 13:05:54 -04:00
Jon Chambers d09dcc90fe Add methods for getting, clearing, locking recently-deleted account records. 2021-07-27 13:05:54 -04:00
Sophiah Ho 1fd1207bf6 Prevent unit tests from failing for machines with a non-US default Locale 2021-07-27 13:01:48 -04:00
Jon Chambers 0117fc12c7 Actually increment the moved "new user" counter. 2021-07-27 12:09:51 -04:00
Jon Chambers ef9a7fda9a Publish outstanding SQS operation count as a gauge. 2021-07-27 11:15:41 -04:00
Chris Eager 13447df1e0 Update validation for NotNull items in IncomingMessagesList 2021-07-27 10:39:30 -04:00
Jon Chambers 3608c5bfb0 Wait for outstanding requests to be resolved before shutting down the directory queue. 2021-07-27 10:36:53 -04:00
Jon Chambers 34dbff6786 Switch to an async SQS client. 2021-07-27 10:36:53 -04:00
Jon Chambers a6066bfc2f Migrate DirectoryQueueTest to JUnit 5. 2021-07-27 10:36:53 -04:00
Jon Chambers 8579190cdf Consolidate account creation/directory updates into AccountsManager 2021-07-27 10:27:47 -04:00
Chris Eager 917f667229 Remove AccountController and KeysController from websocket 2021-07-26 14:27:43 -05:00
Chris Eager 317a551bdb Migrate MetricsRequestEventListenerTest to JUnit 5 2021-07-26 12:06:29 -05:00
Chris Eager 27e9271473 Add request path and user agent to unhandled exception logging 2021-07-26 12:06:29 -05:00
Fedor Indutny 11dff6c546 more controllers 2021-07-26 12:06:17 -05:00
Fedor Indutny e6712937ca fix indent 2021-07-26 12:06:17 -05:00
Fedor Indutny cf8887bb5a Provide more WebSocket endpoints 2021-07-26 12:06:17 -05:00
Chris Eager 696340f780 Migrate DeviceControllerTest to JUnit 5 2021-07-26 11:18:17 -05:00
Chris Eager 86ddcbaa08 Migrate CertificateControllerTest to JUnit 5 2021-07-26 11:18:17 -05:00
Chris Eager 2144d2a8d8 Migrate AttachmentControllerTest to JUnit 5 2021-07-26 11:18:17 -05:00
Chris Eager f7af861b31 Migrate SecureStorageControllerTest to JUnit 5 2021-07-26 11:18:17 -05:00
Chris Eager 208a09b3ae Migrate RemoteConfigControllerTest to JUnit 5 2021-07-26 11:18:17 -05:00
Chris Eager 831023e41d Migrate PaymentsControllerTest to JUnit 5 2021-07-26 11:18:17 -05:00
Chris Eager ff627793d6 Migrate DirectoryControllerTest to JUnit 5 2021-07-26 11:18:17 -05:00
Chris Eager f971c76a99 Migrate StickerControllerTest to JUnit 5 2021-07-26 11:18:17 -05:00
Chris Eager 8f41176c76 Enable "sms" transport for +98 2021-07-26 10:40:05 -05:00
Ehren Kret 31bbbbb5e0 Raise default message TTL to 14 days 2021-07-20 14:08:08 -05:00
Jon Chambers effcd6038d Also record dimensional metrics for circuit breakers and retries. 2021-07-19 16:56:16 -04:00
Jon Chambers 12be7d49c2 Clear one-time pre-keys on re-registration. 2021-07-19 10:05:01 -04:00
Jon Chambers 14863b575e Clear one-time pre-keys when a device is unlinked. 2021-07-19 10:05:01 -04:00
Jon Chambers 32a95f96ff Add a pessimistic locking system for operations on recently-deleted account records 2021-07-16 16:52:58 -04:00
Jon Chambers b757d4b334 Measure how many "send message" requests are still using e164-based addressing. 2021-07-16 16:52:58 -04:00
Chris Eager bd03d910fe Set authenticated device after updating last seen 2021-07-16 16:52:58 -04:00
Chris Eager 01ef855157 Return a non-stale account from base authenticator when last seen is updated 2021-07-16 16:52:58 -04:00
Chris Eager 817866caf3 Use fresh accounts to update in PushFeedbackProcessor 2021-07-16 16:52:58 -04:00
Chris Eager 158d65c6a7 Add optimistic locking to account updates 2021-07-16 16:52:58 -04:00
realturner 62022c7de1 Migrate AppConfig to SDK v2 to detect and use web identify token 2021-07-16 16:48:33 -04:00
Chris Eager a824b5575d Add dynamic configuration for using DynamoDB in AccountsDatabaseCrawler 2021-07-06 13:01:24 -05:00
Jon Chambers 78819d5382 Remove expiration logic when checking token validity.
The data store will no longer return tokens that have expired, and we no longer need to check for expiration in application space.
2021-07-06 11:03:49 -04:00
Jon Chambers d128bc782a Retire Postgres-backed pending account/device tables. 2021-07-06 11:03:49 -04:00
Chris Eager 530b2a310f Ensure active future is always completed 2021-07-02 15:05:11 -05:00
Chris Eager d5b0d99a54 Remove unused method 2021-07-02 15:05:11 -05:00
Chris Eager 43be72d076 Add test for ManagedPeriodicWork; fix shutdown not awaiting active execution 2021-07-02 15:05:11 -05:00
Chris Eager 9558944e22 Add needsReconciliationIndexName to sample.yml 2021-07-02 15:05:11 -05:00
Chris Eager 0f6c866c8d Update imports 2021-07-02 15:05:11 -05:00
Chris Eager bac78e9291 Switch DeletedAccountsTableCrawler metrics to a basic Metrics#summary 2021-07-02 15:05:11 -05:00
Chris Eager c22ea78672 Add crawler to process migration retry accounts 2021-07-02 15:05:11 -05:00
Chris Eager a85afe827d Avoid NPE by using scheduledFuture as the Gauge state object 2021-07-02 15:05:11 -05:00
Chris Eager abaed821ec Add additional case to unit test 2021-07-02 15:05:11 -05:00
Chris Eager 6fa9dcd954 Refactor to use shared recurringJobExecutor 2021-07-02 15:05:11 -05:00
Chris Eager 819d59cd79 Update reconciliation crawler to use secondary index 2021-07-02 15:05:11 -05:00
Chris Eager 2f88f0eedb Refactor to use single threaded scheduled executor 2021-07-02 15:05:11 -05:00
Chris Eager 74ff491671 Rename ManagedPeriodicWorkCache to ManagedPeriodicWorkLock 2021-07-02 15:05:11 -05:00
Chris Eager eac48a6617 Don’t delete accounts after reconciling 2021-07-02 15:05:11 -05:00
Chris Eager 19617c14f8 Improved logging in ManagedPeriodcWork 2021-07-02 15:05:11 -05:00
Chris Eager fc7291c3e8 Migrate DeletedAccountsTableCrawler to ManagedPeriodicWork 2021-07-02 15:05:11 -05:00
Chris Eager 88db808298 Add abstract ManagedPeriodicWork 2021-07-02 15:05:11 -05:00
Chris Eager 5193abdab3 Add DeletedAccountsTableCrawler 2021-07-02 15:05:11 -05:00
Chris Eager a315c9be92 Add DeletedAccounts DynamoDB table 2021-07-02 15:05:11 -05:00
Chris Eager fc1541591a Add AbstractDynamoDbStore#scan 2021-07-02 15:05:11 -05:00
Chris Eager ae97c4db9f Use editorconfig in AbstractDynamoDbStore 2021-07-02 15:05:11 -05:00
Chris Eager 26bc5973b5 Clear message queue before and after removing a device 2021-07-02 10:48:42 -05:00
Chris Eager e52b8c8423 Implement DatadogConfig in DatadogConfiguration 2021-07-02 10:48:05 -05:00
Jon Chambers 7395489bac Add tests for pending account/device managers. 2021-07-02 11:30:13 -04:00
Jon Chambers b384ed7f5c Add a counter for requests for delivery certificates with/without e164s. 2021-07-01 10:59:10 -04:00
Jon Chambers e3afcae7d3 Gather data to verify safety of retiring legacy reglock system. 2021-07-01 10:58:47 -04:00
Jon Chambers 9faeed7b20 Count E164 authentications versus UUID authentications. 2021-07-01 10:51:34 -04:00
Jon Chambers 49adcca80e Use Optional.isEmpty(). 2021-07-01 10:51:34 -04:00
Jon Chambers 49c43a6816 Simplify distribution summary for "days since last seen." 2021-07-01 10:51:34 -04:00
Jon Chambers 84f85ae098 Collapse various account meters into a single, multi-dimensional counter. 2021-07-01 10:51:34 -04:00
Jon Chambers 3d581941ab Add plumbing and configuration to migrate pending accounts/devices to DynamoDB. 2021-07-01 10:50:52 -04:00
Jon Chambers d2d39baede Add a DynamoDB-backed stored verification code store. 2021-07-01 10:50:52 -04:00
Jon Chambers 111f5ba024 Use java.time classes for stored verification code expiration; add tests. 2021-07-01 10:50:52 -04:00
Jon Chambers ce3fb7fa99 Extract a common base class for verification code store tests. 2021-07-01 10:50:52 -04:00
Jon Chambers fc421d3f21 Introduce a common interface for verification code stores. 2021-07-01 10:50:52 -04:00
Jon Chambers 71bea759c6 Consolidate StoredVerificationCode constructors. 2021-07-01 10:50:52 -04:00
Jon Chambers bf1dd791a5 Drop caching for pending accounts/devices. 2021-07-01 10:50:52 -04:00
658 changed files with 51885 additions and 60504 deletions

No files matched your search

-1396
View File
File diff suppressed because it is too large. Load diff
-4
View File
@@ -1,4 +0,0 @@
# Copyright 2021 Signal Messenger, LLC
# SPDX-License-Identifier: AGPL-3.0-only
custom: https://signal.org/donate/
-24
View File
@@ -1,24 +0,0 @@
name: Service CI
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: 11
- name: Cache local Maven repository
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Build with Maven
run: mvn -e -B verify
-23
View File
@@ -1,23 +0,0 @@
target
local.properties
.idea
*.iml
run.sh
*~
local.yml
config/production.yml
config/federated.yml
config/staging.yml
config/testing.yml
config/deploy.properties
/service/config/production.yml
/service/config/federated.yml
/service/config/staging.yml
/service/config/testing.yml
/service/config/deploy.properties
/service/dependency-reduced-pom.xml
.opsmanage
put.sh
deployer-staging.properties
deployer-production.properties
deployer.log
Binary file not shown.
Binary file not shown.
-9
View File
@@ -1,9 +0,0 @@
<extensions xmlns="http://maven.apache.org/EXTENSIONS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/EXTENSIONS/1.0.0 http://maven.apache.org/xsd/core-extensions-1.0.0.xsd">
<extension>
<groupId>fr.brouillard.oss</groupId>
<artifactId>jgitver-maven-plugin</artifactId>
<version>1.7.1</version>
</extension>
</extensions>
-14
View File
@@ -1,14 +0,0 @@
<configuration xmlns="http://jgitver.github.io/maven/configuration/1.1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://jgitver.github.io/maven/configuration/1.1.0 https://jgitver.github.io/maven/configuration/jgitver-configuration-v1_1_0.xsd">
<useDirty>true</useDirty>
<useDefaultBranchingPolicy>false</useDefaultBranchingPolicy>
<branchPolicies>
<branchPolicy>
<pattern>(.*)</pattern>
<transformations>
<transformation>IGNORE</transformation>
</transformations>
</branchPolicy>
</branchPolicies>
</configuration>
+44
View File
@@ -615,3 +615,47 @@ reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If your software can interact with users remotely through a computer
network, you should also make sure that it provides a way for users to
get its source. For example, if your program is a web application, its
interface could display a "Source" link that leads users to an archive
of the code. There are many ways you could offer source, and different
solutions will be better for different programs; see section 13 for the
specific requirements.
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU AGPL, see
<https://www.gnu.org/licenses/>.
-26
View File
@@ -1,26 +0,0 @@
Signal-Server
=================
Documentation
-------------
Looking for protocol documentation? Check out the website!
https://signal.org/docs/
Cryptography Notice
------------
This distribution includes cryptographic software. The country in which you currently reside may have restrictions on the import, possession, use, and/or re-export to another country, of encryption software.
BEFORE using any encryption software, please check your country's laws, regulations and policies concerning the import, possession, or use, and re-export of encryption software, to see if this is permitted.
See <http://www.wassenaar.org/> for more information.
The U.S. Government Department of Commerce, Bureau of Industry and Security (BIS), has classified this software as Export Commodity Control Number (ECCN) 5D002.C.1, which includes information security software using or performing cryptographic functions with asymmetric algorithms.
The form and manner of this distribution makes it eligible for export under the License Exception ENC Technology Software Unrestricted (TSU) exception (see the BIS Export Administration Regulations, Section 740.13) for both object code and source code.
License
---------------------
Copyright 2013-2021 Signal Messenger, LLC
Licensed under the AGPLv3: https://www.gnu.org/licenses/agpl-3.0.html
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

-52
View File
@@ -1,52 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>TextSecureServer</artifactId>
<groupId>org.whispersystems.textsecure</groupId>
<version>JGITVER</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>gcm-sender-async</artifactId>
<dependencies>
<dependency>
<groupId>io.github.resilience4j</groupId>
<artifactId>resilience4j-retry</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-nop</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
</project>
@@ -1,9 +0,0 @@
/*
* Copyright 2013-2020 Signal Messenger, LLC
* SPDX-License-Identifier: AGPL-3.0-only
*/
package org.whispersystems.gcm.server;
public class AuthenticationFailedException extends Exception {
}
@@ -1,9 +0,0 @@
/*
* Copyright 2013-2020 Signal Messenger, LLC
* SPDX-License-Identifier: AGPL-3.0-only
*/
package org.whispersystems.gcm.server;
public class InvalidRequestException extends Exception {
}
@@ -1,144 +0,0 @@
/*
* Copyright 2013-2020 Signal Messenger, LLC
* SPDX-License-Identifier: AGPL-3.0-only
*/
package org.whispersystems.gcm.server;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.whispersystems.gcm.server.internal.GcmRequestEntity;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
public class Message {
private static final ObjectMapper objectMapper = new ObjectMapper();
private final String collapseKey;
private final Long ttl;
private final Boolean delayWhileIdle;
private final Map<String, String> data;
private final List<String> registrationIds;
private final String priority;
private Message(String collapseKey, Long ttl, Boolean delayWhileIdle,
Map<String, String> data, List<String> registrationIds,
String priority)
{
this.collapseKey = collapseKey;
this.ttl = ttl;
this.delayWhileIdle = delayWhileIdle;
this.data = data;
this.registrationIds = registrationIds;
this.priority = priority;
}
public String serialize() throws JsonProcessingException {
GcmRequestEntity requestEntity = new GcmRequestEntity(collapseKey, ttl, delayWhileIdle,
data, registrationIds, priority);
return objectMapper.writeValueAsString(requestEntity);
}
/**
* Construct a new Message using a Builder.
* @return A new Builder.
*/
public static Builder newBuilder() {
return new Builder();
}
public static class Builder {
private String collapseKey = null;
private Long ttl = null;
private Boolean delayWhileIdle = null;
private Map<String, String> data = null;
private List<String> registrationIds = new LinkedList<>();
private String priority = null;
private Builder() {}
/**
* @param collapseKey The GCM collapse key to use (optional).
* @return The Builder.
*/
public Builder withCollapseKey(String collapseKey) {
this.collapseKey = collapseKey;
return this;
}
/**
* @param seconds The TTL (in seconds) for this message (optional).
* @return The Builder.
*/
public Builder withTtl(long seconds) {
this.ttl = seconds;
return this;
}
/**
* @param delayWhileIdle Set GCM delay_while_idle (optional).
* @return The Builder.
*/
public Builder withDelayWhileIdle(boolean delayWhileIdle) {
this.delayWhileIdle = delayWhileIdle;
return this;
}
/**
* Set a key in the GCM JSON payload delivered to the application (optional).
* @param key The key to set.
* @param value The value to set.
* @return The Builder.
*/
public Builder withDataPart(String key, String value) {
if (data == null) {
data = new HashMap<>();
}
data.put(key, value);
return this;
}
/**
* Set the destination GCM registration ID (mandatory).
* @param registrationId The destination GCM registration ID.
* @return The Builder.
*/
public Builder withDestination(String registrationId) {
this.registrationIds.clear();
this.registrationIds.add(registrationId);
return this;
}
/**
* Set the GCM message priority (optional).
*
* @param priority Valid values are "normal" and "high."
* On iOS, these correspond to APNs priority 5 and 10.
* @return The Builder.
*/
public Builder withPriority(String priority) {
this.priority = priority;
return this;
}
/**
* Construct a message object.
*
* @return An immutable message object, as configured by this builder.
*/
public Message build() {
if (registrationIds.isEmpty()) {
throw new IllegalArgumentException("You must specify a destination!");
}
return new Message(collapseKey, ttl, delayWhileIdle, data, registrationIds, priority);
}
}
}
@@ -1,80 +0,0 @@
/*
* Copyright 2013-2020 Signal Messenger, LLC
* SPDX-License-Identifier: AGPL-3.0-only
*/
package org.whispersystems.gcm.server;
/**
* The result of a GCM send operation.
*/
public class Result {
private final String canonicalRegistrationId;
private final String messageId;
private final String error;
Result(String canonicalRegistrationId, String messageId, String error) {
this.canonicalRegistrationId = canonicalRegistrationId;
this.messageId = messageId;
this.error = error;
}
/**
* Returns the "canonical" GCM registration ID for this destination.
* See GCM documentation for details.
* @return The canonical GCM registration ID.
*/
public String getCanonicalRegistrationId() {
return canonicalRegistrationId;
}
/**
* @return If a "canonical" GCM registration ID is present in the response.
*/
public boolean hasCanonicalRegistrationId() {
return canonicalRegistrationId != null && !canonicalRegistrationId.isEmpty();
}
/**
* @return The assigned GCM message ID, if successful.
*/
public String getMessageId() {
return messageId;
}
/**
* @return The raw error string, if present.
*/
public String getError() {
return error;
}
/**
* @return If the send was a success.
*/
public boolean isSuccess() {
return messageId != null && !messageId.isEmpty() && (error == null || error.isEmpty());
}
/**
* @return If the destination GCM registration ID is no longer registered.
*/
public boolean isUnregistered() {
return "NotRegistered".equals(error);
}
/**
* @return If messages to this device are being throttled.
*/
public boolean isThrottled() {
return "DeviceMessageRateExceeded".equals(error);
}
/**
* @return If the destination GCM registration ID is invalid.
*/
public boolean isInvalidRegistrationId() {
return "InvalidRegistration".equals(error);
}
}
@@ -1,154 +0,0 @@
/*
* Copyright 2013-2020 Signal Messenger, LLC
* SPDX-License-Identifier: AGPL-3.0-only
*/
package org.whispersystems.gcm.server;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.common.annotations.VisibleForTesting;
import io.github.resilience4j.retry.IntervalFunction;
import io.github.resilience4j.retry.Retry;
import io.github.resilience4j.retry.RetryConfig;
import org.whispersystems.gcm.server.internal.GcmResponseEntity;
import org.whispersystems.gcm.server.internal.GcmResponseListEntity;
import java.io.IOException;
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse.BodyHandlers;
import java.security.SecureRandom;
import java.time.Duration;
import java.util.List;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.CompletionException;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeoutException;
/**
* The main interface to sending GCM messages. Thread safe.
*
* @author Moxie Marlinspike
*/
public class Sender {
private static final String PRODUCTION_URL = "https://fcm.googleapis.com/fcm/send";
private final String authorizationHeader;
private final URI uri;
private final Retry retry;
private final ObjectMapper mapper;
private final ScheduledExecutorService executorService;
private final HttpClient[] clients = new HttpClient[10];
private final SecureRandom random = new SecureRandom();
/**
* Construct a Sender instance.
*
* @param apiKey Your application's GCM API key.
*/
public Sender(String apiKey, ObjectMapper mapper) {
this(apiKey, mapper, 10);
}
/**
* Construct a Sender instance with a specified retry count.
*
* @param apiKey Your application's GCM API key.
* @param retryCount The number of retries to attempt on a network error or 500 response.
*/
public Sender(String apiKey, ObjectMapper mapper, int retryCount) {
this(apiKey, mapper, retryCount, PRODUCTION_URL);
}
@VisibleForTesting
public Sender(String apiKey, ObjectMapper mapper, int retryCount, String url) {
this.mapper = mapper;
this.executorService = Executors.newSingleThreadScheduledExecutor();
this.uri = URI.create(url);
this.authorizationHeader = String.format("key=%s", apiKey);
this.retry = Retry.of("fcm-sender", RetryConfig.custom()
.maxAttempts(retryCount)
.intervalFunction(IntervalFunction.ofExponentialRandomBackoff(Duration.ofMillis(100), 2.0))
.retryOnException(this::isRetryableException)
.build());
for (int i=0;i<clients.length;i++) {
this.clients[i] = HttpClient.newBuilder()
.version(HttpClient.Version.HTTP_2)
.connectTimeout(Duration.ofSeconds(10))
.build();
}
}
private boolean isRetryableException(Throwable throwable) {
while (throwable instanceof CompletionException) {
throwable = throwable.getCause();
}
return throwable instanceof ServerFailedException ||
throwable instanceof TimeoutException ||
throwable instanceof IOException;
}
/**
* Asynchronously send a message.
*
* @param message The message to send.
* @return A future.
*/
public CompletableFuture<Result> send(Message message) {
try {
HttpRequest request = HttpRequest.newBuilder()
.uri(uri)
.header("Authorization", authorizationHeader)
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(message.serialize()))
.timeout(Duration.ofSeconds(10))
.build();
return retry.executeCompletionStage(executorService,
() -> getClient().sendAsync(request, BodyHandlers.ofByteArray())
.thenApply(response -> {
switch (response.statusCode()) {
case 400: throw new CompletionException(new InvalidRequestException());
case 401: throw new CompletionException(new AuthenticationFailedException());
case 204:
case 200: return response.body();
default: throw new CompletionException(new ServerFailedException("Bad status: " + response.statusCode()));
}
})
.thenApply(responseBytes -> {
try {
List<GcmResponseEntity> responseList = mapper.readValue(responseBytes, GcmResponseListEntity.class).getResults();
if (responseList == null || responseList.size() == 0) {
throw new CompletionException(new IOException("Empty response list!"));
}
GcmResponseEntity responseEntity = responseList.get(0);
return new Result(responseEntity.getCanonicalRegistrationId(),
responseEntity.getMessageId(),
responseEntity.getError());
} catch (IOException e) {
throw new CompletionException(e);
}
})).toCompletableFuture();
} catch (JsonProcessingException e) {
return CompletableFuture.failedFuture(e);
}
}
public Retry getRetry() {
return retry;
}
private HttpClient getClient() {
return clients[random.nextInt(clients.length)];
}
}
@@ -1,15 +0,0 @@
/*
* Copyright 2013-2020 Signal Messenger, LLC
* SPDX-License-Identifier: AGPL-3.0-only
*/
package org.whispersystems.gcm.server;
public class ServerFailedException extends Exception {
public ServerFailedException(String message) {
super(message);
}
public ServerFailedException(Exception e) {
super(e);
}
}
@@ -1,46 +0,0 @@
/*
* Copyright 2013-2020 Signal Messenger, LLC
* SPDX-License-Identifier: AGPL-3.0-only
*/
package org.whispersystems.gcm.server.internal;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
import java.util.Map;
@JsonInclude(JsonInclude.Include.NON_NULL)
public class GcmRequestEntity {
@JsonProperty(value = "collapse_key")
private String collapseKey;
@JsonProperty(value = "time_to_live")
private Long ttl;
@JsonProperty(value = "delay_while_idle")
private Boolean delayWhileIdle;
@JsonProperty(value = "data")
private Map<String, String> data;
@JsonProperty(value = "registration_ids")
private List<String> registrationIds;
@JsonProperty
private String priority;
public GcmRequestEntity(String collapseKey, Long ttl, Boolean delayWhileIdle,
Map<String, String> data, List<String> registrationIds,
String priority)
{
this.collapseKey = collapseKey;
this.ttl = ttl;
this.delayWhileIdle = delayWhileIdle;
this.data = data;
this.registrationIds = registrationIds;
this.priority = priority;
}
}
@@ -1,31 +0,0 @@
/*
* Copyright 2013-2020 Signal Messenger, LLC
* SPDX-License-Identifier: AGPL-3.0-only
*/
package org.whispersystems.gcm.server.internal;
import com.fasterxml.jackson.annotation.JsonProperty;
public class GcmResponseEntity {
@JsonProperty(value = "message_id")
private String messageId;
@JsonProperty(value = "registration_id")
private String canonicalRegistrationId;
@JsonProperty
private String error;
public String getMessageId() {
return messageId;
}
public String getCanonicalRegistrationId() {
return canonicalRegistrationId;
}
public String getError() {
return error;
}
}
@@ -1,19 +0,0 @@
/*
* Copyright 2013-2020 Signal Messenger, LLC
* SPDX-License-Identifier: AGPL-3.0-only
*/
package org.whispersystems.gcm.server.internal;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
public class GcmResponseListEntity {
@JsonProperty
private List<GcmResponseEntity> results;
public List<GcmResponseEntity> getResults() {
return results;
}
}
@@ -1,49 +0,0 @@
/*
* Copyright 2013-2020 Signal Messenger, LLC
* SPDX-License-Identifier: AGPL-3.0-only
*/
package org.whispersystems.gcm.server;
import org.junit.Test;
import java.io.IOException;
import static org.junit.Assert.assertEquals;
import static org.whispersystems.gcm.server.util.JsonHelpers.jsonFixture;
public class MessageTest {
@Test
public void testMinimal() throws IOException {
Message message = Message.newBuilder()
.withDestination("1")
.build();
assertEquals(message.serialize(), jsonFixture("fixtures/message-minimal.json"));
}
@Test
public void testComplete() throws IOException {
Message message = Message.newBuilder()
.withDestination("1")
.withCollapseKey("collapse")
.withDelayWhileIdle(true)
.withTtl(10)
.withPriority("high")
.build();
assertEquals(message.serialize(), jsonFixture("fixtures/message-complete.json"));
}
@Test
public void testWithData() throws IOException {
Message message = Message.newBuilder()
.withDestination("2")
.withDataPart("key1", "value1")
.withDataPart("key2", "value2")
.build();
assertEquals(message.serialize(), jsonFixture("fixtures/message-data.json"));
}
}
@@ -1,200 +0,0 @@
/*
* Copyright 2013-2020 Signal Messenger, LLC
* SPDX-License-Identifier: AGPL-3.0-only
*/
package org.whispersystems.gcm.server;
import static com.github.tomakehurst.wiremock.client.WireMock.aResponse;
import static com.github.tomakehurst.wiremock.client.WireMock.any;
import static com.github.tomakehurst.wiremock.client.WireMock.anyRequestedFor;
import static com.github.tomakehurst.wiremock.client.WireMock.anyUrl;
import static com.github.tomakehurst.wiremock.client.WireMock.equalTo;
import static com.github.tomakehurst.wiremock.client.WireMock.ok;
import static com.github.tomakehurst.wiremock.client.WireMock.postRequestedFor;
import static com.github.tomakehurst.wiremock.client.WireMock.urlEqualTo;
import static com.github.tomakehurst.wiremock.client.WireMock.verify;
import static com.github.tomakehurst.wiremock.core.WireMockConfiguration.options;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import static org.whispersystems.gcm.server.util.FixtureHelpers.fixture;
import static org.whispersystems.gcm.server.util.JsonHelpers.jsonFixture;
import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.PropertyAccessor;
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.github.tomakehurst.wiremock.client.CountMatchingStrategy;
import com.github.tomakehurst.wiremock.junit.WireMockRule;
import java.io.IOException;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
import org.junit.Rule;
import org.junit.Test;
public class SenderTest {
@Rule
public WireMockRule wireMock = new WireMockRule(options().dynamicPort().dynamicHttpsPort());
private static final ObjectMapper mapper = new ObjectMapper();
static {
mapper.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.NONE);
mapper.setVisibility(PropertyAccessor.FIELD, JsonAutoDetect.Visibility.ANY);
mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
}
@Test
public void testSuccess() throws InterruptedException, ExecutionException, TimeoutException, IOException {
wireMock.stubFor(any(anyUrl())
.willReturn(aResponse()
.withStatus(200)
.withBody(fixture("fixtures/response-success.json"))));
Sender sender = new Sender("foobarbaz", mapper, 10, "http://localhost:" + wireMock.port() + "/gcm/send");
CompletableFuture<Result> future = sender.send(Message.newBuilder().withDestination("1").build());
Result result = future.get(10, TimeUnit.SECONDS);
assertTrue(result.isSuccess());
assertFalse(result.isThrottled());
assertFalse(result.isUnregistered());
assertEquals(result.getMessageId(), "1:08");
assertNull(result.getError());
assertNull(result.getCanonicalRegistrationId());
verify(1, postRequestedFor(urlEqualTo("/gcm/send"))
.withHeader("Authorization", equalTo("key=foobarbaz"))
.withHeader("Content-Type", equalTo("application/json"))
.withRequestBody(equalTo(jsonFixture("fixtures/message-minimal.json"))));
}
@Test
public void testBadApiKey() throws InterruptedException, TimeoutException {
wireMock.stubFor(any(anyUrl())
.willReturn(aResponse()
.withStatus(401)));
Sender sender = new Sender("foobar", mapper, 10, "http://localhost:" + wireMock.port() + "/gcm/send");
CompletableFuture<Result> future = sender.send(Message.newBuilder().withDestination("1").build());
try {
future.get(10, TimeUnit.SECONDS);
throw new AssertionError();
} catch (ExecutionException ee) {
assertTrue(ee.getCause() instanceof AuthenticationFailedException);
}
verify(1, anyRequestedFor(anyUrl()));
}
@Test
public void testBadRequest() throws TimeoutException, InterruptedException {
wireMock.stubFor(any(anyUrl())
.willReturn(aResponse()
.withStatus(400)));
Sender sender = new Sender("foobarbaz", mapper, 10, "http://localhost:" + wireMock.port() + "/gcm/send");
CompletableFuture<Result> future = sender.send(Message.newBuilder().withDestination("1").build());
try {
future.get(10, TimeUnit.SECONDS);
throw new AssertionError();
} catch (ExecutionException e) {
assertTrue(e.getCause() instanceof InvalidRequestException);
}
verify(1, anyRequestedFor(anyUrl()));
}
@Test
public void testServerError() throws TimeoutException, InterruptedException {
wireMock.stubFor(any(anyUrl())
.willReturn(aResponse()
.withStatus(503)));
Sender sender = new Sender("foobarbaz", mapper, 3, "http://localhost:" + wireMock.port() + "/gcm/send");
CompletableFuture<Result> future = sender.send(Message.newBuilder().withDestination("1").build());
try {
future.get(10, TimeUnit.SECONDS);
throw new AssertionError();
} catch (ExecutionException ee) {
assertTrue(ee.getCause() instanceof ServerFailedException);
}
verify(3, anyRequestedFor(anyUrl()));
}
@Test
public void testServerErrorRecovery() throws InterruptedException, ExecutionException, TimeoutException {
wireMock.stubFor(any(anyUrl()).willReturn(aResponse().withStatus(503)));
Sender sender = new Sender("foobarbaz", mapper, 4, "http://localhost:" + wireMock.port() + "/gcm/send");
CompletableFuture<Result> future = sender.send(Message.newBuilder().withDestination("1").build());
// up to three failures can happen, with 100ms exponential backoff
// if we end up using the fourth, and finaly try, it would be after ~700 ms
CompletableFuture.delayedExecutor(300, TimeUnit.MILLISECONDS).execute(() ->
wireMock.stubFor(any(anyUrl())
.willReturn(aResponse()
.withStatus(200)
.withBody(fixture("fixtures/response-success.json"))))
);
Result result = future.get(10, TimeUnit.SECONDS);
verify(new CountMatchingStrategy(CountMatchingStrategy.GREATER_THAN, 1), anyRequestedFor(anyUrl()));
assertTrue(result.isSuccess());
assertFalse(result.isThrottled());
assertFalse(result.isUnregistered());
assertEquals(result.getMessageId(), "1:08");
assertNull(result.getError());
assertNull(result.getCanonicalRegistrationId());
}
@Test
public void testNetworkError() throws TimeoutException, InterruptedException {
wireMock.stubFor(any(anyUrl())
.willReturn(ok()));
Sender sender = new Sender("foobarbaz", mapper ,2, "http://localhost:" + wireMock.port() + "/gcm/send");
wireMock.stop();
CompletableFuture<Result> future = sender.send(Message.newBuilder().withDestination("1").build());
try {
future.get(10, TimeUnit.SECONDS);
} catch (ExecutionException e) {
assertTrue(e.getCause() instanceof IOException);
}
}
@Test
public void testNotRegistered() throws InterruptedException, ExecutionException, TimeoutException {
wireMock.stubFor(any(anyUrl()).willReturn(aResponse().withStatus(200)
.withBody(fixture("fixtures/response-not-registered.json"))));
Sender sender = new Sender("foobarbaz", mapper,2, "http://localhost:" + wireMock.port() + "/gcm/send");
CompletableFuture<Result> future = sender.send(Message.newBuilder()
.withDestination("2")
.withDataPart("message", "new message!")
.build());
Result result = future.get(10, TimeUnit.SECONDS);
assertFalse(result.isSuccess());
assertTrue(result.isUnregistered());
assertFalse(result.isThrottled());
assertEquals(result.getError(), "NotRegistered");
}
}
@@ -1,89 +0,0 @@
/*
* Copyright 2013-2020 Signal Messenger, LLC
* SPDX-License-Identifier: AGPL-3.0-only
*/
package org.whispersystems.gcm.server;
import static com.github.tomakehurst.wiremock.client.WireMock.aResponse;
import static com.github.tomakehurst.wiremock.client.WireMock.post;
import static com.github.tomakehurst.wiremock.client.WireMock.stubFor;
import static com.github.tomakehurst.wiremock.client.WireMock.urlPathEqualTo;
import static junit.framework.TestCase.assertTrue;
import static org.whispersystems.gcm.server.util.FixtureHelpers.fixture;
import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.PropertyAccessor;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.github.tomakehurst.wiremock.core.WireMockConfiguration;
import com.github.tomakehurst.wiremock.junit.WireMockRule;
import java.util.LinkedList;
import java.util.List;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
public class SimultaneousSenderTest {
@Rule
public WireMockRule wireMock = new WireMockRule(WireMockConfiguration.options().dynamicPort().dynamicHttpsPort());
private static final ObjectMapper mapper = new ObjectMapper();
static {
mapper.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.NONE);
mapper.setVisibility(PropertyAccessor.FIELD, JsonAutoDetect.Visibility.ANY);
mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
}
@Test
public void testSimultaneousSuccess() throws TimeoutException, InterruptedException, ExecutionException, JsonProcessingException {
stubFor(post(urlPathEqualTo("/gcm/send"))
.willReturn(aResponse()
.withStatus(200)
.withBody(fixture("fixtures/response-success.json"))));
Sender sender = new Sender("foobarbaz", mapper, 2, "http://localhost:" + wireMock.port() + "/gcm/send");
List<CompletableFuture<Result>> results = new LinkedList<>();
for (int i=0;i<1000;i++) {
results.add(sender.send(Message.newBuilder().withDestination("1").build()));
}
for (CompletableFuture<Result> future : results) {
Result result = future.get(60, TimeUnit.SECONDS);
if (!result.isSuccess()) {
throw new AssertionError(result.getError());
}
}
}
@Test
@Ignore
public void testSimultaneousFailure() throws TimeoutException, InterruptedException {
stubFor(post(urlPathEqualTo("/gcm/send"))
.willReturn(aResponse()
.withStatus(503)));
Sender sender = new Sender("foobarbaz", mapper, 2, "http://localhost:" + wireMock.port() + "/gcm/send");
List<CompletableFuture<Result>> futures = new LinkedList<>();
for (int i=0;i<1000;i++) {
futures.add(sender.send(Message.newBuilder().withDestination("1").build()));
}
for (CompletableFuture<Result> future : futures) {
try {
Result result = future.get(60, TimeUnit.SECONDS);
} catch (ExecutionException e) {
assertTrue(e.getCause().toString(), e.getCause() instanceof ServerFailedException);
}
}
}
}
@@ -1,47 +0,0 @@
/*
* Copyright 2013-2020 Signal Messenger, LLC
* SPDX-License-Identifier: AGPL-3.0-only
*/
package org.whispersystems.gcm.server.util;
import com.google.common.base.Charsets;
import com.google.common.io.Resources;
import java.io.IOException;
import java.nio.charset.Charset;
/**
* A set of helper method for fixture files.
*/
public class FixtureHelpers {
private FixtureHelpers() { /* singleton */ }
/**
* Reads the given fixture file from the classpath (e. g. {@code src/test/resources})
* and returns its contents as a UTF-8 string.
*
* @param filename the filename of the fixture file
* @return the contents of {@code src/test/resources/{filename}}
* @throws IllegalArgumentException if an I/O error occurs.
*/
public static String fixture(String filename) {
return fixture(filename, Charsets.UTF_8);
}
/**
* Reads the given fixture file from the classpath (e. g. {@code src/test/resources})
* and returns its contents as a string.
*
* @param filename the filename of the fixture file
* @param charset the character set of {@code filename}
* @return the contents of {@code src/test/resources/{filename}}
* @throws IllegalArgumentException if an I/O error occurs.
*/
private static String fixture(String filename, Charset charset) {
try {
return Resources.toString(Resources.getResource(filename), charset).trim();
} catch (IOException e) {
throw new IllegalArgumentException(e);
}
}
}
@@ -1,30 +0,0 @@
/*
* Copyright 2013-2020 Signal Messenger, LLC
* SPDX-License-Identifier: AGPL-3.0-only
*/
package org.whispersystems.gcm.server.util;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import java.io.IOException;
import static org.whispersystems.gcm.server.util.FixtureHelpers.fixture;
public class JsonHelpers {
private static final ObjectMapper objectMapper = new ObjectMapper();
public static String asJson(Object object) throws JsonProcessingException {
return objectMapper.writeValueAsString(object);
}
public static <T> T fromJson(String value, Class<T> clazz) throws IOException {
return objectMapper.readValue(value, clazz);
}
public static String jsonFixture(String filename) throws IOException {
return objectMapper.writeValueAsString(objectMapper.readValue(fixture(filename), JsonNode.class));
}
}
@@ -1,7 +0,0 @@
{
"priority" : "high",
"collapse_key" : "collapse",
"time_to_live" : 10,
"delay_while_idle" : true,
"registration_ids" : ["1"]
}
@@ -1,7 +0,0 @@
{
"data" : {
"key1" : "value1",
"key2" : "value2"
},
"registration_ids" : ["2"]
}
@@ -1,3 +0,0 @@
{
"registration_ids" : ["1"]
}
@@ -1,8 +0,0 @@
{ "multicast_id": 216,
"success": 0,
"failure": 1,
"canonical_ids": 0,
"results": [
{ "error": "NotRegistered"}
]
}
@@ -1,8 +0,0 @@
{ "multicast_id": 108,
"success": 1,
"failure": 0,
"canonical_ids": 0,
"results": [
{ "message_id": "1:08" }
]
}
@@ -1,8 +0,0 @@
<configuration>
<!-- Turning down the wiremock logging -->
<logger name="com.github.tomakehurst.wiremock" level="WARN"/>
<logger name="wiremock.org" level="ERROR"/>
<logger name="WireMock" level="WARN"/>
<!-- wiremock has per endpoint servlet logging -->
<logger name="/" level="WARN"/>
</configuration>
+291
View File
@@ -0,0 +1,291 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Protobuf module documentation</title>
<link rel="stylesheet" href="static/mystyles.css" />
<script src="static/fontawesome.js"></script>
<script src="static/lunr.js"></script>
<script src="static/theme.js"></script>
</head>
<body>
<div class="container">
<nav class="level pt-6 mb-5 pb-2 bottom-border">
<div class="level-left">
<p class="level-item has-text-centered is-size-3 has-text-weight-medium">
<a class="link is-info" href="index.html">
Protobuf module documentation
</a>
</p>
</div>
<div class="level-right">
<form action="search.html" class="mr-2 has-text-centered">
<input type="text" name="query" class="input mr-3 navbar-search-query-input" placeholder="Search">
<input type="submit" class="button is-primary mr-5" value="Search" />
</form>
<p class="level-item has-text-centered is-size-5">
<a href="" class="link is-info mr-5" target="_blank">
<span>Source</span>
</a>
<button class="theme-toggle" id="theme-toggle" title="Toggles light & dark" aria-label="auto" aria-live="polite" type="button">
<svg class="sun-and-moon" aria-hidden="true" width="24" height="24" viewBox="0 0 24 24">
<mask class="moon" id="moon-mask">
<rect x="0" y="0" width="100%" height="100%" fill="white" />
<circle cx="24" cy="10" r="6" fill="black" />
</mask>
<circle class="sun" cx="12" cy="12" r="6" mask="url(#moon-mask)" fill="currentColor" />
<g class="sun-beams" stroke="currentColor">
<line x1="12" y1="1" x2="12" y2="3" />
<line x1="12" y1="21" x2="12" y2="23" />
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64" />
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78" />
<line x1="1" y1="12" x2="3" y2="12" />
<line x1="21" y1="12" x2="23" y2="12" />
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36" />
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22" />
</g>
</svg>
</button>
</p>
</div>
</nav>
</div>
<div id="main-content" class="container mb-6">
<p class="mb-2">
<a style="font-size: 0.9em" href="#packages">↓ Packages</a>
</p>
<div class="block content"><h1>Chat gRPC API</h1>
<h2>Request metadata</h2>
<p>Clients may provide headers for gRPC requests via <a href="https://grpc.io/docs/guides/metadata/">gRPC metadata</a> which translates directly to HTTP/2 headers.</p>
<ul>
<li>Clients should provide a <code>User-Agent</code> header on all gRPC requests. </li>
<li>Clients may provide an <code>Accept-Language</code> on any gRPC requests.</li>
</ul>
<h2>Authentication</h2>
<p>To authenticate for a specific signal account + device, clients may provide a <a href="https://www.rfc-editor.org/info/rfc7617/">Basic authorization header</a>
on the request. The username must be the account identifier encoded in the 8-4-4-4-12 format followed by a '.'
character and then the device id serialized as a string.</p>
<p>All services either require or forbid providing authentication via an Authorization header. If the service is annotated
with the <code>require.auth</code> option <code>AUTH_ONLY_AUTHENTICATED</code>, all requests to the service must contain valid authentication
headers. If the service is annotated with the option <code>AUTH_ONLY_ANONYMOUS</code> the client must not provide an authorization
header. If provided, the request will fail with a <code>BAD_AUTHENTICATION</code> error.</p>
<h2>Errors</h2>
<p>In the gRPC protocol all errors are at the request level. That is, errors are returned in response to individual requests and do not impact other H2 streams on the same connection nor terminate the connection.</p>
<p>For errors that may be returned by any RPCs, the chat server will return the well-defined gRPC status codes returned as part of every RPC call. For errors that are specific to a particular RPC, the error must be encoded in the service proto definition and will be returned with a <code>Status</code> of <code>OK</code>.</p>
<p>Status errors include additional metadata as described in <a href="https://google.aip.dev/193#error_model">AIP-193 (google's richer error model)</a>. Every <code>Status != OK</code> response returned by the chat server's application layer will include a <code>Grpc-Status-Details-Bin</code> response trailer with a <code>google.rpc.Status</code> proto.</p>
<p>Each <code>google.rpc.Status</code> must have a status matching the top-level status on the gRPC response. Additionally, a single <code>ErrorInfo</code> must always be present in the details field of the <code>Status</code>. The <code>ErrorInfo</code> must contain a <code>domain</code> field and a <code>reason</code> field.</p>
<p>The <code>domain</code> for a status error generated by the chat server will always be <code>grpc.chat.signal.org</code></p>
<p>The server may set the <code>reason</code> to match the enum string for the <code>Status.Code</code> if there is no need to further distinguish a code. Clients should inspect the <code>reason</code>, not the <code>status</code>, for automated error handling.</p>
<p>The chat server may return the following errors from any RPC</p>
<table>
<thead>
<tr>
<th style="text-align: left;">Status Code</th>
<th style="text-align: left;">Reason</th>
<th style="text-align: left;">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;"><code>INVALID_ARGUMENT</code></td>
<td style="text-align: left;"><code>UPGRADE_REQUIRED</code></td>
<td style="text-align: left;">The client version provided in the <code>User-Agent</code> is no longer supported. The client must upgrade to use the service.</td>
</tr>
<tr>
<td style="text-align: left;"><code>INVALID_ARGUMENT</code></td>
<td style="text-align: left;"><code>CONSTRAINT_VIOLATED</code></td>
<td style="text-align: left;">The RPC argument violated a constraint that was annotated or documented in the service definition. It is always possible to check this constraint without communicating with the chat server. This always represents a client bug or out of date client. <br><br> The <code>details</code> may include a <a href="https://github.com/googleapis/googleapis/blob/8c06c1e04ae562f49f411357577c700e9142f33c/google/rpc/error_details.proto#L236"><code>BadRequest</code> message</a> that indicates additional information about the invalid field.</td>
</tr>
<tr>
<td style="text-align: left;"><code>INVALID_ARGUMENT</code></td>
<td style="text-align: left;"><code>BAD_AUTHENTICATION</code></td>
<td style="text-align: left;">The request has incorrectly set authentication credentials for the RPC. This represents a client bug where the authorization mode is not correct for the RPC. For example, <br><br> The RPC was for an anonymous service, but included an Authentication header in the RPC metadata. <br><br>The RPC should only be made by the primary device, but the request had linked device credentials.</td>
</tr>
<tr>
<td style="text-align: left;"><code>UNAUTHENTICATED</code></td>
<td style="text-align: left;"><code>INVALID_CREDENTIALS</code></td>
<td style="text-align: left;">The account credentials provided in the authorization header are not valid.</td>
</tr>
<tr>
<td style="text-align: left;"><code>RESOURCE_EXHAUSTED</code></td>
<td style="text-align: left;"><code>RESOURCE_EXHAUSTED</code></td>
<td style="text-align: left;">A server-side resource was exhausted. The <code>details</code> field may include a <a href="https://github.com/googleapis/googleapis/blob/8c06c1e04ae562f49f411357577c700e9142f33c/google/rpc/error_details.proto#L92"><code>RetryInfo</code> message</a> that includes the amount of time in seconds the client should wait before retrying the request. <br><br> If a <code>RetryInfo</code> is present, the client must wait the indicated time before retrying the request. If absent, the client should retry with an exponential backoff.</td>
</tr>
<tr>
<td style="text-align: left;"><code>ABORTED</code></td>
<td style="text-align: left;"><code>STREAM_CLOSED</code></td>
<td style="text-align: left;">The server terminated a streaming RPC for some domain specific reason. The <code>details</code> field must include a message with additional information about why the stream was closed. This message must be defined in the corresponding service proto for the streaming RPC. This status must only be returned from server-side streaming RPCs. Clients must handle a STREAM_CLOSED status even if no corresponding message is defined in the version of the proto they are targeting. Unless otherwise noted, if a stream termination message is defined, clients must handle the error at any point in the message stream.</td>
</tr>
<tr>
<td style="text-align: left;"><code>UNAVAILABLE</code></td>
<td style="text-align: left;"><code>UNAVAILABLE</code></td>
<td style="text-align: left;">There was an internal error processing the RPC. The client should retry the request with exponential backoff.</td>
</tr>
</tbody>
</table>
<h3>Logging Errors</h3>
<p>When logging error responses, clients may always log the status code, domain, and reason.</p>
<p>For errors with domain <code>grpc.chat.signal.org</code> and reason <code>CONSTRAINT_VIOLATED</code>, clients should check the <code>details</code> field for a <code>BadRequest</code> proto. If present, they should log the <code>field</code> of each violation in <code>field_violations</code>.</p>
<h3>GOAWAY</h3>
<p>In a partial or total server outage, the server may start rejecting new connection requests or terminating existing connections with an HTTP/2 GOAWAY frame with code 0x40.</p>
<p>If clients receive a 0x40 GOAWAY they should retry connections with an aggressive exponential backoff.</p></div>
<h3 id="packages" class="title is-3">
Packages
</h3>
<div class="block">This site contains the documentation for the following Protobuf packages.</div>
<div class="block">
<h4 class="title is-5">
<a href="org.signal.chat.account.html">org.signal.chat.account</a>
</h4>
<h4 class="title is-5">
<a href="org.signal.chat.attachments.html">org.signal.chat.attachments</a>
</h4>
<h4 class="title is-5">
<a href="org.signal.chat.backup.html">org.signal.chat.backup</a>
</h4>
<h4 class="title is-5">
<a href="org.signal.chat.calling.html">org.signal.chat.calling</a>
</h4>
<h4 class="title is-5">
<a href="org.signal.chat.calling.quality.html">org.signal.chat.calling.quality</a>
</h4>
<h4 class="title is-5">
<a href="org.signal.chat.challenge.html">org.signal.chat.challenge</a>
</h4>
<h4 class="title is-5">
<a href="org.signal.chat.common.html">org.signal.chat.common</a>
</h4>
<h4 class="title is-5">
<a href="org.signal.chat.credentials.html">org.signal.chat.credentials</a>
</h4>
<h4 class="title is-5">
<a href="org.signal.chat.device.html">org.signal.chat.device</a>
</h4>
<h4 class="title is-5">
<a href="org.signal.chat.donations.html">org.signal.chat.donations</a>
</h4>
<h4 class="title is-5">
<a href="org.signal.chat.errors.html">org.signal.chat.errors</a>
</h4>
<h4 class="title is-5">
<a href="org.signal.chat.keys.html">org.signal.chat.keys</a>
</h4>
<h4 class="title is-5">
<a href="org.signal.chat.messages.html">org.signal.chat.messages</a>
</h4>
<h4 class="title is-5">
<a href="org.signal.chat.payments.html">org.signal.chat.payments</a>
</h4>
<h4 class="title is-5">
<a href="org.signal.chat.profile.html">org.signal.chat.profile</a>
</h4>
<h4 class="title is-5">
<a href="org.signal.chat.purchase.html">org.signal.chat.purchase</a>
</h4>
<h4 class="title is-5">
<a href="org.signal.chat.remoteconfiguration.html">org.signal.chat.remoteconfiguration</a>
</h4>
<h4 class="title is-5">
<a href="org.signal.chat.require.html">org.signal.chat.require</a>
</h4>
<h4 class="title is-5">
<a href="org.signal.chat.tag.html">org.signal.chat.tag</a>
</h4>
</div>
</div>
<footer class="footer">
<div class="content has-text-centered">
<p>Built with <strong><a href="https://github.com/markvincze/sabledocs" target="_blank">sabledocs</a></strong>.</p>
</div>
</footer>
</body>
</html>
File diff suppressed because it is too large. Load diff
+487
View File
@@ -0,0 +1,487 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Protobuf module documentation</title>
<link rel="stylesheet" href="static/mystyles.css" />
<script src="static/fontawesome.js"></script>
<script src="static/lunr.js"></script>
<script src="static/theme.js"></script>
</head>
<body>
<div class="container">
<nav class="level pt-6 mb-5 pb-2 bottom-border">
<div class="level-left">
<p class="level-item has-text-centered is-size-3 has-text-weight-medium">
<a class="link is-info" href="index.html">
Protobuf module documentation
</a>
</p>
</div>
<div class="level-right">
<form action="search.html" class="mr-2 has-text-centered">
<input type="text" name="query" class="input mr-3 navbar-search-query-input" placeholder="Search">
<input type="submit" class="button is-primary mr-5" value="Search" />
</form>
<p class="level-item has-text-centered is-size-5">
<a href="" class="link is-info mr-5" target="_blank">
<span>Source</span>
</a>
<button class="theme-toggle" id="theme-toggle" title="Toggles light & dark" aria-label="auto" aria-live="polite" type="button">
<svg class="sun-and-moon" aria-hidden="true" width="24" height="24" viewBox="0 0 24 24">
<mask class="moon" id="moon-mask">
<rect x="0" y="0" width="100%" height="100%" fill="white" />
<circle cx="24" cy="10" r="6" fill="black" />
</mask>
<circle class="sun" cx="12" cy="12" r="6" mask="url(#moon-mask)" fill="currentColor" />
<g class="sun-beams" stroke="currentColor">
<line x1="12" y1="1" x2="12" y2="3" />
<line x1="12" y1="21" x2="12" y2="23" />
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64" />
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78" />
<line x1="1" y1="12" x2="3" y2="12" />
<line x1="21" y1="12" x2="23" y2="12" />
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36" />
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22" />
</g>
</svg>
</button>
</p>
</div>
</nav>
</div>
<div id="main-content" class="container mb-6">
<p class="mb-2">
<a style="font-size: 0.9em" href="index.html">← Back to packages</a>
</p>
<h3 class="title is-3">
Package <code>org.signal.chat.attachments</code>
</h3>
<div class="block">
<p>
<a href="#service-org.signal.chat.attachments.Attachments">
<span class="tag" style="min-width: 6em">Service</span>
<code>Attachments</code>
</a>
</p>
<p>
<a href="#message-org.signal.chat.attachments.GetStickerUploadFormRequest">
<span class="tag" style="min-width: 6em">Message</span>
<code>GetStickerUploadFormRequest</code>
</a>
</p>
<p>
<a href="#message-org.signal.chat.attachments.GetStickerUploadFormResponse">
<span class="tag" style="min-width: 6em">Message</span>
<code>GetStickerUploadFormResponse</code>
</a>
</p>
<p>
<a href="#message-org.signal.chat.attachments.GetUploadFormRequest">
<span class="tag" style="min-width: 6em">Message</span>
<code>GetUploadFormRequest</code>
</a>
</p>
<p>
<a href="#message-org.signal.chat.attachments.GetUploadFormResponse">
<span class="tag" style="min-width: 6em">Message</span>
<code>GetUploadFormResponse</code>
</a>
</p>
</div>
<div class="block">
</div>
<div class="block">
<h3 class="title is-3">
Services
</h3>
<div>
<h4 class="title is-4 type-heading" id="service-org.signal.chat.attachments.Attachments">
<a href="#service-org.signal.chat.attachments.Attachments" title="org.signal.chat.attachments.Attachments">service Attachments</a>
</h4>
<div class="block content">
<p></p>
</div>
<div class="box">
<div class="block">
<h5 class="title is-5" id="service-org.signal.chat.attachments.Attachments-GetUploadForm">
<a href="#service-org.signal.chat.attachments.Attachments-GetUploadForm">
rpc <code>GetUploadForm</code>
</a>
</h5>
Request: <code><a href="org.signal.chat.attachments.html#message-org.signal.chat.attachments.GetUploadFormRequest"><span title="org.signal.chat.attachments.GetUploadFormRequest">org.signal.chat.attachments.GetUploadFormRequest</span>
</a></code><br>
Response: <code><a href="org.signal.chat.attachments.html#message-org.signal.chat.attachments.GetUploadFormResponse"><span title="org.signal.chat.attachments.GetUploadFormResponse">org.signal.chat.attachments.GetUploadFormResponse</span>
</a></code><br>
</div>
<div class="block">
<p><p>Retrieve an upload form that can be used to perform a resumable upload</p></p>
</div>
</div>
<div class="box">
<div class="block">
<h5 class="title is-5" id="service-org.signal.chat.attachments.Attachments-GetStickerUploadForm">
<a href="#service-org.signal.chat.attachments.Attachments-GetStickerUploadForm">
rpc <code>GetStickerUploadForm</code>
</a>
</h5>
Request: <code><a href="org.signal.chat.attachments.html#message-org.signal.chat.attachments.GetStickerUploadFormRequest"><span title="org.signal.chat.attachments.GetStickerUploadFormRequest">org.signal.chat.attachments.GetStickerUploadFormRequest</span>
</a></code><br>
Response: <code><a href="org.signal.chat.attachments.html#message-org.signal.chat.attachments.GetStickerUploadFormResponse"><span title="org.signal.chat.attachments.GetStickerUploadFormResponse">org.signal.chat.attachments.GetStickerUploadFormResponse</span>
</a></code><br>
</div>
<div class="block">
<p><p>Retrieve an upload form that can be used to upload a sticker pack</p></p>
</div>
</div>
</div>
</div>
<h3 class="title is-3">
Messages
</h3>
<div class="block">
<h4 class="title is-4 type-heading" id="message-org.signal.chat.attachments.GetStickerUploadFormRequest">
<span>
<a href="#message-org.signal.chat.attachments.GetStickerUploadFormRequest" title="org.signal.chat.attachments.GetStickerUploadFormRequest">message GetStickerUploadFormRequest</a>
</span>
</h4>
<div class="block content">
</div>
<table class="table is-fullwidth is-hoverable is-bordered">
<thead>
<tr>
<th></th>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>
sticker_count
</td>
<td>
<code title="uint32">
<span>uint32</span>
</code>
</td>
<td class="content"><p>The number of stickers in the sticker pack to upload</p></td>
</tr>
</tbody>
</table>
</div>
<div class="block">
<h4 class="title is-4 type-heading" id="message-org.signal.chat.attachments.GetStickerUploadFormResponse">
<span>
<a href="#message-org.signal.chat.attachments.GetStickerUploadFormResponse" title="org.signal.chat.attachments.GetStickerUploadFormResponse">message GetStickerUploadFormResponse</a>
</span>
</h4>
<div class="block content">
</div>
<table class="table is-fullwidth is-hoverable is-bordered">
<thead>
<tr>
<th></th>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>
pack_id
</td>
<td>
<code title="string">
<span>string</span>
</code>
</td>
<td class="content"><p>A randomly-generated ID for the new sticker pack</p></td>
</tr>
<tr>
<td>2</td>
<td>
manifest_upload_form
</td>
<td>
<code title="org.signal.chat.common.S3UploadForm">
<a href="org.signal.chat.common.html#message-org.signal.chat.common.S3UploadForm"><span title="org.signal.chat.common.S3UploadForm">org.signal.chat.common.S3UploadForm</span>
</a>
</code>
</td>
<td class="content"><p>An upload form clients must use to upload a manifest for the sticker pack</p></td>
</tr>
<tr>
<td>3</td>
<td>
sticker_upload_forms
</td>
<td>
<code title="org.signal.chat.common.S3UploadForm">
repeated
<a href="org.signal.chat.common.html#message-org.signal.chat.common.S3UploadForm"><span title="org.signal.chat.common.S3UploadForm">org.signal.chat.common.S3UploadForm</span>
</a>
</code>
</td>
<td class="content"><p>Upload forms for individual stickers within the sticker pack</p></td>
</tr>
</tbody>
</table>
</div>
<div class="block">
<h4 class="title is-4 type-heading" id="message-org.signal.chat.attachments.GetUploadFormRequest">
<span>
<a href="#message-org.signal.chat.attachments.GetUploadFormRequest" title="org.signal.chat.attachments.GetUploadFormRequest">message GetUploadFormRequest</a>
</span>
</h4>
<div class="block content">
</div>
<table class="table is-fullwidth is-hoverable is-bordered">
<thead>
<tr>
<th></th>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>
uploadLength
</td>
<td>
<code title="uint64">
<span>uint64</span>
</code>
</td>
<td class="content"><p>The length of the attachment for the requested upload form. Uploads
performed with this form will be limited to the provided length.</p></td>
</tr>
</tbody>
</table>
</div>
<div class="block">
<h4 class="title is-4 type-heading" id="message-org.signal.chat.attachments.GetUploadFormResponse">
<span>
<a href="#message-org.signal.chat.attachments.GetUploadFormResponse" title="org.signal.chat.attachments.GetUploadFormResponse">message GetUploadFormResponse</a>
</span>
</h4>
<div class="block content">
</div>
<table class="table is-fullwidth is-hoverable is-bordered">
<thead>
<tr>
<th></th>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="nohover"><td style="border: 0px"></td></tr>
<tr class="nohover">
<td class="oneof-heading" colspan="4">
<div class="oneof-heading">
<strong>oneof outcome</strong>
</div>
</td>
</tr>
<tr>
<td>
1
</td>
<td>
upload_form
</td>
<td>
<code title="org.signal.chat.common.UploadForm">
<a href="org.signal.chat.common.html#message-org.signal.chat.common.UploadForm"><span title="org.signal.chat.common.UploadForm">org.signal.chat.common.UploadForm</span>
</a>
</code>
</td>
<td class="content"></td>
</tr>
<tr>
<td>
2
</td>
<td>
exceeds_max_upload_length
</td>
<td>
<code title="org.signal.chat.errors.FailedPrecondition">
<a href="org.signal.chat.errors.html#message-org.signal.chat.errors.FailedPrecondition"><span title="org.signal.chat.errors.FailedPrecondition">org.signal.chat.errors.FailedPrecondition</span>
</a>
</code>
</td>
<td class="content"><p>The request size was larger than the maximum supported upload size. The
maximum upload size is subject to change and is governed by
<code>global.attachments.maxBytes</code></p></td>
</tr>
</tbody>
</table>
</div>
</div>
<footer class="footer">
<div class="content has-text-centered">
<p>Built with <strong><a href="https://github.com/markvincze/sabledocs" target="_blank">sabledocs</a></strong>.</p>
</div>
</footer>
</body>
</html>
File diff suppressed because it is too large. Load diff
+544
View File
@@ -0,0 +1,544 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Protobuf module documentation</title>
<link rel="stylesheet" href="static/mystyles.css" />
<script src="static/fontawesome.js"></script>
<script src="static/lunr.js"></script>
<script src="static/theme.js"></script>
</head>
<body>
<div class="container">
<nav class="level pt-6 mb-5 pb-2 bottom-border">
<div class="level-left">
<p class="level-item has-text-centered is-size-3 has-text-weight-medium">
<a class="link is-info" href="index.html">
Protobuf module documentation
</a>
</p>
</div>
<div class="level-right">
<form action="search.html" class="mr-2 has-text-centered">
<input type="text" name="query" class="input mr-3 navbar-search-query-input" placeholder="Search">
<input type="submit" class="button is-primary mr-5" value="Search" />
</form>
<p class="level-item has-text-centered is-size-5">
<a href="" class="link is-info mr-5" target="_blank">
<span>Source</span>
</a>
<button class="theme-toggle" id="theme-toggle" title="Toggles light & dark" aria-label="auto" aria-live="polite" type="button">
<svg class="sun-and-moon" aria-hidden="true" width="24" height="24" viewBox="0 0 24 24">
<mask class="moon" id="moon-mask">
<rect x="0" y="0" width="100%" height="100%" fill="white" />
<circle cx="24" cy="10" r="6" fill="black" />
</mask>
<circle class="sun" cx="12" cy="12" r="6" mask="url(#moon-mask)" fill="currentColor" />
<g class="sun-beams" stroke="currentColor">
<line x1="12" y1="1" x2="12" y2="3" />
<line x1="12" y1="21" x2="12" y2="23" />
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64" />
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78" />
<line x1="1" y1="12" x2="3" y2="12" />
<line x1="21" y1="12" x2="23" y2="12" />
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36" />
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22" />
</g>
</svg>
</button>
</p>
</div>
</nav>
</div>
<div id="main-content" class="container mb-6">
<p class="mb-2">
<a style="font-size: 0.9em" href="index.html">← Back to packages</a>
</p>
<h3 class="title is-3">
Package <code>org.signal.chat.calling</code>
</h3>
<div class="block">
<p>
<a href="#service-org.signal.chat.calling.Calling">
<span class="tag" style="min-width: 6em">Service</span>
<code>Calling</code>
</a>
</p>
<p>
<a href="#message-org.signal.chat.calling.GetCallingRelaysRequest">
<span class="tag" style="min-width: 6em">Message</span>
<code>GetCallingRelaysRequest</code>
</a>
</p>
<p>
<a href="#message-org.signal.chat.calling.GetCallingRelaysResponse">
<span class="tag" style="min-width: 6em">Message</span>
<code>GetCallingRelaysResponse</code>
</a>
</p>
<p>
<a href="#message-org.signal.chat.calling.GetCallingRelaysResponse.HostnameUrlList">
<span class="tag" style="min-width: 6em">Message</span>
<code>HostnameUrlList</code>
</a>
</p>
<p>
<a href="#message-org.signal.chat.calling.GetCallingRelaysResponse.IpUrlList">
<span class="tag" style="min-width: 6em">Message</span>
<code>IpUrlList</code>
</a>
</p>
<p>
<a href="#message-org.signal.chat.calling.GetCallingRelaysResponse.Relay">
<span class="tag" style="min-width: 6em">Message</span>
<code>Relay</code>
</a>
</p>
</div>
<div class="block">
</div>
<div class="block">
<h3 class="title is-3">
Services
</h3>
<div>
<h4 class="title is-4 type-heading" id="service-org.signal.chat.calling.Calling">
<a href="#service-org.signal.chat.calling.Calling" title="org.signal.chat.calling.Calling">service Calling</a>
</h4>
<div class="block content">
<p><p>Provides methods for getting credentials and relay options for one-on-one
calls.</p></p>
</div>
<div class="box">
<div class="block">
<h5 class="title is-5" id="service-org.signal.chat.calling.Calling-GetCallingRelays">
<a href="#service-org.signal.chat.calling.Calling-GetCallingRelays">
rpc <code>GetCallingRelays</code>
</a>
</h5>
Request: <code><a href="org.signal.chat.calling.html#message-org.signal.chat.calling.GetCallingRelaysRequest"><span title="org.signal.chat.calling.GetCallingRelaysRequest">org.signal.chat.calling.GetCallingRelaysRequest</span>
</a></code><br>
Response: <code><a href="org.signal.chat.calling.html#message-org.signal.chat.calling.GetCallingRelaysResponse"><span title="org.signal.chat.calling.GetCallingRelaysResponse">org.signal.chat.calling.GetCallingRelaysResponse</span>
</a></code><br>
</div>
<div class="block">
<p><p>Retrieves TURN credentials and relay options for one-on-one calls.</p></p>
</div>
</div>
</div>
</div>
<h3 class="title is-3">
Messages
</h3>
<div class="block">
<h4 class="title is-4 type-heading" id="message-org.signal.chat.calling.GetCallingRelaysRequest">
<span>
<a href="#message-org.signal.chat.calling.GetCallingRelaysRequest" title="org.signal.chat.calling.GetCallingRelaysRequest">message GetCallingRelaysRequest</a>
</span>
</h4>
<div class="block content">
</div>
<table class="table is-fullwidth is-hoverable is-bordered">
<thead>
<tr>
<th></th>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
<div class="block">
<h4 class="title is-4 type-heading" id="message-org.signal.chat.calling.GetCallingRelaysResponse">
<span>
<a href="#message-org.signal.chat.calling.GetCallingRelaysResponse" title="org.signal.chat.calling.GetCallingRelaysResponse">message GetCallingRelaysResponse</a>
</span>
</h4>
<div class="block content">
</div>
<table class="table is-fullwidth is-hoverable is-bordered">
<thead>
<tr>
<th></th>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>
relays
</td>
<td>
<code title="org.signal.chat.calling.GetCallingRelaysResponse.Relay">
repeated
<a href="org.signal.chat.calling.html#message-org.signal.chat.calling.GetCallingRelaysResponse.Relay"><span title="org.signal.chat.calling.GetCallingRelaysResponse.Relay">org.signal.chat.calling.GetCallingRelaysResponse.Relay</span>
</a>
</code>
</td>
<td class="content"><p>A collection of calling relays a client may use for one-on-one calls.</p></td>
</tr>
</tbody>
</table>
</div>
<div class="block">
<h4 class="title is-4 type-heading" id="message-org.signal.chat.calling.GetCallingRelaysResponse.HostnameUrlList">
<span>
<a href="#message-org.signal.chat.calling.GetCallingRelaysResponse.HostnameUrlList" title="org.signal.chat.calling.GetCallingRelaysResponse.HostnameUrlList">message HostnameUrlList</a>
<br /><span style="font-size: 0.7em; font-weight: normal">(Nested in <a href="org.signal.chat.calling.html#message-org.signal.chat.calling.GetCallingRelaysResponse"><span title="org.signal.chat.calling.GetCallingRelaysResponse">org.signal.chat.calling.GetCallingRelaysResponse</span>
</a>)</span>
</span>
</h4>
<div class="block content">
</div>
<table class="table is-fullwidth is-hoverable is-bordered">
<thead>
<tr>
<th></th>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>
urls
</td>
<td>
<code title="string">
repeated
<span>string</span>
</code>
</td>
<td class="content"><p>A collection of hostname-based TURN, TURNS, or STUN URLs a client can use
to connect to a relay.</p></td>
</tr>
</tbody>
</table>
</div>
<div class="block">
<h4 class="title is-4 type-heading" id="message-org.signal.chat.calling.GetCallingRelaysResponse.IpUrlList">
<span>
<a href="#message-org.signal.chat.calling.GetCallingRelaysResponse.IpUrlList" title="org.signal.chat.calling.GetCallingRelaysResponse.IpUrlList">message IpUrlList</a>
<br /><span style="font-size: 0.7em; font-weight: normal">(Nested in <a href="org.signal.chat.calling.html#message-org.signal.chat.calling.GetCallingRelaysResponse"><span title="org.signal.chat.calling.GetCallingRelaysResponse">org.signal.chat.calling.GetCallingRelaysResponse</span>
</a>)</span>
</span>
</h4>
<div class="block content">
</div>
<table class="table is-fullwidth is-hoverable is-bordered">
<thead>
<tr>
<th></th>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>
urls
</td>
<td>
<code title="string">
repeated
<span>string</span>
</code>
</td>
<td class="content"><p>A collection of IP-based TURN, TURNS, or STUN URLs a client can use to
connect to a relay.</p></td>
</tr>
<tr>
<td>2</td>
<td>
hostname
</td>
<td>
<code title="string">
optional
<span>string</span>
</code>
</td>
<td class="content"><p>A hostname clients must use to validate the relay's TLS certificate when
connecting via an IP-based TURNS URL. May not be specified if <code>urls</code>
contains no TURNS URLs.</p></td>
</tr>
</tbody>
</table>
</div>
<div class="block">
<h4 class="title is-4 type-heading" id="message-org.signal.chat.calling.GetCallingRelaysResponse.Relay">
<span>
<a href="#message-org.signal.chat.calling.GetCallingRelaysResponse.Relay" title="org.signal.chat.calling.GetCallingRelaysResponse.Relay">message Relay</a>
<br /><span style="font-size: 0.7em; font-weight: normal">(Nested in <a href="org.signal.chat.calling.html#message-org.signal.chat.calling.GetCallingRelaysResponse"><span title="org.signal.chat.calling.GetCallingRelaysResponse">org.signal.chat.calling.GetCallingRelaysResponse</span>
</a>)</span>
</span>
</h4>
<div class="block content">
</div>
<table class="table is-fullwidth is-hoverable is-bordered">
<thead>
<tr>
<th></th>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>
username
</td>
<td>
<code title="string">
<span>string</span>
</code>
</td>
<td class="content"><p>A username that can be presented to authenticate with a TURN server.</p></td>
</tr>
<tr>
<td>2</td>
<td>
password
</td>
<td>
<code title="string">
<span>string</span>
</code>
</td>
<td class="content"><p>A password that can be presented to authenticate with a TURN server.</p></td>
</tr>
<tr>
<td>3</td>
<td>
credential_ttl_seconds
</td>
<td>
<code title="uint64">
<span>uint64</span>
</code>
</td>
<td class="content"><p>The duration, in seconds, after which the included username and password
will no longer be valid.</p></td>
</tr>
<tr>
<td>4</td>
<td>
hostname_urls
</td>
<td>
<code title="org.signal.chat.calling.GetCallingRelaysResponse.HostnameUrlList">
optional
<a href="org.signal.chat.calling.html#message-org.signal.chat.calling.GetCallingRelaysResponse.HostnameUrlList"><span title="org.signal.chat.calling.GetCallingRelaysResponse.HostnameUrlList">org.signal.chat.calling.GetCallingRelaysResponse.HostnameUrlList</span>
</a>
</code>
</td>
<td class="content"><p>A collection of hostname-based URLs clients may use to connect to this
relay.</p></td>
</tr>
<tr>
<td>5</td>
<td>
ip_urls
</td>
<td>
<code title="org.signal.chat.calling.GetCallingRelaysResponse.IpUrlList">
optional
<a href="org.signal.chat.calling.html#message-org.signal.chat.calling.GetCallingRelaysResponse.IpUrlList"><span title="org.signal.chat.calling.GetCallingRelaysResponse.IpUrlList">org.signal.chat.calling.GetCallingRelaysResponse.IpUrlList</span>
</a>
</code>
</td>
<td class="content"><p>A collection of IP-based URLs clients may use to connect to this relay.</p></td>
</tr>
</tbody>
</table>
</div>
</div>
<footer class="footer">
<div class="content has-text-centered">
<p>Built with <strong><a href="https://github.com/markvincze/sabledocs" target="_blank">sabledocs</a></strong>.</p>
</div>
</footer>
</body>
</html>
+635
View File
@@ -0,0 +1,635 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Protobuf module documentation</title>
<link rel="stylesheet" href="static/mystyles.css" />
<script src="static/fontawesome.js"></script>
<script src="static/lunr.js"></script>
<script src="static/theme.js"></script>
</head>
<body>
<div class="container">
<nav class="level pt-6 mb-5 pb-2 bottom-border">
<div class="level-left">
<p class="level-item has-text-centered is-size-3 has-text-weight-medium">
<a class="link is-info" href="index.html">
Protobuf module documentation
</a>
</p>
</div>
<div class="level-right">
<form action="search.html" class="mr-2 has-text-centered">
<input type="text" name="query" class="input mr-3 navbar-search-query-input" placeholder="Search">
<input type="submit" class="button is-primary mr-5" value="Search" />
</form>
<p class="level-item has-text-centered is-size-5">
<a href="" class="link is-info mr-5" target="_blank">
<span>Source</span>
</a>
<button class="theme-toggle" id="theme-toggle" title="Toggles light & dark" aria-label="auto" aria-live="polite" type="button">
<svg class="sun-and-moon" aria-hidden="true" width="24" height="24" viewBox="0 0 24 24">
<mask class="moon" id="moon-mask">
<rect x="0" y="0" width="100%" height="100%" fill="white" />
<circle cx="24" cy="10" r="6" fill="black" />
</mask>
<circle class="sun" cx="12" cy="12" r="6" mask="url(#moon-mask)" fill="currentColor" />
<g class="sun-beams" stroke="currentColor">
<line x1="12" y1="1" x2="12" y2="3" />
<line x1="12" y1="21" x2="12" y2="23" />
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64" />
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78" />
<line x1="1" y1="12" x2="3" y2="12" />
<line x1="21" y1="12" x2="23" y2="12" />
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36" />
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22" />
</g>
</svg>
</button>
</p>
</div>
</nav>
</div>
<div id="main-content" class="container mb-6">
<p class="mb-2">
<a style="font-size: 0.9em" href="index.html">← Back to packages</a>
</p>
<h3 class="title is-3">
Package <code>org.signal.chat.calling.quality</code>
</h3>
<div class="block">
<p>
<a href="#service-org.signal.chat.calling.quality.CallQuality">
<span class="tag" style="min-width: 6em">Service</span>
<code>CallQuality</code>
</a>
</p>
<p>
<a href="#message-org.signal.chat.calling.quality.SubmitCallQualitySurveyRequest">
<span class="tag" style="min-width: 6em">Message</span>
<code>SubmitCallQualitySurveyRequest</code>
</a>
</p>
<p>
<a href="#message-org.signal.chat.calling.quality.SubmitCallQualitySurveyResponse">
<span class="tag" style="min-width: 6em">Message</span>
<code>SubmitCallQualitySurveyResponse</code>
</a>
</p>
</div>
<div class="block">
</div>
<div class="block">
<h3 class="title is-3">
Services
</h3>
<div>
<h4 class="title is-4 type-heading" id="service-org.signal.chat.calling.quality.CallQuality">
<a href="#service-org.signal.chat.calling.quality.CallQuality" title="org.signal.chat.calling.quality.CallQuality">service CallQuality</a>
</h4>
<div class="block content">
<p><p>Provides methods for submitting call quality surveys</p></p>
</div>
<div class="box">
<div class="block">
<h5 class="title is-5" id="service-org.signal.chat.calling.quality.CallQuality-SubmitCallQualitySurvey">
<a href="#service-org.signal.chat.calling.quality.CallQuality-SubmitCallQualitySurvey">
rpc <code>SubmitCallQualitySurvey</code>
</a>
</h5>
Request: <code><a href="org.signal.chat.calling.quality.html#message-org.signal.chat.calling.quality.SubmitCallQualitySurveyRequest"><span title="org.signal.chat.calling.quality.SubmitCallQualitySurveyRequest">org.signal.chat.calling.quality.SubmitCallQualitySurveyRequest</span>
</a></code><br>
Response: <code><a href="org.signal.chat.calling.quality.html#message-org.signal.chat.calling.quality.SubmitCallQualitySurveyResponse"><span title="org.signal.chat.calling.quality.SubmitCallQualitySurveyResponse">org.signal.chat.calling.quality.SubmitCallQualitySurveyResponse</span>
</a></code><br>
</div>
<div class="block">
<p><p>Submits a call quality survey response.</p></p>
</div>
</div>
</div>
</div>
<h3 class="title is-3">
Messages
</h3>
<div class="block">
<h4 class="title is-4 type-heading" id="message-org.signal.chat.calling.quality.SubmitCallQualitySurveyRequest">
<span>
<a href="#message-org.signal.chat.calling.quality.SubmitCallQualitySurveyRequest" title="org.signal.chat.calling.quality.SubmitCallQualitySurveyRequest">message SubmitCallQualitySurveyRequest</a>
</span>
</h4>
<div class="block content">
</div>
<table class="table is-fullwidth is-hoverable is-bordered">
<thead>
<tr>
<th></th>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>
user_satisfied
</td>
<td>
<code title="bool">
<span>bool</span>
</code>
</td>
<td class="content"><p>Indicates whether the caller was generally satisfied with the quality of
the call</p></td>
</tr>
<tr>
<td>2</td>
<td>
call_quality_issues
</td>
<td>
<code title="string">
repeated
<span>string</span>
</code>
</td>
<td class="content"><p>A list of call quality issues selected by the caller</p></td>
</tr>
<tr>
<td>3</td>
<td>
additional_issues_description
</td>
<td>
<code title="string">
optional
<span>string</span>
</code>
</td>
<td class="content"><p>A free-form description of any additional issues as written by the caller</p></td>
</tr>
<tr>
<td>4</td>
<td>
debug_log_url
</td>
<td>
<code title="string">
optional
<span>string</span>
</code>
</td>
<td class="content"><p>A URL for a set of debug logs associated with the call if the caller chose
to submit debug logs</p></td>
</tr>
<tr>
<td>5</td>
<td>
start_timestamp
</td>
<td>
<code title="int64">
<span>int64</span>
</code>
</td>
<td class="content"><p>The time at which the call started in milliseconds since the epoch</p></td>
</tr>
<tr>
<td>6</td>
<td>
end_timestamp
</td>
<td>
<code title="int64">
<span>int64</span>
</code>
</td>
<td class="content"><p>The time at which the call ended in milliseconds since the epoch</p></td>
</tr>
<tr>
<td>7</td>
<td>
call_type
</td>
<td>
<code title="string">
<span>string</span>
</code>
</td>
<td class="content"><p>The type of call; note that direct voice calls can become video calls and
vice versa, and this field indicates which mode was selected at call
initiation time. At the time of writing, expected call types are
"direct_voice", "direct_video", "group", and "call_link".</p></td>
</tr>
<tr>
<td>8</td>
<td>
success
</td>
<td>
<code title="bool">
<span>bool</span>
</code>
</td>
<td class="content"><p>Indicates whether the call completed without error or if it terminated
abnormally</p></td>
</tr>
<tr>
<td>9</td>
<td>
call_end_reason
</td>
<td>
<code title="string">
<span>string</span>
</code>
</td>
<td class="content"><p>A client-defined, but human-readable reason for call termination</p></td>
</tr>
<tr>
<td>10</td>
<td>
connection_rtt_median
</td>
<td>
<code title="float">
optional
<span>float</span>
</code>
</td>
<td class="content"><p>The median round-trip time, measured in milliseconds, for STUN/ICE packets
(i.e. connection maintenance and establishment)</p></td>
</tr>
<tr>
<td>11</td>
<td>
audio_rtt_median
</td>
<td>
<code title="float">
optional
<span>float</span>
</code>
</td>
<td class="content"><p>The median round-trip time, measured in milliseconds, for RTP/RTCP packets
for audio streams</p></td>
</tr>
<tr>
<td>12</td>
<td>
video_rtt_median
</td>
<td>
<code title="float">
optional
<span>float</span>
</code>
</td>
<td class="content"><p>The median round-trip time, measured in milliseconds, for RTP/RTCP packets
for video streams</p></td>
</tr>
<tr>
<td>13</td>
<td>
audio_recv_jitter_median
</td>
<td>
<code title="float">
optional
<span>float</span>
</code>
</td>
<td class="content"><p>The median jitter for audio streams, measured in milliseconds, for the
duration of the call as measured by the client submitting the survey</p></td>
</tr>
<tr>
<td>14</td>
<td>
video_recv_jitter_median
</td>
<td>
<code title="float">
optional
<span>float</span>
</code>
</td>
<td class="content"><p>The median jitter for video streams, measured in milliseconds, for the
duration of the call as measured by the client submitting the survey</p></td>
</tr>
<tr>
<td>15</td>
<td>
audio_send_jitter_median
</td>
<td>
<code title="float">
optional
<span>float</span>
</code>
</td>
<td class="content"><p>The median jitter for audio streams, measured in milliseconds, for the
duration of the call as measured by the remote endpoint in the call (either
the peer of the client submitting the survey in a direct call or the SFU in
a group call)</p></td>
</tr>
<tr>
<td>16</td>
<td>
video_send_jitter_median
</td>
<td>
<code title="float">
optional
<span>float</span>
</code>
</td>
<td class="content"><p>The median jitter for video streams, measured in milliseconds, for the
duration of the call as measured by the remote endpoint in the call (either
the peer of the client submitting the survey in a direct call or the SFU in
a group call)</p></td>
</tr>
<tr>
<td>17</td>
<td>
audio_recv_packet_loss_fraction
</td>
<td>
<code title="float">
optional
<span>float</span>
</code>
</td>
<td class="content"><p>The fraction of audio packets lost over the duration of the call as
measured by the client submitting the survey</p></td>
</tr>
<tr>
<td>18</td>
<td>
video_recv_packet_loss_fraction
</td>
<td>
<code title="float">
optional
<span>float</span>
</code>
</td>
<td class="content"><p>The fraction of video packets lost over the duration of the call as
measured by the client submitting the survey</p></td>
</tr>
<tr>
<td>19</td>
<td>
audio_send_packet_loss_fraction
</td>
<td>
<code title="float">
optional
<span>float</span>
</code>
</td>
<td class="content"><p>The fraction of audio packets lost over the duration of the call as
measured by the remote endpoint in the call (either the peer of the client
submitting the survey in a direct call or the SFU in a group call)</p></td>
</tr>
<tr>
<td>20</td>
<td>
video_send_packet_loss_fraction
</td>
<td>
<code title="float">
optional
<span>float</span>
</code>
</td>
<td class="content"><p>The fraction of video packets lost over the duration of the call as
measured by the remote endpoint in the call (either the peer of the client
submitting the survey in a direct call or the SFU in a group call)</p></td>
</tr>
<tr>
<td>21</td>
<td>
call_telemetry
</td>
<td>
<code title="bytes">
optional
<span>bytes</span>
</code>
</td>
<td class="content"><p>Machine-generated telemetry from the call; this is a serialized protobuf
entity generated (and, critically, explained to the user!) by the calling
library</p></td>
</tr>
<tr>
<td>22</td>
<td>
call_id_hash
</td>
<td>
<code title="bytes">
optional
<span>bytes</span>
</code>
</td>
<td class="content"><p>A hash of a call ID (shared between clients and never sent to the calling
server) that can be used to correlate survey responses from multiple
participants in a call</p></td>
</tr>
</tbody>
</table>
</div>
<div class="block">
<h4 class="title is-4 type-heading" id="message-org.signal.chat.calling.quality.SubmitCallQualitySurveyResponse">
<span>
<a href="#message-org.signal.chat.calling.quality.SubmitCallQualitySurveyResponse" title="org.signal.chat.calling.quality.SubmitCallQualitySurveyResponse">message SubmitCallQualitySurveyResponse</a>
</span>
</h4>
<div class="block content">
</div>
<table class="table is-fullwidth is-hoverable is-bordered">
<thead>
<tr>
<th></th>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
<footer class="footer">
<div class="content has-text-centered">
<p>Built with <strong><a href="https://github.com/markvincze/sabledocs" target="_blank">sabledocs</a></strong>.</p>
</div>
</footer>
</body>
</html>
+679
View File
@@ -0,0 +1,679 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Protobuf module documentation</title>
<link rel="stylesheet" href="static/mystyles.css" />
<script src="static/fontawesome.js"></script>
<script src="static/lunr.js"></script>
<script src="static/theme.js"></script>
</head>
<body>
<div class="container">
<nav class="level pt-6 mb-5 pb-2 bottom-border">
<div class="level-left">
<p class="level-item has-text-centered is-size-3 has-text-weight-medium">
<a class="link is-info" href="index.html">
Protobuf module documentation
</a>
</p>
</div>
<div class="level-right">
<form action="search.html" class="mr-2 has-text-centered">
<input type="text" name="query" class="input mr-3 navbar-search-query-input" placeholder="Search">
<input type="submit" class="button is-primary mr-5" value="Search" />
</form>
<p class="level-item has-text-centered is-size-5">
<a href="" class="link is-info mr-5" target="_blank">
<span>Source</span>
</a>
<button class="theme-toggle" id="theme-toggle" title="Toggles light & dark" aria-label="auto" aria-live="polite" type="button">
<svg class="sun-and-moon" aria-hidden="true" width="24" height="24" viewBox="0 0 24 24">
<mask class="moon" id="moon-mask">
<rect x="0" y="0" width="100%" height="100%" fill="white" />
<circle cx="24" cy="10" r="6" fill="black" />
</mask>
<circle class="sun" cx="12" cy="12" r="6" mask="url(#moon-mask)" fill="currentColor" />
<g class="sun-beams" stroke="currentColor">
<line x1="12" y1="1" x2="12" y2="3" />
<line x1="12" y1="21" x2="12" y2="23" />
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64" />
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78" />
<line x1="1" y1="12" x2="3" y2="12" />
<line x1="21" y1="12" x2="23" y2="12" />
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36" />
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22" />
</g>
</svg>
</button>
</p>
</div>
</nav>
</div>
<div id="main-content" class="container mb-6">
<p class="mb-2">
<a style="font-size: 0.9em" href="index.html">← Back to packages</a>
</p>
<h3 class="title is-3">
Package <code>org.signal.chat.challenge</code>
</h3>
<div class="block">
<p>
<a href="#service-org.signal.chat.challenge.Challenge">
<span class="tag" style="min-width: 6em">Service</span>
<code>Challenge</code>
</a>
</p>
<p>
<a href="#message-org.signal.chat.challenge.AnswerChallengeRequest.AnswerCaptchaChallengeRequest">
<span class="tag" style="min-width: 6em">Message</span>
<code>AnswerCaptchaChallengeRequest</code>
</a>
</p>
<p>
<a href="#message-org.signal.chat.challenge.AnswerChallengeRequest">
<span class="tag" style="min-width: 6em">Message</span>
<code>AnswerChallengeRequest</code>
</a>
</p>
<p>
<a href="#message-org.signal.chat.challenge.AnswerChallengeResponse">
<span class="tag" style="min-width: 6em">Message</span>
<code>AnswerChallengeResponse</code>
</a>
</p>
<p>
<a href="#message-org.signal.chat.challenge.AnswerChallengeRequest.AnswerPushChallengeRequest">
<span class="tag" style="min-width: 6em">Message</span>
<code>AnswerPushChallengeRequest</code>
</a>
</p>
<p>
<a href="#message-org.signal.chat.challenge.RequestPushChallengeRequest">
<span class="tag" style="min-width: 6em">Message</span>
<code>RequestPushChallengeRequest</code>
</a>
</p>
<p>
<a href="#message-org.signal.chat.challenge.RequestPushChallengeResponse">
<span class="tag" style="min-width: 6em">Message</span>
<code>RequestPushChallengeResponse</code>
</a>
</p>
<p>
<a href="#message-org.signal.chat.challenge.RequestPushChallengeResponse.SentPushChallenge">
<span class="tag" style="min-width: 6em">Message</span>
<code>SentPushChallenge</code>
</a>
</p>
</div>
<div class="block">
</div>
<div class="block">
<h3 class="title is-3">
Services
</h3>
<div>
<h4 class="title is-4 type-heading" id="service-org.signal.chat.challenge.Challenge">
<a href="#service-org.signal.chat.challenge.Challenge" title="org.signal.chat.challenge.Challenge">service Challenge</a>
</h4>
<div class="block content">
<p></p>
</div>
<div class="box">
<div class="block">
<h5 class="title is-5" id="service-org.signal.chat.challenge.Challenge-AnswerChallenge">
<a href="#service-org.signal.chat.challenge.Challenge-AnswerChallenge">
rpc <code>AnswerChallenge</code>
</a>
</h5>
Request: <code><a href="org.signal.chat.challenge.html#message-org.signal.chat.challenge.AnswerChallengeRequest"><span title="org.signal.chat.challenge.AnswerChallengeRequest">org.signal.chat.challenge.AnswerChallengeRequest</span>
</a></code><br>
Response: <code><a href="org.signal.chat.challenge.html#message-org.signal.chat.challenge.AnswerChallengeResponse"><span title="org.signal.chat.challenge.AnswerChallengeResponse">org.signal.chat.challenge.AnswerChallengeResponse</span>
</a></code><br>
</div>
<div class="block">
<p><p>Submit proof of a challenge completion.</p>
<p>Some server endpoints (the "send message" endpoint, for example) may return
a response indicating the client must complete a challenge before continuing.
Clients may use this endpoint to provide proof of a completed challenge.
If successful, the client may then continue their original operation.</p></p>
</div>
</div>
<div class="box">
<div class="block">
<h5 class="title is-5" id="service-org.signal.chat.challenge.Challenge-RequestPushChallenge">
<a href="#service-org.signal.chat.challenge.Challenge-RequestPushChallenge">
rpc <code>RequestPushChallenge</code>
</a>
</h5>
Request: <code><a href="org.signal.chat.challenge.html#message-org.signal.chat.challenge.RequestPushChallengeRequest"><span title="org.signal.chat.challenge.RequestPushChallengeRequest">org.signal.chat.challenge.RequestPushChallengeRequest</span>
</a></code><br>
Response: <code><a href="org.signal.chat.challenge.html#message-org.signal.chat.challenge.RequestPushChallengeResponse"><span title="org.signal.chat.challenge.RequestPushChallengeResponse">org.signal.chat.challenge.RequestPushChallengeResponse</span>
</a></code><br>
</div>
<div class="block">
<p><p>Requests that a challenge value be sent to the authenticated account's
primary device via push notification. Once received, callers may present
the challenge value via the HandleChallengeResponse RPC.</p>
<p>APNs challenge payloads will be formatted as follows:</p>
<pre><code>{
&quot;aps&quot;: {
&quot;sound&quot;: &quot;default&quot;,
&quot;alert&quot;: {
&quot;loc-key&quot;: &quot;APN_Message&quot;
}
},
&quot;rateLimitChallenge&quot;: &quot;{CHALLENGE_TOKEN}&quot;
}
</code></pre>
<p>FCM challenge payloads will be formatted as follows:</p>
<pre><code>{&quot;rateLimitChallenge&quot;: &quot;{CHALLENGE_TOKEN}&quot;}
</code></pre></p>
</div>
</div>
</div>
</div>
<h3 class="title is-3">
Messages
</h3>
<div class="block">
<h4 class="title is-4 type-heading" id="message-org.signal.chat.challenge.AnswerChallengeRequest.AnswerCaptchaChallengeRequest">
<span>
<a href="#message-org.signal.chat.challenge.AnswerChallengeRequest.AnswerCaptchaChallengeRequest" title="org.signal.chat.challenge.AnswerChallengeRequest.AnswerCaptchaChallengeRequest">message AnswerCaptchaChallengeRequest</a>
<br /><span style="font-size: 0.7em; font-weight: normal">(Nested in <a href="org.signal.chat.challenge.html#message-org.signal.chat.challenge.AnswerChallengeRequest"><span title="org.signal.chat.challenge.AnswerChallengeRequest">org.signal.chat.challenge.AnswerChallengeRequest</span>
</a>)</span>
</span>
</h4>
<div class="block content">
</div>
<table class="table is-fullwidth is-hoverable is-bordered">
<thead>
<tr>
<th></th>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>
captcha
</td>
<td>
<code title="string">
<span>string</span>
</code>
</td>
<td class="content"><p>A string representing a solved captcha
Example: signal-hcaptcha.30b01b46-d8c9-4c30-bbd7-9719acfe0c10.challenge.abcdefg1345</p></td>
</tr>
</tbody>
</table>
</div>
<div class="block">
<h4 class="title is-4 type-heading" id="message-org.signal.chat.challenge.AnswerChallengeRequest">
<span>
<a href="#message-org.signal.chat.challenge.AnswerChallengeRequest" title="org.signal.chat.challenge.AnswerChallengeRequest">message AnswerChallengeRequest</a>
</span>
</h4>
<div class="block content">
</div>
<table class="table is-fullwidth is-hoverable is-bordered">
<thead>
<tr>
<th></th>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>
token
</td>
<td>
<code title="string">
<span>string</span>
</code>
</td>
<td class="content"><p>The opaque token id from the ChallengeRequired response returned by the
server endpoint that requested the challenge</p></td>
</tr>
<tr class="nohover"><td style="border: 0px"></td></tr>
<tr class="nohover">
<td class="oneof-heading" colspan="4">
<div class="oneof-heading">
<strong>oneof request</strong>
</div>
</td>
</tr>
<tr>
<td>
2
</td>
<td>
push
</td>
<td>
<code title="org.signal.chat.challenge.AnswerChallengeRequest.AnswerPushChallengeRequest">
<a href="org.signal.chat.challenge.html#message-org.signal.chat.challenge.AnswerChallengeRequest.AnswerPushChallengeRequest"><span title="org.signal.chat.challenge.AnswerChallengeRequest.AnswerPushChallengeRequest">org.signal.chat.challenge.AnswerChallengeRequest.AnswerPushChallengeRequest</span>
</a>
</code>
</td>
<td class="content"></td>
</tr>
<tr>
<td>
3
</td>
<td>
captcha
</td>
<td>
<code title="org.signal.chat.challenge.AnswerChallengeRequest.AnswerCaptchaChallengeRequest">
<a href="org.signal.chat.challenge.html#message-org.signal.chat.challenge.AnswerChallengeRequest.AnswerCaptchaChallengeRequest"><span title="org.signal.chat.challenge.AnswerChallengeRequest.AnswerCaptchaChallengeRequest">org.signal.chat.challenge.AnswerChallengeRequest.AnswerCaptchaChallengeRequest</span>
</a>
</code>
</td>
<td class="content"></td>
</tr>
</tbody>
</table>
</div>
<div class="block">
<h4 class="title is-4 type-heading" id="message-org.signal.chat.challenge.AnswerChallengeResponse">
<span>
<a href="#message-org.signal.chat.challenge.AnswerChallengeResponse" title="org.signal.chat.challenge.AnswerChallengeResponse">message AnswerChallengeResponse</a>
</span>
</h4>
<div class="block content">
</div>
<table class="table is-fullwidth is-hoverable is-bordered">
<thead>
<tr>
<th></th>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>
success
</td>
<td>
<code title="bool">
<span>bool</span>
</code>
</td>
<td class="content"><p>Whether the challenge proof was accepted</p></td>
</tr>
</tbody>
</table>
</div>
<div class="block">
<h4 class="title is-4 type-heading" id="message-org.signal.chat.challenge.AnswerChallengeRequest.AnswerPushChallengeRequest">
<span>
<a href="#message-org.signal.chat.challenge.AnswerChallengeRequest.AnswerPushChallengeRequest" title="org.signal.chat.challenge.AnswerChallengeRequest.AnswerPushChallengeRequest">message AnswerPushChallengeRequest</a>
<br /><span style="font-size: 0.7em; font-weight: normal">(Nested in <a href="org.signal.chat.challenge.html#message-org.signal.chat.challenge.AnswerChallengeRequest"><span title="org.signal.chat.challenge.AnswerChallengeRequest">org.signal.chat.challenge.AnswerChallengeRequest</span>
</a>)</span>
</span>
</h4>
<div class="block content">
</div>
<table class="table is-fullwidth is-hoverable is-bordered">
<thead>
<tr>
<th></th>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>
challenge
</td>
<td>
<code title="string">
<span>string</span>
</code>
</td>
<td class="content"><p>The challenge string provided to the client via a push payload</p></td>
</tr>
</tbody>
</table>
</div>
<div class="block">
<h4 class="title is-4 type-heading" id="message-org.signal.chat.challenge.RequestPushChallengeRequest">
<span>
<a href="#message-org.signal.chat.challenge.RequestPushChallengeRequest" title="org.signal.chat.challenge.RequestPushChallengeRequest">message RequestPushChallengeRequest</a>
</span>
</h4>
<div class="block content">
</div>
<table class="table is-fullwidth is-hoverable is-bordered">
<thead>
<tr>
<th></th>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
<div class="block">
<h4 class="title is-4 type-heading" id="message-org.signal.chat.challenge.RequestPushChallengeResponse">
<span>
<a href="#message-org.signal.chat.challenge.RequestPushChallengeResponse" title="org.signal.chat.challenge.RequestPushChallengeResponse">message RequestPushChallengeResponse</a>
</span>
</h4>
<div class="block content">
</div>
<table class="table is-fullwidth is-hoverable is-bordered">
<thead>
<tr>
<th></th>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="nohover"><td style="border: 0px"></td></tr>
<tr class="nohover">
<td class="oneof-heading" colspan="4">
<div class="oneof-heading">
<strong>oneof response</strong>
</div>
</td>
</tr>
<tr>
<td>
1
</td>
<td>
sent_push_challenge
</td>
<td>
<code title="google.protobuf.Empty">
<span>google.protobuf.Empty</span>
</code>
</td>
<td class="content"><p>The server attempted to send a challenge value to the authenticated
account's primary device via a push notification.</p></td>
</tr>
<tr>
<td>
2
</td>
<td>
no_push_token
</td>
<td>
<code title="org.signal.chat.errors.FailedPrecondition">
<a href="org.signal.chat.errors.html#message-org.signal.chat.errors.FailedPrecondition"><span title="org.signal.chat.errors.FailedPrecondition">org.signal.chat.errors.FailedPrecondition</span>
</a>
</code>
</td>
<td class="content"><p>The authenticated account's primary device does not have a push token.</p></td>
</tr>
</tbody>
</table>
</div>
<div class="block">
<h4 class="title is-4 type-heading" id="message-org.signal.chat.challenge.RequestPushChallengeResponse.SentPushChallenge">
<span>
<a href="#message-org.signal.chat.challenge.RequestPushChallengeResponse.SentPushChallenge" title="org.signal.chat.challenge.RequestPushChallengeResponse.SentPushChallenge">message SentPushChallenge</a>
<br /><span style="font-size: 0.7em; font-weight: normal">(Nested in <a href="org.signal.chat.challenge.html#message-org.signal.chat.challenge.RequestPushChallengeResponse"><span title="org.signal.chat.challenge.RequestPushChallengeResponse">org.signal.chat.challenge.RequestPushChallengeResponse</span>
</a>)</span>
</span>
</h4>
<div class="block content">
</div>
<table class="table is-fullwidth is-hoverable is-bordered">
<thead>
<tr>
<th></th>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
<footer class="footer">
<div class="content has-text-centered">
<p>Built with <strong><a href="https://github.com/markvincze/sabledocs" target="_blank">sabledocs</a></strong>.</p>
</div>
</footer>
</body>
</html>
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
+503
View File
@@ -0,0 +1,503 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Protobuf module documentation</title>
<link rel="stylesheet" href="static/mystyles.css" />
<script src="static/fontawesome.js"></script>
<script src="static/lunr.js"></script>
<script src="static/theme.js"></script>
</head>
<body>
<div class="container">
<nav class="level pt-6 mb-5 pb-2 bottom-border">
<div class="level-left">
<p class="level-item has-text-centered is-size-3 has-text-weight-medium">
<a class="link is-info" href="index.html">
Protobuf module documentation
</a>
</p>
</div>
<div class="level-right">
<form action="search.html" class="mr-2 has-text-centered">
<input type="text" name="query" class="input mr-3 navbar-search-query-input" placeholder="Search">
<input type="submit" class="button is-primary mr-5" value="Search" />
</form>
<p class="level-item has-text-centered is-size-5">
<a href="" class="link is-info mr-5" target="_blank">
<span>Source</span>
</a>
<button class="theme-toggle" id="theme-toggle" title="Toggles light & dark" aria-label="auto" aria-live="polite" type="button">
<svg class="sun-and-moon" aria-hidden="true" width="24" height="24" viewBox="0 0 24 24">
<mask class="moon" id="moon-mask">
<rect x="0" y="0" width="100%" height="100%" fill="white" />
<circle cx="24" cy="10" r="6" fill="black" />
</mask>
<circle class="sun" cx="12" cy="12" r="6" mask="url(#moon-mask)" fill="currentColor" />
<g class="sun-beams" stroke="currentColor">
<line x1="12" y1="1" x2="12" y2="3" />
<line x1="12" y1="21" x2="12" y2="23" />
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64" />
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78" />
<line x1="1" y1="12" x2="3" y2="12" />
<line x1="21" y1="12" x2="23" y2="12" />
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36" />
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22" />
</g>
</svg>
</button>
</p>
</div>
</nav>
</div>
<div id="main-content" class="container mb-6">
<p class="mb-2">
<a style="font-size: 0.9em" href="index.html">← Back to packages</a>
</p>
<h3 class="title is-3">
Package <code>org.signal.chat.donations</code>
</h3>
<div class="block">
<p>
<a href="#service-org.signal.chat.donations.Donations">
<span class="tag" style="min-width: 6em">Service</span>
<code>Donations</code>
</a>
</p>
<p>
<a href="#message-org.signal.chat.donations.CreateDonationPermitsRequest">
<span class="tag" style="min-width: 6em">Message</span>
<code>CreateDonationPermitsRequest</code>
</a>
</p>
<p>
<a href="#message-org.signal.chat.donations.CreateDonationPermitsResponse">
<span class="tag" style="min-width: 6em">Message</span>
<code>CreateDonationPermitsResponse</code>
</a>
</p>
<p>
<a href="#message-org.signal.chat.donations.RedeemReceiptRequest">
<span class="tag" style="min-width: 6em">Message</span>
<code>RedeemReceiptRequest</code>
</a>
</p>
<p>
<a href="#message-org.signal.chat.donations.RedeemReceiptResponse">
<span class="tag" style="min-width: 6em">Message</span>
<code>RedeemReceiptResponse</code>
</a>
</p>
</div>
<div class="block">
</div>
<div class="block">
<h3 class="title is-3">
Services
</h3>
<div>
<h4 class="title is-4 type-heading" id="service-org.signal.chat.donations.Donations">
<a href="#service-org.signal.chat.donations.Donations" title="org.signal.chat.donations.Donations">service Donations</a>
</h4>
<div class="block content">
<p></p>
</div>
<div class="box">
<div class="block">
<h5 class="title is-5" id="service-org.signal.chat.donations.Donations-RedeemReceipt">
<a href="#service-org.signal.chat.donations.Donations-RedeemReceipt">
rpc <code>RedeemReceipt</code>
</a>
</h5>
Request: <code><a href="org.signal.chat.donations.html#message-org.signal.chat.donations.RedeemReceiptRequest"><span title="org.signal.chat.donations.RedeemReceiptRequest">org.signal.chat.donations.RedeemReceiptRequest</span>
</a></code><br>
Response: <code><a href="org.signal.chat.donations.html#message-org.signal.chat.donations.RedeemReceiptResponse"><span title="org.signal.chat.donations.RedeemReceiptResponse">org.signal.chat.donations.RedeemReceiptResponse</span>
</a></code><br>
</div>
<div class="block">
<p><p>Redeem a receipt acquired from Subscriptions.GetReceiptCredential
to add a badge to the account. After successful redemption, profile
responses will include the corresponding badge (if configured as visible)
until the expiration time on the receipt.</p></p>
</div>
</div>
<div class="box">
<div class="block">
<h5 class="title is-5" id="service-org.signal.chat.donations.Donations-CreateDonationPermits">
<a href="#service-org.signal.chat.donations.Donations-CreateDonationPermits">
rpc <code>CreateDonationPermits</code>
</a>
</h5>
Request: <code><a href="org.signal.chat.donations.html#message-org.signal.chat.donations.CreateDonationPermitsRequest"><span title="org.signal.chat.donations.CreateDonationPermitsRequest">org.signal.chat.donations.CreateDonationPermitsRequest</span>
</a></code><br>
Response: <code><a href="org.signal.chat.donations.html#message-org.signal.chat.donations.CreateDonationPermitsResponse"><span title="org.signal.chat.donations.CreateDonationPermitsResponse">org.signal.chat.donations.CreateDonationPermitsResponse</span>
</a></code><br>
</div>
<div class="block">
<p><p>Generate a set of anonymous, single-use, permits for use with /v1/subscription endpoints.</p>
<p>If rate limited, reduce requested permit count and/or try again after the prescribed delay.</p></p>
</div>
</div>
</div>
</div>
<h3 class="title is-3">
Messages
</h3>
<div class="block">
<h4 class="title is-4 type-heading" id="message-org.signal.chat.donations.CreateDonationPermitsRequest">
<span>
<a href="#message-org.signal.chat.donations.CreateDonationPermitsRequest" title="org.signal.chat.donations.CreateDonationPermitsRequest">message CreateDonationPermitsRequest</a>
</span>
</h4>
<div class="block content">
</div>
<table class="table is-fullwidth is-hoverable is-bordered">
<thead>
<tr>
<th></th>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>
donation_permits_request
</td>
<td>
<code title="bytes">
<span>bytes</span>
</code>
</td>
<td class="content"><p>a serialized libsignal DonationPermitsRequest</p></td>
</tr>
</tbody>
</table>
</div>
<div class="block">
<h4 class="title is-4 type-heading" id="message-org.signal.chat.donations.CreateDonationPermitsResponse">
<span>
<a href="#message-org.signal.chat.donations.CreateDonationPermitsResponse" title="org.signal.chat.donations.CreateDonationPermitsResponse">message CreateDonationPermitsResponse</a>
</span>
</h4>
<div class="block content">
</div>
<table class="table is-fullwidth is-hoverable is-bordered">
<thead>
<tr>
<th></th>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>
donation_permits_response
</td>
<td>
<code title="bytes">
<span>bytes</span>
</code>
</td>
<td class="content"><p>a serialized libsignal DonationPermitsResponse</p></td>
</tr>
</tbody>
</table>
</div>
<div class="block">
<h4 class="title is-4 type-heading" id="message-org.signal.chat.donations.RedeemReceiptRequest">
<span>
<a href="#message-org.signal.chat.donations.RedeemReceiptRequest" title="org.signal.chat.donations.RedeemReceiptRequest">message RedeemReceiptRequest</a>
</span>
</h4>
<div class="block content">
</div>
<table class="table is-fullwidth is-hoverable is-bordered">
<thead>
<tr>
<th></th>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>
receiptCredentialPresentation
</td>
<td>
<code title="bytes">
<span>bytes</span>
</code>
</td>
<td class="content"><p>Presentation of the ZK receipt acquired when the subscription was created</p></td>
</tr>
<tr>
<td>2</td>
<td>
visible
</td>
<td>
<code title="bool">
<span>bool</span>
</code>
</td>
<td class="content"><p>If true, the corresponding badge should be visible on the profile</p></td>
</tr>
<tr>
<td>3</td>
<td>
primary
</td>
<td>
<code title="bool">
<span>bool</span>
</code>
</td>
<td class="content"><p>If true, and the new badge is visible, it should be the primary badge on the profile</p></td>
</tr>
</tbody>
</table>
</div>
<div class="block">
<h4 class="title is-4 type-heading" id="message-org.signal.chat.donations.RedeemReceiptResponse">
<span>
<a href="#message-org.signal.chat.donations.RedeemReceiptResponse" title="org.signal.chat.donations.RedeemReceiptResponse">message RedeemReceiptResponse</a>
</span>
</h4>
<div class="block content">
</div>
<table class="table is-fullwidth is-hoverable is-bordered">
<thead>
<tr>
<th></th>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="nohover"><td style="border: 0px"></td></tr>
<tr class="nohover">
<td class="oneof-heading" colspan="4">
<div class="oneof-heading">
<strong>oneof response</strong>
</div>
</td>
</tr>
<tr>
<td>
1
</td>
<td>
success
</td>
<td>
<code title="google.protobuf.Empty">
<span>google.protobuf.Empty</span>
</code>
</td>
<td class="content"><p>The receipt was successfully redeemed</p></td>
</tr>
<tr>
<td>
2
</td>
<td>
failed_authentication
</td>
<td>
<code title="org.signal.chat.errors.FailedZkAuthentication">
<a href="org.signal.chat.errors.html#message-org.signal.chat.errors.FailedZkAuthentication"><span title="org.signal.chat.errors.FailedZkAuthentication">org.signal.chat.errors.FailedZkAuthentication</span>
</a>
</code>
</td>
<td class="content"><p>The provided presentation is invalid</p></td>
</tr>
<tr>
<td>
3
</td>
<td>
already_redeemed
</td>
<td>
<code title="org.signal.chat.errors.FailedPrecondition">
<a href="org.signal.chat.errors.html#message-org.signal.chat.errors.FailedPrecondition"><span title="org.signal.chat.errors.FailedPrecondition">org.signal.chat.errors.FailedPrecondition</span>
</a>
</code>
</td>
<td class="content"><p>The receipt was already redeemed for a different account</p></td>
</tr>
</tbody>
</table>
</div>
</div>
<footer class="footer">
<div class="content has-text-centered">
<p>Built with <strong><a href="https://github.com/markvincze/sabledocs" target="_blank">sabledocs</a></strong>.</p>
</div>
</footer>
</body>
</html>
+330
View File
@@ -0,0 +1,330 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Protobuf module documentation</title>
<link rel="stylesheet" href="static/mystyles.css" />
<script src="static/fontawesome.js"></script>
<script src="static/lunr.js"></script>
<script src="static/theme.js"></script>
</head>
<body>
<div class="container">
<nav class="level pt-6 mb-5 pb-2 bottom-border">
<div class="level-left">
<p class="level-item has-text-centered is-size-3 has-text-weight-medium">
<a class="link is-info" href="index.html">
Protobuf module documentation
</a>
</p>
</div>
<div class="level-right">
<form action="search.html" class="mr-2 has-text-centered">
<input type="text" name="query" class="input mr-3 navbar-search-query-input" placeholder="Search">
<input type="submit" class="button is-primary mr-5" value="Search" />
</form>
<p class="level-item has-text-centered is-size-5">
<a href="" class="link is-info mr-5" target="_blank">
<span>Source</span>
</a>
<button class="theme-toggle" id="theme-toggle" title="Toggles light & dark" aria-label="auto" aria-live="polite" type="button">
<svg class="sun-and-moon" aria-hidden="true" width="24" height="24" viewBox="0 0 24 24">
<mask class="moon" id="moon-mask">
<rect x="0" y="0" width="100%" height="100%" fill="white" />
<circle cx="24" cy="10" r="6" fill="black" />
</mask>
<circle class="sun" cx="12" cy="12" r="6" mask="url(#moon-mask)" fill="currentColor" />
<g class="sun-beams" stroke="currentColor">
<line x1="12" y1="1" x2="12" y2="3" />
<line x1="12" y1="21" x2="12" y2="23" />
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64" />
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78" />
<line x1="1" y1="12" x2="3" y2="12" />
<line x1="21" y1="12" x2="23" y2="12" />
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36" />
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22" />
</g>
</svg>
</button>
</p>
</div>
</nav>
</div>
<div id="main-content" class="container mb-6">
<p class="mb-2">
<a style="font-size: 0.9em" href="index.html">← Back to packages</a>
</p>
<h3 class="title is-3">
Package <code>org.signal.chat.errors</code>
</h3>
<div class="block">
<p>
<a href="#message-org.signal.chat.errors.FailedPrecondition">
<span class="tag" style="min-width: 6em">Message</span>
<code>FailedPrecondition</code>
</a>
</p>
<p>
<a href="#message-org.signal.chat.errors.FailedUnidentifiedAuthorization">
<span class="tag" style="min-width: 6em">Message</span>
<code>FailedUnidentifiedAuthorization</code>
</a>
</p>
<p>
<a href="#message-org.signal.chat.errors.FailedZkAuthentication">
<span class="tag" style="min-width: 6em">Message</span>
<code>FailedZkAuthentication</code>
</a>
</p>
<p>
<a href="#message-org.signal.chat.errors.NotFound">
<span class="tag" style="min-width: 6em">Message</span>
<code>NotFound</code>
</a>
</p>
</div>
<div class="block">
</div>
<h3 class="title is-3">
Messages
</h3>
<div class="block">
<h4 class="title is-4 type-heading" id="message-org.signal.chat.errors.FailedPrecondition">
<span>
<a href="#message-org.signal.chat.errors.FailedPrecondition" title="org.signal.chat.errors.FailedPrecondition">message FailedPrecondition</a>
</span>
</h4>
<div class="block content">
<p>Response message that indicates that some precondition of the request was not
met. For example, if there was a request to update foo, but foo had not been
set, this would be an appropriate error.</p>
</div>
<table class="table is-fullwidth is-hoverable is-bordered">
<thead>
<tr>
<th></th>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>
description
</td>
<td>
<code title="string">
<span>string</span>
</code>
</td>
<td class="content"><p>An optional description indicating what precondition failed.</p></td>
</tr>
</tbody>
</table>
</div>
<div class="block">
<h4 class="title is-4 type-heading" id="message-org.signal.chat.errors.FailedUnidentifiedAuthorization">
<span>
<a href="#message-org.signal.chat.errors.FailedUnidentifiedAuthorization" title="org.signal.chat.errors.FailedUnidentifiedAuthorization">message FailedUnidentifiedAuthorization</a>
</span>
</h4>
<div class="block content">
<p>Response message that indicates authorization to perform an unidentified
operation via an endorsement or access key failed</p>
</div>
<table class="table is-fullwidth is-hoverable is-bordered">
<thead>
<tr>
<th></th>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>
description
</td>
<td>
<code title="string">
<span>string</span>
</code>
</td>
<td class="content"><p>An optional description with additional information about the failure.</p></td>
</tr>
</tbody>
</table>
</div>
<div class="block">
<h4 class="title is-4 type-heading" id="message-org.signal.chat.errors.FailedZkAuthentication">
<span>
<a href="#message-org.signal.chat.errors.FailedZkAuthentication" title="org.signal.chat.errors.FailedZkAuthentication">message FailedZkAuthentication</a>
</span>
</h4>
<div class="block content">
<p>Response message that authentication via an anonymous credential failed.</p>
</div>
<table class="table is-fullwidth is-hoverable is-bordered">
<thead>
<tr>
<th></th>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>
description
</td>
<td>
<code title="string">
<span>string</span>
</code>
</td>
<td class="content"><p>An optional description with additional information about the failure.</p></td>
</tr>
</tbody>
</table>
</div>
<div class="block">
<h4 class="title is-4 type-heading" id="message-org.signal.chat.errors.NotFound">
<span>
<a href="#message-org.signal.chat.errors.NotFound" title="org.signal.chat.errors.NotFound">message NotFound</a>
</span>
</h4>
<div class="block content">
<p>Response message that indicates a particular resource was not found.</p>
</div>
<table class="table is-fullwidth is-hoverable is-bordered">
<thead>
<tr>
<th></th>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
<footer class="footer">
<div class="content has-text-centered">
<p>Built with <strong><a href="https://github.com/markvincze/sabledocs" target="_blank">sabledocs</a></strong>.</p>
</div>
</footer>
</body>
</html>
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
+356
View File
@@ -0,0 +1,356 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Protobuf module documentation</title>
<link rel="stylesheet" href="static/mystyles.css" />
<script src="static/fontawesome.js"></script>
<script src="static/lunr.js"></script>
<script src="static/theme.js"></script>
</head>
<body>
<div class="container">
<nav class="level pt-6 mb-5 pb-2 bottom-border">
<div class="level-left">
<p class="level-item has-text-centered is-size-3 has-text-weight-medium">
<a class="link is-info" href="index.html">
Protobuf module documentation
</a>
</p>
</div>
<div class="level-right">
<form action="search.html" class="mr-2 has-text-centered">
<input type="text" name="query" class="input mr-3 navbar-search-query-input" placeholder="Search">
<input type="submit" class="button is-primary mr-5" value="Search" />
</form>
<p class="level-item has-text-centered is-size-5">
<a href="" class="link is-info mr-5" target="_blank">
<span>Source</span>
</a>
<button class="theme-toggle" id="theme-toggle" title="Toggles light & dark" aria-label="auto" aria-live="polite" type="button">
<svg class="sun-and-moon" aria-hidden="true" width="24" height="24" viewBox="0 0 24 24">
<mask class="moon" id="moon-mask">
<rect x="0" y="0" width="100%" height="100%" fill="white" />
<circle cx="24" cy="10" r="6" fill="black" />
</mask>
<circle class="sun" cx="12" cy="12" r="6" mask="url(#moon-mask)" fill="currentColor" />
<g class="sun-beams" stroke="currentColor">
<line x1="12" y1="1" x2="12" y2="3" />
<line x1="12" y1="21" x2="12" y2="23" />
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64" />
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78" />
<line x1="1" y1="12" x2="3" y2="12" />
<line x1="21" y1="12" x2="23" y2="12" />
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36" />
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22" />
</g>
</svg>
</button>
</p>
</div>
</nav>
</div>
<div id="main-content" class="container mb-6">
<p class="mb-2">
<a style="font-size: 0.9em" href="index.html">← Back to packages</a>
</p>
<h3 class="title is-3">
Package <code>org.signal.chat.payments</code>
</h3>
<div class="block">
<p>
<a href="#service-org.signal.chat.payments.Payments">
<span class="tag" style="min-width: 6em">Service</span>
<code>Payments</code>
</a>
</p>
<p>
<a href="#message-org.signal.chat.payments.GetCurrencyConversionsResponse.CurrencyConversionEntity">
<span class="tag" style="min-width: 6em">Message</span>
<code>CurrencyConversionEntity</code>
</a>
</p>
<p>
<a href="#message-org.signal.chat.payments.GetCurrencyConversionsRequest">
<span class="tag" style="min-width: 6em">Message</span>
<code>GetCurrencyConversionsRequest</code>
</a>
</p>
<p>
<a href="#message-org.signal.chat.payments.GetCurrencyConversionsResponse">
<span class="tag" style="min-width: 6em">Message</span>
<code>GetCurrencyConversionsResponse</code>
</a>
</p>
</div>
<div class="block">
</div>
<div class="block">
<h3 class="title is-3">
Services
</h3>
<div>
<h4 class="title is-4 type-heading" id="service-org.signal.chat.payments.Payments">
<a href="#service-org.signal.chat.payments.Payments" title="org.signal.chat.payments.Payments">service Payments</a>
</h4>
<div class="block content">
<p><p>Provides methods for working with payments.</p></p>
</div>
<div class="box">
<div class="block">
<h5 class="title is-5" id="service-org.signal.chat.payments.Payments-GetCurrencyConversions">
<a href="#service-org.signal.chat.payments.Payments-GetCurrencyConversions">
rpc <code>GetCurrencyConversions</code>
</a>
</h5>
Request: <code><a href="org.signal.chat.payments.html#message-org.signal.chat.payments.GetCurrencyConversionsRequest"><span title="org.signal.chat.payments.GetCurrencyConversionsRequest">org.signal.chat.payments.GetCurrencyConversionsRequest</span>
</a></code><br>
Response: <code><a href="org.signal.chat.payments.html#message-org.signal.chat.payments.GetCurrencyConversionsResponse"><span title="org.signal.chat.payments.GetCurrencyConversionsResponse">org.signal.chat.payments.GetCurrencyConversionsResponse</span>
</a></code><br>
</div>
</div>
</div>
</div>
<h3 class="title is-3">
Messages
</h3>
<div class="block">
<h4 class="title is-4 type-heading" id="message-org.signal.chat.payments.GetCurrencyConversionsResponse.CurrencyConversionEntity">
<span>
<a href="#message-org.signal.chat.payments.GetCurrencyConversionsResponse.CurrencyConversionEntity" title="org.signal.chat.payments.GetCurrencyConversionsResponse.CurrencyConversionEntity">message CurrencyConversionEntity</a>
<br /><span style="font-size: 0.7em; font-weight: normal">(Nested in <a href="org.signal.chat.payments.html#message-org.signal.chat.payments.GetCurrencyConversionsResponse"><span title="org.signal.chat.payments.GetCurrencyConversionsResponse">org.signal.chat.payments.GetCurrencyConversionsResponse</span>
</a>)</span>
</span>
</h4>
<div class="block content">
</div>
<table class="table is-fullwidth is-hoverable is-bordered">
<thead>
<tr>
<th></th>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>
base
</td>
<td>
<code title="string">
<span>string</span>
</code>
</td>
<td class="content"></td>
</tr>
<tr>
<td>2</td>
<td>
conversions
</td>
<td>
<code title="map&lt;string, string&gt;">
<span>map&lt;string, string&gt;</span>
</code>
</td>
<td class="content"></td>
</tr>
</tbody>
</table>
</div>
<div class="block">
<h4 class="title is-4 type-heading" id="message-org.signal.chat.payments.GetCurrencyConversionsRequest">
<span>
<a href="#message-org.signal.chat.payments.GetCurrencyConversionsRequest" title="org.signal.chat.payments.GetCurrencyConversionsRequest">message GetCurrencyConversionsRequest</a>
</span>
</h4>
<div class="block content">
</div>
<table class="table is-fullwidth is-hoverable is-bordered">
<thead>
<tr>
<th></th>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
<div class="block">
<h4 class="title is-4 type-heading" id="message-org.signal.chat.payments.GetCurrencyConversionsResponse">
<span>
<a href="#message-org.signal.chat.payments.GetCurrencyConversionsResponse" title="org.signal.chat.payments.GetCurrencyConversionsResponse">message GetCurrencyConversionsResponse</a>
</span>
</h4>
<div class="block content">
</div>
<table class="table is-fullwidth is-hoverable is-bordered">
<thead>
<tr>
<th></th>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>
timestamp
</td>
<td>
<code title="uint64">
<span>uint64</span>
</code>
</td>
<td class="content"></td>
</tr>
<tr>
<td>2</td>
<td>
currencies
</td>
<td>
<code title="org.signal.chat.payments.GetCurrencyConversionsResponse.CurrencyConversionEntity">
repeated
<a href="org.signal.chat.payments.html#message-org.signal.chat.payments.GetCurrencyConversionsResponse.CurrencyConversionEntity"><span title="org.signal.chat.payments.GetCurrencyConversionsResponse.CurrencyConversionEntity">org.signal.chat.payments.GetCurrencyConversionsResponse.CurrencyConversionEntity</span>
</a>
</code>
</td>
<td class="content"></td>
</tr>
</tbody>
</table>
</div>
</div>
<footer class="footer">
<div class="content has-text-centered">
<p>Built with <strong><a href="https://github.com/markvincze/sabledocs" target="_blank">sabledocs</a></strong>.</p>
</div>
</footer>
</body>
</html>
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,775 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Protobuf module documentation</title>
<link rel="stylesheet" href="static/mystyles.css" />
<script src="static/fontawesome.js"></script>
<script src="static/lunr.js"></script>
<script src="static/theme.js"></script>
</head>
<body>
<div class="container">
<nav class="level pt-6 mb-5 pb-2 bottom-border">
<div class="level-left">
<p class="level-item has-text-centered is-size-3 has-text-weight-medium">
<a class="link is-info" href="index.html">
Protobuf module documentation
</a>
</p>
</div>
<div class="level-right">
<form action="search.html" class="mr-2 has-text-centered">
<input type="text" name="query" class="input mr-3 navbar-search-query-input" placeholder="Search">
<input type="submit" class="button is-primary mr-5" value="Search" />
</form>
<p class="level-item has-text-centered is-size-5">
<a href="" class="link is-info mr-5" target="_blank">
<span>Source</span>
</a>
<button class="theme-toggle" id="theme-toggle" title="Toggles light & dark" aria-label="auto" aria-live="polite" type="button">
<svg class="sun-and-moon" aria-hidden="true" width="24" height="24" viewBox="0 0 24 24">
<mask class="moon" id="moon-mask">
<rect x="0" y="0" width="100%" height="100%" fill="white" />
<circle cx="24" cy="10" r="6" fill="black" />
</mask>
<circle class="sun" cx="12" cy="12" r="6" mask="url(#moon-mask)" fill="currentColor" />
<g class="sun-beams" stroke="currentColor">
<line x1="12" y1="1" x2="12" y2="3" />
<line x1="12" y1="21" x2="12" y2="23" />
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64" />
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78" />
<line x1="1" y1="12" x2="3" y2="12" />
<line x1="21" y1="12" x2="23" y2="12" />
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36" />
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22" />
</g>
</svg>
</button>
</p>
</div>
</nav>
</div>
<div id="main-content" class="container mb-6">
<p class="mb-2">
<a style="font-size: 0.9em" href="index.html">← Back to packages</a>
</p>
<h3 class="title is-3">
Package <code>org.signal.chat.remoteconfiguration</code>
</h3>
<div class="block">
<p>
<a href="#service-org.signal.chat.remoteconfiguration.RemoteConfiguration">
<span class="tag" style="min-width: 6em">Service</span>
<code>RemoteConfiguration</code>
</a>
</p>
<p>
<a href="#message-org.signal.chat.remoteconfiguration.Badges">
<span class="tag" style="min-width: 6em">Message</span>
<code>Badges</code>
</a>
</p>
<p>
<a href="#message-org.signal.chat.remoteconfiguration.Configuration">
<span class="tag" style="min-width: 6em">Message</span>
<code>Configuration</code>
</a>
</p>
<p>
<a href="#message-org.signal.chat.remoteconfiguration.GetBadgesRequest">
<span class="tag" style="min-width: 6em">Message</span>
<code>GetBadgesRequest</code>
</a>
</p>
<p>
<a href="#message-org.signal.chat.remoteconfiguration.GetBadgesResponse">
<span class="tag" style="min-width: 6em">Message</span>
<code>GetBadgesResponse</code>
</a>
</p>
<p>
<a href="#message-org.signal.chat.remoteconfiguration.GetConfigurationRequest">
<span class="tag" style="min-width: 6em">Message</span>
<code>GetConfigurationRequest</code>
</a>
</p>
<p>
<a href="#message-org.signal.chat.remoteconfiguration.GetConfigurationResponse">
<span class="tag" style="min-width: 6em">Message</span>
<code>GetConfigurationResponse</code>
</a>
</p>
<p>
<a href="#message-org.signal.chat.remoteconfiguration.TaggedBadges">
<span class="tag" style="min-width: 6em">Message</span>
<code>TaggedBadges</code>
</a>
</p>
<p>
<a href="#message-org.signal.chat.remoteconfiguration.TaggedConfiguration">
<span class="tag" style="min-width: 6em">Message</span>
<code>TaggedConfiguration</code>
</a>
</p>
</div>
<div class="block">
</div>
<div class="block">
<h3 class="title is-3">
Services
</h3>
<div>
<h4 class="title is-4 type-heading" id="service-org.signal.chat.remoteconfiguration.RemoteConfiguration">
<a href="#service-org.signal.chat.remoteconfiguration.RemoteConfiguration" title="org.signal.chat.remoteconfiguration.RemoteConfiguration">service RemoteConfiguration</a>
</h4>
<div class="block content">
<p><p>Provides remote configuration applicable to the authenticated user</p></p>
</div>
<div class="box">
<div class="block">
<h5 class="title is-5" id="service-org.signal.chat.remoteconfiguration.RemoteConfiguration-GetConfiguration">
<a href="#service-org.signal.chat.remoteconfiguration.RemoteConfiguration-GetConfiguration">
rpc <code>GetConfiguration</code>
</a>
</h5>
Request: <code><a href="org.signal.chat.remoteconfiguration.html#message-org.signal.chat.remoteconfiguration.GetConfigurationRequest"><span title="org.signal.chat.remoteconfiguration.GetConfigurationRequest">org.signal.chat.remoteconfiguration.GetConfigurationRequest</span>
</a></code><br>
Response: <code><a href="org.signal.chat.remoteconfiguration.html#message-org.signal.chat.remoteconfiguration.GetConfigurationResponse"><span title="org.signal.chat.remoteconfiguration.GetConfigurationResponse">org.signal.chat.remoteconfiguration.GetConfigurationResponse</span>
</a></code><br>
</div>
<div class="block">
<p><p>Fetches the configuration for the authenticated user. Returned
values are based on the authenticated account and caller's client platform,
which is derived from the "User-Agent" header.</p></p>
</div>
</div>
<div class="box">
<div class="block">
<h5 class="title is-5" id="service-org.signal.chat.remoteconfiguration.RemoteConfiguration-GetBadges">
<a href="#service-org.signal.chat.remoteconfiguration.RemoteConfiguration-GetBadges">
rpc <code>GetBadges</code>
</a>
</h5>
Request: <code><a href="org.signal.chat.remoteconfiguration.html#message-org.signal.chat.remoteconfiguration.GetBadgesRequest"><span title="org.signal.chat.remoteconfiguration.GetBadgesRequest">org.signal.chat.remoteconfiguration.GetBadgesRequest</span>
</a></code><br>
Response: <code><a href="org.signal.chat.remoteconfiguration.html#message-org.signal.chat.remoteconfiguration.GetBadgesResponse"><span title="org.signal.chat.remoteconfiguration.GetBadgesResponse">org.signal.chat.remoteconfiguration.GetBadgesResponse</span>
</a></code><br>
</div>
<div class="block">
<p><p>Returns detailed information for all configured badges, keyed by badge ID.</p>
<p>Badge descriptions may contain localized strings. Callers should set their
language preferences via gRPC metadata on the request with the key
"Accept-Language": https://datatracker.ietf.org/doc/html/rfc3282#section-3</p>
<p>Callers may cache a badges result for up to 1 day before checking (via
etag) if there are any new updates.</p></p>
</div>
</div>
</div>
</div>
<h3 class="title is-3">
Messages
</h3>
<div class="block">
<h4 class="title is-4 type-heading" id="message-org.signal.chat.remoteconfiguration.Badges">
<span>
<a href="#message-org.signal.chat.remoteconfiguration.Badges" title="org.signal.chat.remoteconfiguration.Badges">message Badges</a>
</span>
</h4>
<div class="block content">
</div>
<table class="table is-fullwidth is-hoverable is-bordered">
<thead>
<tr>
<th></th>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>
badges
</td>
<td>
<code title="map&lt;string, Badge&gt;">
<span>map&lt;string, Badge&gt;</span>
</code>
</td>
<td class="content"><p>A map of badge ID to the detailed information for that badge.</p></td>
</tr>
</tbody>
</table>
</div>
<div class="block">
<h4 class="title is-4 type-heading" id="message-org.signal.chat.remoteconfiguration.Configuration">
<span>
<a href="#message-org.signal.chat.remoteconfiguration.Configuration" title="org.signal.chat.remoteconfiguration.Configuration">message Configuration</a>
</span>
</h4>
<div class="block content">
</div>
<table class="table is-fullwidth is-hoverable is-bordered">
<thead>
<tr>
<th></th>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>
configuration
</td>
<td>
<code title="map&lt;string, string&gt;">
<span>map&lt;string, string&gt;</span>
</code>
</td>
<td class="content"><p>A map of namespaced configuration keys to their resolved values. All
configuration values are represented as strings. boolean values are
represented as the strings "true" or "false".</p></td>
</tr>
</tbody>
</table>
</div>
<div class="block">
<h4 class="title is-4 type-heading" id="message-org.signal.chat.remoteconfiguration.GetBadgesRequest">
<span>
<a href="#message-org.signal.chat.remoteconfiguration.GetBadgesRequest" title="org.signal.chat.remoteconfiguration.GetBadgesRequest">message GetBadgesRequest</a>
</span>
</h4>
<div class="block content">
</div>
<table class="table is-fullwidth is-hoverable is-bordered">
<thead>
<tr>
<th></th>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>
etag
</td>
<td>
<code title="bytes">
<span>bytes</span>
</code>
</td>
<td class="content"><p>If present, the etag from a prior GetBadgesResponse. If the provided etag
matches the current badge etag, the server may elide the badge response.</p></td>
</tr>
</tbody>
</table>
</div>
<div class="block">
<h4 class="title is-4 type-heading" id="message-org.signal.chat.remoteconfiguration.GetBadgesResponse">
<span>
<a href="#message-org.signal.chat.remoteconfiguration.GetBadgesResponse" title="org.signal.chat.remoteconfiguration.GetBadgesResponse">message GetBadgesResponse</a>
</span>
</h4>
<div class="block content">
</div>
<table class="table is-fullwidth is-hoverable is-bordered">
<thead>
<tr>
<th></th>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="nohover"><td style="border: 0px"></td></tr>
<tr class="nohover">
<td class="oneof-heading" colspan="4">
<div class="oneof-heading">
<strong>oneof response</strong>
</div>
</td>
</tr>
<tr>
<td>
1
</td>
<td>
tagged_badges
</td>
<td>
<code title="org.signal.chat.remoteconfiguration.TaggedBadges">
<a href="org.signal.chat.remoteconfiguration.html#message-org.signal.chat.remoteconfiguration.TaggedBadges"><span title="org.signal.chat.remoteconfiguration.TaggedBadges">org.signal.chat.remoteconfiguration.TaggedBadges</span>
</a>
</code>
</td>
<td class="content"><p>The full set of badges and corresponding etag.</p></td>
</tr>
<tr>
<td>
2
</td>
<td>
etag_matched
</td>
<td>
<code title="bool">
<span>bool</span>
</code>
</td>
<td class="content"><p>The etag in the request matched the current badge etag.</p></td>
</tr>
</tbody>
</table>
</div>
<div class="block">
<h4 class="title is-4 type-heading" id="message-org.signal.chat.remoteconfiguration.GetConfigurationRequest">
<span>
<a href="#message-org.signal.chat.remoteconfiguration.GetConfigurationRequest" title="org.signal.chat.remoteconfiguration.GetConfigurationRequest">message GetConfigurationRequest</a>
</span>
</h4>
<div class="block content">
</div>
<table class="table is-fullwidth is-hoverable is-bordered">
<thead>
<tr>
<th></th>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>
etag
</td>
<td>
<code title="bytes">
<span>bytes</span>
</code>
</td>
<td class="content"><p>If present, the etag from a prior GetConfigurationResponse. If the
provided etag matches the current configuration etag, the server may elide
the configuration response.</p></td>
</tr>
</tbody>
</table>
</div>
<div class="block">
<h4 class="title is-4 type-heading" id="message-org.signal.chat.remoteconfiguration.GetConfigurationResponse">
<span>
<a href="#message-org.signal.chat.remoteconfiguration.GetConfigurationResponse" title="org.signal.chat.remoteconfiguration.GetConfigurationResponse">message GetConfigurationResponse</a>
</span>
</h4>
<div class="block content">
</div>
<table class="table is-fullwidth is-hoverable is-bordered">
<thead>
<tr>
<th></th>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="nohover"><td style="border: 0px"></td></tr>
<tr class="nohover">
<td class="oneof-heading" colspan="4">
<div class="oneof-heading">
<strong>oneof response</strong>
</div>
</td>
</tr>
<tr>
<td>
1
</td>
<td>
tagged_configuration
</td>
<td>
<code title="org.signal.chat.remoteconfiguration.TaggedConfiguration">
<a href="org.signal.chat.remoteconfiguration.html#message-org.signal.chat.remoteconfiguration.TaggedConfiguration"><span title="org.signal.chat.remoteconfiguration.TaggedConfiguration">org.signal.chat.remoteconfiguration.TaggedConfiguration</span>
</a>
</code>
</td>
<td class="content"><p>The full configuration and corresponding etag.</p></td>
</tr>
<tr>
<td>
2
</td>
<td>
etag_matched
</td>
<td>
<code title="bool">
<span>bool</span>
</code>
</td>
<td class="content"><p>The etag in the request matched the current configuration etag.</p></td>
</tr>
</tbody>
</table>
</div>
<div class="block">
<h4 class="title is-4 type-heading" id="message-org.signal.chat.remoteconfiguration.TaggedBadges">
<span>
<a href="#message-org.signal.chat.remoteconfiguration.TaggedBadges" title="org.signal.chat.remoteconfiguration.TaggedBadges">message TaggedBadges</a>
</span>
</h4>
<div class="block content">
</div>
<table class="table is-fullwidth is-hoverable is-bordered">
<thead>
<tr>
<th></th>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>
badges
</td>
<td>
<code title="org.signal.chat.remoteconfiguration.Badges">
<a href="org.signal.chat.remoteconfiguration.html#message-org.signal.chat.remoteconfiguration.Badges"><span title="org.signal.chat.remoteconfiguration.Badges">org.signal.chat.remoteconfiguration.Badges</span>
</a>
</code>
</td>
<td class="content"></td>
</tr>
<tr>
<td>2</td>
<td>
etag
</td>
<td>
<code title="bytes">
<span>bytes</span>
</code>
</td>
<td class="content"><p>An entity tag for <code>badges</code>. This may be supplied in a subsequent request
to optimize bandwidth when the set of badges has not changed.</p></td>
</tr>
</tbody>
</table>
</div>
<div class="block">
<h4 class="title is-4 type-heading" id="message-org.signal.chat.remoteconfiguration.TaggedConfiguration">
<span>
<a href="#message-org.signal.chat.remoteconfiguration.TaggedConfiguration" title="org.signal.chat.remoteconfiguration.TaggedConfiguration">message TaggedConfiguration</a>
</span>
</h4>
<div class="block content">
</div>
<table class="table is-fullwidth is-hoverable is-bordered">
<thead>
<tr>
<th></th>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>
configuration
</td>
<td>
<code title="org.signal.chat.remoteconfiguration.Configuration">
<a href="org.signal.chat.remoteconfiguration.html#message-org.signal.chat.remoteconfiguration.Configuration"><span title="org.signal.chat.remoteconfiguration.Configuration">org.signal.chat.remoteconfiguration.Configuration</span>
</a>
</code>
</td>
<td class="content"></td>
</tr>
<tr>
<td>2</td>
<td>
etag
</td>
<td>
<code title="bytes">
<span>bytes</span>
</code>
</td>
<td class="content"><p>An entity tag for <code>configuration</code>. This may be supplied in a
subsequent request to optimize bandwidth when the configuration has not
changed.</p></td>
</tr>
</tbody>
</table>
</div>
</div>
<footer class="footer">
<div class="content has-text-centered">
<p>Built with <strong><a href="https://github.com/markvincze/sabledocs" target="_blank">sabledocs</a></strong>.</p>
</div>
</footer>
</body>
</html>
+650
View File
@@ -0,0 +1,650 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Protobuf module documentation</title>
<link rel="stylesheet" href="static/mystyles.css" />
<script src="static/fontawesome.js"></script>
<script src="static/lunr.js"></script>
<script src="static/theme.js"></script>
</head>
<body>
<div class="container">
<nav class="level pt-6 mb-5 pb-2 bottom-border">
<div class="level-left">
<p class="level-item has-text-centered is-size-3 has-text-weight-medium">
<a class="link is-info" href="index.html">
Protobuf module documentation
</a>
</p>
</div>
<div class="level-right">
<form action="search.html" class="mr-2 has-text-centered">
<input type="text" name="query" class="input mr-3 navbar-search-query-input" placeholder="Search">
<input type="submit" class="button is-primary mr-5" value="Search" />
</form>
<p class="level-item has-text-centered is-size-5">
<a href="" class="link is-info mr-5" target="_blank">
<span>Source</span>
</a>
<button class="theme-toggle" id="theme-toggle" title="Toggles light & dark" aria-label="auto" aria-live="polite" type="button">
<svg class="sun-and-moon" aria-hidden="true" width="24" height="24" viewBox="0 0 24 24">
<mask class="moon" id="moon-mask">
<rect x="0" y="0" width="100%" height="100%" fill="white" />
<circle cx="24" cy="10" r="6" fill="black" />
</mask>
<circle class="sun" cx="12" cy="12" r="6" mask="url(#moon-mask)" fill="currentColor" />
<g class="sun-beams" stroke="currentColor">
<line x1="12" y1="1" x2="12" y2="3" />
<line x1="12" y1="21" x2="12" y2="23" />
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64" />
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78" />
<line x1="1" y1="12" x2="3" y2="12" />
<line x1="21" y1="12" x2="23" y2="12" />
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36" />
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22" />
</g>
</svg>
</button>
</p>
</div>
</nav>
</div>
<div id="main-content" class="container mb-6">
<p class="mb-2">
<a style="font-size: 0.9em" href="index.html">← Back to packages</a>
</p>
<h3 class="title is-3">
Package <code>org.signal.chat.require</code>
</h3>
<div class="block">
<p>
<a href="#message-org.signal.chat.require.AllowedValuesConstraint">
<span class="tag" style="min-width: 6em">Message</span>
<code>AllowedValuesConstraint</code>
</a>
</p>
<p>
<a href="#message-org.signal.chat.require.ElementConstraint">
<span class="tag" style="min-width: 6em">Message</span>
<code>ElementConstraint</code>
</a>
</p>
<p>
<a href="#message-org.signal.chat.require.SizeConstraint">
<span class="tag" style="min-width: 6em">Message</span>
<code>SizeConstraint</code>
</a>
</p>
<p>
<a href="#message-org.signal.chat.require.ValueRangeConstraint">
<span class="tag" style="min-width: 6em">Message</span>
<code>ValueRangeConstraint</code>
</a>
</p>
<p>
<a href="#enum-org.signal.chat.require.Auth">
<span class="tag" style="min-width: 6em">Enum</span>
<code>Auth</code>
</a>
</p>
<p>
<a href="#enum-org.signal.chat.require.IdentityType">
<span class="tag" style="min-width: 6em">Enum</span>
<code>IdentityType</code>
</a>
</p>
</div>
<div class="block">
</div>
<h3 class="title is-3">
Messages
</h3>
<div class="block">
<h4 class="title is-4 type-heading" id="message-org.signal.chat.require.AllowedValuesConstraint">
<span>
<a href="#message-org.signal.chat.require.AllowedValuesConstraint" title="org.signal.chat.require.AllowedValuesConstraint">message AllowedValuesConstraint</a>
</span>
</h4>
<div class="block content">
</div>
<table class="table is-fullwidth is-hoverable is-bordered">
<thead>
<tr>
<th></th>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>
ints
</td>
<td>
<code title="int64">
repeated
<span>int64</span>
</code>
</td>
<td class="content"><p>Permitted values for integer fields</p></td>
</tr>
<tr>
<td>2</td>
<td>
strings
</td>
<td>
<code title="string">
repeated
<span>string</span>
</code>
</td>
<td class="content"><p>Permitted values for string fields</p></td>
</tr>
<tr>
<td>3</td>
<td>
enums
</td>
<td>
<code title="string">
repeated
<span>string</span>
</code>
</td>
<td class="content"><p>Permitted value names for enum fields</p></td>
</tr>
</tbody>
</table>
</div>
<div class="block">
<h4 class="title is-4 type-heading" id="message-org.signal.chat.require.ElementConstraint">
<span>
<a href="#message-org.signal.chat.require.ElementConstraint" title="org.signal.chat.require.ElementConstraint">message ElementConstraint</a>
</span>
</h4>
<div class="block content">
</div>
<table class="table is-fullwidth is-hoverable is-bordered">
<thead>
<tr>
<th></th>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>
nonEmpty
</td>
<td>
<code title="bool">
optional
<span>bool</span>
</code>
</td>
<td class="content"></td>
</tr>
<tr>
<td>2</td>
<td>
size
</td>
<td>
<code title="org.signal.chat.require.SizeConstraint">
optional
<a href="org.signal.chat.require.html#message-org.signal.chat.require.SizeConstraint"><span title="org.signal.chat.require.SizeConstraint">org.signal.chat.require.SizeConstraint</span>
</a>
</code>
</td>
<td class="content"></td>
</tr>
<tr>
<td>3</td>
<td>
exactlySize
</td>
<td>
<code title="uint32">
repeated
<span>uint32</span>
</code>
</td>
<td class="content"></td>
</tr>
<tr>
<td>4</td>
<td>
e164
</td>
<td>
<code title="bool">
optional
<span>bool</span>
</code>
</td>
<td class="content"></td>
</tr>
<tr>
<td>5</td>
<td>
base64url
</td>
<td>
<code title="bool">
optional
<span>bool</span>
</code>
</td>
<td class="content"></td>
</tr>
<tr>
<td>6</td>
<td>
range
</td>
<td>
<code title="org.signal.chat.require.ValueRangeConstraint">
optional
<a href="org.signal.chat.require.html#message-org.signal.chat.require.ValueRangeConstraint"><span title="org.signal.chat.require.ValueRangeConstraint">org.signal.chat.require.ValueRangeConstraint</span>
</a>
</code>
</td>
<td class="content"></td>
</tr>
<tr>
<td>7</td>
<td>
identityType
</td>
<td>
<code title="org.signal.chat.require.IdentityType">
optional
<a href="org.signal.chat.require.html#enum-org.signal.chat.require.IdentityType"><span title="org.signal.chat.require.IdentityType">org.signal.chat.require.IdentityType</span>
</a>
</code>
</td>
<td class="content"></td>
</tr>
<tr>
<td>8</td>
<td>
specified
</td>
<td>
<code title="bool">
optional
<span>bool</span>
</code>
</td>
<td class="content"></td>
</tr>
</tbody>
</table>
</div>
<div class="block">
<h4 class="title is-4 type-heading" id="message-org.signal.chat.require.SizeConstraint">
<span>
<a href="#message-org.signal.chat.require.SizeConstraint" title="org.signal.chat.require.SizeConstraint">message SizeConstraint</a>
</span>
</h4>
<div class="block content">
</div>
<table class="table is-fullwidth is-hoverable is-bordered">
<thead>
<tr>
<th></th>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>
min
</td>
<td>
<code title="uint32">
optional
<span>uint32</span>
</code>
</td>
<td class="content"></td>
</tr>
<tr>
<td>2</td>
<td>
max
</td>
<td>
<code title="uint32">
optional
<span>uint32</span>
</code>
</td>
<td class="content"></td>
</tr>
</tbody>
</table>
</div>
<div class="block">
<h4 class="title is-4 type-heading" id="message-org.signal.chat.require.ValueRangeConstraint">
<span>
<a href="#message-org.signal.chat.require.ValueRangeConstraint" title="org.signal.chat.require.ValueRangeConstraint">message ValueRangeConstraint</a>
</span>
</h4>
<div class="block content">
</div>
<table class="table is-fullwidth is-hoverable is-bordered">
<thead>
<tr>
<th></th>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>
min
</td>
<td>
<code title="int64">
optional
<span>int64</span>
</code>
</td>
<td class="content"></td>
</tr>
<tr>
<td>2</td>
<td>
max
</td>
<td>
<code title="int64">
optional
<span>int64</span>
</code>
</td>
<td class="content"></td>
</tr>
</tbody>
</table>
</div>
<h3 class="title is-3">
Enums
</h3>
<div class="block">
<h4 class="title is-4 type-heading" id="enum-org.signal.chat.require.Auth">
<a href="#enum-org.signal.chat.require.Auth" title="org.signal.chat.require.Auth">enum Auth</a>
</h4>
<div class="block content">
<p></p>
</div>
<table class="table is-fullwidth is-hoverable is-bordered">
<thead>
<tr>
<th>Name</th>
<th>Number</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>AUTH_UNSPECIFIED</code></td>
<td>0</td>
<td class="content"></td>
</tr>
<tr>
<td><code>AUTH_ONLY_AUTHENTICATED</code></td>
<td>1</td>
<td class="content"></td>
</tr>
<tr>
<td><code>AUTH_ONLY_ANONYMOUS</code></td>
<td>2</td>
<td class="content"></td>
</tr>
</tbody>
</table>
</div>
<div class="block">
<h4 class="title is-4 type-heading" id="enum-org.signal.chat.require.IdentityType">
<a href="#enum-org.signal.chat.require.IdentityType" title="org.signal.chat.require.IdentityType">enum IdentityType</a>
</h4>
<div class="block content">
<p><p>This is duplicated from common.proto because:</p>
<ol>
<li>importing would be a circular dependency</li>
<li>the canonical declaration belongs there</li>
</ol></p>
</div>
<table class="table is-fullwidth is-hoverable is-bordered">
<thead>
<tr>
<th>Name</th>
<th>Number</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>IDENTITY_TYPE_UNSPECIFIED</code></td>
<td>0</td>
<td class="content"></td>
</tr>
<tr>
<td><code>IDENTITY_TYPE_ACI</code></td>
<td>1</td>
<td class="content"></td>
</tr>
<tr>
<td><code>IDENTITY_TYPE_PNI</code></td>
<td>2</td>
<td class="content"></td>
</tr>
</tbody>
</table>
</div>
</div>
<footer class="footer">
<div class="content has-text-centered">
<p>Built with <strong><a href="https://github.com/markvincze/sabledocs" target="_blank">sabledocs</a></strong>.</p>
</div>
</footer>
</body>
</html>
+98
View File
@@ -0,0 +1,98 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Protobuf module documentation</title>
<link rel="stylesheet" href="static/mystyles.css" />
<script src="static/fontawesome.js"></script>
<script src="static/lunr.js"></script>
<script src="static/theme.js"></script>
</head>
<body>
<div class="container">
<nav class="level pt-6 mb-5 pb-2 bottom-border">
<div class="level-left">
<p class="level-item has-text-centered is-size-3 has-text-weight-medium">
<a class="link is-info" href="index.html">
Protobuf module documentation
</a>
</p>
</div>
<div class="level-right">
<form action="search.html" class="mr-2 has-text-centered">
<input type="text" name="query" class="input mr-3 navbar-search-query-input" placeholder="Search">
<input type="submit" class="button is-primary mr-5" value="Search" />
</form>
<p class="level-item has-text-centered is-size-5">
<a href="" class="link is-info mr-5" target="_blank">
<span>Source</span>
</a>
<button class="theme-toggle" id="theme-toggle" title="Toggles light & dark" aria-label="auto" aria-live="polite" type="button">
<svg class="sun-and-moon" aria-hidden="true" width="24" height="24" viewBox="0 0 24 24">
<mask class="moon" id="moon-mask">
<rect x="0" y="0" width="100%" height="100%" fill="white" />
<circle cx="24" cy="10" r="6" fill="black" />
</mask>
<circle class="sun" cx="12" cy="12" r="6" mask="url(#moon-mask)" fill="currentColor" />
<g class="sun-beams" stroke="currentColor">
<line x1="12" y1="1" x2="12" y2="3" />
<line x1="12" y1="21" x2="12" y2="23" />
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64" />
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78" />
<line x1="1" y1="12" x2="3" y2="12" />
<line x1="21" y1="12" x2="23" y2="12" />
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36" />
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22" />
</g>
</svg>
</button>
</p>
</div>
</nav>
</div>
<div id="main-content" class="container mb-6">
<p class="mb-2">
<a style="font-size: 0.9em" href="index.html">← Back to packages</a>
</p>
<h3 class="title is-3">
Package <code>org.signal.chat.tag</code>
</h3>
<div class="block">
</div>
<div class="block">
</div>
</div>
<footer class="footer">
<div class="content has-text-centered">
<p>Built with <strong><a href="https://github.com/markvincze/sabledocs" target="_blank">sabledocs</a></strong>.</p>
</div>
</footer>
</body>
</html>
+144
View File
@@ -0,0 +1,144 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Protobuf module documentation</title>
<link rel="stylesheet" href="static/mystyles.css" />
<script src="static/fontawesome.js"></script>
<script src="static/lunr.js"></script>
<script src="static/theme.js"></script>
</head>
<body>
<div class="container">
<nav class="level pt-6 mb-5 pb-2 bottom-border">
<div class="level-left">
<p class="level-item has-text-centered is-size-3 has-text-weight-medium">
<a class="link is-info" href="index.html">
Protobuf module documentation
</a>
</p>
</div>
<div class="level-right">
<form action="search.html" class="mr-2 has-text-centered">
<input type="text" name="query" class="input mr-3 navbar-search-query-input" placeholder="Search">
<input type="submit" class="button is-primary mr-5" value="Search" />
</form>
<p class="level-item has-text-centered is-size-5">
<a href="" class="link is-info mr-5" target="_blank">
<span>Source</span>
</a>
<button class="theme-toggle" id="theme-toggle" title="Toggles light & dark" aria-label="auto" aria-live="polite" type="button">
<svg class="sun-and-moon" aria-hidden="true" width="24" height="24" viewBox="0 0 24 24">
<mask class="moon" id="moon-mask">
<rect x="0" y="0" width="100%" height="100%" fill="white" />
<circle cx="24" cy="10" r="6" fill="black" />
</mask>
<circle class="sun" cx="12" cy="12" r="6" mask="url(#moon-mask)" fill="currentColor" />
<g class="sun-beams" stroke="currentColor">
<line x1="12" y1="1" x2="12" y2="3" />
<line x1="12" y1="21" x2="12" y2="23" />
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64" />
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78" />
<line x1="1" y1="12" x2="3" y2="12" />
<line x1="21" y1="12" x2="23" y2="12" />
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36" />
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22" />
</g>
</svg>
</button>
</p>
</div>
</nav>
</div>
<div id="main-content" class="container mb-6">
<script>
const searchDocuments = {"org.signal.chat.account": {"package": "org.signal.chat.account", "url": "org.signal.chat.account.html", "content": "org.signal.chat.account\n\norg\nsignal\nchat\naccount\nAccounts\nProvides methods for working with Signal accounts.\nGetAccountIdentity\nReturns basic identifiers for the authenticated account.\norg\nsignal\nchat\naccount\nGetAccountIdentityRequest\norg\nsignal\nchat\naccount\nGetAccountIdentityResponse\nGetEntitlements\nReturns entitlements for the authenticated account.\norg\nsignal\nchat\naccount\nGetEntitlementsRequest\norg\nsignal\nchat\naccount\nGetEntitlementsResponse\nDeleteAccount\nDeletes the authenticated account, purging all associated data in the\n process.\norg\nsignal\nchat\naccount\nDeleteAccountRequest\norg\nsignal\nchat\naccount\nDeleteAccountResponse\nSetRegistrationLock\nSets the registration lock secret for the authenticated account. To remove\n a registration lock, please use `ClearRegistrationLock`.\norg\nsignal\nchat\naccount\nSetRegistrationLockRequest\norg\nsignal\nchat\naccount\nSetRegistrationLockResponse\nClearRegistrationLock\nRemoves any registration lock credentials from the authenticated account.\norg\nsignal\nchat\naccount\nClearRegistrationLockRequest\norg\nsignal\nchat\naccount\nClearRegistrationLockResponse\nReserveUsernameHash\nAttempts to reserve one of multiple given username hashes. Reserved\n usernames may be claimed later via `ConfirmUsernameHash`.\norg\nsignal\nchat\naccount\nReserveUsernameHashRequest\norg\nsignal\nchat\naccount\nReserveUsernameHashResponse\nConfirmUsernameHash\nSets the username hash/encrypted username to a previously-reserved value\n (see `ReserveUsernameHash`).\norg\nsignal\nchat\naccount\nConfirmUsernameHashRequest\norg\nsignal\nchat\naccount\nConfirmUsernameHashResponse\nDeleteUsernameHash\nClears the current username hash, ciphertext, and link for the\n authenticated user.\norg\nsignal\nchat\naccount\nDeleteUsernameHashRequest\norg\nsignal\nchat\naccount\nDeleteUsernameHashResponse\nSetUsernameLink\nAssociates the given username ciphertext with the account, replacing any\n previously stored ciphertext. A new link handle will optionally be created,\n and the link handle to use will be returned in any event.\norg\nsignal\nchat\naccount\nSetUsernameLinkRequest\norg\nsignal\nchat\naccount\nSetUsernameLinkResponse\nDeleteUsernameLink\nClears any username link associated with the authenticated account.\norg\nsignal\nchat\naccount\nDeleteUsernameLinkRequest\norg\nsignal\nchat\naccount\nDeleteUsernameLinkResponse\nConfigureUnidentifiedAccess\nConfigures \"unidentified access\" keys and preferences for the authenticated\n account. Other users permitted to interact with this account anonymously\n may take actions like fetching pre-keys and profiles for this account or\n sending sealed-sender messages without providing identifying credentials.\norg\nsignal\nchat\naccount\nConfigureUnidentifiedAccessRequest\norg\nsignal\nchat\naccount\nConfigureUnidentifiedAccessResponse\nSetDiscoverableByPhoneNumber\nSets whether the authenticated account may be discovered by phone number\n via the Contact Discovery Service (CDS).\norg\nsignal\nchat\naccount\nSetDiscoverableByPhoneNumberRequest\norg\nsignal\nchat\naccount\nSetDiscoverableByPhoneNumberResponse\nSetRegistrationRecoveryPassword\nSets the registration recovery password for the authenticated account.\norg\nsignal\nchat\naccount\nSetRegistrationRecoveryPasswordRequest\norg\nsignal\nchat\naccount\nSetRegistrationRecoveryPasswordResponse\nSetZkCredentialKey\nStore a public key used to issue and verify zero-knowledge (anonymous) credentials for the account.\norg\nsignal\nchat\naccount\nSetZkCredentialKeyRequest\norg\nsignal\nchat\naccount\nSetZkCredentialKeyResponse\nChangeNumber\nChanges the phone number associated with the authenticated account.\norg\nsignal\nchat\naccount\nChangeNumberRequest\norg\nsignal\nchat\naccount\nChangeNumberResponse\nGetAccountDataReport\nProduces a report of non-ephemeral account data stored by the service\norg\nsignal\nchat\naccount\nGetAccountDataReportRequest\norg\nsignal\nchat\naccount\nGetAccountDataReportResponse\nGetCapabilities\nGets the capabilities for the authenticated account.\norg\nsignal\nchat\naccount\nGetCapabilitiesRequest\norg\nsignal\nchat\naccount\nGetCapabilitiesResponse\nGenerateTotpKey\nGenerates and stores a pending TOTP key for the authenticated account.\n To \"activate\" the key, callers must call the `ConfirmTotpKey` endpoint.\n\n TOTP keys may only be generated for accounts without phone numbers.\norg\nsignal\nchat\naccount\nGenerateTotpKeyRequest\norg\nsignal\nchat\naccount\nGenerateTotpKeyResponse\nConfirmTotpKey\nConfirms that the caller has stored and can derive one-time passwords from\n a pending TOTP key generated via `GenerateTotpKey` and stores/activates the\n key for the caller's account\n\n TOTP keys may only be generated for accounts without phone numbers.\norg\nsignal\nchat\naccount\nConfirmTotpKLine truncated
const searchIndex = {"version": "2.3.9", "fields": ["content", "url"], "fieldVectors": [["content/org.signal.chat.account", [0, 1.295, 1, 0.168, 2, 0.168, 3, 0.168, 4, 1.199, 5, 0.369, 6, 0.665, 7, 0.562, 8, 1.295, 9, 0.905, 10, 1.295, 11, 1.597, 12, 1.301, 13, 2.111, 14, 2.111, 15, 1.295, 16, 1.694, 17, 2.111, 18, 3.08, 19, 1.295, 20, 0.746, 21, 1.295, 22, 1.156, 23, 1.953, 24, 0.872, 25, 2.111, 26, 2.111, 27, 1.295, 28, 0.884, 29, 2.512, 30, 3.321, 31, 2.073, 32, 2.382, 33, 1.295, 34, 0.54, 35, 2.111, 36, 2.111, 37, 2.111, 38, 1.222, 39, 2.111, 40, 2.111, 41, 2.111, 42, 1.42, 43, 3.836, 44, 1.553, 45, 1.216, 46, 2.12, 47, 2.575, 48, 2.285, 49, 2.671, 50, 1.04, 51, 1.202, 52, 2.111, 53, 2.111, 54, 2.111, 55, 1.295, 56, 1.052, 57, 0.696, 58, 0.872, 59, 2.111, 60, 2.671, 61, 1.295, 62, 2.145, 63, 1.012, 64, 2.988, 65, 2.039, 66, 1.681, 67, 2.111, 68, 2.111, 69, 1.295, 70, 0.872, 71, 2.303, 72, 1.254, 73, 3.04, 74, 0.562, 75, 1.535, 76, 1.295, 77, 2.111, 78, 2.111, 79, 1.295, 80, 2.111, 81, 2.111, 82, 1.295, 83, 1.331, 84, 2.209, 85, 1.452, 86, 1.152, 87, 0.872, 88, 0.916, 89, 2.473, 90, 1.472, 91, 1.295, 92, 1.04, 93, 0.872, 94, 1.535, 95, 1.42, 96, 1.735, 97, 0.646, 98, 0.646, 99, 0.975, 100, 1.578, 101, 2.111, 102, 2.111, 103, 1.295, 104, 1.012, 105, 2.671, 106, 2.342, 107, 1.631, 108, 2.111, 109, 2.111, 110, 1.467, 111, 2.111, 112, 2.111, 113, 2.111, 114, 1.295, 115, 2.145, 116, 2.251, 117, 2.111, 118, 2.111, 119, 1.295, 120, 1.774, 121, 0.562, 122, 2.095, 123, 1.538, 124, 1.694, 125, 2.111, 126, 2.111, 127, 1.295, 128, 0.799, 129, 3.392, 130, 2.111, 131, 1.295, 132, 1.694, 133, 2.145, 134, 1.216, 135, 1.04, 136, 2.111, 137, 2.111, 138, 2.111, 139, 1.42, 140, 3.414, 141, 2.111, 142, 2.111, 143, 2.111, 144, 1.298, 145, 2.723, 146, 4.749, 147, 1.159, 148, 1.222, 149, 0.607, 150, 2.111, 151, 0.646, 152, 2.111, 153, 2.671, 154, 3.21, 155, 1.42, 156, 0.995, 157, 1.295, 158, 0.49, 159, 2.111, 160, 2.671, 161, 1.295, 162, 2.073, 163, 0.872, 164, 3.999, 165, 3.392, 166, 2.073, 167, 2.111, 168, 2.671, 169, 1.295, 170, 1.295, 171, 1.04, 172, 1.295, 173, 2.111, 174, 2.671, 175, 1.295, 176, 1.189, 177, 4.517, 178, 2.111, 179, 3.392, 180, 1.295, 181, 0.562, 182, 1.337, 183, 1.798, 184, 1.912, 185, 2.145, 186, 1.798, 187, 1.798, 188, 1.337, 189, 2.671, 190, 1.331, 191, 1.912, 192, 2.111, 193, 2.671, 194, 1.295, 195, 2.111, 196, 2.111, 197, 1.295, 198, 0.66, 199, 0.872, 200, 3.08, 201, 2.111, 202, 2.671, 203, 1.295, 204, 1.295, 205, 2.111, 206, 2.111, 207, 1.295, 208, 1.04, 209, 0.562, 210, 1.295, 211, 0.646, 212, 2.111, 213, 2.111, 214, 1.295, 215, 3.08, 216, 2.111, 217, 2.111, 218, 1.295, 219, 2.111, 220, 2.111, 221, 1.295, 222, 2.145, 223, 2.073, 224, 1.216, 225, 2.111, 226, 2.111, 227, 1.295, 228, 1.798, 229, 2.073, 230, 2.111, 231, 1.159, 232, 1.337, 233, 0.799, 234, 1.295, 235, 0.872, 236, 0.843, 237, 1.664, 238, 0.872, 239, 0.746, 240, 1.04, 241, 0.746, 242, 0.872, 243, 1.295, 244, 2.073, 245, 1.295, 246, 2.111, 247, 1.295, 248, 1.267, 249, 0.646, 250, 1.295, 251, 1.04, 252, 2.111, 253, 1.83, 254, 1.42, 255, 1.04, 256, 1.813, 257, 0.646, 258, 0.872, 259, 1.295, 260, 1.42, 261, 0.872, 262, 1.149, 263, 2.111, 264, 1.691, 265, 1.216, 266, 1.295, 267, 1.04, 268, 1.295, 269, 0.646, 270, 1.04, 271, 1.295, 272, 2.145, 273, 0.768, 274, 1.04, 275, 1.694, 276, 2.111, 277, 1.295, 278, 1.694, 279, 1.42, 280, 1.694, 281, 1.295, 282, 1.774, 283, 1.295, 284, 1.295, 285, 1.295, 286, 1.295, 287, 0.799, 288, 0.49, 289, 1.295, 290, 1.42, 291, 1.295, 292, 1.377, 293, 0.872, 294, 1.018, 295, 1.538, 296, 1.216, 297, 0.428, 298, 0.872, 299, 1.798, 300, 0.616, 301, 1.216, 302, 1.295, 303, 1.774, 304, 1.295, 305, 3.08, 306, 2.111, 307, 1.159, 308, 2.473, 309, 2.111, 310, 1.538, 311, 1.295, 312, 1.052, 313, 1.295, 314, 1.04, 315, 1.04, 316, 3.08, 317, 2.303, 318, 3.392, 319, 1.018, 320, 1.377, 321, 3.079, 322, 2.473, 323, 1.295, 324, 1.04, 325, 2.473, 326, 2.671, 327, 1.04, 328, 1.295, 329, 1.04, 330, 1.295, 331, 1.04, 332, 1.295, 333, 0.646, 334, 0.916, 335, 1.295, 336, 2.111, 337, 1.295, 338, 0.646, 339, 1.295, 340, 2.145, 341, 0.451, 342, 1.295, 343, 1.295, 344, 1.295, 345, 1.42, 346, 1.295, 347, 3.999, 348, 1.295, 349, 1.694, 350, 1.295, 351, 1.295, 352, 2.473, 353, 1.012, 354, 0.766, 355, 1.04, 356, 1.04, 357, 1.295, 358, 1.295, 359, 1.42, 360, 0.916, 361, 0.49, 362, 1.295, 363, 1.295, 364, 0.746, 365, 0.322, 366, 0.916, 367, 1.295, 368, 1.295, 369, 1.04, 370, 0.746, 371, 1.295, 372, 2.111, 373, 1.295, 374, 1.295, 375, 1.295, 376, 1.295, 377, 2.671, 378, 1.295, 379, 0.872, 380, 0.916, 381, 0.746, 382, 0.562, 383, 0.746, 384, 0.428, 385, 2.145, 386, 0.746, 387, 1.04, 388, 1.295, 389, 2.111, 390, 2.473, 391, 1.774, 392, 1.295, 393, 1.295, 394, 1.295, 395, 1.295, 396, 0.872, 397, 0.916, 398, 1.295, 399, 1.04, 400, 1.295, 401, 2.111, 402, 1.295, 403, 1.295, 404, 1.295, 405, 0.872, 406, 0.746, 407, 1.295, 408, 1.295, 409, 1.295, 410, 0.646, 411, 1.42, 412, 0.746, 413, 0.277, 414, 2.111, 415, 1.295, 416, 0.746, 417, 1.295, 418, 0.872,Line truncated
const idx = lunr.Index.load(searchIndex);
function displaySearchResults() {
const query = new URLSearchParams(window.location.search).get('query');
if (query) {
document.getElementById('mainInputQuery').value = query;
const results = idx.query(function (q) {
words = query.toLowerCase().split(" "); // toLowerCase() is needed to make the search case insensitive.
for (n in words) {
const word = words[n];
if (!word) {
continue;
}
// look for an exact match and apply a large positive boost
q.term(word, { usePipeline: true, boost: 100 })
// look for terms that match the beginning of this queryTerm and apply a medium boost
q.term(word + "*", { usePipeline: false, boost: 10 })
}
});
const searchResults = document.getElementById('searchResults');
if (results.length > 0) {
let resultList = ''
for (const n in results) {
// Use the unique ref from the results list to get the full item
// so you can build its <li>
const doc = searchDocuments[results[n].ref]
resultList += '<h5 class="title is-5 mt-3"><a href="' + doc.url + '">' + doc.package + '</a></h5>'
// Add a short clip of the content
resultList += '<p>' + doc.content.substring(0, 150) + '...</p><hr />'
}
searchResults.innerHTML = resultList
} else {
searchResults.innerHTML = '<p>No search results.</p>';
}
}
}
window.addEventListener("load", displaySearchResults);
</script>
<div>
<p class="block">
Enter a query to search this documentation.
</p>
<div class="field is-horizontal">
<form class="field-body">
<div class="field">
<p class="control is-expanded">
<input id="mainInputQuery" type="text" name="query" class="input" placeholder="Search query">
</p>
</div>
<div class="field">
<p class="control is-expanded">
<input type="submit" class="button is-primary" value="Search" />
</p>
</div>
</form>
</div>
<div class="block mt-6">
<div id="searchResults"></div>
</div>
</div>
</div>
<footer class="footer">
<div class="content has-text-centered">
<p>Built with <strong><a href="https://github.com/markvincze/sabledocs" target="_blank">sabledocs</a></strong>.</p>
</div>
</footer>
</body>
</html>
+2
View File
@@ -0,0 +1,2 @@
window.FontAwesomeKitConfig = {"asyncLoading":{"enabled":false},"autoA11y":{"enabled":true},"baseUrl":"https://ka-f.fontawesome.com","baseUrlKit":"https://kit.fontawesome.com","detectConflictsUntil":null,"iconUploads":{},"id":82004925,"license":"free","method":"css","minify":{"enabled":true},"token":"4d30d3d1aa","v4FontFaceShim":{"enabled":true},"v4shim":{"enabled":true},"v5FontFaceShim":{"enabled":true},"version":"6.4.2"};
!function(t){"function"==typeof define&&define.amd?define("kit-loader",t):t()}((function(){"use strict";function t(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function e(e){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?t(Object(o),!0).forEach((function(t){r(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):t(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function r(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function o(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,c,a=[],u=!0,f=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(a.push(r.value),a.length!==e);u=!0);}catch(t){f=!0,o=t}finally{try{if(!u&&null!=n.return&&(c=n.return(),Object(c)!==c))return}finally{if(f)throw o}}return a}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return i(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function c(t,e){var n=e&&e.addOn||"",r=e&&e.baseFilename||t.license+n,o=e&&e.minify?".min":"",i=e&&e.fileSuffix||t.method,c=e&&e.subdir||t.method;return t.baseUrl+"/releases/"+("latest"===t.version?"latest":"v".concat(t.version))+"/"+c+"/"+r+o+"."+i}function a(t,e){var n=e||["fa"],r="."+Array.prototype.join.call(n,",."),o=t.querySelectorAll(r);Array.prototype.forEach.call(o,(function(e){var n=e.getAttribute("title");e.setAttribute("aria-hidden","true");var r=!e.nextElementSibling||!e.nextElementSibling.classList.contains("sr-only");if(n&&r){var o=t.createElement("span");o.innerHTML=n,o.classList.add("sr-only"),e.parentNode.insertBefore(o,e.nextSibling)}}))}var u,f=function(){},s="undefined"!=typeof global&&void 0!==global.process&&"function"==typeof global.process.emit,l="undefined"==typeof setImmediate?setTimeout:setImmediate,d=[];function h(){for(var t=0;t<d.length;t++)d[t][0](d[t][1]);d=[],u=!1}function m(t,e){d.push([t,e]),u||(u=!0,l(h,0))}function p(t){var e=t.owner,n=e._state,r=e._data,o=t[n],i=t.then;if("function"==typeof o){n="fulfilled";try{r=o(r)}catch(t){g(i,t)}}v(i,r)||("fulfilled"===n&&b(i,r),"rejected"===n&&g(i,r))}function v(t,e){var r;try{if(t===e)throw new TypeError("A promises callback cannot return that same promise.");if(e&&("function"==typeof e||"object"===n(e))){var o=e.then;if("function"==typeof o)return o.call(e,(function(n){r||(r=!0,e===n?y(t,n):b(t,n))}),(function(e){r||(r=!0,g(t,e))})),!0}}catch(e){return r||g(t,e),!0}return!1}function b(t,e){t!==e&&v(t,e)||y(t,e)}function y(t,e){"pending"===t._state&&(t._state="settled",t._data=e,m(A,t))}function g(t,e){"pending"===t._state&&(t._state="settled",t._data=e,m(S,t))}function w(t){t._then=t._then.forEach(p)}function A(t){t._state="fulfilled",w(t)}function S(t){t._state="rejected",w(t),!t._handled&&s&&global.process.emit("unhandledRejection",t._data,t)}function O(t){global.process.emit("rejectionHandled",t)}function j(t){if("function"!=typeof t)throw new TypeError("Promise resolver "+t+" is not a function");if(this instanceof j==!1)throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");this._then=[],function(t,e){function n(t){g(e,t)}try{t((function(t){b(e,t)}),n)}catch(t){n(t)}}(t,this)}j.prototype={constructor:j,_state:"pending",_then:null,_data:void 0,_handled:!1,then:function(t,e){var n={owner:this,then:new this.constructor(f),fulfilled:t,rejected:e};return!e&&!t||this._handled||(this._handled=!0,"rejected"===this._state&&s&&m(O,this)),"fulfilled"===this._state||"rejected"==Line truncated
+3475
View File
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
+54
View File
@@ -0,0 +1,54 @@
const storageKey = 'theme-preference';
const onClick = () => {
// flip current value
theme.value = theme.value === 'light'
? 'dark'
: 'light';
setPreference();
}
const getColorPreference = () => {
if (localStorage.getItem(storageKey))
return localStorage.getItem(storageKey);
else
return window.matchMedia('(prefers-color-scheme: dark)').matches
? 'dark'
: 'light';
}
const setPreference = () => {
localStorage.setItem(storageKey, theme.value);
reflectPreference();
}
const reflectPreference = () => {
document.documentElement.className =
theme.value === 'dark' ? 'dark' : '';
document.documentElement
.setAttribute('data-theme', theme.value);
}
const theme = {
value: getColorPreference(),
}
window.addEventListener(
"load",
() => {
document
.querySelector('#theme-toggle')
.addEventListener('click', onClick);
});
// sync with system changes
window
.matchMedia('(prefers-color-scheme: dark)')
.addEventListener('change', ({ matches: isDark }) => {
theme.value = isDark ? 'dark' : 'light';
setPreference();
});
reflectPreference();
+20
View File
@@ -0,0 +1,20 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Signal Server API</title>
<script src="https://unpkg.com/@stoplight/elements/web-components.min.js"></script>
<link rel="stylesheet" href="https://unpkg.com/@stoplight/elements/styles.min.css">
<link rel="icon" type="image/x-icon" href="/favicon.ico">
</head>
<body>
<elements-api
apiDescriptionUrl="signal-server-openapi.yaml"
router="hash"
/>
</body>
</html>
-397
View File
@@ -1,397 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<packaging>pom</packaging>
<repositories>
<repository>
<id>central</id>
<name>Central Repository</name>
<url>https://repo.maven.apache.org/maven2</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>dynamodb-local-oregon</id>
<name>DynamoDB Local Release Repository</name>
<url>https://s3-us-west-2.amazonaws.com/dynamodb-local/release</url>
</repository>
</repositories>
<modules>
<module>redis-dispatch</module>
<module>websocket-resources</module>
<module>gcm-sender-async</module>
<module>service</module>
</modules>
<properties>
<aws.sdk.version>1.11.939</aws.sdk.version>
<aws.sdk2.version>2.16.66</aws.sdk2.version>
<commons-codec.version>1.15</commons-codec.version>
<commons-csv.version>1.8</commons-csv.version>
<commons-io.version>2.9.0</commons-io.version>
<dropwizard.version>2.0.22</dropwizard.version>
<dropwizard-metrics-datadog.version>1.1.13</dropwizard-metrics-datadog.version>
<guava.version>30.1.1-jre</guava.version>
<jaxb.version>2.3.1</jaxb.version>
<jedis.version>2.9.0</jedis.version>
<lettuce.version>6.0.4.RELEASE</lettuce.version>
<libphonenumber.version>8.12.23</libphonenumber.version>
<logstash.logback.version>6.6</logstash.logback.version>
<micrometer.version>1.5.3</micrometer.version>
<mockito.version>3.11.1</mockito.version>
<netty.version>4.1.65.Final</netty.version>
<netty.tcnative-boringssl-static.version>2.0.39.Final</netty.tcnative-boringssl-static.version>
<opentest4j.version>1.2.0</opentest4j.version>
<postgresql.version>9.4-1201-jdbc41</postgresql.version>
<protobuf.version>3.17.1</protobuf.version>
<pushy.version>0.14.2</pushy.version>
<resilience4j.version>1.5.0</resilience4j.version>
<semver4j.version>3.1.0</semver4j.version>
<slf4j.version>1.7.30</slf4j.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<groupId>org.whispersystems.textsecure</groupId>
<artifactId>TextSecureServer</artifactId>
<version>JGITVER</version>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>io.dropwizard</groupId>
<artifactId>dropwizard-dependencies</artifactId>
<version>${dropwizard.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-bom</artifactId>
<version>${netty.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-bom</artifactId>
<version>${aws.sdk.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>bom</artifactId>
<version>${aws.sdk2.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>io.github.resilience4j</groupId>
<artifactId>resilience4j-bom</artifactId>
<version>${resilience4j.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-bom</artifactId>
<version>${micrometer.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>com.eatthepath</groupId>
<artifactId>pushy</artifactId>
<version>${pushy.version}</version>
</dependency>
<dependency>
<groupId>com.eatthepath</groupId>
<artifactId>pushy-dropwizard-metrics-listener</artifactId>
<version>${pushy.version}</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>${guava.version}</version>
</dependency>
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java</artifactId>
<version>${protobuf.version}</version>
</dependency>
<dependency>
<groupId>com.googlecode.libphonenumber</groupId>
<artifactId>libphonenumber</artifactId>
<version>${libphonenumber.version}</version>
</dependency>
<dependency>
<groupId>com.vdurmont</groupId>
<artifactId>semver4j</artifactId>
<version>${semver4j.version}</version>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>${commons-codec.version}</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>${commons-io.version}</version>
</dependency>
<dependency>
<groupId>io.lettuce</groupId>
<artifactId>lettuce-core</artifactId>
<version>${lettuce.version}</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-tcnative-boringssl-static</artifactId>
<version>${netty.tcnative-boringssl-static.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>${jaxb.version}</version>
</dependency>
<dependency>
<groupId>net.logstash.logback</groupId>
<artifactId>logstash-logback-encoder</artifactId>
<version>${logstash.logback.version}</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-csv</artifactId>
<version>${commons-csv.version}</version>
</dependency>
<dependency>
<groupId>org.coursera</groupId>
<artifactId>dropwizard-metrics-datadog</artifactId>
<version>${dropwizard-metrics-datadog.version}</version>
</dependency>
<dependency>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
<version>${jaxb.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>${mockito.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-inline</artifactId>
<version>${mockito.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.opentest4j</groupId>
<artifactId>opentest4j</artifactId>
<version>${opentest4j.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>${postgresql.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-nop</artifactId>
<version>${slf4j.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>redis.clients</groupId>
<artifactId>jedis</artifactId>
<version>${jedis.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-all</artifactId>
<version>1.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.github.tomakehurst</groupId>
<artifactId>wiremock-jre8</artifactId>
<version>2.28.1</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId>
</exclusion>
<exclusion>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>${mockito.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<extensions>
<extension>
<groupId>kr.motd.maven</groupId>
<artifactId>os-maven-plugin</artifactId>
<version>1.7.0</version>
</extension>
</extensions>
<plugins>
<plugin>
<groupId>org.xolstice.maven.plugins</groupId>
<artifactId>protobuf-maven-plugin</artifactId>
<version>0.6.1</version>
<configuration>
<protocArtifact>com.google.protobuf:protoc:3.17.2:exe:${os.detected.classifier}</protocArtifact>
</configuration>
<executions>
<execution>
<goals>
<goal>compile</goal>
<goal>test-compile</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>11</source>
<target>11</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.2.0</version>
<configuration>
<archive>
<manifest>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
</manifest>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.1.2</version>
<executions>
<execution>
<id>copy</id>
<phase>test-compile</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<includeScope>test</includeScope>
<includeTypes>so,dll,dylib</includeTypes>
<outputDirectory>${project.build.directory}/lib</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M5</version>
<configuration>
<systemProperties>
<property>
<name>sqlite4java.library.path</name>
<value>${project.build.directory}/lib</value>
</property>
</systemProperties>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.0.0-M3</version>
<executions>
<execution>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<dependencyConvergence/>
<requireMavenVersion>
<version>3.0.0</version>
</requireMavenVersion>
</rules>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<version>3.0.0-M1</version>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>3.0.0-M1</version>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>
</project>
-20
View File
@@ -1,20 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>TextSecureServer</artifactId>
<groupId>org.whispersystems.textsecure</groupId>
<version>JGITVER</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>redis-dispatch</artifactId>
<dependencies>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
</dependencies>
</project>
@@ -1,11 +0,0 @@
/*
* Copyright 2013-2020 Signal Messenger, LLC
* SPDX-License-Identifier: AGPL-3.0-only
*/
package org.whispersystems.dispatch;
public interface DispatchChannel {
void onDispatchMessage(String channel, byte[] message);
void onDispatchSubscribed(String channel);
void onDispatchUnsubscribed(String channel);
}
@@ -1,157 +0,0 @@
/*
* Copyright 2013-2020 Signal Messenger, LLC
* SPDX-License-Identifier: AGPL-3.0-only
*/
package org.whispersystems.dispatch;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.whispersystems.dispatch.io.RedisPubSubConnectionFactory;
import org.whispersystems.dispatch.redis.PubSubConnection;
import org.whispersystems.dispatch.redis.PubSubReply;
import java.io.IOException;
import java.util.Map;
import java.util.Optional;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.Executor;
import java.util.concurrent.Executors;
@SuppressWarnings("OptionalUsedAsFieldOrParameterType")
public class DispatchManager extends Thread {
private final Logger logger = LoggerFactory.getLogger(DispatchManager.class);
private final Executor executor = Executors.newCachedThreadPool();
private final Map<String, DispatchChannel> subscriptions = new ConcurrentHashMap<>();
private final Optional<DispatchChannel> deadLetterChannel;
private final RedisPubSubConnectionFactory redisPubSubConnectionFactory;
private PubSubConnection pubSubConnection;
private volatile boolean running;
public DispatchManager(RedisPubSubConnectionFactory redisPubSubConnectionFactory,
Optional<DispatchChannel> deadLetterChannel)
{
this.redisPubSubConnectionFactory = redisPubSubConnectionFactory;
this.deadLetterChannel = deadLetterChannel;
}
@Override
public void start() {
this.pubSubConnection = redisPubSubConnectionFactory.connect();
this.running = true;
super.start();
}
public void shutdown() {
this.running = false;
this.pubSubConnection.close();
}
public synchronized void subscribe(String name, DispatchChannel dispatchChannel) {
Optional<DispatchChannel> previous = Optional.ofNullable(subscriptions.get(name));
subscriptions.put(name, dispatchChannel);
try {
pubSubConnection.subscribe(name);
} catch (IOException e) {
logger.warn("Subscription error", e);
}
previous.ifPresent(channel -> dispatchUnsubscription(name, channel));
}
public synchronized void unsubscribe(String name, DispatchChannel channel) {
Optional<DispatchChannel> subscription = Optional.ofNullable(subscriptions.get(name));
if (subscription.isPresent() && subscription.get() == channel) {
subscriptions.remove(name);
try {
pubSubConnection.unsubscribe(name);
} catch (IOException e) {
logger.warn("Unsubscribe error", e);
}
dispatchUnsubscription(name, subscription.get());
}
}
public boolean hasSubscription(String name) {
return subscriptions.containsKey(name);
}
@Override
public void run() {
while (running) {
try {
PubSubReply reply = pubSubConnection.read();
switch (reply.getType()) {
case UNSUBSCRIBE: break;
case SUBSCRIBE: dispatchSubscribe(reply); break;
case MESSAGE: dispatchMessage(reply); break;
default: throw new AssertionError("Unknown pubsub reply type! " + reply.getType());
}
} catch (IOException e) {
logger.warn("***** PubSub Connection Error *****", e);
if (running) {
this.pubSubConnection.close();
this.pubSubConnection = redisPubSubConnectionFactory.connect();
resubscribeAll();
}
}
}
logger.warn("DispatchManager Shutting Down...");
}
private void dispatchSubscribe(final PubSubReply reply) {
Optional<DispatchChannel> subscription = Optional.ofNullable(subscriptions.get(reply.getChannel()));
if (subscription.isPresent()) {
dispatchSubscription(reply.getChannel(), subscription.get());
} else {
logger.info("Received subscribe event for non-existing channel: " + reply.getChannel());
}
}
private void dispatchMessage(PubSubReply reply) {
Optional<DispatchChannel> subscription = Optional.ofNullable(subscriptions.get(reply.getChannel()));
if (subscription.isPresent()) {
dispatchMessage(reply.getChannel(), subscription.get(), reply.getContent().get());
} else if (deadLetterChannel.isPresent()) {
dispatchMessage(reply.getChannel(), deadLetterChannel.get(), reply.getContent().get());
} else {
logger.warn("Received message for non-existing channel, with no dead letter handler: " + reply.getChannel());
}
}
private void resubscribeAll() {
new Thread(() -> {
synchronized (DispatchManager.this) {
try {
for (String name : subscriptions.keySet()) {
pubSubConnection.subscribe(name);
}
} catch (IOException e) {
logger.warn("***** RESUBSCRIPTION ERROR *****", e);
}
}
}).start();
}
private void dispatchMessage(final String name, final DispatchChannel channel, final byte[] message) {
executor.execute(() -> channel.onDispatchMessage(name, message));
}
private void dispatchSubscription(final String name, final DispatchChannel channel) {
executor.execute(() -> channel.onDispatchSubscribed(name));
}
private void dispatchUnsubscription(final String name, final DispatchChannel channel) {
executor.execute(() -> channel.onDispatchUnsubscribed(name));
}
}
@@ -1,68 +0,0 @@
/*
* Copyright 2013-2020 Signal Messenger, LLC
* SPDX-License-Identifier: AGPL-3.0-only
*/
package org.whispersystems.dispatch.io;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
public class RedisInputStream {
private static final byte CR = 0x0D;
private static final byte LF = 0x0A;
private final InputStream inputStream;
public RedisInputStream(InputStream inputStream) {
this.inputStream = inputStream;
}
public String readLine() throws IOException {
ByteArrayOutputStream boas = new ByteArrayOutputStream();
boolean foundCr = false;
while (true) {
int character = inputStream.read();
if (character == -1) {
throw new IOException("Stream closed!");
}
boas.write(character);
if (foundCr && character == LF) break;
else if (character == CR) foundCr = true;
else if (foundCr) foundCr = false;
}
byte[] data = boas.toByteArray();
return new String(data, 0, data.length-2);
}
public byte[] readFully(int size) throws IOException {
byte[] result = new byte[size];
int offset = 0;
int remaining = result.length;
while (remaining > 0) {
int read = inputStream.read(result, offset, remaining);
if (read < 0) {
throw new IOException("Stream closed!");
}
offset += read;
remaining -= read;
}
return result;
}
public void close() throws IOException {
inputStream.close();
}
}
@@ -1,13 +0,0 @@
/*
* Copyright 2013-2020 Signal Messenger, LLC
* SPDX-License-Identifier: AGPL-3.0-only
*/
package org.whispersystems.dispatch.io;
import org.whispersystems.dispatch.redis.PubSubConnection;
public interface RedisPubSubConnectionFactory {
PubSubConnection connect();
}
@@ -1,123 +0,0 @@
/*
* Copyright 2013-2020 Signal Messenger, LLC
* SPDX-License-Identifier: AGPL-3.0-only
*/
package org.whispersystems.dispatch.redis;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.whispersystems.dispatch.io.RedisInputStream;
import org.whispersystems.dispatch.redis.protocol.ArrayReplyHeader;
import org.whispersystems.dispatch.redis.protocol.IntReply;
import org.whispersystems.dispatch.redis.protocol.StringReplyHeader;
import org.whispersystems.dispatch.util.Util;
import java.io.BufferedInputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.net.Socket;
import java.util.Arrays;
import java.util.Optional;
import java.util.concurrent.atomic.AtomicBoolean;
public class PubSubConnection {
private final Logger logger = LoggerFactory.getLogger(PubSubConnection.class);
private static final byte[] UNSUBSCRIBE_TYPE = {'u', 'n', 's', 'u', 'b', 's', 'c', 'r', 'i', 'b', 'e' };
private static final byte[] SUBSCRIBE_TYPE = {'s', 'u', 'b', 's', 'c', 'r', 'i', 'b', 'e' };
private static final byte[] MESSAGE_TYPE = {'m', 'e', 's', 's', 'a', 'g', 'e' };
private static final byte[] SUBSCRIBE_COMMAND = {'S', 'U', 'B', 'S', 'C', 'R', 'I', 'B', 'E', ' ' };
private static final byte[] UNSUBSCRIBE_COMMAND = {'U', 'N', 'S', 'U', 'B', 'S', 'C', 'R', 'I', 'B', 'E', ' '};
private static final byte[] CRLF = {'\r', '\n' };
private final OutputStream outputStream;
private final RedisInputStream inputStream;
private final Socket socket;
private final AtomicBoolean closed;
public PubSubConnection(Socket socket) throws IOException {
this.socket = socket;
this.outputStream = socket.getOutputStream();
this.inputStream = new RedisInputStream(new BufferedInputStream(socket.getInputStream()));
this.closed = new AtomicBoolean(false);
}
public void subscribe(String channelName) throws IOException {
if (closed.get()) throw new IOException("Connection closed!");
byte[] command = Util.combine(SUBSCRIBE_COMMAND, channelName.getBytes(), CRLF);
outputStream.write(command);
}
public void unsubscribe(String channelName) throws IOException {
if (closed.get()) throw new IOException("Connection closed!");
byte[] command = Util.combine(UNSUBSCRIBE_COMMAND, channelName.getBytes(), CRLF);
outputStream.write(command);
}
public PubSubReply read() throws IOException {
if (closed.get()) throw new IOException("Connection closed!");
ArrayReplyHeader replyHeader = new ArrayReplyHeader(inputStream.readLine());
if (replyHeader.getElementCount() != 3) {
throw new IOException("Received array reply header with strange count: " + replyHeader.getElementCount());
}
StringReplyHeader replyTypeHeader = new StringReplyHeader(inputStream.readLine());
byte[] replyType = inputStream.readFully(replyTypeHeader.getStringLength());
inputStream.readLine();
if (Arrays.equals(SUBSCRIBE_TYPE, replyType)) return readSubscribeReply();
else if (Arrays.equals(UNSUBSCRIBE_TYPE, replyType)) return readUnsubscribeReply();
else if (Arrays.equals(MESSAGE_TYPE, replyType)) return readMessageReply();
else throw new IOException("Unknown reply type: " + new String(replyType));
}
public void close() {
try {
this.closed.set(true);
this.inputStream.close();
this.outputStream.close();
this.socket.close();
} catch (IOException e) {
logger.warn("Exception while closing", e);
}
}
private PubSubReply readMessageReply() throws IOException {
StringReplyHeader channelNameHeader = new StringReplyHeader(inputStream.readLine());
byte[] channelName = inputStream.readFully(channelNameHeader.getStringLength());
inputStream.readLine();
StringReplyHeader messageHeader = new StringReplyHeader(inputStream.readLine());
byte[] message = inputStream.readFully(messageHeader.getStringLength());
inputStream.readLine();
return new PubSubReply(PubSubReply.Type.MESSAGE, new String(channelName), Optional.of(message));
}
private PubSubReply readUnsubscribeReply() throws IOException {
String channelName = readSubscriptionReply();
return new PubSubReply(PubSubReply.Type.UNSUBSCRIBE, channelName, Optional.empty());
}
private PubSubReply readSubscribeReply() throws IOException {
String channelName = readSubscriptionReply();
return new PubSubReply(PubSubReply.Type.SUBSCRIBE, channelName, Optional.empty());
}
private String readSubscriptionReply() throws IOException {
StringReplyHeader channelNameHeader = new StringReplyHeader(inputStream.readLine());
byte[] channelName = inputStream.readFully(channelNameHeader.getStringLength());
inputStream.readLine();
IntReply subscriptionCount = new IntReply(inputStream.readLine());
return new String(channelName);
}
}
@@ -1,40 +0,0 @@
/*
* Copyright 2013-2020 Signal Messenger, LLC
* SPDX-License-Identifier: AGPL-3.0-only
*/
package org.whispersystems.dispatch.redis;
import java.util.Optional;
@SuppressWarnings("OptionalUsedAsFieldOrParameterType")
public class PubSubReply {
public enum Type {
MESSAGE,
SUBSCRIBE,
UNSUBSCRIBE
}
private final Type type;
private final String channel;
private final Optional<byte[]> content;
public PubSubReply(Type type, String channel, Optional<byte[]> content) {
this.type = type;
this.channel = channel;
this.content = content;
}
public Type getType() {
return type;
}
public String getChannel() {
return channel;
}
public Optional<byte[]> getContent() {
return content;
}
}
@@ -1,28 +0,0 @@
/*
* Copyright 2013-2020 Signal Messenger, LLC
* SPDX-License-Identifier: AGPL-3.0-only
*/
package org.whispersystems.dispatch.redis.protocol;
import java.io.IOException;
public class ArrayReplyHeader {
private final int elementCount;
public ArrayReplyHeader(String header) throws IOException {
if (header == null || header.length() < 2 || header.charAt(0) != '*') {
throw new IOException("Invalid array reply header: " + header);
}
try {
this.elementCount = Integer.parseInt(header.substring(1));
} catch (NumberFormatException e) {
throw new IOException(e);
}
}
public int getElementCount() {
return elementCount;
}
}
@@ -1,28 +0,0 @@
/*
* Copyright 2013-2020 Signal Messenger, LLC
* SPDX-License-Identifier: AGPL-3.0-only
*/
package org.whispersystems.dispatch.redis.protocol;
import java.io.IOException;
public class IntReply {
private final int value;
public IntReply(String reply) throws IOException {
if (reply == null || reply.length() < 2 || reply.charAt(0) != ':') {
throw new IOException("Invalid int reply: " + reply);
}
try {
this.value = Integer.parseInt(reply.substring(1));
} catch (NumberFormatException e) {
throw new IOException(e);
}
}
public int getValue() {
return value;
}
}
@@ -1,28 +0,0 @@
/*
* Copyright 2013-2020 Signal Messenger, LLC
* SPDX-License-Identifier: AGPL-3.0-only
*/
package org.whispersystems.dispatch.redis.protocol;
import java.io.IOException;
public class StringReplyHeader {
private final int stringLength;
public StringReplyHeader(String header) throws IOException {
if (header == null || header.length() < 2 || header.charAt(0) != '$') {
throw new IOException("Invalid string reply header: " + header);
}
try {
this.stringLength = Integer.parseInt(header.substring(1));
} catch (NumberFormatException e) {
throw new IOException(e);
}
}
public int getStringLength() {
return stringLength;
}
}
@@ -1,40 +0,0 @@
/*
* Copyright 2013-2020 Signal Messenger, LLC
* SPDX-License-Identifier: AGPL-3.0-only
*/
package org.whispersystems.dispatch.util;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
public class Util {
public static byte[] combine(byte[]... elements) {
try {
int sum = 0;
for (byte[] element : elements) {
sum += element.length;
}
ByteArrayOutputStream baos = new ByteArrayOutputStream(sum);
for (byte[] element : elements) {
baos.write(element);
}
return baos.toByteArray();
} catch (IOException e) {
throw new AssertionError(e);
}
}
public static void sleep(long millis) {
try {
Thread.sleep(millis);
} catch (InterruptedException e) {
throw new AssertionError(e);
}
}
}
@@ -1,134 +0,0 @@
/*
* Copyright 2013-2020 Signal Messenger, LLC
* SPDX-License-Identifier: AGPL-3.0-only
*/
package org.whispersystems.dispatch;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExternalResource;
import org.mockito.ArgumentCaptor;
import org.mockito.invocation.InvocationOnMock;
import org.mockito.stubbing.Answer;
import org.whispersystems.dispatch.io.RedisPubSubConnectionFactory;
import org.whispersystems.dispatch.redis.PubSubConnection;
import org.whispersystems.dispatch.redis.PubSubReply;
import java.io.IOException;
import java.util.LinkedList;
import java.util.List;
import java.util.Optional;
import static org.junit.Assert.assertArrayEquals;
import static org.mockito.Mockito.eq;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.timeout;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
public class DispatchManagerTest {
private PubSubConnection pubSubConnection;
private RedisPubSubConnectionFactory socketFactory;
private DispatchManager dispatchManager;
private PubSubReplyInputStream pubSubReplyInputStream;
@Rule
public ExternalResource resource = new ExternalResource() {
@Override
protected void before() throws Throwable {
pubSubConnection = mock(PubSubConnection.class );
socketFactory = mock(RedisPubSubConnectionFactory.class);
pubSubReplyInputStream = new PubSubReplyInputStream();
when(socketFactory.connect()).thenReturn(pubSubConnection);
when(pubSubConnection.read()).thenAnswer(new Answer<PubSubReply>() {
@Override
public PubSubReply answer(InvocationOnMock invocationOnMock) throws Throwable {
return pubSubReplyInputStream.read();
}
});
dispatchManager = new DispatchManager(socketFactory, Optional.empty());
dispatchManager.start();
}
@Override
protected void after() {
}
};
@Test
public void testConnect() {
verify(socketFactory).connect();
}
@Test
public void testSubscribe() throws IOException {
DispatchChannel dispatchChannel = mock(DispatchChannel.class);
dispatchManager.subscribe("foo", dispatchChannel);
pubSubReplyInputStream.write(new PubSubReply(PubSubReply.Type.SUBSCRIBE, "foo", Optional.empty()));
verify(dispatchChannel, timeout(1000)).onDispatchSubscribed(eq("foo"));
}
@Test
public void testSubscribeUnsubscribe() throws IOException {
DispatchChannel dispatchChannel = mock(DispatchChannel.class);
dispatchManager.subscribe("foo", dispatchChannel);
dispatchManager.unsubscribe("foo", dispatchChannel);
pubSubReplyInputStream.write(new PubSubReply(PubSubReply.Type.SUBSCRIBE, "foo", Optional.empty()));
pubSubReplyInputStream.write(new PubSubReply(PubSubReply.Type.UNSUBSCRIBE, "foo", Optional.empty()));
verify(dispatchChannel, timeout(1000)).onDispatchUnsubscribed(eq("foo"));
}
@Test
public void testMessages() throws IOException {
DispatchChannel fooChannel = mock(DispatchChannel.class);
DispatchChannel barChannel = mock(DispatchChannel.class);
dispatchManager.subscribe("foo", fooChannel);
dispatchManager.subscribe("bar", barChannel);
pubSubReplyInputStream.write(new PubSubReply(PubSubReply.Type.SUBSCRIBE, "foo", Optional.empty()));
pubSubReplyInputStream.write(new PubSubReply(PubSubReply.Type.SUBSCRIBE, "bar", Optional.empty()));
verify(fooChannel, timeout(1000)).onDispatchSubscribed(eq("foo"));
verify(barChannel, timeout(1000)).onDispatchSubscribed(eq("bar"));
pubSubReplyInputStream.write(new PubSubReply(PubSubReply.Type.MESSAGE, "foo", Optional.of("hello".getBytes())));
pubSubReplyInputStream.write(new PubSubReply(PubSubReply.Type.MESSAGE, "bar", Optional.of("there".getBytes())));
ArgumentCaptor<byte[]> captor = ArgumentCaptor.forClass(byte[].class);
verify(fooChannel, timeout(1000)).onDispatchMessage(eq("foo"), captor.capture());
assertArrayEquals("hello".getBytes(), captor.getValue());
verify(barChannel, timeout(1000)).onDispatchMessage(eq("bar"), captor.capture());
assertArrayEquals("there".getBytes(), captor.getValue());
}
private static class PubSubReplyInputStream {
private final List<PubSubReply> pubSubReplyList = new LinkedList<>();
public synchronized PubSubReply read() {
try {
while (pubSubReplyList.isEmpty()) wait();
return pubSubReplyList.remove(0);
} catch (InterruptedException e) {
throw new AssertionError(e);
}
}
public synchronized void write(PubSubReply pubSubReply) {
pubSubReplyList.add(pubSubReply);
notifyAll();
}
}
}
@@ -1,265 +0,0 @@
/*
* Copyright 2013-2020 Signal Messenger, LLC
* SPDX-License-Identifier: AGPL-3.0-only
*/
package org.whispersystems.dispatch.redis;
import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyInt;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.Socket;
import java.security.SecureRandom;
import org.junit.Test;
import org.mockito.ArgumentCaptor;
import org.mockito.invocation.InvocationOnMock;
import org.mockito.stubbing.Answer;
public class PubSubConnectionTest {
private static final String REPLY = "*3\r\n" +
"$9\r\n" +
"subscribe\r\n" +
"$5\r\n" +
"abcde\r\n" +
":1\r\n" +
"*3\r\n" +
"$9\r\n" +
"subscribe\r\n" +
"$5\r\n" +
"fghij\r\n" +
":2\r\n" +
"*3\r\n" +
"$9\r\n" +
"subscribe\r\n" +
"$5\r\n" +
"klmno\r\n" +
":2\r\n" +
"*3\r\n" +
"$7\r\n" +
"message\r\n" +
"$5\r\n" +
"abcde\r\n" +
"$10\r\n" +
"1234567890\r\n" +
"*3\r\n" +
"$7\r\n" +
"message\r\n" +
"$5\r\n" +
"klmno\r\n" +
"$10\r\n" +
"0987654321\r\n";
@Test
public void testSubscribe() throws IOException {
// ByteChannel byteChannel = mock(ByteChannel.class);
OutputStream outputStream = mock(OutputStream.class);
Socket socket = mock(Socket.class );
when(socket.getOutputStream()).thenReturn(outputStream);
PubSubConnection connection = new PubSubConnection(socket);
connection.subscribe("foobar");
ArgumentCaptor<byte[]> captor = ArgumentCaptor.forClass(byte[].class);
verify(outputStream).write(captor.capture());
assertArrayEquals(captor.getValue(), "SUBSCRIBE foobar\r\n".getBytes());
}
@Test
public void testUnsubscribe() throws IOException {
OutputStream outputStream = mock(OutputStream.class);
Socket socket = mock(Socket.class );
when(socket.getOutputStream()).thenReturn(outputStream);
PubSubConnection connection = new PubSubConnection(socket);
connection.unsubscribe("bazbar");
ArgumentCaptor<byte[]> captor = ArgumentCaptor.forClass(byte[].class);
verify(outputStream).write(captor.capture());
assertArrayEquals(captor.getValue(), "UNSUBSCRIBE bazbar\r\n".getBytes());
}
@Test
public void testTricklyResponse() throws Exception {
InputStream inputStream = mockInputStreamFor(new TrickleInputStream(REPLY.getBytes()));
OutputStream outputStream = mock(OutputStream.class);
Socket socket = mock(Socket.class );
when(socket.getOutputStream()).thenReturn(outputStream);
when(socket.getInputStream()).thenReturn(inputStream);
PubSubConnection pubSubConnection = new PubSubConnection(socket);
readResponses(pubSubConnection);
}
@Test
public void testFullResponse() throws Exception {
InputStream inputStream = mockInputStreamFor(new FullInputStream(REPLY.getBytes()));
OutputStream outputStream = mock(OutputStream.class);
Socket socket = mock(Socket.class );
when(socket.getOutputStream()).thenReturn(outputStream);
when(socket.getInputStream()).thenReturn(inputStream);
PubSubConnection pubSubConnection = new PubSubConnection(socket);
readResponses(pubSubConnection);
}
@Test
public void testRandomLengthResponse() throws Exception {
InputStream inputStream = mockInputStreamFor(new RandomInputStream(REPLY.getBytes()));
OutputStream outputStream = mock(OutputStream.class);
Socket socket = mock(Socket.class );
when(socket.getOutputStream()).thenReturn(outputStream);
when(socket.getInputStream()).thenReturn(inputStream);
PubSubConnection pubSubConnection = new PubSubConnection(socket);
readResponses(pubSubConnection);
}
private InputStream mockInputStreamFor(final MockInputStream stub) throws IOException {
InputStream result = mock(InputStream.class);
when(result.read()).thenAnswer(new Answer<Integer>() {
@Override
public Integer answer(InvocationOnMock invocationOnMock) throws Throwable {
return stub.read();
}
});
when(result.read(any(byte[].class))).thenAnswer(new Answer<Integer>() {
@Override
public Integer answer(InvocationOnMock invocationOnMock) throws Throwable {
byte[] buffer = (byte[])invocationOnMock.getArguments()[0];
return stub.read(buffer, 0, buffer.length);
}
});
when(result.read(any(byte[].class), anyInt(), anyInt())).thenAnswer(new Answer<Integer>() {
@Override
public Integer answer(InvocationOnMock invocationOnMock) throws Throwable {
byte[] buffer = (byte[]) invocationOnMock.getArguments()[0];
int offset = (int) invocationOnMock.getArguments()[1];
int length = (int) invocationOnMock.getArguments()[2];
return stub.read(buffer, offset, length);
}
});
return result;
}
private void readResponses(PubSubConnection pubSubConnection) throws Exception {
PubSubReply reply = pubSubConnection.read();
assertEquals(reply.getType(), PubSubReply.Type.SUBSCRIBE);
assertEquals(reply.getChannel(), "abcde");
assertFalse(reply.getContent().isPresent());
reply = pubSubConnection.read();
assertEquals(reply.getType(), PubSubReply.Type.SUBSCRIBE);
assertEquals(reply.getChannel(), "fghij");
assertFalse(reply.getContent().isPresent());
reply = pubSubConnection.read();
assertEquals(reply.getType(), PubSubReply.Type.SUBSCRIBE);
assertEquals(reply.getChannel(), "klmno");
assertFalse(reply.getContent().isPresent());
reply = pubSubConnection.read();
assertEquals(reply.getType(), PubSubReply.Type.MESSAGE);
assertEquals(reply.getChannel(), "abcde");
assertArrayEquals(reply.getContent().get(), "1234567890".getBytes());
reply = pubSubConnection.read();
assertEquals(reply.getType(), PubSubReply.Type.MESSAGE);
assertEquals(reply.getChannel(), "klmno");
assertArrayEquals(reply.getContent().get(), "0987654321".getBytes());
}
private interface MockInputStream {
public int read();
public int read(byte[] input, int offset, int length);
}
private static class TrickleInputStream implements MockInputStream {
private final byte[] data;
private int index = 0;
private TrickleInputStream(byte[] data) {
this.data = data;
}
public int read() {
return data[index++];
}
public int read(byte[] input, int offset, int length) {
input[offset] = data[index++];
return 1;
}
}
private static class FullInputStream implements MockInputStream {
private final byte[] data;
private int index = 0;
private FullInputStream(byte[] data) {
this.data = data;
}
public int read() {
return data[index++];
}
public int read(byte[] input, int offset, int length) {
int amount = Math.min(data.length - index, length);
System.arraycopy(data, index, input, offset, amount);
index += length;
return amount;
}
}
private static class RandomInputStream implements MockInputStream {
private final byte[] data;
private int index = 0;
private RandomInputStream(byte[] data) {
this.data = data;
}
public int read() {
return data[index++];
}
public int read(byte[] input, int offset, int length) {
int maxCopy = Math.min(data.length - index, length);
int randomCopy = new SecureRandom().nextInt(maxCopy) + 1;
int copyAmount = Math.min(maxCopy, randomCopy);
System.arraycopy(data, index, input, offset, copyAmount);
index += copyAmount;
return copyAmount;
}
}
}
@@ -1,55 +0,0 @@
/*
* Copyright 2013-2020 Signal Messenger, LLC
* SPDX-License-Identifier: AGPL-3.0-only
*/
package org.whispersystems.dispatch.redis.protocol;
import org.junit.Test;
import java.io.IOException;
import static org.junit.Assert.assertEquals;
public class ArrayReplyHeaderTest {
@Test(expected = IOException.class)
public void testNull() throws IOException {
new ArrayReplyHeader(null);
}
@Test(expected = IOException.class)
public void testBadPrefix() throws IOException {
new ArrayReplyHeader(":3");
}
@Test(expected = IOException.class)
public void testEmpty() throws IOException {
new ArrayReplyHeader("");
}
@Test(expected = IOException.class)
public void testTruncated() throws IOException {
new ArrayReplyHeader("*");
}
@Test(expected = IOException.class)
public void testBadNumber() throws IOException {
new ArrayReplyHeader("*ABC");
}
@Test
public void testValid() throws IOException {
assertEquals(4, new ArrayReplyHeader("*4").getElementCount());
}
}
@@ -1,39 +0,0 @@
/*
* Copyright 2013-2020 Signal Messenger, LLC
* SPDX-License-Identifier: AGPL-3.0-only
*/
package org.whispersystems.dispatch.redis.protocol;
import org.junit.Test;
import java.io.IOException;
import static org.junit.Assert.assertEquals;
public class IntReplyHeaderTest {
@Test(expected = IOException.class)
public void testNull() throws IOException {
new IntReply(null);
}
@Test(expected = IOException.class)
public void testEmpty() throws IOException {
new IntReply("");
}
@Test(expected = IOException.class)
public void testBadNumber() throws IOException {
new IntReply(":A");
}
@Test(expected = IOException.class)
public void testBadFormat() throws IOException {
new IntReply("*");
}
@Test
public void testValid() throws IOException {
assertEquals(23, new IntReply(":23").getValue());
}
}
@@ -1,51 +0,0 @@
/*
* Copyright 2013-2020 Signal Messenger, LLC
* SPDX-License-Identifier: AGPL-3.0-only
*/
package org.whispersystems.dispatch.redis.protocol;
import org.junit.Test;
import java.io.IOException;
import static org.junit.Assert.assertEquals;
public class StringReplyHeaderTest {
@Test
public void testNull() {
try {
new StringReplyHeader(null);
throw new AssertionError();
} catch (IOException e) {
// good
}
}
@Test
public void testBadNumber() {
try {
new StringReplyHeader("$100A");
throw new AssertionError();
} catch (IOException e) {
// good
}
}
@Test
public void testBadPrefix() {
try {
new StringReplyHeader("*");
throw new AssertionError();
} catch (IOException e) {
// good
}
}
@Test
public void testValid() throws IOException {
assertEquals(1000, new StringReplyHeader("$1000").getStringLength());
}
}
-25
View File
@@ -1,25 +0,0 @@
<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.1.0 http://maven.apache.org/xsd/assembly-2.1.0.xsd">
<id>bin</id>
<includeBaseDirectory>false</includeBaseDirectory>
<formats>
<format>tar.gz</format>
</formats>
<fileSets>
<fileSet>
<directory>${project.basedir}/config</directory>
<outputDirectory>/config</outputDirectory>
<includes>
<include>*</include>
</includes>
</fileSet>
<fileSet>
<directory>${project.build.directory}</directory>
<outputDirectory>/</outputDirectory>
<includes>
<include>${parent.artifactId}-${project.version}.jar</include>
</includes>
</fileSet>
</fileSets>
</assembly>
-234
View File
@@ -1,234 +0,0 @@
twilio: # Twilio gateway configuration
accountId:
accountToken:
nanpaMessagingServiceSid: # Twilio SID for the messaging service to use for NANPA.
messagingServiceSid: # Twilio SID for the message service to use for non-NANPA.
verifyServiceSid: # Twilio SID for a Verify service
localDomain: # Domain Twilio can connect back to for calls. Should be domain of your service.
defaultClientVerificationTexts:
ios: # Text to use for the verification message on iOS. Will be passed to String.format with the verification code as argument 1.
androidNg: # Text to use for the verification message on android-ng client types. Will be passed to String.format with the verification code as argument 1.
android202001: # Text to use for the verification message on android-2020-01 client types. Will be passed to String.format with the verification code as argument 1.
android202103: # Text to use for the verification message on android-2021-03 client types. Will be passed to String.format with the verification code as argument 1.
generic: # Text to use when the client type is unrecognized. Will be passed to String.format with the verification code as argument 1.
regionalClientVerificationTexts: # Map of country codes to custom texts
999: # example country code
ios:
# … all keys from defaultClientVerificationTexts are required
androidAppHash: # Hash appended to Android
verifyServiceFriendlyName: # Service name used in template. Requires Twilio account rep to enable
push:
queueSize: # Size of push pending queue
turn: # TURN server configuration
secret: # TURN server secret
uris:
- stun:yourdomain:80
- stun:yourdomain.com:443
- turn:yourdomain:443?transport=udp
- turn:etc.com:80?transport=udp
cacheCluster: # Redis server configuration for cache cluster
urls:
- redis://redis.example.com:6379/
clientPresenceCluster: # Redis server configuration for client presence cluster
urls:
- redis://redis.example.com:6379/
pubsub: # Redis server configuration for pubsub cluster
url: redis://redis.example.com:6379/
replicaUrls:
- redis://redis.example.com:6379/
pushSchedulerCluster: # Redis server configuration for push scheduler cluster
urls:
- redis://redis.example.com:6379/
rateLimitersCluster: # Redis server configuration for rate limiters cluster
urls:
- redis://redis.example.com:6379/
directory:
client: # Configuration for interfacing with Contact Discovery Service cluster
userAuthenticationTokenSharedSecret: # hex-encoded secret shared with CDS used to generate auth tokens for Signal users
userAuthenticationTokenUserIdSecret: # hex-encoded secret shared among Signal-Servers to obscure user phone numbers from CDS
sqs:
accessKey: # AWS SQS accessKey
accessSecret: # AWS SQS accessSecret
queueUrls: # AWS SQS queue urls
- https://sqs.example.com/directory.fifo
server: # One or more CDS servers
- replicationName: # CDS replication name
replicationUrl: # CDS replication endpoint base url
replicationPassword: # CDS replication endpoint password
replicationCaCertificate: # CDS replication endpoint TLS certificate trust root
messageCache: # Redis server configuration for message store cache
persistDelayMinutes:
cluster:
urls:
- redis://redis.example.com:6379/
metricsCluster:
urls:
- redis://redis.example.com:6379/
messageDynamoDb: # DynamoDB table configuration
region:
tableName:
keysDynamoDb: # DynamoDB table configuration
region:
tableName:
accountsDynamoDb: # DynamoDB table configuration
region:
tableName:
phoneNumberTableName:
migrationDeletedAccountsDynamoDb: # DynamoDB table configuration
region:
tableName:
migrationRetryAccountsDynamoDb: # DynamoDB table configuration
region:
tableName:
pushChallengeDynamoDb: # DynamoDB table configuration
region:
tableName:
reportMessageDynamoDb: # DynamoDB table configuration
region:
tableName:
awsAttachments: # AWS S3 configuration
accessKey:
accessSecret:
bucket:
region:
gcpAttachments: # GCP Storage configuration
domain:
email:
maxSizeInBytes:
pathPrefix:
rsaSigningKey:
abuseDatabase: # Postgresql database configuration
driverClass: org.postgresql.Driver
user:
password:
url:
accountsDatabase: # Postgresql database configuration
driverClass: org.postgresql.Driver
user:
password:
url:
accountDatabaseCrawler:
chunkSize: # accounts per run
chunkIntervalMs: # time per run
apn: # Apple Push Notifications configuration
sandbox: true
bundleId:
keyId:
teamId:
signingKey:
gcm: # GCM Configuration
senderId:
apiKey:
cdn:
accessKey: # AWS Access Key ID
accessSecret: # AWS Access Secret
bucket: # S3 Bucket name
region: # AWS region
wavefront: # Wavefront micrometer metrics config
uri: # Wavefront proxy endpoint
batchSize: # Number of measurements to send per request
datadog:
apiKey:
environment:
unidentifiedDelivery:
certificate:
privateKey:
expiresDays:
voiceVerification:
url: https://cdn-ca.signal.org/verification/
locales:
- en
recaptcha:
secret:
storageService:
uri:
userAuthenticationTokenSharedSecret:
storageCaCertificate:
backupService:
uri:
userAuthenticationTokenSharedSecret:
backupCaCertificate:
zkConfig:
serverPublic:
serverSecret:
enabled:
appConfig:
application:
environment:
configuration:
remoteConfig:
authorizedTokens:
- # 1st authorized token
- # 2nd authorized token
- # ...
- # Nth authorized token
globalConfig: # keys and values that are given to clients on GET /v1/config
paymentsService:
userAuthenticationTokenSharedSecret: # hex-encoded 32-byte secret shared with MobileCoin services used to generate auth tokens for Signal users
torExitNodeList:
s3Region:
s3Bucket:
objectKey:
maxSize:
asnTable:
s3Region:
s3Bucket:
objectKey:
maxSize:
donation:
uri: # value
apiKey: # value
supportedCurrencies:
- # 1st supported currency
- # 2nd supported currency
- # ...
- # Nth supported currency
circuitBreaker:
failureRateThreshold: # value
ringBufferSizeInHalfOpenState: # value
ringBufferSizeInClosedState: # value
waitDurationInOpenStateInSeconds: # value
retry:
maxAttempts: # value
waitDuration: # value
-543
View File
@@ -1,543 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>TextSecureServer</artifactId>
<groupId>org.whispersystems.textsecure</groupId>
<version>JGITVER</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>service</artifactId>
<dependencies>
<dependency>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
</dependency>
<dependency>
<groupId>jakarta.validation</groupId>
<artifactId>jakarta.validation-api</artifactId>
</dependency>
<dependency>
<groupId>jakarta.ws.rs</groupId>
<artifactId>jakarta.ws.rs-api</artifactId>
</dependency>
<dependency>
<groupId>org.whispersystems.textsecure</groupId>
<artifactId>redis-dispatch</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.whispersystems.textsecure</groupId>
<artifactId>websocket-resources</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.whispersystems.textsecure</groupId>
<artifactId>gcm-sender-async</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.signal</groupId>
<artifactId>zkgroup-java</artifactId>
<version>0.7.0</version>
</dependency>
<dependency>
<groupId>org.whispersystems</groupId>
<artifactId>curve25519-java</artifactId>
<version>0.5.0</version>
</dependency>
<dependency>
<groupId>io.dropwizard</groupId>
<artifactId>dropwizard-core</artifactId>
</dependency>
<dependency>
<groupId>io.dropwizard</groupId>
<artifactId>dropwizard-jdbi3</artifactId>
</dependency>
<dependency>
<groupId>io.dropwizard</groupId>
<artifactId>dropwizard-auth</artifactId>
</dependency>
<dependency>
<groupId>io.dropwizard</groupId>
<artifactId>dropwizard-client</artifactId>
</dependency>
<dependency>
<groupId>io.dropwizard</groupId>
<artifactId>dropwizard-db</artifactId>
</dependency>
<dependency>
<groupId>io.dropwizard</groupId>
<artifactId>dropwizard-logging</artifactId>
</dependency>
<dependency>
<groupId>io.dropwizard</groupId>
<artifactId>dropwizard-metrics</artifactId>
</dependency>
<dependency>
<groupId>io.dropwizard</groupId>
<artifactId>dropwizard-util</artifactId>
</dependency>
<dependency>
<groupId>io.dropwizard</groupId>
<artifactId>dropwizard-servlets</artifactId>
</dependency>
<dependency>
<groupId>io.dropwizard</groupId>
<artifactId>dropwizard-lifecycle</artifactId>
</dependency>
<dependency>
<groupId>io.dropwizard</groupId>
<artifactId>dropwizard-jersey</artifactId>
</dependency>
<dependency>
<groupId>io.dropwizard</groupId>
<artifactId>dropwizard-jetty</artifactId>
</dependency>
<dependency>
<groupId>io.dropwizard</groupId>
<artifactId>dropwizard-validation</artifactId>
</dependency>
<dependency>
<groupId>io.dropwizard</groupId>
<artifactId>dropwizard-migrations</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-core</artifactId>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-access</artifactId>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
</dependency>
<dependency>
<groupId>net.logstash.logback</groupId>
<artifactId>logstash-logback-encoder</artifactId>
</dependency>
<dependency>
<groupId>org.jdbi</groupId>
<artifactId>jdbi3-core</artifactId>
</dependency>
<dependency>
<groupId>org.liquibase</groupId>
<artifactId>liquibase-core</artifactId>
</dependency>
<dependency>
<groupId>io.dropwizard.metrics</groupId>
<artifactId>metrics-core</artifactId>
</dependency>
<dependency>
<groupId>io.dropwizard.metrics</groupId>
<artifactId>metrics-jdbi3</artifactId>
</dependency>
<dependency>
<groupId>io.dropwizard.metrics</groupId>
<artifactId>metrics-healthchecks</artifactId>
</dependency>
<dependency>
<groupId>io.dropwizard.metrics</groupId>
<artifactId>metrics-annotation</artifactId>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-common</artifactId>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-server</artifactId>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-client</artifactId>
</dependency>
<dependency>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
</dependency>
<dependency>
<groupId>io.dropwizard</groupId>
<artifactId>dropwizard-testing</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.websocket</groupId>
<artifactId>websocket-api</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-servlets</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-csv</artifactId>
</dependency>
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
</dependency>
<dependency>
<groupId>io.github.resilience4j</groupId>
<artifactId>resilience4j-circuitbreaker</artifactId>
</dependency>
<dependency>
<groupId>io.github.resilience4j</groupId>
<artifactId>resilience4j-retry</artifactId>
</dependency>
<dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-core</artifactId>
</dependency>
<dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-registry-wavefront</artifactId>
</dependency>
<dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-registry-datadog</artifactId>
</dependency>
<dependency>
<groupId>org.coursera</groupId>
<artifactId>dropwizard-metrics-datadog</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-yaml</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jsr310</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.jaxrs</groupId>
<artifactId>jackson-jaxrs-json-provider</artifactId>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>s3</artifactId>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>sqs</artifactId>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>dynamodb</artifactId>
</dependency>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-core</artifactId>
</dependency>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-s3</artifactId>
</dependency>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-appconfig</artifactId>
</dependency>
<dependency>
<groupId>redis.clients</groupId>
<artifactId>jedis</artifactId>
</dependency>
<dependency>
<groupId>io.lettuce</groupId>
<artifactId>lettuce-core</artifactId>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.eatthepath</groupId>
<artifactId>pushy</artifactId>
</dependency>
<dependency>
<groupId>com.eatthepath</groupId>
<artifactId>pushy-dropwizard-metrics-listener</artifactId>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-tcnative-boringssl-static</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.vdurmont</groupId>
<artifactId>semver4j</artifactId>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java</artifactId>
</dependency>
<dependency>
<groupId>com.googlecode.libphonenumber</groupId>
<artifactId>libphonenumber</artifactId>
</dependency>
<dependency>
<groupId>net.sourceforge.argparse4j</groupId>
<artifactId>argparse4j</artifactId>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.test-framework</groupId>
<artifactId>jersey-test-framework-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.test-framework.providers</groupId>
<artifactId>jersey-test-framework-provider-grizzly2</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
</exclusion>
<exclusion>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.opentable.components</groupId>
<artifactId>otj-pg-embedded</artifactId>
<version>0.13.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.almworks.sqlite4java</groupId>
<artifactId>sqlite4java</artifactId>
<version>1.0.392</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.projectreactor</groupId>
<artifactId>reactor-core</artifactId>
<version>3.3.16.RELEASE</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-params</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.signal</groupId>
<artifactId>embedded-redis</artifactId>
<version>0.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.fasterxml.uuid</groupId>
<artifactId>java-uuid-generator</artifactId>
<version>3.2.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>DynamoDBLocal</artifactId>
<version>1.16.0</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.antlr</groupId>
<artifactId>antlr4-runtime</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>pl.pragmatists</groupId>
<artifactId>JUnitParams</artifactId>
<version>1.1.1</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<finalName>${project.parent.artifactId}-${project.version}</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.4</version>
<configuration>
<createDependencyReducedPom>true</createDependencyReducedPom>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
</excludes>
</filter>
</filters>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>org.whispersystems.textsecuregcm.WhisperServerService</mainClass>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.3.0</version>
<configuration>
<descriptors>
<descriptor>assembly.xml</descriptor>
</descriptors>
</configuration>
<executions>
<execution>
<id>make-assembly</id> <!-- this is used for inheritance merges -->
<phase>package</phase> <!-- bind to the packaging phase -->
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>properties-maven-plugin</artifactId>
<version>1.0.0</version>
<executions>
<execution>
<id>read-deploy-configuration</id>
<phase>deploy</phase>
<goals>
<goal>read-project-properties</goal>
</goals>
<configuration>
<files>${project.basedir}/config/deploy.properties</files>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.bazaarvoice.maven.plugins</groupId>
<artifactId>s3-upload-maven-plugin</artifactId>
<version>1.5</version>
<configuration>
<source>${project.build.directory}/${project.build.finalName}-bin.tar.gz</source>
<bucketName>${deploy.bucketName}</bucketName>
<destination>${project.build.finalName}-bin.tar.gz</destination>
</configuration>
<executions>
<execution>
<id>deploy-to-s3</id>
<phase>deploy</phase>
<goals>
<goal>s3-upload</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>templating-maven-plugin</artifactId>
<version>1.0.0</version>
<executions>
<execution>
<id>filter-src</id>
<goals>
<goal>filter-sources</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
@@ -1,15 +0,0 @@
/*
* Copyright 2013-2021 Signal Messenger, LLC
* SPDX-License-Identifier: AGPL-3.0-only
*/
package org.whispersystems.textsecuregcm;
public class WhisperServerVersion {
private static final String VERSION = "${project.version}";
public static String getServerVersion() {
return VERSION;
}
}
@@ -1,479 +0,0 @@
/*
* Copyright 2013-2020 Signal Messenger, LLC
* SPDX-License-Identifier: AGPL-3.0-only
*/
package org.whispersystems.textsecuregcm;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.dropwizard.Configuration;
import io.dropwizard.client.JerseyClientConfiguration;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import org.whispersystems.textsecuregcm.configuration.AccountDatabaseCrawlerConfiguration;
import org.whispersystems.textsecuregcm.configuration.AccountsDatabaseConfiguration;
import org.whispersystems.textsecuregcm.configuration.AccountsDynamoDbConfiguration;
import org.whispersystems.textsecuregcm.configuration.ApnConfiguration;
import org.whispersystems.textsecuregcm.configuration.AppConfigConfiguration;
import org.whispersystems.textsecuregcm.configuration.AwsAttachmentsConfiguration;
import org.whispersystems.textsecuregcm.configuration.CdnConfiguration;
import org.whispersystems.textsecuregcm.configuration.DatabaseConfiguration;
import org.whispersystems.textsecuregcm.configuration.DatadogConfiguration;
import org.whispersystems.textsecuregcm.configuration.DirectoryConfiguration;
import org.whispersystems.textsecuregcm.configuration.DonationConfiguration;
import org.whispersystems.textsecuregcm.configuration.DynamoDbConfiguration;
import org.whispersystems.textsecuregcm.configuration.GcmConfiguration;
import org.whispersystems.textsecuregcm.configuration.GcpAttachmentsConfiguration;
import org.whispersystems.textsecuregcm.configuration.MaxDeviceConfiguration;
import org.whispersystems.textsecuregcm.configuration.MessageCacheConfiguration;
import org.whispersystems.textsecuregcm.configuration.MessageDynamoDbConfiguration;
import org.whispersystems.textsecuregcm.configuration.WavefrontConfiguration;
import org.whispersystems.textsecuregcm.configuration.PaymentsServiceConfiguration;
import org.whispersystems.textsecuregcm.configuration.PushConfiguration;
import org.whispersystems.textsecuregcm.configuration.RateLimitsConfiguration;
import org.whispersystems.textsecuregcm.configuration.RecaptchaConfiguration;
import org.whispersystems.textsecuregcm.configuration.RedisClusterConfiguration;
import org.whispersystems.textsecuregcm.configuration.RedisConfiguration;
import org.whispersystems.textsecuregcm.configuration.RemoteConfigConfiguration;
import org.whispersystems.textsecuregcm.configuration.SecureBackupServiceConfiguration;
import org.whispersystems.textsecuregcm.configuration.SecureStorageServiceConfiguration;
import org.whispersystems.textsecuregcm.configuration.TestDeviceConfiguration;
import org.whispersystems.textsecuregcm.configuration.MonitoredS3ObjectConfiguration;
import org.whispersystems.textsecuregcm.configuration.TurnConfiguration;
import org.whispersystems.textsecuregcm.configuration.TwilioConfiguration;
import org.whispersystems.textsecuregcm.configuration.UnidentifiedDeliveryConfiguration;
import org.whispersystems.textsecuregcm.configuration.VoiceVerificationConfiguration;
import org.whispersystems.textsecuregcm.configuration.ZkConfig;
import org.whispersystems.websocket.configuration.WebSocketConfiguration;
/** @noinspection MismatchedQueryAndUpdateOfCollection, WeakerAccess */
public class WhisperServerConfiguration extends Configuration {
@NotNull
@Valid
@JsonProperty
private TwilioConfiguration twilio;
@NotNull
@Valid
@JsonProperty
private PushConfiguration push;
@NotNull
@Valid
@JsonProperty
private AwsAttachmentsConfiguration awsAttachments;
@NotNull
@Valid
@JsonProperty
private GcpAttachmentsConfiguration gcpAttachments;
@NotNull
@Valid
@JsonProperty
private CdnConfiguration cdn;
@NotNull
@Valid
@JsonProperty
private WavefrontConfiguration wavefront;
@NotNull
@Valid
@JsonProperty
private DatadogConfiguration datadog;
@NotNull
@Valid
@JsonProperty
private RedisClusterConfiguration cacheCluster;
@NotNull
@Valid
@JsonProperty
private RedisConfiguration pubsub;
@NotNull
@Valid
@JsonProperty
private RedisClusterConfiguration metricsCluster;
@NotNull
@Valid
@JsonProperty
private DirectoryConfiguration directory;
@NotNull
@Valid
@JsonProperty
private AccountDatabaseCrawlerConfiguration accountDatabaseCrawler;
@NotNull
@Valid
@JsonProperty
private RedisClusterConfiguration pushSchedulerCluster;
@NotNull
@Valid
@JsonProperty
private RedisClusterConfiguration rateLimitersCluster;
@NotNull
@Valid
@JsonProperty
private MessageCacheConfiguration messageCache;
@NotNull
@Valid
@JsonProperty
private RedisClusterConfiguration clientPresenceCluster;
@Valid
@NotNull
@JsonProperty
private MessageDynamoDbConfiguration messageDynamoDb;
@Valid
@NotNull
@JsonProperty
private DynamoDbConfiguration keysDynamoDb;
@Valid
@NotNull
@JsonProperty
private AccountsDynamoDbConfiguration accountsDynamoDb;
@Valid
@NotNull
@JsonProperty
private DynamoDbConfiguration migrationDeletedAccountsDynamoDb;
@Valid
@NotNull
@JsonProperty
private DynamoDbConfiguration migrationRetryAccountsDynamoDb;
@Valid
@NotNull
@JsonProperty
private DynamoDbConfiguration pushChallengeDynamoDb;
@Valid
@NotNull
@JsonProperty
private DynamoDbConfiguration reportMessageDynamoDb;
@Valid
@NotNull
@JsonProperty
private DatabaseConfiguration abuseDatabase;
@Valid
@NotNull
@JsonProperty
private List<TestDeviceConfiguration> testDevices = new LinkedList<>();
@Valid
@NotNull
@JsonProperty
private List<MaxDeviceConfiguration> maxDevices = new LinkedList<>();
@Valid
@NotNull
@JsonProperty
private AccountsDatabaseConfiguration accountsDatabase;
@Valid
@NotNull
@JsonProperty
private RateLimitsConfiguration limits = new RateLimitsConfiguration();
@Valid
@NotNull
@JsonProperty
private JerseyClientConfiguration httpClient = new JerseyClientConfiguration();
@Valid
@NotNull
@JsonProperty
private WebSocketConfiguration webSocket = new WebSocketConfiguration();
@Valid
@NotNull
@JsonProperty
private TurnConfiguration turn;
@Valid
@NotNull
@JsonProperty
private GcmConfiguration gcm;
@Valid
@NotNull
@JsonProperty
private ApnConfiguration apn;
@Valid
@NotNull
@JsonProperty
private UnidentifiedDeliveryConfiguration unidentifiedDelivery;
@Valid
@NotNull
@JsonProperty
private VoiceVerificationConfiguration voiceVerification;
@Valid
@NotNull
@JsonProperty
private RecaptchaConfiguration recaptcha;
@Valid
@NotNull
@JsonProperty
private SecureStorageServiceConfiguration storageService;
@Valid
@NotNull
@JsonProperty
private SecureBackupServiceConfiguration backupService;
@Valid
@NotNull
@JsonProperty
private PaymentsServiceConfiguration paymentsService;
@Valid
@NotNull
@JsonProperty
private ZkConfig zkConfig;
@Valid
@NotNull
@JsonProperty
private RemoteConfigConfiguration remoteConfig;
@Valid
@NotNull
@JsonProperty
private AppConfigConfiguration appConfig;
@Valid
@NotNull
@JsonProperty
private MonitoredS3ObjectConfiguration torExitNodeList;
@Valid
@NotNull
@JsonProperty
private MonitoredS3ObjectConfiguration asnTable;
@Valid
@NotNull
@JsonProperty
private DonationConfiguration donation;
private Map<String, String> transparentDataIndex = new HashMap<>();
public RecaptchaConfiguration getRecaptchaConfiguration() {
return recaptcha;
}
public VoiceVerificationConfiguration getVoiceVerificationConfiguration() {
return voiceVerification;
}
public WebSocketConfiguration getWebSocketConfiguration() {
return webSocket;
}
public TwilioConfiguration getTwilioConfiguration() {
return twilio;
}
public PushConfiguration getPushConfiguration() {
return push;
}
public JerseyClientConfiguration getJerseyClientConfiguration() {
return httpClient;
}
public AwsAttachmentsConfiguration getAwsAttachmentsConfiguration() {
return awsAttachments;
}
public GcpAttachmentsConfiguration getGcpAttachmentsConfiguration() {
return gcpAttachments;
}
public RedisClusterConfiguration getCacheClusterConfiguration() {
return cacheCluster;
}
public RedisConfiguration getPubsubCacheConfiguration() {
return pubsub;
}
public RedisClusterConfiguration getMetricsClusterConfiguration() {
return metricsCluster;
}
public DirectoryConfiguration getDirectoryConfiguration() {
return directory;
}
public SecureStorageServiceConfiguration getSecureStorageServiceConfiguration() {
return storageService;
}
public AccountDatabaseCrawlerConfiguration getAccountDatabaseCrawlerConfiguration() {
return accountDatabaseCrawler;
}
public MessageCacheConfiguration getMessageCacheConfiguration() {
return messageCache;
}
public RedisClusterConfiguration getClientPresenceClusterConfiguration() {
return clientPresenceCluster;
}
public RedisClusterConfiguration getPushSchedulerCluster() {
return pushSchedulerCluster;
}
public RedisClusterConfiguration getRateLimitersCluster() {
return rateLimitersCluster;
}
public MessageDynamoDbConfiguration getMessageDynamoDbConfiguration() {
return messageDynamoDb;
}
public DynamoDbConfiguration getKeysDynamoDbConfiguration() {
return keysDynamoDb;
}
public AccountsDynamoDbConfiguration getAccountsDynamoDbConfiguration() {
return accountsDynamoDb;
}
public DynamoDbConfiguration getMigrationDeletedAccountsDynamoDbConfiguration() {
return migrationDeletedAccountsDynamoDb;
}
public DynamoDbConfiguration getMigrationRetryAccountsDynamoDbConfiguration() {
return migrationRetryAccountsDynamoDb;
}
public DatabaseConfiguration getAbuseDatabaseConfiguration() {
return abuseDatabase;
}
public AccountsDatabaseConfiguration getAccountsDatabaseConfiguration() {
return accountsDatabase;
}
public RateLimitsConfiguration getLimitsConfiguration() {
return limits;
}
public TurnConfiguration getTurnConfiguration() {
return turn;
}
public GcmConfiguration getGcmConfiguration() {
return gcm;
}
public ApnConfiguration getApnConfiguration() {
return apn;
}
public CdnConfiguration getCdnConfiguration() {
return cdn;
}
public WavefrontConfiguration getWavefrontConfiguration() {
return wavefront;
}
public DatadogConfiguration getDatadogConfiguration() {
return datadog;
}
public UnidentifiedDeliveryConfiguration getDeliveryCertificate() {
return unidentifiedDelivery;
}
public Map<String, Integer> getTestDevices() {
Map<String, Integer> results = new HashMap<>();
for (TestDeviceConfiguration testDeviceConfiguration : testDevices) {
results.put(testDeviceConfiguration.getNumber(),
testDeviceConfiguration.getCode());
}
return results;
}
public Map<String, Integer> getMaxDevices() {
Map<String, Integer> results = new HashMap<>();
for (MaxDeviceConfiguration maxDeviceConfiguration : maxDevices) {
results.put(maxDeviceConfiguration.getNumber(),
maxDeviceConfiguration.getCount());
}
return results;
}
public Map<String, String> getTransparentDataIndex() {
return transparentDataIndex;
}
public SecureBackupServiceConfiguration getSecureBackupServiceConfiguration() {
return backupService;
}
public PaymentsServiceConfiguration getPaymentsServiceConfiguration() {
return paymentsService;
}
public ZkConfig getZkConfig() {
return zkConfig;
}
public RemoteConfigConfiguration getRemoteConfigConfiguration() {
return remoteConfig;
}
public AppConfigConfiguration getAppConfig() {
return appConfig;
}
public DynamoDbConfiguration getPushChallengeDynamoDbConfiguration() {
return pushChallengeDynamoDb;
}
public DynamoDbConfiguration getReportMessageDynamoDbConfiguration() {
return reportMessageDynamoDb;
}
public MonitoredS3ObjectConfiguration getTorExitNodeListConfiguration() {
return torExitNodeList;
}
public MonitoredS3ObjectConfiguration getAsnTableConfiguration() {
return asnTable;
}
public DonationConfiguration getDonationConfiguration() {
return donation;
}
}
@@ -1,669 +0,0 @@
/*
* Copyright 2013-2020 Signal Messenger, LLC
* SPDX-License-Identifier: AGPL-3.0-only
*/
package org.whispersystems.textsecuregcm;
import static com.codahale.metrics.MetricRegistry.name;
import com.amazonaws.auth.AWSCredentials;
import com.amazonaws.auth.AWSCredentialsProvider;
import com.amazonaws.auth.AWSStaticCredentialsProvider;
import com.amazonaws.auth.BasicAWSCredentials;
import com.codahale.metrics.SharedMetricRegistries;
import com.codahale.metrics.jdbi3.strategies.DefaultNameStrategy;
import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.PropertyAccessor;
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;
import io.dropwizard.Application;
import io.dropwizard.auth.AuthFilter;
import io.dropwizard.auth.PolymorphicAuthDynamicFeature;
import io.dropwizard.auth.PolymorphicAuthValueFactoryProvider;
import io.dropwizard.auth.basic.BasicCredentialAuthFilter;
import io.dropwizard.auth.basic.BasicCredentials;
import io.dropwizard.db.DataSourceFactory;
import io.dropwizard.db.PooledDataSourceFactory;
import io.dropwizard.jdbi3.JdbiFactory;
import io.dropwizard.setup.Bootstrap;
import io.dropwizard.setup.Environment;
import io.lettuce.core.resource.ClientResources;
import io.micrometer.core.instrument.Clock;
import io.micrometer.core.instrument.Meter.Id;
import io.micrometer.core.instrument.Metrics;
import io.micrometer.core.instrument.Tags;
import io.micrometer.core.instrument.config.MeterFilter;
import io.micrometer.core.instrument.distribution.DistributionStatisticConfig;
import io.micrometer.datadog.DatadogConfig;
import io.micrometer.datadog.DatadogMeterRegistry;
import io.micrometer.wavefront.WavefrontConfig;
import io.micrometer.wavefront.WavefrontMeterRegistry;
import java.net.http.HttpClient;
import java.time.Duration;
import java.util.ArrayList;
import java.util.Collections;
import java.util.EnumSet;
import java.util.List;
import java.util.Optional;
import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.LinkedBlockingDeque;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
import javax.servlet.DispatcherType;
import javax.servlet.FilterRegistration;
import javax.servlet.ServletRegistration;
import org.eclipse.jetty.servlets.CrossOriginFilter;
import org.jdbi.v3.core.Jdbi;
import org.signal.zkgroup.ServerSecretParams;
import org.signal.zkgroup.auth.ServerZkAuthOperations;
import org.signal.zkgroup.profiles.ServerZkProfileOperations;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.whispersystems.dispatch.DispatchManager;
import org.whispersystems.textsecuregcm.auth.AccountAuthenticator;
import org.whispersystems.textsecuregcm.auth.CertificateGenerator;
import org.whispersystems.textsecuregcm.auth.DisabledPermittedAccount;
import org.whispersystems.textsecuregcm.auth.DisabledPermittedAccountAuthenticator;
import org.whispersystems.textsecuregcm.auth.ExternalServiceCredentialGenerator;
import org.whispersystems.textsecuregcm.auth.TurnTokenGenerator;
import org.whispersystems.textsecuregcm.configuration.DirectoryServerConfiguration;
import org.whispersystems.textsecuregcm.controllers.AccountController;
import org.whispersystems.textsecuregcm.controllers.AttachmentControllerV1;
import org.whispersystems.textsecuregcm.controllers.AttachmentControllerV2;
import org.whispersystems.textsecuregcm.controllers.AttachmentControllerV3;
import org.whispersystems.textsecuregcm.controllers.CertificateController;
import org.whispersystems.textsecuregcm.controllers.ChallengeController;
import org.whispersystems.textsecuregcm.controllers.DeviceController;
import org.whispersystems.textsecuregcm.controllers.DirectoryController;
import org.whispersystems.textsecuregcm.controllers.DonationController;
import org.whispersystems.textsecuregcm.controllers.KeepAliveController;
import org.whispersystems.textsecuregcm.controllers.KeysController;
import org.whispersystems.textsecuregcm.controllers.MessageController;
import org.whispersystems.textsecuregcm.controllers.PaymentsController;
import org.whispersystems.textsecuregcm.controllers.ProfileController;
import org.whispersystems.textsecuregcm.controllers.ProvisioningController;
import org.whispersystems.textsecuregcm.controllers.RemoteConfigController;
import org.whispersystems.textsecuregcm.controllers.SecureBackupController;
import org.whispersystems.textsecuregcm.controllers.SecureStorageController;
import org.whispersystems.textsecuregcm.controllers.StickerController;
import org.whispersystems.textsecuregcm.controllers.VoiceVerificationController;
import org.whispersystems.textsecuregcm.currency.CurrencyConversionManager;
import org.whispersystems.textsecuregcm.currency.FixerClient;
import org.whispersystems.textsecuregcm.currency.FtxClient;
import org.whispersystems.textsecuregcm.experiment.ExperimentEnrollmentManager;
import org.whispersystems.textsecuregcm.filters.RemoteDeprecationFilter;
import org.whispersystems.textsecuregcm.filters.TimestampResponseFilter;
import org.whispersystems.textsecuregcm.limits.PreKeyRateLimiter;
import org.whispersystems.textsecuregcm.limits.PushChallengeManager;
import org.whispersystems.textsecuregcm.limits.RateLimitChallengeManager;
import org.whispersystems.textsecuregcm.limits.RateLimitResetMetricsManager;
import org.whispersystems.textsecuregcm.limits.RateLimiters;
import org.whispersystems.textsecuregcm.limits.UnsealedSenderRateLimiter;
import org.whispersystems.textsecuregcm.liquibase.NameableMigrationsBundle;
import org.whispersystems.textsecuregcm.mappers.DeviceLimitExceededExceptionMapper;
import org.whispersystems.textsecuregcm.mappers.IOExceptionMapper;
import org.whispersystems.textsecuregcm.mappers.InvalidWebsocketAddressExceptionMapper;
import org.whispersystems.textsecuregcm.mappers.RateLimitChallengeExceptionMapper;
import org.whispersystems.textsecuregcm.mappers.RateLimitExceededExceptionMapper;
import org.whispersystems.textsecuregcm.mappers.RetryLaterExceptionMapper;
import org.whispersystems.textsecuregcm.metrics.BufferPoolGauges;
import org.whispersystems.textsecuregcm.metrics.CpuUsageGauge;
import org.whispersystems.textsecuregcm.metrics.FileDescriptorGauge;
import org.whispersystems.textsecuregcm.metrics.FreeMemoryGauge;
import org.whispersystems.textsecuregcm.metrics.GarbageCollectionGauges;
import org.whispersystems.textsecuregcm.metrics.MaxFileDescriptorGauge;
import org.whispersystems.textsecuregcm.metrics.MetricsApplicationEventListener;
import org.whispersystems.textsecuregcm.metrics.MetricsRequestEventListener;
import org.whispersystems.textsecuregcm.metrics.NetworkReceivedGauge;
import org.whispersystems.textsecuregcm.metrics.NetworkSentGauge;
import org.whispersystems.textsecuregcm.metrics.OperatingSystemMemoryGauge;
import org.whispersystems.textsecuregcm.metrics.PushLatencyManager;
import org.whispersystems.textsecuregcm.metrics.TrafficSource;
import org.whispersystems.textsecuregcm.providers.MultiRecipientMessageProvider;
import org.whispersystems.textsecuregcm.providers.RedisClientFactory;
import org.whispersystems.textsecuregcm.providers.RedisClusterHealthCheck;
import org.whispersystems.textsecuregcm.push.APNSender;
import org.whispersystems.textsecuregcm.push.ApnFallbackManager;
import org.whispersystems.textsecuregcm.push.ClientPresenceManager;
import org.whispersystems.textsecuregcm.push.GCMSender;
import org.whispersystems.textsecuregcm.push.MessageSender;
import org.whispersystems.textsecuregcm.push.ProvisioningManager;
import org.whispersystems.textsecuregcm.push.ReceiptSender;
import org.whispersystems.textsecuregcm.recaptcha.RecaptchaClient;
import org.whispersystems.textsecuregcm.redis.ConnectionEventLogger;
import org.whispersystems.textsecuregcm.redis.FaultTolerantRedisCluster;
import org.whispersystems.textsecuregcm.redis.ReplicatedJedisPool;
import org.whispersystems.textsecuregcm.s3.PolicySigner;
import org.whispersystems.textsecuregcm.s3.PostPolicyGenerator;
import org.whispersystems.textsecuregcm.securebackup.SecureBackupClient;
import org.whispersystems.textsecuregcm.securestorage.SecureStorageClient;
import org.whispersystems.textsecuregcm.sms.SmsSender;
import org.whispersystems.textsecuregcm.sms.TwilioSmsSender;
import org.whispersystems.textsecuregcm.sms.TwilioVerifyExperimentEnrollmentManager;
import org.whispersystems.textsecuregcm.sqs.DirectoryQueue;
import org.whispersystems.textsecuregcm.storage.AbusiveHostRules;
import org.whispersystems.textsecuregcm.storage.Account;
import org.whispersystems.textsecuregcm.storage.AccountCleaner;
import org.whispersystems.textsecuregcm.storage.AccountDatabaseCrawler;
import org.whispersystems.textsecuregcm.storage.AccountDatabaseCrawlerCache;
import org.whispersystems.textsecuregcm.storage.AccountDatabaseCrawlerListener;
import org.whispersystems.textsecuregcm.storage.Accounts;
import org.whispersystems.textsecuregcm.storage.AccountsDynamoDb;
import org.whispersystems.textsecuregcm.storage.AccountsDynamoDbMigrator;
import org.whispersystems.textsecuregcm.storage.AccountsManager;
import org.whispersystems.textsecuregcm.storage.ActiveUserCounter;
import org.whispersystems.textsecuregcm.storage.DirectoryReconciler;
import org.whispersystems.textsecuregcm.storage.DirectoryReconciliationClient;
import org.whispersystems.textsecuregcm.storage.DynamicConfigurationManager;
import org.whispersystems.textsecuregcm.storage.FaultTolerantDatabase;
import org.whispersystems.textsecuregcm.storage.KeysDynamoDb;
import org.whispersystems.textsecuregcm.storage.MessagePersister;
import org.whispersystems.textsecuregcm.storage.MessagesCache;
import org.whispersystems.textsecuregcm.storage.MessagesDynamoDb;
import org.whispersystems.textsecuregcm.storage.MessagesManager;
import org.whispersystems.textsecuregcm.storage.MigrationDeletedAccounts;
import org.whispersystems.textsecuregcm.storage.MigrationRetryAccounts;
import org.whispersystems.textsecuregcm.storage.PendingAccounts;
import org.whispersystems.textsecuregcm.storage.PendingAccountsManager;
import org.whispersystems.textsecuregcm.storage.PendingDevices;
import org.whispersystems.textsecuregcm.storage.PendingDevicesManager;
import org.whispersystems.textsecuregcm.storage.Profiles;
import org.whispersystems.textsecuregcm.storage.ProfilesManager;
import org.whispersystems.textsecuregcm.storage.PubSubManager;
import org.whispersystems.textsecuregcm.storage.PushChallengeDynamoDb;
import org.whispersystems.textsecuregcm.storage.PushFeedbackProcessor;
import org.whispersystems.textsecuregcm.storage.RegistrationLockVersionCounter;
import org.whispersystems.textsecuregcm.storage.RemoteConfigs;
import org.whispersystems.textsecuregcm.storage.RemoteConfigsManager;
import org.whispersystems.textsecuregcm.storage.ReportMessageDynamoDb;
import org.whispersystems.textsecuregcm.storage.ReportMessageManager;
import org.whispersystems.textsecuregcm.storage.ReservedUsernames;
import org.whispersystems.textsecuregcm.storage.Usernames;
import org.whispersystems.textsecuregcm.storage.UsernamesManager;
import org.whispersystems.textsecuregcm.util.AsnManager;
import org.whispersystems.textsecuregcm.util.Constants;
import org.whispersystems.textsecuregcm.util.DynamoDbFromConfig;
import org.whispersystems.textsecuregcm.util.HostnameUtil;
import org.whispersystems.textsecuregcm.util.TorExitNodeManager;
import org.whispersystems.textsecuregcm.websocket.AuthenticatedConnectListener;
import org.whispersystems.textsecuregcm.websocket.DeadLetterHandler;
import org.whispersystems.textsecuregcm.websocket.ProvisioningConnectListener;
import org.whispersystems.textsecuregcm.websocket.WebSocketAccountAuthenticator;
import org.whispersystems.textsecuregcm.workers.CertificateCommand;
import org.whispersystems.textsecuregcm.workers.CheckDynamicConfigurationCommand;
import org.whispersystems.textsecuregcm.workers.DeleteUserCommand;
import org.whispersystems.textsecuregcm.workers.ServerVersionCommand;
import org.whispersystems.textsecuregcm.workers.SetCrawlerAccelerationTask;
import org.whispersystems.textsecuregcm.workers.SetRequestLoggingEnabledTask;
import org.whispersystems.textsecuregcm.workers.VacuumCommand;
import org.whispersystems.textsecuregcm.workers.ZkParamsCommand;
import org.whispersystems.websocket.WebSocketResourceProviderFactory;
import org.whispersystems.websocket.setup.WebSocketEnvironment;
import software.amazon.awssdk.auth.credentials.AwsBasicCredentials;
import software.amazon.awssdk.auth.credentials.AwsCredentials;
import software.amazon.awssdk.auth.credentials.AwsCredentialsProvider;
import software.amazon.awssdk.auth.credentials.StaticCredentialsProvider;
import software.amazon.awssdk.regions.Region;
import software.amazon.awssdk.services.dynamodb.DynamoDbAsyncClient;
import software.amazon.awssdk.services.dynamodb.DynamoDbClient;
import software.amazon.awssdk.services.s3.S3Client;
public class WhisperServerService extends Application<WhisperServerConfiguration> {
private static final Logger log = LoggerFactory.getLogger(WhisperServerService.class);
@Override
public void initialize(Bootstrap<WhisperServerConfiguration> bootstrap) {
bootstrap.addCommand(new VacuumCommand());
bootstrap.addCommand(new DeleteUserCommand());
bootstrap.addCommand(new CertificateCommand());
bootstrap.addCommand(new ZkParamsCommand());
bootstrap.addCommand(new ServerVersionCommand());
bootstrap.addCommand(new CheckDynamicConfigurationCommand());
bootstrap.addBundle(new NameableMigrationsBundle<WhisperServerConfiguration>("accountdb", "accountsdb.xml") {
@Override
public DataSourceFactory getDataSourceFactory(WhisperServerConfiguration configuration) {
return configuration.getAccountsDatabaseConfiguration();
}
});
bootstrap.addBundle(new NameableMigrationsBundle<WhisperServerConfiguration>("abusedb", "abusedb.xml") {
@Override
public PooledDataSourceFactory getDataSourceFactory(WhisperServerConfiguration configuration) {
return configuration.getAbuseDatabaseConfiguration();
}
});
}
@Override
public String getName() {
return "whisper-server";
}
@Override
public void run(WhisperServerConfiguration config, Environment environment)
throws Exception {
SharedMetricRegistries.add(Constants.METRICS_NAME, environment.metrics());
final DistributionStatisticConfig defaultDistributionStatisticConfig = DistributionStatisticConfig.builder()
.percentiles(.75, .95, .99, .999)
.build();
final WavefrontConfig wavefrontConfig = new WavefrontConfig() {
@Override
public String get(final String key) {
return null;
}
@Override
public String uri() {
return config.getWavefrontConfiguration().getUri();
}
@Override
public int batchSize() {
return config.getWavefrontConfiguration().getBatchSize();
}
};
Metrics.addRegistry(new WavefrontMeterRegistry(wavefrontConfig, Clock.SYSTEM) {
@Override
protected DistributionStatisticConfig defaultHistogramConfig() {
return defaultDistributionStatisticConfig.merge(super.defaultHistogramConfig());
}
});
{
final DatadogMeterRegistry datadogMeterRegistry = new DatadogMeterRegistry(new DatadogConfig() {
@Override
public String get(final String key) {
return null;
}
@Override
public String apiKey() {
return config.getDatadogConfiguration().getApiKey();
}
@Override
public Duration step() {
return config.getDatadogConfiguration().getStep();
}
@Override
public int batchSize() {
return config.getDatadogConfiguration().getBatchSize();
}
@Override
public String hostTag() {
return "host";
}
}, Clock.SYSTEM);
datadogMeterRegistry.config().commonTags(
Tags.of(
"service", "chat",
"host", HostnameUtil.getLocalHostname(),
"version", WhisperServerVersion.getServerVersion(),
"env", config.getDatadogConfiguration().getEnvironment()))
.meterFilter(MeterFilter.denyNameStartsWith(MetricsRequestEventListener.REQUEST_COUNTER_NAME))
.meterFilter(MeterFilter.denyNameStartsWith(MetricsRequestEventListener.ANDROID_REQUEST_COUNTER_NAME))
.meterFilter(MeterFilter.denyNameStartsWith(MetricsRequestEventListener.DESKTOP_REQUEST_COUNTER_NAME))
.meterFilter(MeterFilter.denyNameStartsWith(MetricsRequestEventListener.IOS_REQUEST_COUNTER_NAME))
.meterFilter(new MeterFilter() {
@Override
public DistributionStatisticConfig configure(final Id id, final DistributionStatisticConfig config) {
return defaultDistributionStatisticConfig.merge(config);
}
});
Metrics.addRegistry(datadogMeterRegistry);
}
environment.getObjectMapper().configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
environment.getObjectMapper().setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.NONE);
environment.getObjectMapper().setVisibility(PropertyAccessor.FIELD, JsonAutoDetect.Visibility.ANY);
JdbiFactory jdbiFactory = new JdbiFactory(DefaultNameStrategy.CHECK_EMPTY);
Jdbi accountJdbi = jdbiFactory.build(environment, config.getAccountsDatabaseConfiguration(), "accountdb");
Jdbi abuseJdbi = jdbiFactory.build(environment, config.getAbuseDatabaseConfiguration(), "abusedb" );
FaultTolerantDatabase accountDatabase = new FaultTolerantDatabase("accounts_database", accountJdbi, config.getAccountsDatabaseConfiguration().getCircuitBreakerConfiguration());
FaultTolerantDatabase abuseDatabase = new FaultTolerantDatabase("abuse_database", abuseJdbi, config.getAbuseDatabaseConfiguration().getCircuitBreakerConfiguration());
DynamoDbClient messageDynamoDb = DynamoDbFromConfig.client(config.getMessageDynamoDbConfiguration(),
software.amazon.awssdk.auth.credentials.InstanceProfileCredentialsProvider.create());
DynamoDbClient preKeyDynamoDb = DynamoDbFromConfig.client(config.getKeysDynamoDbConfiguration(),
software.amazon.awssdk.auth.credentials.InstanceProfileCredentialsProvider.create());
DynamoDbClient accountsDynamoDbClient = DynamoDbFromConfig.client(config.getAccountsDynamoDbConfiguration(),
software.amazon.awssdk.auth.credentials.InstanceProfileCredentialsProvider.create());
// The thread pool core & max sizes are set via dynamic configuration within AccountsDynamoDb
ThreadPoolExecutor accountsDynamoDbMigrationThreadPool = new ThreadPoolExecutor(1, 1, 0, TimeUnit.SECONDS,
new LinkedBlockingDeque<>());
DynamoDbAsyncClient accountsDynamoDbAsyncClient = DynamoDbFromConfig.asyncClient(config.getAccountsDynamoDbConfiguration(),
software.amazon.awssdk.auth.credentials.InstanceProfileCredentialsProvider.create(),
accountsDynamoDbMigrationThreadPool);
DynamoDbClient recentlyDeletedAccountsDynamoDb = DynamoDbFromConfig.client(config.getMigrationDeletedAccountsDynamoDbConfiguration(),
software.amazon.awssdk.auth.credentials.InstanceProfileCredentialsProvider.create());
DynamoDbClient pushChallengeDynamoDbClient = DynamoDbFromConfig.client(config.getPushChallengeDynamoDbConfiguration(),
software.amazon.awssdk.auth.credentials.InstanceProfileCredentialsProvider.create());
DynamoDbClient reportMessageDynamoDbClient = DynamoDbFromConfig.client(config.getReportMessageDynamoDbConfiguration(),
software.amazon.awssdk.auth.credentials.InstanceProfileCredentialsProvider.create());
DynamoDbClient migrationRetryAccountsDynamoDb = DynamoDbFromConfig.client(config.getMigrationRetryAccountsDynamoDbConfiguration(),
software.amazon.awssdk.auth.credentials.InstanceProfileCredentialsProvider.create());
MigrationDeletedAccounts migrationDeletedAccounts = new MigrationDeletedAccounts(recentlyDeletedAccountsDynamoDb, config.getMigrationDeletedAccountsDynamoDbConfiguration().getTableName());
MigrationRetryAccounts migrationRetryAccounts = new MigrationRetryAccounts(migrationRetryAccountsDynamoDb, config.getMigrationRetryAccountsDynamoDbConfiguration().getTableName());
Accounts accounts = new Accounts(accountDatabase);
AccountsDynamoDb accountsDynamoDb = new AccountsDynamoDb(accountsDynamoDbClient, accountsDynamoDbAsyncClient, accountsDynamoDbMigrationThreadPool, config.getAccountsDynamoDbConfiguration().getTableName(), config.getAccountsDynamoDbConfiguration().getPhoneNumberTableName(), migrationDeletedAccounts, migrationRetryAccounts);
PendingAccounts pendingAccounts = new PendingAccounts(accountDatabase);
PendingDevices pendingDevices = new PendingDevices (accountDatabase);
Usernames usernames = new Usernames(accountDatabase);
ReservedUsernames reservedUsernames = new ReservedUsernames(accountDatabase);
Profiles profiles = new Profiles(accountDatabase);
KeysDynamoDb keysDynamoDb = new KeysDynamoDb(preKeyDynamoDb, config.getKeysDynamoDbConfiguration().getTableName());
MessagesDynamoDb messagesDynamoDb = new MessagesDynamoDb(messageDynamoDb, config.getMessageDynamoDbConfiguration().getTableName(), config.getMessageDynamoDbConfiguration().getTimeToLive());
AbusiveHostRules abusiveHostRules = new AbusiveHostRules(abuseDatabase);
RemoteConfigs remoteConfigs = new RemoteConfigs(accountDatabase);
PushChallengeDynamoDb pushChallengeDynamoDb = new PushChallengeDynamoDb(pushChallengeDynamoDbClient, config.getPushChallengeDynamoDbConfiguration().getTableName());
ReportMessageDynamoDb reportMessageDynamoDb = new ReportMessageDynamoDb(reportMessageDynamoDbClient, config.getReportMessageDynamoDbConfiguration().getTableName());
RedisClientFactory pubSubClientFactory = new RedisClientFactory("pubsub_cache", config.getPubsubCacheConfiguration().getUrl(), config.getPubsubCacheConfiguration().getReplicaUrls(), config.getPubsubCacheConfiguration().getCircuitBreakerConfiguration());
ReplicatedJedisPool pubsubClient = pubSubClientFactory.getRedisClientPool();
ClientResources generalCacheClientResources = ClientResources.builder().build();
ClientResources messageCacheClientResources = ClientResources.builder().build();
ClientResources presenceClientResources = ClientResources.builder().build();
ClientResources metricsCacheClientResources = ClientResources.builder().build();
ClientResources pushSchedulerCacheClientResources = ClientResources.builder().ioThreadPoolSize(4).build();
ClientResources rateLimitersCacheClientResources = ClientResources.builder().build();
ConnectionEventLogger.logConnectionEvents(generalCacheClientResources);
ConnectionEventLogger.logConnectionEvents(messageCacheClientResources);
ConnectionEventLogger.logConnectionEvents(presenceClientResources);
ConnectionEventLogger.logConnectionEvents(metricsCacheClientResources);
FaultTolerantRedisCluster cacheCluster = new FaultTolerantRedisCluster("main_cache_cluster", config.getCacheClusterConfiguration(), generalCacheClientResources);
FaultTolerantRedisCluster messagesCluster = new FaultTolerantRedisCluster("messages_cluster", config.getMessageCacheConfiguration().getRedisClusterConfiguration(), messageCacheClientResources);
FaultTolerantRedisCluster clientPresenceCluster = new FaultTolerantRedisCluster("client_presence_cluster", config.getClientPresenceClusterConfiguration(), presenceClientResources);
FaultTolerantRedisCluster metricsCluster = new FaultTolerantRedisCluster("metrics_cluster", config.getMetricsClusterConfiguration(), metricsCacheClientResources);
FaultTolerantRedisCluster pushSchedulerCluster = new FaultTolerantRedisCluster("push_scheduler", config.getPushSchedulerCluster(), pushSchedulerCacheClientResources);
FaultTolerantRedisCluster rateLimitersCluster = new FaultTolerantRedisCluster("rate_limiters", config.getRateLimitersCluster(), rateLimitersCacheClientResources);
BlockingQueue<Runnable> keyspaceNotificationDispatchQueue = new ArrayBlockingQueue<>(10_000);
Metrics.gaugeCollectionSize(name(getClass(), "keyspaceNotificationDispatchQueueSize"), Collections.emptyList(), keyspaceNotificationDispatchQueue);
ScheduledExecutorService recurringJobExecutor = environment.lifecycle().scheduledExecutorService(name(getClass(), "recurringJob-%d")).threads(2).build();
ScheduledExecutorService declinedMessageReceiptExecutor = environment.lifecycle().scheduledExecutorService(name(getClass(), "declined-receipt-%d")).threads(2).build();
ScheduledExecutorService retrySchedulingExecutor = environment.lifecycle().scheduledExecutorService(name(getClass(), "retry-%d")).threads(2).build();
ExecutorService keyspaceNotificationDispatchExecutor = environment.lifecycle().executorService(name(getClass(), "keyspaceNotification-%d")).maxThreads(16).workQueue(keyspaceNotificationDispatchQueue).build();
ExecutorService apnSenderExecutor = environment.lifecycle().executorService(name(getClass(), "apnSender-%d")).maxThreads(1).minThreads(1).build();
ExecutorService gcmSenderExecutor = environment.lifecycle().executorService(name(getClass(), "gcmSender-%d")).maxThreads(1).minThreads(1).build();
ExecutorService backupServiceExecutor = environment.lifecycle().executorService(name(getClass(), "backupService-%d")).maxThreads(1).minThreads(1).build();
ExecutorService storageServiceExecutor = environment.lifecycle().executorService(name(getClass(), "storageService-%d")).maxThreads(1).minThreads(1).build();
ExecutorService donationExecutor = environment.lifecycle().executorService(name(getClass(), "donation-%d")).maxThreads(1).minThreads(1).build();
ExternalServiceCredentialGenerator directoryCredentialsGenerator = new ExternalServiceCredentialGenerator(config.getDirectoryConfiguration().getDirectoryClientConfiguration().getUserAuthenticationTokenSharedSecret(),
config.getDirectoryConfiguration().getDirectoryClientConfiguration().getUserAuthenticationTokenUserIdSecret(),
true);
DynamicConfigurationManager dynamicConfigurationManager = new DynamicConfigurationManager(config.getAppConfig().getApplication(), config.getAppConfig().getEnvironment(), config.getAppConfig().getConfigurationName());
dynamicConfigurationManager.start();
ExperimentEnrollmentManager experimentEnrollmentManager = new ExperimentEnrollmentManager(dynamicConfigurationManager);
TwilioVerifyExperimentEnrollmentManager verifyExperimentEnrollmentManager = new TwilioVerifyExperimentEnrollmentManager(
config.getVoiceVerificationConfiguration(), experimentEnrollmentManager);
ExternalServiceCredentialGenerator storageCredentialsGenerator = new ExternalServiceCredentialGenerator(config.getSecureStorageServiceConfiguration().getUserAuthenticationTokenSharedSecret(), new byte[0], false);
ExternalServiceCredentialGenerator backupCredentialsGenerator = new ExternalServiceCredentialGenerator(config.getSecureBackupServiceConfiguration().getUserAuthenticationTokenSharedSecret(), new byte[0], false);
ExternalServiceCredentialGenerator paymentsCredentialsGenerator = new ExternalServiceCredentialGenerator(config.getPaymentsServiceConfiguration().getUserAuthenticationTokenSharedSecret(), new byte[0], false);
SecureBackupClient secureBackupClient = new SecureBackupClient(backupCredentialsGenerator, backupServiceExecutor, config.getSecureBackupServiceConfiguration());
SecureStorageClient secureStorageClient = new SecureStorageClient(storageCredentialsGenerator, storageServiceExecutor, config.getSecureStorageServiceConfiguration());
ClientPresenceManager clientPresenceManager = new ClientPresenceManager(clientPresenceCluster, recurringJobExecutor, keyspaceNotificationDispatchExecutor);
DirectoryQueue directoryQueue = new DirectoryQueue(config.getDirectoryConfiguration().getSqsConfiguration());
PendingAccountsManager pendingAccountsManager = new PendingAccountsManager(pendingAccounts, cacheCluster);
PendingDevicesManager pendingDevicesManager = new PendingDevicesManager(pendingDevices, cacheCluster);
UsernamesManager usernamesManager = new UsernamesManager(usernames, reservedUsernames, cacheCluster);
ProfilesManager profilesManager = new ProfilesManager(profiles, cacheCluster);
MessagesCache messagesCache = new MessagesCache(messagesCluster, messagesCluster, keyspaceNotificationDispatchExecutor);
PushLatencyManager pushLatencyManager = new PushLatencyManager(metricsCluster);
ReportMessageManager reportMessageManager = new ReportMessageManager(reportMessageDynamoDb, Metrics.globalRegistry);
MessagesManager messagesManager = new MessagesManager(messagesDynamoDb, messagesCache, pushLatencyManager, reportMessageManager);
AccountsManager accountsManager = new AccountsManager(accounts, accountsDynamoDb, cacheCluster, directoryQueue, keysDynamoDb, messagesManager, usernamesManager, profilesManager, secureStorageClient, secureBackupClient, experimentEnrollmentManager, dynamicConfigurationManager);
RemoteConfigsManager remoteConfigsManager = new RemoteConfigsManager(remoteConfigs);
DeadLetterHandler deadLetterHandler = new DeadLetterHandler(accountsManager, messagesManager);
DispatchManager dispatchManager = new DispatchManager(pubSubClientFactory, Optional.of(deadLetterHandler));
PubSubManager pubSubManager = new PubSubManager(pubsubClient, dispatchManager);
APNSender apnSender = new APNSender(apnSenderExecutor, accountsManager, config.getApnConfiguration());
GCMSender gcmSender = new GCMSender(gcmSenderExecutor, accountsManager, config.getGcmConfiguration().getApiKey());
RateLimiters rateLimiters = new RateLimiters(config.getLimitsConfiguration(), dynamicConfigurationManager, rateLimitersCluster);
ProvisioningManager provisioningManager = new ProvisioningManager(pubSubManager);
TorExitNodeManager torExitNodeManager = new TorExitNodeManager(recurringJobExecutor, config.getTorExitNodeListConfiguration());
AsnManager asnManager = new AsnManager(recurringJobExecutor, config.getAsnTableConfiguration());
AccountAuthenticator accountAuthenticator = new AccountAuthenticator(accountsManager);
DisabledPermittedAccountAuthenticator disabledPermittedAccountAuthenticator = new DisabledPermittedAccountAuthenticator(accountsManager);
RateLimitResetMetricsManager rateLimitResetMetricsManager = new RateLimitResetMetricsManager(metricsCluster, Metrics.globalRegistry);
UnsealedSenderRateLimiter unsealedSenderRateLimiter = new UnsealedSenderRateLimiter(rateLimiters, rateLimitersCluster, dynamicConfigurationManager, rateLimitResetMetricsManager);
PreKeyRateLimiter preKeyRateLimiter = new PreKeyRateLimiter(rateLimiters, dynamicConfigurationManager, rateLimitResetMetricsManager);
ApnFallbackManager apnFallbackManager = new ApnFallbackManager(pushSchedulerCluster, apnSender, accountsManager);
TwilioSmsSender twilioSmsSender = new TwilioSmsSender(config.getTwilioConfiguration(), dynamicConfigurationManager);
SmsSender smsSender = new SmsSender(twilioSmsSender);
MessageSender messageSender = new MessageSender(apnFallbackManager, clientPresenceManager, messagesManager, gcmSender, apnSender, pushLatencyManager);
ReceiptSender receiptSender = new ReceiptSender(accountsManager, messageSender);
TurnTokenGenerator turnTokenGenerator = new TurnTokenGenerator(config.getTurnConfiguration());
RecaptchaClient recaptchaClient = new RecaptchaClient(config.getRecaptchaConfiguration().getSecret());
PushChallengeManager pushChallengeManager = new PushChallengeManager(apnSender, gcmSender, pushChallengeDynamoDb);
RateLimitChallengeManager rateLimitChallengeManager = new RateLimitChallengeManager(pushChallengeManager, recaptchaClient, preKeyRateLimiter, unsealedSenderRateLimiter, rateLimiters, dynamicConfigurationManager);
MessagePersister messagePersister = new MessagePersister(messagesCache, messagesManager, accountsManager, dynamicConfigurationManager, Duration.ofMinutes(config.getMessageCacheConfiguration().getPersistDelayMinutes()));
final List<AccountDatabaseCrawlerListener> accountDatabaseCrawlerListeners = new ArrayList<>();
accountDatabaseCrawlerListeners.add(new PushFeedbackProcessor(accountsManager, directoryQueue));
accountDatabaseCrawlerListeners.add(new ActiveUserCounter(config.getMetricsFactory(), cacheCluster));
for (DirectoryServerConfiguration directoryServerConfiguration : config.getDirectoryConfiguration().getDirectoryServerConfiguration()) {
final DirectoryReconciliationClient directoryReconciliationClient = new DirectoryReconciliationClient(directoryServerConfiguration);
final DirectoryReconciler directoryReconciler = new DirectoryReconciler(directoryServerConfiguration.getReplicationName(), directoryReconciliationClient);
accountDatabaseCrawlerListeners.add(directoryReconciler);
}
accountDatabaseCrawlerListeners.add(new AccountCleaner(accountsManager));
accountDatabaseCrawlerListeners.add(new RegistrationLockVersionCounter(metricsCluster, config.getMetricsFactory()));
accountDatabaseCrawlerListeners.add(new AccountsDynamoDbMigrator(accountsDynamoDb, dynamicConfigurationManager));
HttpClient currencyClient = HttpClient.newBuilder().version(HttpClient.Version.HTTP_2).connectTimeout(Duration.ofSeconds(10)).build();
FixerClient fixerClient = new FixerClient(currencyClient, config.getPaymentsServiceConfiguration().getFixerApiKey());
FtxClient ftxClient = new FtxClient(currencyClient);
CurrencyConversionManager currencyManager = new CurrencyConversionManager(fixerClient, ftxClient, config.getPaymentsServiceConfiguration().getPaymentCurrencies());
AccountDatabaseCrawlerCache accountDatabaseCrawlerCache = new AccountDatabaseCrawlerCache(cacheCluster);
AccountDatabaseCrawler accountDatabaseCrawler = new AccountDatabaseCrawler(accountsManager, accountDatabaseCrawlerCache, accountDatabaseCrawlerListeners, config.getAccountDatabaseCrawlerConfiguration().getChunkSize(), config.getAccountDatabaseCrawlerConfiguration().getChunkIntervalMs());
apnSender.setApnFallbackManager(apnFallbackManager);
environment.lifecycle().manage(apnFallbackManager);
environment.lifecycle().manage(pubSubManager);
environment.lifecycle().manage(messageSender);
environment.lifecycle().manage(accountDatabaseCrawler);
environment.lifecycle().manage(remoteConfigsManager);
environment.lifecycle().manage(messagesCache);
environment.lifecycle().manage(messagePersister);
environment.lifecycle().manage(clientPresenceManager);
environment.lifecycle().manage(currencyManager);
environment.lifecycle().manage(torExitNodeManager);
environment.lifecycle().manage(asnManager);
StaticCredentialsProvider cdnCredentialsProvider = StaticCredentialsProvider
.create(AwsBasicCredentials.create(
config.getCdnConfiguration().getAccessKey(),
config.getCdnConfiguration().getAccessSecret()));
S3Client cdnS3Client = S3Client.builder()
.credentialsProvider(cdnCredentialsProvider)
.region(Region.of(config.getCdnConfiguration().getRegion()))
.build();
PostPolicyGenerator profileCdnPolicyGenerator = new PostPolicyGenerator(config.getCdnConfiguration().getRegion(), config.getCdnConfiguration().getBucket(), config.getCdnConfiguration().getAccessKey());
PolicySigner profileCdnPolicySigner = new PolicySigner(config.getCdnConfiguration().getAccessSecret(), config.getCdnConfiguration().getRegion());
ServerSecretParams zkSecretParams = new ServerSecretParams(config.getZkConfig().getServerSecret());
ServerZkProfileOperations zkProfileOperations = new ServerZkProfileOperations(zkSecretParams);
ServerZkAuthOperations zkAuthOperations = new ServerZkAuthOperations(zkSecretParams);
boolean isZkEnabled = config.getZkConfig().isEnabled();
AttachmentControllerV1 attachmentControllerV1 = new AttachmentControllerV1(rateLimiters, config.getAwsAttachmentsConfiguration().getAccessKey(), config.getAwsAttachmentsConfiguration().getAccessSecret(), config.getAwsAttachmentsConfiguration().getBucket());
AttachmentControllerV2 attachmentControllerV2 = new AttachmentControllerV2(rateLimiters, config.getAwsAttachmentsConfiguration().getAccessKey(), config.getAwsAttachmentsConfiguration().getAccessSecret(), config.getAwsAttachmentsConfiguration().getRegion(), config.getAwsAttachmentsConfiguration().getBucket());
AttachmentControllerV3 attachmentControllerV3 = new AttachmentControllerV3(rateLimiters, config.getGcpAttachmentsConfiguration().getDomain(), config.getGcpAttachmentsConfiguration().getEmail(), config.getGcpAttachmentsConfiguration().getMaxSizeInBytes(), config.getGcpAttachmentsConfiguration().getPathPrefix(), config.getGcpAttachmentsConfiguration().getRsaSigningKey());
DonationController donationController = new DonationController(donationExecutor, config.getDonationConfiguration());
KeysController keysController = new KeysController(rateLimiters, keysDynamoDb, accountsManager, directoryQueue, preKeyRateLimiter, dynamicConfigurationManager, rateLimitChallengeManager);
MessageController messageController = new MessageController(rateLimiters, messageSender, receiptSender, accountsManager, messagesManager, unsealedSenderRateLimiter, apnFallbackManager, dynamicConfigurationManager, rateLimitChallengeManager, reportMessageManager, metricsCluster, declinedMessageReceiptExecutor);
ProfileController profileController = new ProfileController(rateLimiters, accountsManager, profilesManager, usernamesManager, dynamicConfigurationManager, cdnS3Client, profileCdnPolicyGenerator, profileCdnPolicySigner, config.getCdnConfiguration().getBucket(), zkProfileOperations, isZkEnabled);
StickerController stickerController = new StickerController(rateLimiters, config.getCdnConfiguration().getAccessKey(), config.getCdnConfiguration().getAccessSecret(), config.getCdnConfiguration().getRegion(), config.getCdnConfiguration().getBucket());
RemoteConfigController remoteConfigController = new RemoteConfigController(remoteConfigsManager, config.getRemoteConfigConfiguration().getAuthorizedTokens(), config.getRemoteConfigConfiguration().getGlobalConfig());
ChallengeController challengeController = new ChallengeController(rateLimitChallengeManager);
AuthFilter<BasicCredentials, Account> accountAuthFilter = new BasicCredentialAuthFilter.Builder<Account>().setAuthenticator(accountAuthenticator).buildAuthFilter ();
AuthFilter<BasicCredentials, DisabledPermittedAccount> disabledPermittedAccountAuthFilter = new BasicCredentialAuthFilter.Builder<DisabledPermittedAccount>().setAuthenticator(disabledPermittedAccountAuthenticator).buildAuthFilter();
environment.servlets().addFilter("RemoteDeprecationFilter", new RemoteDeprecationFilter(dynamicConfigurationManager))
.addMappingForUrlPatterns(EnumSet.of(DispatcherType.REQUEST), false, "/*");
environment.jersey().register(MultiRecipientMessageProvider.class);
environment.jersey().register(new MetricsApplicationEventListener(TrafficSource.HTTP));
environment.jersey().register(new PolymorphicAuthDynamicFeature<>(ImmutableMap.of(Account.class, accountAuthFilter,
DisabledPermittedAccount.class, disabledPermittedAccountAuthFilter)));
environment.jersey().register(new PolymorphicAuthValueFactoryProvider.Binder<>(ImmutableSet.of(Account.class, DisabledPermittedAccount.class)));
environment.jersey().register(new TimestampResponseFilter());
environment.jersey().register(new AccountController(pendingAccountsManager, accountsManager, usernamesManager, abusiveHostRules, rateLimiters, smsSender, directoryQueue, messagesManager, dynamicConfigurationManager, turnTokenGenerator, config.getTestDevices(), recaptchaClient, gcmSender, apnSender, backupCredentialsGenerator, verifyExperimentEnrollmentManager));
environment.jersey().register(new DeviceController(pendingDevicesManager, accountsManager, messagesManager, directoryQueue, rateLimiters, config.getMaxDevices()));
environment.jersey().register(new DirectoryController(directoryCredentialsGenerator));
environment.jersey().register(new ProvisioningController(rateLimiters, provisioningManager));
environment.jersey().register(new CertificateController(new CertificateGenerator(config.getDeliveryCertificate().getCertificate(), config.getDeliveryCertificate().getPrivateKey(), config.getDeliveryCertificate().getExpiresDays()), zkAuthOperations, isZkEnabled));
environment.jersey().register(new VoiceVerificationController(config.getVoiceVerificationConfiguration().getUrl(), config.getVoiceVerificationConfiguration().getLocales()));
environment.jersey().register(new SecureStorageController(storageCredentialsGenerator));
environment.jersey().register(new SecureBackupController(backupCredentialsGenerator));
environment.jersey().register(new PaymentsController(currencyManager, paymentsCredentialsGenerator));
environment.jersey().register(attachmentControllerV1);
environment.jersey().register(attachmentControllerV2);
environment.jersey().register(attachmentControllerV3);
environment.jersey().register(donationController);
environment.jersey().register(keysController);
environment.jersey().register(messageController);
environment.jersey().register(profileController);
environment.jersey().register(stickerController);
environment.jersey().register(remoteConfigController);
environment.jersey().register(challengeController);
///
WebSocketEnvironment<Account> webSocketEnvironment = new WebSocketEnvironment<>(environment, config.getWebSocketConfiguration(), 90000);
webSocketEnvironment.setAuthenticator(new WebSocketAccountAuthenticator(accountAuthenticator));
webSocketEnvironment.setConnectListener(new AuthenticatedConnectListener(receiptSender, messagesManager, messageSender, apnFallbackManager, clientPresenceManager, retrySchedulingExecutor));
webSocketEnvironment.jersey().register(MultiRecipientMessageProvider.class);
webSocketEnvironment.jersey().register(new MetricsApplicationEventListener(TrafficSource.WEBSOCKET));
webSocketEnvironment.jersey().register(new KeepAliveController(clientPresenceManager));
webSocketEnvironment.jersey().register(messageController);
webSocketEnvironment.jersey().register(profileController);
webSocketEnvironment.jersey().register(attachmentControllerV1);
webSocketEnvironment.jersey().register(attachmentControllerV2);
webSocketEnvironment.jersey().register(attachmentControllerV3);
webSocketEnvironment.jersey().register(donationController);
webSocketEnvironment.jersey().register(remoteConfigController);
WebSocketEnvironment<Account> provisioningEnvironment = new WebSocketEnvironment<>(environment, webSocketEnvironment.getRequestLog(), 60000);
provisioningEnvironment.setConnectListener(new ProvisioningConnectListener(pubSubManager));
provisioningEnvironment.jersey().register(new MetricsApplicationEventListener(TrafficSource.WEBSOCKET));
provisioningEnvironment.jersey().register(new KeepAliveController(clientPresenceManager));
registerCorsFilter(environment);
registerExceptionMappers(environment, webSocketEnvironment, provisioningEnvironment);
RateLimitChallengeExceptionMapper rateLimitChallengeExceptionMapper = new RateLimitChallengeExceptionMapper(rateLimitChallengeManager);
environment.jersey().register(rateLimitChallengeExceptionMapper);
webSocketEnvironment.jersey().register(rateLimitChallengeExceptionMapper);
provisioningEnvironment.jersey().register(rateLimitChallengeExceptionMapper);
WebSocketResourceProviderFactory<Account> webSocketServlet = new WebSocketResourceProviderFactory<>(webSocketEnvironment, Account.class);
WebSocketResourceProviderFactory<Account> provisioningServlet = new WebSocketResourceProviderFactory<>(provisioningEnvironment, Account.class);
ServletRegistration.Dynamic websocket = environment.servlets().addServlet("WebSocket", webSocketServlet );
ServletRegistration.Dynamic provisioning = environment.servlets().addServlet("Provisioning", provisioningServlet);
websocket.addMapping("/v1/websocket/");
websocket.setAsyncSupported(true);
provisioning.addMapping("/v1/websocket/provisioning/");
provisioning.setAsyncSupported(true);
environment.admin().addTask(new SetRequestLoggingEnabledTask());
environment.admin().addTask(new SetCrawlerAccelerationTask(accountDatabaseCrawlerCache));
///
environment.healthChecks().register("cacheCluster", new RedisClusterHealthCheck(cacheCluster));
environment.metrics().register(name(CpuUsageGauge.class, "cpu"), new CpuUsageGauge(3, TimeUnit.SECONDS));
environment.metrics().register(name(FreeMemoryGauge.class, "free_memory"), new FreeMemoryGauge());
environment.metrics().register(name(NetworkSentGauge.class, "bytes_sent"), new NetworkSentGauge());
environment.metrics().register(name(NetworkReceivedGauge.class, "bytes_received"), new NetworkReceivedGauge());
environment.metrics().register(name(FileDescriptorGauge.class, "fd_count"), new FileDescriptorGauge());
environment.metrics().register(name(MaxFileDescriptorGauge.class, "max_fd_count"), new MaxFileDescriptorGauge());
environment.metrics().register(name(OperatingSystemMemoryGauge.class, "buffers"), new OperatingSystemMemoryGauge("Buffers"));
environment.metrics().register(name(OperatingSystemMemoryGauge.class, "cached"), new OperatingSystemMemoryGauge("Cached"));
BufferPoolGauges.registerMetrics();
GarbageCollectionGauges.registerMetrics();
}
private void registerExceptionMappers(Environment environment, WebSocketEnvironment<Account> webSocketEnvironment, WebSocketEnvironment<Account> provisioningEnvironment) {
environment.jersey().register(new IOExceptionMapper());
environment.jersey().register(new RateLimitExceededExceptionMapper());
environment.jersey().register(new InvalidWebsocketAddressExceptionMapper());
environment.jersey().register(new DeviceLimitExceededExceptionMapper());
environment.jersey().register(new RetryLaterExceptionMapper());
webSocketEnvironment.jersey().register(new IOExceptionMapper());
webSocketEnvironment.jersey().register(new RateLimitExceededExceptionMapper());
webSocketEnvironment.jersey().register(new InvalidWebsocketAddressExceptionMapper());
webSocketEnvironment.jersey().register(new DeviceLimitExceededExceptionMapper());
webSocketEnvironment.jersey().register(new RetryLaterExceptionMapper());
provisioningEnvironment.jersey().register(new IOExceptionMapper());
provisioningEnvironment.jersey().register(new RateLimitExceededExceptionMapper());
provisioningEnvironment.jersey().register(new InvalidWebsocketAddressExceptionMapper());
provisioningEnvironment.jersey().register(new DeviceLimitExceededExceptionMapper());
provisioningEnvironment.jersey().register(new RetryLaterExceptionMapper());
}
private void registerCorsFilter(Environment environment) {
FilterRegistration.Dynamic filter = environment.servlets().addFilter("CORS", CrossOriginFilter.class);
filter.addMappingForUrlPatterns(EnumSet.allOf(DispatcherType.class), true, "/*");
filter.setInitParameter("allowedOrigins", "*");
filter.setInitParameter("allowedHeaders", "Content-Type,Authorization,X-Requested-With,Content-Length,Accept,Origin,X-Signal-Agent");
filter.setInitParameter("allowedMethods", "GET,PUT,POST,DELETE,OPTIONS");
filter.setInitParameter("preflightMaxAge", "5184000");
filter.setInitParameter("allowCredentials", "true");
}
public static void main(String[] args) throws Exception {
new WhisperServerService().run(args);
}
}
@@ -1,39 +0,0 @@
/*
* Copyright 2013-2020 Signal Messenger, LLC
* SPDX-License-Identifier: AGPL-3.0-only
*/
package org.whispersystems.textsecuregcm.auth;
import io.micrometer.core.instrument.Metrics;
import org.whispersystems.textsecuregcm.storage.Account;
import org.whispersystems.textsecuregcm.storage.AccountsManager;
import java.util.Optional;
import io.dropwizard.auth.Authenticator;
import io.dropwizard.auth.basic.BasicCredentials;
import static com.codahale.metrics.MetricRegistry.name;
public class AccountAuthenticator extends BaseAccountAuthenticator implements Authenticator<BasicCredentials, Account> {
private static final String AUTHENTICATION_COUNTER_NAME = name(AccountAuthenticator.class, "authenticate");
private static final String GV2_CAPABLE_TAG_NAME = "gv1Migration";
public AccountAuthenticator(AccountsManager accountsManager) {
super(accountsManager);
}
@Override
public Optional<Account> authenticate(BasicCredentials basicCredentials) {
final Optional<Account> maybeAccount = super.authenticate(basicCredentials, true);
// TODO Remove this temporary counter when we can replace it with more generic feature adoption system
maybeAccount.ifPresent(account -> {
Metrics.counter(AUTHENTICATION_COUNTER_NAME, GV2_CAPABLE_TAG_NAME, String.valueOf(account.isGv1MigrationSupported())).increment();
});
return maybeAccount;
}
}
@@ -1,45 +0,0 @@
/*
* Copyright 2013-2020 Signal Messenger, LLC
* SPDX-License-Identifier: AGPL-3.0-only
*/
package org.whispersystems.textsecuregcm.auth;
import java.util.UUID;
public class AmbiguousIdentifier {
private final UUID uuid;
private final String number;
public AmbiguousIdentifier(String target) {
if (target.startsWith("+")) {
this.uuid = null;
this.number = target;
} else {
this.uuid = UUID.fromString(target);
this.number = null;
}
}
public UUID getUuid() {
return uuid;
}
public String getNumber() {
return number;
}
public boolean hasUuid() {
return uuid != null;
}
public boolean hasNumber() {
return number != null;
}
@Override
public String toString() {
return hasUuid() ? uuid.toString() : number;
}
}
@@ -1,27 +0,0 @@
/*
* Copyright 2013-2020 Signal Messenger, LLC
* SPDX-License-Identifier: AGPL-3.0-only
*/
package org.whispersystems.textsecuregcm.auth;
import java.util.Base64;
import javax.ws.rs.WebApplicationException;
import javax.ws.rs.core.Response;
public class Anonymous {
private final byte[] unidentifiedSenderAccessKey;
public Anonymous(String header) {
try {
this.unidentifiedSenderAccessKey = Base64.getDecoder().decode(header);
} catch (IllegalArgumentException e) {
throw new WebApplicationException(e, Response.Status.UNAUTHORIZED);
}
}
public byte[] getAccessKey() {
return unidentifiedSenderAccessKey;
}
}
@@ -1,50 +0,0 @@
/*
* Copyright 2013-2020 Signal Messenger, LLC
* SPDX-License-Identifier: AGPL-3.0-only
*/
package org.whispersystems.textsecuregcm.auth;
import org.apache.commons.codec.binary.Hex;
import java.nio.charset.StandardCharsets;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.security.SecureRandom;
public class AuthenticationCredentials {
private final String hashedAuthenticationToken;
private final String salt;
public AuthenticationCredentials(String hashedAuthenticationToken, String salt) {
this.hashedAuthenticationToken = hashedAuthenticationToken;
this.salt = salt;
}
public AuthenticationCredentials(String authenticationToken) {
this.salt = String.valueOf(Math.abs(new SecureRandom().nextInt()));
this.hashedAuthenticationToken = getHashedValue(salt, authenticationToken);
}
public String getHashedAuthenticationToken() {
return hashedAuthenticationToken;
}
public String getSalt() {
return salt;
}
public boolean verify(String authenticationToken) {
String theirValue = getHashedValue(salt, authenticationToken);
return MessageDigest.isEqual(theirValue.getBytes(StandardCharsets.UTF_8), this.hashedAuthenticationToken.getBytes(StandardCharsets.UTF_8));
}
private static String getHashedValue(String salt, String token) {
try {
return new String(Hex.encodeHex(MessageDigest.getInstance("SHA1").digest((salt + token).getBytes(StandardCharsets.UTF_8))));
} catch (NoSuchAlgorithmException e) {
throw new AssertionError(e);
}
}
}
@@ -1,81 +0,0 @@
/*
* Copyright 2013-2020 Signal Messenger, LLC
* SPDX-License-Identifier: AGPL-3.0-only
*/
package org.whispersystems.textsecuregcm.auth;
import org.whispersystems.textsecuregcm.util.Util;
import java.io.IOException;
import java.util.Base64;
public class AuthorizationHeader {
private final AmbiguousIdentifier identifier;
private final long deviceId;
private final String password;
private AuthorizationHeader(AmbiguousIdentifier identifier, long deviceId, String password) {
this.identifier = identifier;
this.deviceId = deviceId;
this.password = password;
}
public static AuthorizationHeader fromUserAndPassword(String user, String password) throws InvalidAuthorizationHeaderException {
try {
String[] numberAndId = user.split("\\.");
return new AuthorizationHeader(new AmbiguousIdentifier(numberAndId[0]),
numberAndId.length > 1 ? Long.parseLong(numberAndId[1]) : 1,
password);
} catch (NumberFormatException nfe) {
throw new InvalidAuthorizationHeaderException(nfe);
}
}
public static AuthorizationHeader fromFullHeader(String header) throws InvalidAuthorizationHeaderException {
try {
if (header == null) {
throw new InvalidAuthorizationHeaderException("Null header");
}
String[] headerParts = header.split(" ");
if (headerParts == null || headerParts.length < 2) {
throw new InvalidAuthorizationHeaderException("Invalid authorization header: " + header);
}
if (!"Basic".equals(headerParts[0])) {
throw new InvalidAuthorizationHeaderException("Unsupported authorization method: " + headerParts[0]);
}
String concatenatedValues = new String(Base64.getDecoder().decode(headerParts[1]));
if (Util.isEmpty(concatenatedValues)) {
throw new InvalidAuthorizationHeaderException("Bad decoded value: " + concatenatedValues);
}
String[] credentialParts = concatenatedValues.split(":");
if (credentialParts == null || credentialParts.length < 2) {
throw new InvalidAuthorizationHeaderException("Badly formated credentials: " + concatenatedValues);
}
return fromUserAndPassword(credentialParts[0], credentialParts[1]);
} catch (IllegalArgumentException e) {
throw new InvalidAuthorizationHeaderException(e);
}
}
public AmbiguousIdentifier getIdentifier() {
return identifier;
}
public long getDeviceId() {
return deviceId;
}
public String getPassword() {
return password;
}
}
@@ -1,121 +0,0 @@
/*
* Copyright 2013-2020 Signal Messenger, LLC
* SPDX-License-Identifier: AGPL-3.0-only
*/
package org.whispersystems.textsecuregcm.auth;
import com.codahale.metrics.Meter;
import com.codahale.metrics.MetricRegistry;
import com.codahale.metrics.SharedMetricRegistries;
import com.google.common.annotations.VisibleForTesting;
import io.dropwizard.auth.basic.BasicCredentials;
import io.micrometer.core.instrument.DistributionSummary;
import io.micrometer.core.instrument.Metrics;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.whispersystems.textsecuregcm.storage.Account;
import org.whispersystems.textsecuregcm.storage.AccountsManager;
import org.whispersystems.textsecuregcm.storage.Device;
import org.whispersystems.textsecuregcm.util.Constants;
import org.whispersystems.textsecuregcm.util.Util;
import java.time.Clock;
import java.time.Duration;
import java.time.temporal.ChronoUnit;
import java.util.Optional;
import static com.codahale.metrics.MetricRegistry.name;
public class BaseAccountAuthenticator {
private final MetricRegistry metricRegistry = SharedMetricRegistries.getOrCreate(Constants.METRICS_NAME);
private final Meter authenticationFailedMeter = metricRegistry.meter(name(getClass(), "authentication", "failed" ));
private final Meter authenticationSucceededMeter = metricRegistry.meter(name(getClass(), "authentication", "succeeded" ));
private final Meter noSuchAccountMeter = metricRegistry.meter(name(getClass(), "authentication", "noSuchAccount" ));
private final Meter noSuchDeviceMeter = metricRegistry.meter(name(getClass(), "authentication", "noSuchDevice" ));
private final Meter accountDisabledMeter = metricRegistry.meter(name(getClass(), "authentication", "accountDisabled"));
private final Meter deviceDisabledMeter = metricRegistry.meter(name(getClass(), "authentication", "deviceDisabled" ));
private final Meter invalidAuthHeaderMeter = metricRegistry.meter(name(getClass(), "authentication", "invalidHeader" ));
private final String daysSinceLastSeenDistributionName = name(getClass(), "authentication", "daysSinceLastSeen");
private static final String IS_PRIMARY_DEVICE_TAG = "isPrimary";
private final Logger logger = LoggerFactory.getLogger(BaseAccountAuthenticator.class);
private final AccountsManager accountsManager;
private final Clock clock;
public BaseAccountAuthenticator(AccountsManager accountsManager) {
this(accountsManager, Clock.systemUTC());
}
@VisibleForTesting
public BaseAccountAuthenticator(AccountsManager accountsManager, Clock clock) {
this.accountsManager = accountsManager;
this.clock = clock;
}
public Optional<Account> authenticate(BasicCredentials basicCredentials, boolean enabledRequired) {
try {
AuthorizationHeader authorizationHeader = AuthorizationHeader.fromUserAndPassword(basicCredentials.getUsername(), basicCredentials.getPassword());
Optional<Account> account = accountsManager.get(authorizationHeader.getIdentifier());
if (!account.isPresent()) {
noSuchAccountMeter.mark();
return Optional.empty();
}
Optional<Device> device = account.get().getDevice(authorizationHeader.getDeviceId());
if (!device.isPresent()) {
noSuchDeviceMeter.mark();
return Optional.empty();
}
if (enabledRequired) {
if (!device.get().isEnabled()) {
deviceDisabledMeter.mark();
return Optional.empty();
}
if (!account.get().isEnabled()) {
accountDisabledMeter.mark();
return Optional.empty();
}
}
if (device.get().getAuthenticationCredentials().verify(basicCredentials.getPassword())) {
authenticationSucceededMeter.mark();
account.get().setAuthenticatedDevice(device.get());
updateLastSeen(account.get(), device.get());
return account;
}
authenticationFailedMeter.mark();
return Optional.empty();
} catch (IllegalArgumentException | InvalidAuthorizationHeaderException iae) {
invalidAuthHeaderMeter.mark();
return Optional.empty();
}
}
@VisibleForTesting
public void updateLastSeen(Account account, Device device) {
final long lastSeenOffsetSeconds = Math.abs(account.getUuid().getLeastSignificantBits()) % ChronoUnit.DAYS.getDuration().toSeconds();
final long todayInMillisWithOffset = Util.todayInMillisGivenOffsetFromNow(clock, Duration.ofSeconds(lastSeenOffsetSeconds).negated());
if (device.getLastSeen() < todayInMillisWithOffset) {
DistributionSummary.builder(daysSinceLastSeenDistributionName)
.tags(IS_PRIMARY_DEVICE_TAG, String.valueOf(device.isMaster()))
.publishPercentileHistogram()
.register(Metrics.globalRegistry)
.record(Duration.ofMillis(todayInMillisWithOffset - device.getLastSeen()).toDays());
device.setLastSeen(Util.todayInMillis(clock));
accountsManager.update(account);
}
}
}
@@ -1,58 +0,0 @@
/*
* Copyright 2013-2020 Signal Messenger, LLC
* SPDX-License-Identifier: AGPL-3.0-only
*/
package org.whispersystems.textsecuregcm.auth;
import com.google.protobuf.ByteString;
import com.google.protobuf.InvalidProtocolBufferException;
import org.whispersystems.textsecuregcm.crypto.Curve;
import org.whispersystems.textsecuregcm.crypto.ECPrivateKey;
import org.whispersystems.textsecuregcm.entities.MessageProtos.SenderCertificate;
import org.whispersystems.textsecuregcm.entities.MessageProtos.ServerCertificate;
import org.whispersystems.textsecuregcm.storage.Account;
import org.whispersystems.textsecuregcm.storage.Device;
import java.io.IOException;
import java.security.InvalidKeyException;
import java.util.Base64;
import java.util.concurrent.TimeUnit;
public class CertificateGenerator {
private final ECPrivateKey privateKey;
private final int expiresDays;
private final ServerCertificate serverCertificate;
public CertificateGenerator(byte[] serverCertificate, ECPrivateKey privateKey, int expiresDays)
throws InvalidProtocolBufferException
{
this.privateKey = privateKey;
this.expiresDays = expiresDays;
this.serverCertificate = ServerCertificate.parseFrom(serverCertificate);
}
public byte[] createFor(Account account, Device device, boolean includeE164) throws IOException, InvalidKeyException {
SenderCertificate.Certificate.Builder builder = SenderCertificate.Certificate.newBuilder()
.setSenderDevice(Math.toIntExact(device.getId()))
.setExpires(System.currentTimeMillis() + TimeUnit.DAYS.toMillis(expiresDays))
.setIdentityKey(ByteString.copyFrom(Base64.getDecoder().decode(account.getIdentityKey())))
.setSigner(serverCertificate)
.setSenderUuid(account.getUuid().toString());
if (includeE164) {
builder.setSender(account.getNumber());
}
byte[] certificate = builder.build().toByteArray();
byte[] signature = Curve.calculateSignature(privateKey, certificate);
return SenderCertificate.newBuilder()
.setCertificate(ByteString.copyFrom(certificate))
.setSignature(ByteString.copyFrom(signature))
.build()
.toByteArray();
}
}
@@ -1,30 +0,0 @@
/*
* Copyright 2021 Signal Messenger, LLC
* SPDX-License-Identifier: AGPL-3.0-only
*/
package org.whispersystems.textsecuregcm.auth;
import java.util.Base64;
import javax.ws.rs.WebApplicationException;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.Response.Status;
public class CombinedUnidentifiedSenderAccessKeys {
private final byte[] combinedUnidentifiedSenderAccessKeys;
public CombinedUnidentifiedSenderAccessKeys(String header) {
try {
this.combinedUnidentifiedSenderAccessKeys = Base64.getDecoder().decode(header);
if (this.combinedUnidentifiedSenderAccessKeys == null || this.combinedUnidentifiedSenderAccessKeys.length != 16) {
throw new WebApplicationException("Invalid combined unidentified sender access keys", Status.UNAUTHORIZED);
}
} catch (IllegalArgumentException e) {
throw new WebApplicationException(e, Response.Status.UNAUTHORIZED);
}
}
public byte[] getAccessKeys() {
return combinedUnidentifiedSenderAccessKeys;
}
}
@@ -1,36 +0,0 @@
/*
* Copyright 2013-2020 Signal Messenger, LLC
* SPDX-License-Identifier: AGPL-3.0-only
*/
package org.whispersystems.textsecuregcm.auth;
import org.whispersystems.textsecuregcm.storage.Account;
import javax.security.auth.Subject;
import java.security.Principal;
public class DisabledPermittedAccount implements Principal {
private final Account account;
public DisabledPermittedAccount(Account account) {
this.account = account;
}
public Account getAccount() {
return account;
}
// Principal implementation
@Override
public String getName() {
return null;
}
@Override
public boolean implies(Subject subject) {
return false;
}
}
@@ -1,27 +0,0 @@
/*
* Copyright 2013-2020 Signal Messenger, LLC
* SPDX-License-Identifier: AGPL-3.0-only
*/
package org.whispersystems.textsecuregcm.auth;
import org.whispersystems.textsecuregcm.storage.Account;
import org.whispersystems.textsecuregcm.storage.AccountsManager;
import java.util.Optional;
import io.dropwizard.auth.Authenticator;
import io.dropwizard.auth.basic.BasicCredentials;
public class DisabledPermittedAccountAuthenticator extends BaseAccountAuthenticator implements Authenticator<BasicCredentials, DisabledPermittedAccount> {
public DisabledPermittedAccountAuthenticator(AccountsManager accountsManager) {
super(accountsManager);
}
@Override
public Optional<DisabledPermittedAccount> authenticate(BasicCredentials credentials) {
Optional<Account> account = super.authenticate(credentials, false);
return account.map(DisabledPermittedAccount::new);
}
}
@@ -1,112 +0,0 @@
/*
* Copyright 2013-2020 Signal Messenger, LLC
* SPDX-License-Identifier: AGPL-3.0-only
*/
package org.whispersystems.textsecuregcm.auth;
import org.apache.commons.codec.DecoderException;
import org.apache.commons.codec.binary.Hex;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.whispersystems.textsecuregcm.util.Util;
import javax.crypto.Mac;
import javax.crypto.spec.SecretKeySpec;
import java.security.InvalidKeyException;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.concurrent.TimeUnit;
public class ExternalServiceCredentialGenerator {
private final Logger logger = LoggerFactory.getLogger(ExternalServiceCredentialGenerator.class);
private final byte[] key;
private final byte[] userIdKey;
private final boolean usernameDerivation;
public ExternalServiceCredentialGenerator(byte[] key, byte[] userIdKey, boolean usernameDerivation) {
this.key = key;
this.userIdKey = userIdKey;
this.usernameDerivation = usernameDerivation;
}
public ExternalServiceCredentials generateFor(String number) {
Mac mac = getMacInstance();
String username = getUserId(number, mac, usernameDerivation);
long currentTimeSeconds = System.currentTimeMillis() / 1000;
String prefix = username + ":" + currentTimeSeconds;
String output = Hex.encodeHexString(Util.truncate(getHmac(key, prefix.getBytes(), mac), 10));
String token = prefix + ":" + output;
return new ExternalServiceCredentials(username, token);
}
public boolean isValid(String token, String number, long currentTimeMillis) {
String[] parts = token.split(":");
Mac mac = getMacInstance();
if (parts.length != 3) {
return false;
}
if (!getUserId(number, mac, usernameDerivation).equals(parts[0])) {
return false;
}
if (!isValidTime(parts[1], currentTimeMillis)) {
return false;
}
return isValidSignature(parts[0] + ":" + parts[1], parts[2], mac);
}
private String getUserId(String number, Mac mac, boolean usernameDerivation) {
if (usernameDerivation) return Hex.encodeHexString(Util.truncate(getHmac(userIdKey, number.getBytes(), mac), 10));
else return number;
}
private boolean isValidTime(String timeString, long currentTimeMillis) {
try {
long tokenTime = Long.parseLong(timeString);
long ourTime = TimeUnit.MILLISECONDS.toSeconds(currentTimeMillis);
return TimeUnit.SECONDS.toHours(Math.abs(ourTime - tokenTime)) < 24;
} catch (NumberFormatException e) {
logger.warn("Number Format", e);
return false;
}
}
private boolean isValidSignature(String prefix, String suffix, Mac mac) {
try {
byte[] ourSuffix = Util.truncate(getHmac(key, prefix.getBytes(), mac), 10);
byte[] theirSuffix = Hex.decodeHex(suffix.toCharArray());
return MessageDigest.isEqual(ourSuffix, theirSuffix);
} catch (DecoderException e) {
logger.warn("DirectoryCredentials", e);
return false;
}
}
private Mac getMacInstance() {
try {
return Mac.getInstance("HmacSHA256");
} catch (NoSuchAlgorithmException e) {
throw new AssertionError(e);
}
}
private byte[] getHmac(byte[] key, byte[] input, Mac mac) {
try {
mac.init(new SecretKeySpec(key, "HmacSHA256"));
return mac.doFinal(input);
} catch (InvalidKeyException e) {
throw new AssertionError(e);
}
}
}
@@ -1,33 +0,0 @@
/*
* Copyright 2013-2020 Signal Messenger, LLC
* SPDX-License-Identifier: AGPL-3.0-only
*/
package org.whispersystems.textsecuregcm.auth;
import com.fasterxml.jackson.annotation.JsonProperty;
public class ExternalServiceCredentials {
@JsonProperty
private String username;
@JsonProperty
private String password;
public ExternalServiceCredentials(String username, String password) {
this.username = username;
this.password = password;
}
public ExternalServiceCredentials() {}
public String getUsername() {
return username;
}
public String getPassword() {
return password;
}
}
@@ -1,16 +0,0 @@
/*
* Copyright 2013-2020 Signal Messenger, LLC
* SPDX-License-Identifier: AGPL-3.0-only
*/
package org.whispersystems.textsecuregcm.auth;
public class InvalidAuthorizationHeaderException extends Exception {
public InvalidAuthorizationHeaderException(String s) {
super(s);
}
public InvalidAuthorizationHeaderException(Exception e) {
super(e);
}
}
@@ -1,78 +0,0 @@
/*
* Copyright 2013-2020 Signal Messenger, LLC
* SPDX-License-Identifier: AGPL-3.0-only
*/
package org.whispersystems.textsecuregcm.auth;
import org.whispersystems.textsecuregcm.storage.Account;
import org.whispersystems.textsecuregcm.storage.Device;
import javax.ws.rs.WebApplicationException;
import javax.ws.rs.core.Response;
import java.security.MessageDigest;
import java.util.Optional;
@SuppressWarnings("OptionalUsedAsFieldOrParameterType")
public class OptionalAccess {
public static final String UNIDENTIFIED = "Unidentified-Access-Key";
public static void verify(Optional<Account> requestAccount,
Optional<Anonymous> accessKey,
Optional<Account> targetAccount,
String deviceSelector)
{
try {
verify(requestAccount, accessKey, targetAccount);
if (!deviceSelector.equals("*")) {
long deviceId = Long.parseLong(deviceSelector);
Optional<Device> targetDevice = targetAccount.get().getDevice(deviceId);
if (targetDevice.isPresent() && targetDevice.get().isEnabled()) {
return;
}
if (requestAccount.isPresent()) {
throw new WebApplicationException(Response.Status.NOT_FOUND);
} else {
throw new WebApplicationException(Response.Status.UNAUTHORIZED);
}
}
} catch (NumberFormatException e) {
throw new WebApplicationException(Response.status(422).build());
}
}
public static void verify(Optional<Account> requestAccount,
Optional<Anonymous> accessKey,
Optional<Account> targetAccount)
{
if (requestAccount.isPresent() && targetAccount.isPresent() && targetAccount.get().isEnabled()) {
return;
}
//noinspection ConstantConditions
if (requestAccount.isPresent() && (targetAccount.isEmpty() || (targetAccount.isPresent() && !targetAccount.get().isEnabled()))) {
throw new WebApplicationException(Response.Status.NOT_FOUND);
}
if (accessKey.isPresent() && targetAccount.isPresent() && targetAccount.get().isEnabled() && targetAccount.get().isUnrestrictedUnidentifiedAccess()) {
return;
}
if (accessKey.isPresent() &&
targetAccount.isPresent() &&
targetAccount.get().getUnidentifiedAccessKey().isPresent() &&
targetAccount.get().isEnabled() &&
MessageDigest.isEqual(accessKey.get().getAccessKey(), targetAccount.get().getUnidentifiedAccessKey().get()))
{
return;
}
throw new WebApplicationException(Response.Status.UNAUTHORIZED);
}
}
@@ -1,68 +0,0 @@
/*
* Copyright 2013-2020 Signal Messenger, LLC
* SPDX-License-Identifier: AGPL-3.0-only
*/
package org.whispersystems.textsecuregcm.auth;
import com.google.common.annotations.VisibleForTesting;
import org.whispersystems.textsecuregcm.util.Util;
import javax.annotation.Nullable;
import java.security.MessageDigest;
import java.util.Optional;
import java.util.concurrent.TimeUnit;
@SuppressWarnings("OptionalUsedAsFieldOrParameterType")
public class StoredRegistrationLock {
private final Optional<String> registrationLock;
private final Optional<String> registrationLockSalt;
private final Optional<String> deprecatedPin;
private final long lastSeen;
public StoredRegistrationLock(Optional<String> registrationLock, Optional<String> registrationLockSalt, Optional<String> deprecatedPin, long lastSeen) {
this.registrationLock = registrationLock;
this.registrationLockSalt = registrationLockSalt;
this.deprecatedPin = deprecatedPin;
this.lastSeen = lastSeen;
}
public boolean requiresClientRegistrationLock() {
return ((registrationLock.isPresent() && registrationLockSalt.isPresent()) || deprecatedPin.isPresent()) && System.currentTimeMillis() - lastSeen < TimeUnit.DAYS.toMillis(7);
}
public boolean needsFailureCredentials() {
return registrationLock.isPresent() && registrationLockSalt.isPresent();
}
public boolean hasDeprecatedPin() {
return deprecatedPin.isPresent();
}
public long getTimeRemaining() {
return TimeUnit.DAYS.toMillis(7) - (System.currentTimeMillis() - lastSeen);
}
public boolean verify(@Nullable String clientRegistrationLock, @Nullable String clientDeprecatedPin) {
if (Util.isEmpty(clientRegistrationLock) && Util.isEmpty(clientDeprecatedPin)) {
return false;
}
if (registrationLock.isPresent() && registrationLockSalt.isPresent() && !Util.isEmpty(clientRegistrationLock)) {
return new AuthenticationCredentials(registrationLock.get(), registrationLockSalt.get()).verify(clientRegistrationLock);
} else if (deprecatedPin.isPresent() && !Util.isEmpty(clientDeprecatedPin)) {
return MessageDigest.isEqual(deprecatedPin.get().getBytes(), clientDeprecatedPin.getBytes());
} else {
return false;
}
}
@VisibleForTesting
public StoredRegistrationLock forTime(long timestamp) {
return new StoredRegistrationLock(registrationLock, registrationLockSalt, deprecatedPin, timestamp);
}
}
@@ -1,74 +0,0 @@
/*
* Copyright 2013-2020 Signal Messenger, LLC
* SPDX-License-Identifier: AGPL-3.0-only
*/
package org.whispersystems.textsecuregcm.auth;
import com.fasterxml.jackson.annotation.JsonProperty;
import org.whispersystems.textsecuregcm.util.Util;
import java.security.MessageDigest;
import java.util.Optional;
import java.util.concurrent.TimeUnit;
public class StoredVerificationCode {
@JsonProperty
private String code;
@JsonProperty
private long timestamp;
@JsonProperty
private String pushCode;
@JsonProperty
private String twilioVerificationSid;
public StoredVerificationCode() {
}
public StoredVerificationCode(String code, long timestamp, String pushCode) {
this(code, timestamp, pushCode, null);
}
public StoredVerificationCode(String code, long timestamp, String pushCode, String twilioVerificationSid) {
this.code = code;
this.timestamp = timestamp;
this.pushCode = pushCode;
this.twilioVerificationSid = twilioVerificationSid;
}
public String getCode() {
return code;
}
public long getTimestamp() {
return timestamp;
}
public String getPushCode() {
return pushCode;
}
public Optional<String> getTwilioVerificationSid() {
return Optional.ofNullable(twilioVerificationSid);
}
public boolean isValid(String theirCodeString) {
if (timestamp + TimeUnit.MINUTES.toMillis(10) < System.currentTimeMillis()) {
return false;
}
if (Util.isEmpty(code) || Util.isEmpty(theirCodeString)) {
return false;
}
byte[] ourCode = code.getBytes();
byte[] theirCode = theirCodeString.getBytes();
return MessageDigest.isEqual(ourCode, theirCode);
}
}
@@ -1,28 +0,0 @@
/*
* Copyright 2013-2020 Signal Messenger, LLC
* SPDX-License-Identifier: AGPL-3.0-only
*/
package org.whispersystems.textsecuregcm.auth;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
public class TurnToken {
@JsonProperty
private String username;
@JsonProperty
private String password;
@JsonProperty
private List<String> urls;
public TurnToken(String username, String password, List<String> urls) {
this.username = username;
this.password = password;
this.urls = urls;
}
}
@@ -1,44 +0,0 @@
/*
* Copyright 2013-2020 Signal Messenger, LLC
* SPDX-License-Identifier: AGPL-3.0-only
*/
package org.whispersystems.textsecuregcm.auth;
import org.whispersystems.textsecuregcm.configuration.TurnConfiguration;
import javax.crypto.Mac;
import javax.crypto.spec.SecretKeySpec;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
import java.security.SecureRandom;
import java.util.Base64;
import java.util.List;
import java.util.concurrent.TimeUnit;
public class TurnTokenGenerator {
private final byte[] key;
private final List<String> urls;
public TurnTokenGenerator(TurnConfiguration configuration) {
this.key = configuration.getSecret().getBytes();
this.urls = configuration.getUris();
}
public TurnToken generate() {
try {
Mac mac = Mac.getInstance("HmacSHA1");
long validUntilSeconds = (System.currentTimeMillis() + TimeUnit.DAYS.toMillis(1)) / 1000;
long user = Math.abs(new SecureRandom().nextInt());
String userTime = validUntilSeconds + ":" + user;
mac.init(new SecretKeySpec(key, "HmacSHA1"));
String password = Base64.getEncoder().encodeToString(mac.doFinal(userTime.getBytes()));
return new TurnToken(userTime, password, urls);
} catch (NoSuchAlgorithmException | InvalidKeyException e) {
throw new AssertionError(e);
}
}
}
@@ -1,31 +0,0 @@
/*
* Copyright 2013-2020 Signal Messenger, LLC
* SPDX-License-Identifier: AGPL-3.0-only
*/
package org.whispersystems.textsecuregcm.auth;
import javax.crypto.Mac;
import javax.crypto.spec.SecretKeySpec;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
import java.util.Base64;
import java.util.Optional;
@SuppressWarnings("OptionalUsedAsFieldOrParameterType")
public class UnidentifiedAccessChecksum {
public static String generateFor(Optional<byte[]> unidentifiedAccessKey) {
try {
if (!unidentifiedAccessKey.isPresent()|| unidentifiedAccessKey.get().length != 16) return null;
Mac mac = Mac.getInstance("HmacSHA256");
mac.init(new SecretKeySpec(unidentifiedAccessKey.get(), "HmacSHA256"));
return Base64.getEncoder().encodeToString(mac.doFinal(new byte[32]));
} catch (NoSuchAlgorithmException | InvalidKeyException e) {
throw new AssertionError(e);
}
}
}
Loaded 100 of 658 files, more files were not shown because too many files have changed in this diff. Show more