Compare commits

..
411 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
1414 changed files with 51842 additions and 215941 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/
-37
View File
@@ -1,37 +0,0 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: monthly
groups:
minor-actions-dependencies:
# GitHub Actions: Only group minor and patch updates (we want to carefully review major updates)
update-types: [ minor, patch ]
- package-ecosystem: maven
directories: [ "**/*" ]
schedule:
interval: monthly
ignore:
# Only patch updates don't require coordination with the deployed database
- dependency-name: "org.foundationdb:fdb-java"
update-types:
- version-update:semver-major
- version-update:semver-minor
# Ignore the latest pre-release version
versions: ["<=7.3.79"]
# Temporary exclusions, pending upstream fixes
# https://github.com/dropwizard/dropwizard/pull/11273
- dependency-name: "ch.qos.logback:*"
versions: [">=1.6.0"]
# Dependency convergence sentinels, pinned to specific versions
- dependency-name: "com.squareup.okio:okio-jvm"
groups:
minor-java-dependencies:
# Java: Only group minor and patch updates (we want to carefully review major updates)
update-types: [ minor, patch ]
View File
Whitespace-only changes.
-46
View File
@@ -1,46 +0,0 @@
name: Update Documentation
on:
push:
branches:
- main
jobs:
build:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Install APT packages
run: |
sudo apt-get update
# setup-java requires gpg
sudo apt-get install -y protobuf-compiler gpg
pip install sabledocs
- uses: actions/setup-java@d1374f8ac74474200d16ef8ecee22c7ae7a51880 # v6.3.0
with:
distribution: 'temurin'
java-version-file: .java-version
cache: 'maven'
- name: Generate OpenAPI documentation
run: ./mvnw compile
- name: Generate gRPC documentation
run: |
protoc -I service/src/main/proto service/src/main/proto/org/signal/chat/*.proto \
-o api-doc/grpc/descriptor.pb --include_source_info
cd api-doc/grpc && sabledocs
- name: Push documentation to gh-pages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config user.email "github@signal.org"
git config user.name "Documentation Updater"
git fetch origin gh-pages
git checkout gh-pages
cp api-doc/target/openapi/signal-server-openapi.yaml .
rm -rf grpc
cp -r api-doc/grpc/sabledocs_output grpc
git add -A signal-server-openapi.yaml grpc
git diff --cached --quiet || git commit -m "Updating documentation"
git push origin gh-pages -q
-51
View File
@@ -1,51 +0,0 @@
name: Integration Tests
on:
schedule:
- cron: '30 19 * * MON-FRI'
workflow_dispatch:
env:
# This may seem a little redundant, but copying the configuration to an environment variable makes it easier and safer
# to then write its contents to a file
INTEGRATION_TEST_CONFIG: ${{ vars.INTEGRATION_TEST_CONFIG }}
jobs:
build:
if: ${{ vars.INTEGRATION_TEST_CONFIG != '' }}
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
issues: write
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Install APT packages
run: |
# setup-java requires gpg
sudo apt update
sudo apt install -y gpg
- uses: actions/setup-java@d1374f8ac74474200d16ef8ecee22c7ae7a51880 # v6.3.0
with:
distribution: 'temurin'
java-version-file: .java-version
cache: 'maven'
- uses: aws-actions/configure-aws-credentials@e1253824e5c10ff9df46874f81ed3ec929e19cfd # v6.3.0
name: Configure AWS credentials from Test account
with:
role-to-assume: ${{ vars.AWS_ROLE }}
aws-region: ${{ vars.AWS_REGION }}
- name: Write integration test configuration
run: |
mkdir -p integration-tests/src/main/resources
echo "${INTEGRATION_TEST_CONFIG}" > integration-tests/src/main/resources/config.yml
- name: Run and verify integration tests
run: ./mvnw clean compile test-compile failsafe:integration-test failsafe:verify -P aws-sso
- name: Open an issue on failure
if: ${{ failure() && github.event_name == 'schedule' }}
env:
GH_TOKEN: ${{ github.token }}
run: |
gh issue create \
--title "Failed server integration tests ($(date +'%Y-%m-%d'))" \
--body "Workflow **${{ github.workflow }}** failed. See the run: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
-72
View File
@@ -1,72 +0,0 @@
name: Service CI
permissions:
contents: read
on:
pull_request:
push:
branches-ignore:
- gh-pages
jobs:
build:
runs-on: ubuntu-latest
container: ubuntu:26.04
timeout-minutes: 20
services:
foundationdb0:
# Note: this should generally match the version of the FoundationDB SERVER deployed in production; no need to
# bump it purely to match the CLIENT version
image: foundationdb/foundationdb:7.3.68
options: --name foundationdb0
foundationdb1:
# Note: this should generally match the version of the FoundationDB SERVER deployed in production; no need to
# bump it purely to match the CLIENT version
image: foundationdb/foundationdb:7.3.68
options: --name foundationdb1
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Install APT packages
# ca-certificates: required for AWS CRT client
run: |
apt update
# Maven Wrapper requires `unzip`; see https://github.com/apache/maven-wrapper/issues/425
# setup-java requires gpg
apt install -y ca-certificates curl gpg unzip
# Add Docker's official GPG key:
install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
chmod a+r /etc/apt/keyrings/docker.asc
# Add Docker repository to apt sources:
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
$(. /etc/os-release && echo "${UBUNTU_CODENAME:-$VERSION_CODENAME}") stable" | \
tee /etc/apt/sources.list.d/docker.list > /dev/null
# ca-certificates: required for AWS CRT client
apt update && apt install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin ca-certificates
- name: Set up JDK
uses: actions/setup-java@d1374f8ac74474200d16ef8ecee22c7ae7a51880 # v6.3.0
with:
distribution: 'temurin'
java-version-file: .java-version
cache: 'maven'
env:
# work around an issue with actions/runner setting an incorrect HOME in containers, which breaks maven caching
# https://github.com/actions/setup-java/issues/356
HOME: /root
- name: Configure FoundationDB0 database
run: docker exec foundationdb0 /usr/bin/fdbcli --exec 'configure new single memory'
- name: Configure FoundationDB1 database
run: docker exec foundationdb1 /usr/bin/fdbcli --exec 'configure new single memory'
- name: Download and install FoundationDB client
run: |
./mvnw -e -B -Pexclude-spam-filter -pl service download:wget@install-foundationdb-client-library
cp service/target/jib-extra/usr/lib/libfdb_c.so /usr/lib/libfdb_c.x86_64.so
ldconfig
- name: Build with Maven
run: ./mvnw -e -B -Pprepull-testcontainers-images clean verify -DfoundationDb.serviceContainerNamePrefix=foundationdb
-35
View File
@@ -1,35 +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
/service/src/main/resources/org/signal/badges/Badges_*.properties
!/service/src/main/resources/org/signal/badges/Badges_en.properties
/service/src/main/resources/org/signal/subscriptions/Subscriptions_*.properties
!/service/src/main/resources/org/signal/subscriptions/Subscriptions_en.properties
.project
.classpath
.settings
.DS_Store
# Generated gRPC documentation build artifacts
/api-doc/grpc/descriptor.pb
/api-doc/grpc/sabledocs_output/
-11
View File
@@ -1,11 +0,0 @@
# Note that the implementation of the spam filter is private; internal
# developers will need to override this URL with:
#
# ```
# git config submodule.spam-filter.url PRIVATE_URL
# ```
#
# External developers may safely ignore this submodule.
[submodule "spam-filter"]
path = spam-filter
url = REDACTED
-1
View File
@@ -1 +0,0 @@
temurin-27
-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.9.0</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>
-21
View File
@@ -1,21 +0,0 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
wrapperVersion=3.3.4
distributionType=only-script
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.16/apache-maven-3.9.16-bin.zip
distributionSha256Sum=5af3b743dd8b876b5c45da33b676251e5f1687712644abb4ee519ca56e1d89ce
wrapperSha256Sum=4e2fbf6554bc8a4702cdfdd3bef464f423393d784ddbb037216320ce55d5e4e1
+1 -1
View File
@@ -296,7 +296,7 @@ commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keysManager, or other information required to install
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
-47
View File
@@ -1,47 +0,0 @@
Signal-Server
=================
Documentation
-------------
Looking for protocol documentation? Check out the website!
https://signal.org/docs/
How to Build
------------
This project uses [FoundationDB](https://www.foundationdb.org/) and requires the FoundationDB client library to be installed on the host system. With that in place, the server can be built and tested with:
```shell script
$ ./mvnw clean test
```
Security
--------
Security issues should be sent to <a href=mailto:security@signal.org>security@signal.org</a>.
Help
----
We cannot provide direct technical support. Get help running this software in your own environment in our [unofficial community forum][community forum].
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 <https://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 Signal Messenger, LLC
Licensed under the GNU AGPLv3: https://www.gnu.org/licenses/agpl-3.0.html
[community forum]: https://community.signalusers.org
-30
View File
@@ -1,30 +0,0 @@
# Testing
## Automated tests
The full suite of automated tests can be run using Maven from the project root:
```sh
./mvnw verify
```
## Test server
The service can be run in a feature-limited test mode by running the Maven `integration-test`
goal with the `test-server` profile activated:
```sh
./mvnw integration-test -Ptest-server [-DskipTests=true]
```
This runs [`LocalWhisperServerService`][lwss] with [test configuration][test.yml] and [secrets][test secrets]. External
registration clients are stubbed so that:
- a captcha requirement can be satisfied with `noop.noop.registration.noop`
- any string will be accepted for a phone verification code
[lwss]: service/src/test/java/org/whispersystems/textsecuregcm/LocalWhisperServerService.java
[test.yml]: service/src/test/resources/config/test.yml
[test secrets]: service/src/test/resources/config/test-secrets-bundle.yml
-2
View File
@@ -1,2 +0,0 @@
main-page-content-file = "../../service/src/main/proto/org/signal/chat/README.md"
markdown-extensions = ["fenced_code", "tables"]
-53
View File
@@ -1,53 +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>api-doc</artifactId>
<dependencies>
<dependency>
<groupId>org.whispersystems.textsecure</groupId>
<artifactId>service</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-maven-plugin-jakarta</artifactId>
<version>${swagger.version}</version>
<configuration>
<outputFileName>signal-server-openapi</outputFileName>
<outputPath>${project.build.directory}/openapi</outputPath>
<outputFormat>YAML</outputFormat>
<configurationFilePath>${project.basedir}/src/main/resources/openapi/openapi-configuration.yaml
</configurationFilePath>
</configuration>
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>resolve</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.google.cloud.tools</groupId>
<artifactId>jib-maven-plugin</artifactId>
<configuration>
<!-- we don't want jib to execute on this module -->
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>
</project>
@@ -1,97 +0,0 @@
/*
* Copyright 2023 Signal Messenger, LLC
* SPDX-License-Identifier: AGPL-3.0-only
*/
package org.signal.openapi;
import com.fasterxml.jackson.annotation.JsonView;
import com.fasterxml.jackson.databind.JavaType;
import com.fasterxml.jackson.databind.type.SimpleType;
import io.dropwizard.auth.Auth;
import io.swagger.v3.jaxrs2.ResolvedParameter;
import io.swagger.v3.jaxrs2.ext.AbstractOpenAPIExtension;
import io.swagger.v3.jaxrs2.ext.OpenAPIExtension;
import io.swagger.v3.oas.models.Components;
import jakarta.ws.rs.Consumes;
import java.lang.annotation.Annotation;
import java.lang.reflect.Type;
import java.util.Iterator;
import java.util.List;
import java.util.Optional;
import java.util.ServiceLoader;
import java.util.Set;
import org.whispersystems.textsecuregcm.auth.AuthenticatedDevice;
/**
* One of the extension mechanisms of Swagger Core library (OpenAPI processor) is via custom implementations
* of the {@link AbstractOpenAPIExtension} class.
* <p/>
* The purpose of this extension is to customize certain aspects of the OpenAPI model generation on a lower level.
* This extension works in coordination with {@link OpenApiReader} that has access to the model on a higher level.
* <p/>
* The extension is enabled by being listed in {@code META-INF/services/io.swagger.v3.jaxrs2.ext.OpenAPIExtension} file.
* @see ServiceLoader
* @see OpenApiReader
* @see <a href="https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---Extensions">Swagger 2.X Extensions</a>
*/
public class OpenApiExtension extends AbstractOpenAPIExtension {
public static final ResolvedParameter AUTHENTICATED_ACCOUNT = new ResolvedParameter();
public static final ResolvedParameter OPTIONAL_AUTHENTICATED_ACCOUNT = new ResolvedParameter();
/**
* When parsing endpoint methods, Swagger will treat the first parameter not annotated as header/path/query param
* as a request body (and will ignore other not annotated parameters). In our case, this behavior conflicts with
* the {@code @Auth}-annotated parameters. Here we're checking if parameters are known to be anything other than
* a body and return an appropriate {@link ResolvedParameter} representation.
*/
@Override
public ResolvedParameter extractParameters(
final List<Annotation> annotations,
final Type type,
final Set<Type> typesToSkip,
final Components components,
final Consumes classConsumes,
final Consumes methodConsumes,
final boolean includeRequestBody,
final JsonView jsonViewAnnotation,
final Iterator<OpenAPIExtension> chain) {
if (annotations.stream().anyMatch(a -> a.annotationType().equals(Auth.class))) {
// this is the case of authenticated endpoint,
if (type instanceof SimpleType simpleType
&& simpleType.getRawClass().equals(AuthenticatedDevice.class)) {
return AUTHENTICATED_ACCOUNT;
}
if (type instanceof SimpleType simpleType
&& isOptionalOfType(simpleType, AuthenticatedDevice.class)) {
return OPTIONAL_AUTHENTICATED_ACCOUNT;
}
}
return super.extractParameters(
annotations,
type,
typesToSkip,
components,
classConsumes,
methodConsumes,
includeRequestBody,
jsonViewAnnotation,
chain);
}
private static boolean isOptionalOfType(final SimpleType simpleType, final Class<?> expectedType) {
if (!simpleType.getRawClass().equals(Optional.class)) {
return false;
}
final List<JavaType> typeParameters = simpleType.getBindings().getTypeParameters();
if (typeParameters.isEmpty()) {
return false;
}
return typeParameters.get(0) instanceof SimpleType optionalParameterType
&& optionalParameterType.getRawClass().equals(expectedType);
}
}
@@ -1,71 +0,0 @@
/*
* Copyright 2023 Signal Messenger, LLC
* SPDX-License-Identifier: AGPL-3.0-only
*/
package org.signal.openapi;
import static com.google.common.base.MoreObjects.firstNonNull;
import static org.signal.openapi.OpenApiExtension.AUTHENTICATED_ACCOUNT;
import static org.signal.openapi.OpenApiExtension.OPTIONAL_AUTHENTICATED_ACCOUNT;
import com.fasterxml.jackson.annotation.JsonView;
import com.google.common.collect.ImmutableList;
import io.swagger.v3.jaxrs2.Reader;
import io.swagger.v3.jaxrs2.ResolvedParameter;
import io.swagger.v3.oas.models.Operation;
import io.swagger.v3.oas.models.security.SecurityRequirement;
import jakarta.ws.rs.Consumes;
import java.lang.annotation.Annotation;
import java.lang.reflect.Type;
import java.util.Collections;
import java.util.List;
/**
* One of the extension mechanisms of Swagger Core library (OpenAPI processor) is via custom implementations
* of the {@link Reader} class.
* <p/>
* The purpose of this extension is to customize certain aspects of the OpenAPI model generation on a higher level.
* This extension works in coordination with {@link OpenApiExtension} that has access to the model on a lower level.
* <p/>
* The extension is enabled by being listed in {@code resources/openapi/openapi-configuration.yaml} file.
* @see OpenApiExtension
* @see <a href="https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---Extensions">Swagger 2.X Extensions</a>
*/
public class OpenApiReader extends Reader {
private static final String AUTHENTICATED_ACCOUNT_AUTH_SCHEMA = "authenticatedAccount";
/**
* Overriding this method allows converting a resolved parameter into other operation entities,
* in this case, into security requirements.
*/
@Override
protected ResolvedParameter getParameters(
final Type type,
final List<Annotation> annotations,
final Operation operation,
final Consumes classConsumes,
final Consumes methodConsumes,
final JsonView jsonViewAnnotation) {
final ResolvedParameter resolved = super.getParameters(
type, annotations, operation, classConsumes, methodConsumes, jsonViewAnnotation);
if (resolved == AUTHENTICATED_ACCOUNT) {
operation.setSecurity(ImmutableList.<SecurityRequirement>builder()
.addAll(firstNonNull(operation.getSecurity(), Collections.emptyList()))
.add(new SecurityRequirement().addList(AUTHENTICATED_ACCOUNT_AUTH_SCHEMA))
.build());
}
if (resolved == OPTIONAL_AUTHENTICATED_ACCOUNT) {
operation.setSecurity(ImmutableList.<SecurityRequirement>builder()
.addAll(firstNonNull(operation.getSecurity(), Collections.emptyList()))
.add(new SecurityRequirement().addList(AUTHENTICATED_ACCOUNT_AUTH_SCHEMA))
.add(new SecurityRequirement())
.build());
}
return resolved;
}
}
@@ -1 +0,0 @@
org.signal.openapi.OpenApiExtension
@@ -1,25 +0,0 @@
resourcePackages:
- org.whispersystems.textsecuregcm
prettyPrint: true
cacheTTL: 0
readerClass: org.signal.openapi.OpenApiReader
openAPI:
info:
title: Signal Server API
license:
name: AGPL-3.0-only
url: https://www.gnu.org/licenses/agpl-3.0.txt
servers:
- url: https://chat.signal.org
description: Production service
- url: https://chat.staging.signal.org
description: Staging service
components:
securitySchemes:
authenticatedAccount:
type: http
scheme: basic
description: |
Account authentication is based on Basic authentication schema,
where `username` has a format of `<user_id>[.<device_id>]`. If `device_id` is not specified,
user's `main` device is assumed.
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

+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>
-2
View File
@@ -1,2 +0,0 @@
.libs
src/main/resources/config.yml
-94
View File
@@ -1,94 +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>integration-tests</artifactId>
<dependencies>
<dependency>
<groupId>org.whispersystems.textsecure</groupId>
<artifactId>service</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>dynamodb</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.websocket</groupId>
<artifactId>jetty-websocket-jetty-api</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.websocket</groupId>
<artifactId>jetty-websocket-jetty-client</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.http2</groupId>
<artifactId>jetty-http2-client-transport</artifactId>
</dependency>
<dependency>
<groupId>com.webauthn4j</groupId>
<artifactId>webauthn4j-test</artifactId>
<version>${webauthn4j.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<excludes>
<exclude>**</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<configuration>
<additionalClasspathElements>
<additionalClasspathElement>${project.basedir}/.libs/software.amazon.awssdk-sso.jar</additionalClasspathElement>
</additionalClasspathElements>
<includes>
<include>**/*.java</include>
</includes>
</configuration>
</plugin>
<plugin>
<groupId>com.google.cloud.tools</groupId>
<artifactId>jib-maven-plugin</artifactId>
<configuration>
<!-- we don't want jib to execute on this module -->
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>aws-sso</id>
<dependencies>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>sso</artifactId>
</dependency>
</dependencies>
</profile>
</profiles>
</project>
@@ -1,101 +0,0 @@
/*
* Copyright 2023 Signal Messenger, LLC
* SPDX-License-Identifier: AGPL-3.0-only
*/
package org.signal.integration;
import java.time.Clock;
import java.time.Duration;
import java.util.Optional;
import java.util.UUID;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
import org.signal.integration.config.Config;
import org.signal.libsignal.zkgroup.receipts.ReceiptSerial;
import org.whispersystems.textsecuregcm.metrics.NoopAwsSdkMetricPublisher;
import org.whispersystems.textsecuregcm.registration.VerificationSession;
import org.whispersystems.textsecuregcm.storage.ChangeNumberWaitingPeriods;
import org.whispersystems.textsecuregcm.storage.PhoneNumberIdentifiers;
import org.whispersystems.textsecuregcm.storage.PhoneNumberRecoveryPasswords;
import org.whispersystems.textsecuregcm.storage.PhoneNumberRecoveryPasswordsManager;
import org.whispersystems.textsecuregcm.storage.RedeemedReceiptsManager;
import org.whispersystems.textsecuregcm.storage.VerificationSessionManager;
import org.whispersystems.textsecuregcm.storage.VerificationSessions;
import software.amazon.awssdk.auth.credentials.AwsCredentialsProvider;
import software.amazon.awssdk.auth.credentials.DefaultCredentialsProvider;
import software.amazon.awssdk.services.dynamodb.DynamoDbAsyncClient;
import software.amazon.awssdk.services.dynamodb.DynamoDbClient;
public class IntegrationTools {
private final PhoneNumberRecoveryPasswordsManager phoneNumberRecoveryPasswordsManager;
private final VerificationSessionManager verificationSessionManager;
private final PhoneNumberIdentifiers phoneNumberIdentifiers;
private final ChangeNumberWaitingPeriods changeNumberWaitingPeriods;
private final RedeemedReceiptsManager redeemedReceiptsManager;
public static IntegrationTools create(final Config config) {
final AwsCredentialsProvider credentialsProvider = DefaultCredentialsProvider.builder().build();
final DynamoDbAsyncClient dynamoDbAsyncClient =
config.dynamoDbClient().buildAsyncClient(credentialsProvider, new NoopAwsSdkMetricPublisher());
final DynamoDbClient dynamoDbClient =
config.dynamoDbClient().buildSyncClient(credentialsProvider, new NoopAwsSdkMetricPublisher());
final PhoneNumberRecoveryPasswords phoneNumberRecoveryPasswords = new PhoneNumberRecoveryPasswords(
config.dynamoDbTables().registrationRecovery(), Duration.ofDays(1), dynamoDbClient, Clock.systemUTC());
final VerificationSessions verificationSessions = new VerificationSessions(
dynamoDbClient, config.dynamoDbTables().verificationSessions(), Clock.systemUTC());
return new IntegrationTools(
new PhoneNumberRecoveryPasswordsManager(phoneNumberRecoveryPasswords),
new VerificationSessionManager(verificationSessions),
new PhoneNumberIdentifiers(dynamoDbAsyncClient, config.dynamoDbTables().phoneNumberIdentifiers()),
new ChangeNumberWaitingPeriods(config.dynamoDbTables().changeNumberWaitingPeriods(), dynamoDbClient),
new RedeemedReceiptsManager(Clock.systemUTC(), config.dynamoDbTables().redeemedReceipts(), dynamoDbClient)
);
}
private IntegrationTools(
final PhoneNumberRecoveryPasswordsManager phoneNumberRecoveryPasswordsManager,
final VerificationSessionManager verificationSessionManager,
final PhoneNumberIdentifiers phoneNumberIdentifiers,
final ChangeNumberWaitingPeriods changeNumberWaitingPeriods,
final RedeemedReceiptsManager redeemedReceiptsManager) {
this.phoneNumberRecoveryPasswordsManager = phoneNumberRecoveryPasswordsManager;
this.verificationSessionManager = verificationSessionManager;
this.phoneNumberIdentifiers = phoneNumberIdentifiers;
this.changeNumberWaitingPeriods = changeNumberWaitingPeriods;
this.redeemedReceiptsManager = redeemedReceiptsManager;
}
public void populateRecoveryPassword(final String phoneNumber, final byte[] password) {
try {
final UUID pni = phoneNumberIdentifiers
.getPhoneNumberIdentifier(phoneNumber).get(5, TimeUnit.SECONDS);
phoneNumberRecoveryPasswordsManager.store(pni, password);
} catch (ExecutionException | InterruptedException | TimeoutException e) {
throw new RuntimeException("failed to get pni", e);
}
}
public Optional<String> peekVerificationSessionPushChallenge(final String sessionId) {
return verificationSessionManager.findForId(sessionId).map(VerificationSession::pushChallenge);
}
public void clearChangeNumberWaitingPeriod(TestUser user) {
changeNumberWaitingPeriods.delete(user.aciUuid());
}
public void deleteRedeemedReceipt(final ReceiptSerial receiptSerial) {
redeemedReceiptsManager.deleteReceipt(receiptSerial);
}
}
@@ -1,799 +0,0 @@
/*
* Copyright 2023 Signal Messenger, LLC
* SPDX-License-Identifier: AGPL-3.0-only
*/
package org.signal.integration;
import static java.util.Objects.requireNonNull;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonNode;
import com.google.common.io.Resources;
import com.google.common.net.HttpHeaders;
import com.webauthn4j.data.AuthenticatorAssertionResponse;
import com.webauthn4j.data.PublicKeyCredential;
import com.webauthn4j.data.PublicKeyCredentialDescriptor;
import com.webauthn4j.data.PublicKeyCredentialRequestOptions;
import com.webauthn4j.data.PublicKeyCredentialType;
import com.webauthn4j.data.UserVerificationRequirement;
import com.webauthn4j.data.client.challenge.DefaultChallenge;
import com.webauthn4j.test.client.ClientPlatform;
import io.dropwizard.configuration.ConfigurationValidationException;
import io.dropwizard.jersey.validation.Validators;
import io.github.resilience4j.retry.Retry;
import io.grpc.ChannelCredentials;
import io.grpc.ClientInterceptor;
import io.grpc.Grpc;
import io.grpc.ManagedChannel;
import io.grpc.Metadata;
import io.grpc.TlsChannelCredentials;
import io.grpc.stub.MetadataUtils;
import jakarta.validation.ConstraintViolation;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.UncheckedIOException;
import java.lang.invoke.MethodHandles;
import java.net.URI;
import java.net.URL;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.nio.charset.StandardCharsets;
import java.security.InvalidKeyException;
import java.security.KeyStore;
import java.security.SecureRandom;
import java.security.cert.CertificateException;
import java.time.Duration;
import java.time.Instant;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Base64;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.Set;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
import java.util.concurrent.atomic.AtomicInteger;
import javax.annotation.Nullable;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.Validate;
import org.apache.commons.lang3.exception.ExceptionUtils;
import org.apache.commons.lang3.tuple.Pair;
import org.eclipse.jetty.client.HttpClient;
import org.eclipse.jetty.client.Request;
import org.eclipse.jetty.http2.client.HTTP2Client;
import org.eclipse.jetty.http2.client.transport.HttpClientTransportOverHTTP2;
import org.eclipse.jetty.io.ClientConnector;
import org.eclipse.jetty.util.ssl.SslContextFactory;
import org.eclipse.jetty.websocket.api.exceptions.UpgradeException;
import org.eclipse.jetty.websocket.client.ClientUpgradeRequest;
import org.eclipse.jetty.websocket.client.WebSocketClient;
import org.signal.integration.config.Config;
import org.signal.integration.config.WebAuthnConfiguration;
import org.signal.libsignal.protocol.IdentityKey;
import org.signal.libsignal.protocol.ecc.ECKeyPair;
import org.signal.libsignal.protocol.ecc.ECPublicKey;
import org.signal.libsignal.protocol.kem.KEMKeyPair;
import org.signal.libsignal.protocol.kem.KEMKeyType;
import org.signal.libsignal.protocol.kem.KEMPublicKey;
import org.signal.libsignal.zkgroup.InvalidInputException;
import org.signal.libsignal.zkgroup.ServerPublicParams;
import org.signal.libsignal.zkgroup.VerificationFailedException;
import org.signal.libsignal.zkgroup.receipts.ClientZkReceiptOperations;
import org.signal.libsignal.zkgroup.receipts.ReceiptCredential;
import org.signal.libsignal.zkgroup.receipts.ReceiptCredentialPresentation;
import org.signal.libsignal.zkgroup.receipts.ReceiptSerial;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.whispersystems.textsecuregcm.auth.grpc.RequireAuthenticationInterceptor;
import org.whispersystems.textsecuregcm.configuration.RetryConfiguration;
import org.whispersystems.textsecuregcm.entities.AccountAttributes;
import org.whispersystems.textsecuregcm.entities.AccountIdentityResponse;
import org.whispersystems.textsecuregcm.entities.DeviceActivationRequest;
import org.whispersystems.textsecuregcm.entities.ECSignedPreKey;
import org.whispersystems.textsecuregcm.entities.KEMSignedPreKey;
import org.whispersystems.textsecuregcm.entities.RegistrationRequest;
import org.whispersystems.textsecuregcm.http.FaultTolerantHttpClient;
import org.whispersystems.textsecuregcm.mappers.MfaFailureExceptionMapper;
import org.whispersystems.textsecuregcm.storage.Device;
import org.whispersystems.textsecuregcm.storage.TotpManager;
import org.whispersystems.textsecuregcm.util.CertificateUtil;
import org.whispersystems.textsecuregcm.util.HeaderUtils;
import org.whispersystems.textsecuregcm.util.HttpUtils;
import org.whispersystems.textsecuregcm.util.ResilienceUtil;
import org.whispersystems.textsecuregcm.util.SystemMapper;
import org.whispersystems.textsecuregcm.util.ThrowingSupplier;
import org.whispersystems.textsecuregcm.util.Util;
public final class Operations {
private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
private static final Config CONFIG = loadConfigFromClasspath("config.yml");
private static final String GRPC_DOMAIN = "grpc." + CONFIG.domain();
private static final IntegrationTools INTEGRATION_TOOLS = IntegrationTools.create(CONFIG);
private static final String USER_AGENT = "integration-test";
private static final FaultTolerantHttpClient CLIENT = buildClient();
private static final FaultTolerantHttpClient NO_RETRY_CLIENT = buildNoRetryClient();
private static final WebSocketClient WEB_SOCKET_CLIENT = buildWebSocketClient();
private static final ManagedChannel GRPC_CHANNEL = buildGrpcChannel();
private static final Retry WEBSOCKET_CONNECT_RETRY = Retry.of("integration-test-websocket-connect",
new RetryConfiguration().toRetryConfigBuilder()
.retryOnException(Operations::isRetryableConnectFailure)
.build());
private Operations() {
// utility class
}
static boolean isRetryableConnectFailure(final Throwable e) {
final Throwable cause = e instanceof ExecutionException ? e.getCause() : e;
if (cause instanceof UpgradeException upgradeException) {
return upgradeException.getResponseStatusCode() >= 500
|| ExceptionUtils.getRootCause(upgradeException) instanceof TimeoutException;
}
return cause instanceof IOException;
}
public record Receipt(ReceiptSerial serial, ReceiptCredential credential) {}
public static Receipt getPrescribedReceipt() throws InvalidInputException {
return new Receipt(
new ReceiptSerial(Base64.getUrlDecoder().decode(CONFIG.prescribedReceiptSerial())),
new ReceiptCredential(Base64.getUrlDecoder().decode(CONFIG.prescribedReceiptCredential()))
);
}
public static WebAuthnConfiguration getWebAuthnConfiguration() {
return CONFIG.webAuthn();
}
public static TestUser registerNumberlessUser(final ReceiptCredential receiptCredential)
throws InvalidInputException, VerificationFailedException {
final String accountPassword = Base64.getEncoder().encodeToString(randomBytes(32));
final byte[] recoveryPassword = randomBytes(32);
final TestUser user = TestUser.createNumberless(accountPassword, recoveryPassword);
final ClientZkReceiptOperations clientOps = new ClientZkReceiptOperations(new ServerPublicParams(Base64.getDecoder().decode(CONFIG.serverZkPublicParams())));
final ReceiptCredentialPresentation receiptCredentialPresentation = clientOps.createReceiptCredentialPresentation(receiptCredential);
final ECKeyPair aciIdentityKeyPair = ECKeyPair.generate();
final RegistrationRequest registrationRequest = new RegistrationRequest(null,
null,
receiptCredentialPresentation.serialize(),
null,
null,
user.accountAttributes(),
true,
new IdentityKey(aciIdentityKeyPair.getPublicKey()),
null,
new DeviceActivationRequest(generateSignedECPreKey(1, aciIdentityKeyPair),
Optional.empty(),
generateSignedKEMPreKey(3, aciIdentityKeyPair),
Optional.empty(),
Optional.empty(),
Optional.empty()));
final AccountIdentityResponse registrationResponse = apiPost("/v1/registration", registrationRequest)
// username must be present but can be set to anything for a numberless registration request
.authorized("test", accountPassword)
.executeExpectSuccess(AccountIdentityResponse.class);
user.setAciUuid(registrationResponse.uuid());
return user;
}
public static TestUser recoverNumberlessUserWithTotp(final TestUser testUser, final ThrowingSupplier<Integer, InvalidKeyException> totpSupplier) throws InvalidKeyException {
final TestUser recoveredUser = TestUser.createNumberlessForRecovery(testUser.accountPassword(), testUser.registrationPassword());
final ECKeyPair aciIdentityKeyPair = ECKeyPair.generate();
final ECKeyPair pniIdentityKeyPair = ECKeyPair.generate();
final DeviceActivationRequest deviceActivationRequest = new DeviceActivationRequest(
generateSignedECPreKey(1, aciIdentityKeyPair),
Optional.of(generateSignedECPreKey(2, pniIdentityKeyPair)),
generateSignedKEMPreKey(3, aciIdentityKeyPair),
Optional.of(generateSignedKEMPreKey(4, pniIdentityKeyPair)),
Optional.empty(),
Optional.empty());
// The server only allows one redemption of a TOTP per time-step, which we may have used up during `confirm`. Retry
// until the next time-step.
final Instant retryUntil = Instant.now().plus(TotpManager.TOTP.getTimeStep().plus(Duration.ofSeconds(1)));
while (true) {
final Pair<Integer, AccountIdentityResponse> registrationResponse = apiPost("/v1/registration",
new RegistrationRequest(null,
testUser.registrationPassword(),
null,
totpSupplier.get(),
null,
recoveredUser.accountAttributes(),
true,
new IdentityKey(aciIdentityKeyPair.getPublicKey()),
new IdentityKey(pniIdentityKeyPair.getPublicKey()),
deviceActivationRequest))
// For a numberless account recovery, the username is the ACI
.authorized(testUser.aciUuid().toString(), testUser.accountPassword())
.execute(AccountIdentityResponse.class);
if (registrationResponse.getLeft() == 441 && Instant.now().isBefore(retryUntil)) {
Util.sleep(Duration.ofSeconds(1).toMillis());
continue;
}
Validate.isTrue(HttpUtils.isSuccessfulResponse(registrationResponse.getLeft()),
"Unexpected response code: %d", registrationResponse.getLeft());
recoveredUser.setAciUuid(registrationResponse.getRight().uuid());
return recoveredUser;
}
}
public static TestUser recoverNumberlessUserWithWebAuthn(final TestUser testUser,
final ClientPlatform clientPlatform,
final byte[] credentialId,
final String relyingPartyId) {
final TestUser recoveredUser = TestUser.createNumberlessForRecovery(testUser.accountPassword(), testUser.registrationPassword());
final ECKeyPair aciIdentityKeyPair = ECKeyPair.generate();
final ECKeyPair pniIdentityKeyPair = ECKeyPair.generate();
final RegistrationRequest initialRequest = new RegistrationRequest(null,
testUser.registrationPassword(),
null,
null,
null,
recoveredUser.accountAttributes(),
true,
new IdentityKey(aciIdentityKeyPair.getPublicKey()),
new IdentityKey(pniIdentityKeyPair.getPublicKey()),
new DeviceActivationRequest(generateSignedECPreKey(1, aciIdentityKeyPair),
Optional.of(generateSignedECPreKey(2, pniIdentityKeyPair)),
generateSignedKEMPreKey(3, aciIdentityKeyPair),
Optional.of(generateSignedKEMPreKey(4, pniIdentityKeyPair)),
Optional.empty(),
Optional.empty()));
// we expect (and need) failure with status 441, which will contain the WebAuthn challenge
MfaFailureExceptionMapper.MfaFailureResponse mfaFailureResponse = apiPost("/v1/registration", initialRequest)
// For a numberless account recovery, the username is the ACI
.authorized(testUser.aciUuid().toString(), testUser.accountPassword())
.executeExpectStatusCode(441, MfaFailureExceptionMapper.MfaFailureResponse.class);
// Retry a 441 to 3 times. It's possible we burned a challenge on a 500 that actually succeeded, but we didn't see
// the response, so we can retry on the new challenge.
int attempt = 0;
while (true) {
attempt++;
Validate.isTrue(mfaFailureResponse.webAuthnParameters().allowedCredentialIds()
.stream()
.anyMatch(allowedId -> Arrays.equals(allowedId, credentialId)),
"Expected MFA failure to contain credentialId");
final PublicKeyCredential<AuthenticatorAssertionResponse, ?> credential =
clientPlatform.get(new PublicKeyCredentialRequestOptions(
new DefaultChallenge(mfaFailureResponse.webAuthnParameters().challenge()),
null,
relyingPartyId,
List.of(new PublicKeyCredentialDescriptor(PublicKeyCredentialType.PUBLIC_KEY, credentialId, null)),
UserVerificationRequirement.DISCOURAGED,
null));
final RegistrationRequest registrationRequest = new RegistrationRequest(null,
testUser.registrationPassword(),
null,
null,
webAuthnVerificationResponseJson(credential),
recoveredUser.accountAttributes(),
true,
new IdentityKey(aciIdentityKeyPair.getPublicKey()),
new IdentityKey(pniIdentityKeyPair.getPublicKey()),
new DeviceActivationRequest(generateSignedECPreKey(1, aciIdentityKeyPair),
Optional.of(generateSignedECPreKey(2, pniIdentityKeyPair)),
generateSignedKEMPreKey(3, aciIdentityKeyPair),
Optional.of(generateSignedKEMPreKey(4, pniIdentityKeyPair)),
Optional.empty(),
Optional.empty()));
final Pair<Integer, JsonNode> registrationResponse = apiPost("/v1/registration", registrationRequest)
// For a numberless account recovery, the username is the ACI
.authorized(testUser.aciUuid().toString(), testUser.accountPassword())
.execute(JsonNode.class);
if (registrationResponse.getLeft() == 441 && attempt < 3) {
mfaFailureResponse = SystemMapper.jsonMapper()
.convertValue(registrationResponse.getRight(), MfaFailureExceptionMapper.MfaFailureResponse.class);
continue;
}
Validate.isTrue(HttpUtils.isSuccessfulResponse(registrationResponse.getLeft()),
"Unexpected response code: %d, body: %s", registrationResponse.getLeft(), registrationResponse.getRight());
recoveredUser.setAciUuid(SystemMapper.jsonMapper()
.convertValue(registrationResponse.getRight(), AccountIdentityResponse.class).uuid());
return recoveredUser;
}
}
public static TestUser newRegisteredUser(final String number) {
final byte[] registrationPassword = populateRandomRecoveryPassword(number);
final String accountPassword = Base64.getEncoder().encodeToString(randomBytes(32));
final TestUser user = TestUser.create(number, accountPassword, registrationPassword);
final AccountAttributes accountAttributes = user.accountAttributes();
final ECKeyPair aciIdentityKeyPair = ECKeyPair.generate();
final ECKeyPair pniIdentityKeyPair = ECKeyPair.generate();
// register account
final RegistrationRequest registrationRequest = new RegistrationRequest(null,
registrationPassword,
null,
null,
null,
accountAttributes,
true,
new IdentityKey(aciIdentityKeyPair.getPublicKey()),
new IdentityKey(pniIdentityKeyPair.getPublicKey()),
new DeviceActivationRequest(generateSignedECPreKey(1, aciIdentityKeyPair),
Optional.of(generateSignedECPreKey(2, pniIdentityKeyPair)),
generateSignedKEMPreKey(3, aciIdentityKeyPair),
Optional.of(generateSignedKEMPreKey(4, pniIdentityKeyPair)),
Optional.empty(),
Optional.empty()));
final AccountIdentityResponse registrationResponse = apiPost("/v1/registration", registrationRequest)
.authorized(number, accountPassword)
.executeExpectSuccess(AccountIdentityResponse.class);
user.setAciUuid(registrationResponse.uuid());
registrationResponse.pni().ifPresent(user::setPniUuid);
return user;
}
public record PrescribedVerificationNumber(String number, String verificationCode) {}
public static PrescribedVerificationNumber prescribedVerificationNumber() {
return new PrescribedVerificationNumber(
CONFIG.prescribedRegistrationNumber(),
CONFIG.prescribedRegistrationCode());
}
public static void deleteUser(final TestUser user) {
final AtomicInteger attempts = new AtomicInteger();
final Retry retry = Retry.of("integration-test-delete-user",
new RetryConfiguration().<Integer>toRetryConfigBuilder()
.retryOnResult(statusCode -> statusCode >= 500)
.build());
final int statusCode = retry.executeSupplier(() -> {
attempts.incrementAndGet();
return apiDelete("/v1/accounts/me")
.authorized(user)
// disable retries, since this endpoint is not idempotent
.withoutRetries()
.execute()
.getLeft();
});
// If we had to retry a 500 where the account was already deleted, we would fail authorization
Validate.isTrue(HttpUtils.isSuccessfulResponse(statusCode) || (attempts.get() > 1 && statusCode == 401),
"Unexpected response code: %d", statusCode);
}
public static String peekVerificationSessionPushChallenge(final String sessionId) {
return INTEGRATION_TOOLS.peekVerificationSessionPushChallenge(sessionId)
.orElseThrow(() -> new RuntimeException("push challenge not found for the verification session"));
}
public static byte[] populateRandomRecoveryPassword(final String number) {
final byte[] recoveryPassword = randomBytes(32);
INTEGRATION_TOOLS.populateRecoveryPassword(number, recoveryPassword);
return recoveryPassword;
}
public static void clearChangeNumberWaitingPeriod(final TestUser user) {
INTEGRATION_TOOLS.clearChangeNumberWaitingPeriod(user);
}
public static void deleteReceipt(final ReceiptSerial receiptSerial) {
INTEGRATION_TOOLS.deleteRedeemedReceipt(receiptSerial);
}
public static <T> T sendEmptyRequestAuthenticated(
final String endpoint,
final String method,
final String username,
final String password,
final Class<T> outputType) {
try {
final HttpRequest request = HttpRequest.newBuilder()
.uri(serverUri(endpoint, Collections.emptyList()))
.method(method, HttpRequest.BodyPublishers.noBody())
.header(HttpHeaders.AUTHORIZATION, HeaderUtils.basicAuthHeader(username, password))
.header(HttpHeaders.CONTENT_TYPE, "application/json")
.build();
return CLIENT.sendAsync(request, HttpResponse.BodyHandlers.ofString(StandardCharsets.UTF_8))
.whenComplete((response, error) -> {
if (error != null) {
logger.error("request error", error);
error.printStackTrace();
} else {
logger.info("response: {}", response.statusCode());
System.out.println("response: " + response.statusCode() + ", " + response.body());
}
})
.thenApply(response -> {
try {
return outputType.equals(Void.class)
? null
: SystemMapper.jsonMapper().readValue(response.body(), outputType);
} catch (final IOException e) {
throw new RuntimeException(e);
}
})
.get();
} catch (final Exception e) {
throw new RuntimeException(e);
}
}
public static byte[] randomBytes(final int numBytes) {
final byte[] bytes = new byte[numBytes];
new SecureRandom().nextBytes(bytes);
return bytes;
}
public static RequestBuilder apiGet(final String endpoint) {
return new RequestBuilder(HttpRequest.newBuilder().GET(), endpoint);
}
public static RequestBuilder apiDelete(final String endpoint) {
return new RequestBuilder(HttpRequest.newBuilder().DELETE(), endpoint);
}
public static <R> RequestBuilder apiPost(final String endpoint, final R input) {
return RequestBuilder.withJsonBody(endpoint, "POST", input);
}
public static <R> RequestBuilder apiPut(final String endpoint, final R input) {
return RequestBuilder.withJsonBody(endpoint, "PUT", input);
}
public static <R> RequestBuilder apiPatch(final String endpoint, final R input) {
return RequestBuilder.withJsonBody(endpoint, "PATCH", input);
}
private static URI serverUri(final String endpoint, final List<String> queryParams) {
final String query = queryParams.isEmpty()
? StringUtils.EMPTY
: "?" + String.join("&", queryParams);
return URI.create("https://" + CONFIG.domain() + endpoint + query);
}
public static ManagedChannel grpcChannel() {
return GRPC_CHANNEL;
}
public static ClientInterceptor authorizationInterceptor(final TestUser user, final byte deviceId) {
final String username = "%s.%d".formatted(user.aciUuid().toString(), deviceId);
final Metadata metadata = new Metadata();
metadata.put(RequireAuthenticationInterceptor.AUTHORIZATION_METADATA_KEY,
HeaderUtils.basicAuthHeader(username, user.accountPassword()));
return MetadataUtils.newAttachHeadersInterceptor(metadata);
}
private static ManagedChannel buildGrpcChannel() {
try {
final String rootCerts = String.join("\n", CONFIG.rootCerts());
final ByteArrayInputStream rootCertInputStream =
new ByteArrayInputStream(rootCerts.getBytes(StandardCharsets.UTF_8));
final ChannelCredentials credentials = TlsChannelCredentials.newBuilder().trustManager(rootCertInputStream).build();
return Grpc.newChannelBuilderForAddress(GRPC_DOMAIN, 443, credentials)
.userAgent(USER_AGENT)
.defaultServiceConfig(Map.of("methodConfig", List.of(Map.of(
"name", List.of(Map.of()),
"retryPolicy", Map.of(
"maxAttempts", 3.0,
"initialBackoff", "0.5s",
"maxBackoff", "2s",
"backoffMultiplier", 2.0,
"retryableStatusCodes", List.of("UNAVAILABLE"))))))
.enableRetry()
.build();
} catch (final IOException e) {
throw new UncheckedIOException(e);
}
}
public static class RequestBuilder {
private final HttpRequest.Builder builder;
private final String endpoint;
private final List<String> queryParams = new ArrayList<>();
private boolean retryServerErrors = true;
private RequestBuilder(final HttpRequest.Builder builder, final String endpoint) {
this.builder = builder;
this.endpoint = endpoint;
}
private static <R> RequestBuilder withJsonBody(final String endpoint, final String method, final R input) {
final byte[] body = encodeJsonBody(input);
return new RequestBuilder(HttpRequest.newBuilder()
.header(HttpHeaders.CONTENT_TYPE, "application/json")
.method(method, HttpRequest.BodyPublishers.ofByteArray(body)), endpoint);
}
public RequestBuilder authorized(final TestUser user) {
return authorized(user, Device.PRIMARY_ID);
}
public RequestBuilder authorized(final TestUser user, final byte deviceId) {
final String username = "%s.%d".formatted(user.aciUuid().toString(), deviceId);
return authorized(username, user.accountPassword());
}
public RequestBuilder authorized(final String username, final String password) {
builder.header(HttpHeaders.AUTHORIZATION, HeaderUtils.basicAuthHeader(username, password));
return this;
}
public RequestBuilder queryParam(final String key, final String value) {
queryParams.add("%s=%s".formatted(key, value));
return this;
}
public RequestBuilder header(final String name, final String value) {
builder.header(name, value);
return this;
}
/// Don't automatically retry 5xx responses, for requests that aren't safe to blindly retry
public RequestBuilder withoutRetries() {
retryServerErrors = false;
return this;
}
public Pair<Integer, Void> execute() {
return execute(Void.class);
}
public Pair<Integer, Void> executeExpectSuccess() {
final RawResponse response = executeRaw();
Validate.isTrue(
HttpUtils.isSuccessfulResponse(response.statusCode()),
"Unexpected response code: %d, body: %s",
response.statusCode(), response.body());
return Pair.of(response.statusCode(), null);
}
public <T> T executeExpectSuccess(final Class<T> expectedType) {
final RawResponse response = executeRaw();
Validate.isTrue(
HttpUtils.isSuccessfulResponse(response.statusCode()),
"Unexpected response code: %d, body: %s",
response.statusCode(), response.body());
return requireNonNull(parseBody(response.body(), expectedType));
}
public void executeExpectStatusCode(final int expectedStatusCode) {
final RawResponse response = executeRaw();
Validate.isTrue(
response.statusCode() == expectedStatusCode,
"Unexpected response code: %d (expected %d), body: %s",
response.statusCode(), expectedStatusCode, response.body());
}
public <T> T executeExpectStatusCode(final int expectedStatusCode, final Class<T> expectedType) {
final RawResponse response = executeRaw();
Validate.isTrue(
response.statusCode() == expectedStatusCode,
"Unexpected response code: %d (expected %d), body: %s",
response.statusCode(), expectedStatusCode, response.body());
return requireNonNull(parseBody(response.body(), expectedType));
}
public <T> Pair<Integer, T> execute(final Class<T> expectedType) {
final RawResponse response = executeRaw();
return Pair.of(response.statusCode(), parseBody(response.body(), expectedType));
}
private record RawResponse(int statusCode, String body) {}
private RawResponse executeRaw() {
builder.uri(serverUri(endpoint, queryParams))
.header(HttpHeaders.USER_AGENT, USER_AGENT);
return (retryServerErrors ? CLIENT : NO_RETRY_CLIENT)
.sendAsync(builder.build(), HttpResponse.BodyHandlers.ofString(StandardCharsets.UTF_8))
.whenComplete((response, error) -> {
if (error != null) {
logger.error("request error", error);
error.printStackTrace();
}
})
.thenApply(response -> new RawResponse(response.statusCode(), response.body()))
.join();
}
@Nullable
private static <T> T parseBody(final String body, final Class<T> expectedType) {
if (expectedType.equals(Void.class)) {
return null;
}
try {
return SystemMapper.jsonMapper().readValue(body, expectedType);
} catch (final IOException e) {
throw new RuntimeException(
"Could not parse response body as %s, body: %s".formatted(expectedType.getSimpleName(), body), e);
}
}
}
private static FaultTolerantHttpClient buildClient() {
try {
final FaultTolerantHttpClient client = FaultTolerantHttpClient.newBuilder("integration-test", Executors.newFixedThreadPool(16))
.withTrustedServerCertificates(CONFIG.rootCerts().toArray(String[]::new))
.withRetry(null, Executors.newSingleThreadScheduledExecutor())
.build();
// FaultTolerantHttpClient doesn't expose its Retry; it's the only one registered in this JVM
ResilienceUtil.getRetryRegistry().getAllRetries().forEach(retry -> retry.getEventPublisher()
.onRetry(event -> logger.warn("Retrying {} after {} failed attempt(s)",
event.getName(), event.getNumberOfRetryAttempts(), event.getLastThrowable())));
return client;
} catch (final CertificateException e) {
throw new RuntimeException(e);
}
}
private static FaultTolerantHttpClient buildNoRetryClient() {
try {
return FaultTolerantHttpClient.newBuilder("integration-test-no-retry", Executors.newFixedThreadPool(16))
.withTrustedServerCertificates(CONFIG.rootCerts().toArray(String[]::new))
.build();
} catch (final CertificateException e) {
throw new RuntimeException(e);
}
}
private static WebSocketClient buildWebSocketClient() {
try {
final KeyStore trustStore = CertificateUtil.buildKeyStoreForPem(CONFIG.rootCerts().toArray(String[]::new));
final SslContextFactory.Client sslContextFactory = new SslContextFactory.Client();
sslContextFactory.setTrustStore(trustStore);
final ClientConnector connector = new ClientConnector();
connector.setSslContextFactory(sslContextFactory);
final HTTP2Client http2Client = new HTTP2Client(connector);
final HttpClient httpClient = new HttpClient(new HttpClientTransportOverHTTP2(http2Client)) {
// There is an upstream Jetty bug where an HTTP/2 reader can race against and beat a websocket connection in
// reading the first websocket frame. See https://github.com/jetty/jetty.project/issues/15981 for more details.
//
// As a workaround, register a response content listener that never reads. This stops the HTTP client's default
// response content consumer from reading websocket frames off the upgraded HTTP/2 stream.
@Override
public Request newRequest(final URI uri) {
return super.newRequest(uri).onResponseContentSource((_, _) -> {});
}
};
final WebSocketClient wsClient = new WebSocketClient(httpClient);
wsClient.start();
return wsClient;
} catch (Exception e) {
throw new RuntimeException(e);
}
}
public static WebsocketClientSession authenticatedWebsocket(final TestUser user, final byte deviceId) throws IOException {
final String username = "%s.%d".formatted(user.aciUuid().toString(), deviceId);
return connect("/v1/websocket/", Map.of(HttpHeaders.AUTHORIZATION, HeaderUtils.basicAuthHeader(username, user.accountPassword())));
}
public static WebsocketClientSession anonymousWebsocket() throws IOException {
return connect("/v1/websocket/", Collections.emptyMap());
}
private static WebsocketClientSession connect(
final String path,
final Map<String, String> headers) throws IOException {
final URI uri = URI.create("wss://" + GRPC_DOMAIN + path);
final ClientUpgradeRequest request = new ClientUpgradeRequest(uri);
request.setTimeout(5, TimeUnit.SECONDS);
headers.forEach(request::setHeader);
try {
return WEBSOCKET_CONNECT_RETRY.executeCallable(() -> {
final WebsocketClientSession session = new WebsocketClientSession();
WEB_SOCKET_CLIENT.connect(session, request).get();
logger.info("Successfully connected to websocket on {}", uri);
return session;
});
} catch (Exception e) {
throw new IOException(e);
}
}
private static Config loadConfigFromClasspath(final String filename) {
try {
final URL configFileUrl = Resources.getResource(filename);
final Config config = SystemMapper.yamlMapper().readValue(Resources.toByteArray(configFileUrl), Config.class);
final Set<ConstraintViolation<Config>> constraintViolations = Validators.newValidator().validate(config);
if (!constraintViolations.isEmpty()) {
throw new ConfigurationValidationException(filename, constraintViolations);
}
return config;
} catch (final Exception e) {
throw new RuntimeException(e);
}
}
public static ECSignedPreKey generateSignedECPreKey(final long id, final ECKeyPair identityKeyPair) {
final ECPublicKey pubKey = ECKeyPair.generate().getPublicKey();
final byte[] signature = identityKeyPair.getPrivateKey().calculateSignature(pubKey.serialize());
return new ECSignedPreKey(id, pubKey, signature);
}
public static KEMSignedPreKey generateSignedKEMPreKey(final long id, final ECKeyPair identityKeyPair) {
final KEMPublicKey pubKey = KEMKeyPair.generate(KEMKeyType.KYBER_1024).getPublicKey();
final byte[] signature = identityKeyPair.getPrivateKey().calculateSignature(pubKey.serialize());
return new KEMSignedPreKey(id, pubKey, signature);
}
public static <R> byte[] encodeJsonBody(final R input) {
try {
return SystemMapper.jsonMapper().writeValueAsBytes(input);
} catch (final JsonProcessingException e) {
throw new RuntimeException(e);
}
}
/// Serializes an assertion into the [specification](https://www.w3.org/TR/webauthn/#dictdef-authenticationresponsejson) format.
static String webAuthnVerificationResponseJson(final PublicKeyCredential<AuthenticatorAssertionResponse, ?> credential) {
final AuthenticatorAssertionResponse response = credential.getResponse();
return """
{
"id": "%s",
"rawId": "%s",
"type": "public-key",
"clientExtensionResults": {},
"response": {
"clientDataJSON": "%s",
"authenticatorData": "%s",
"signature": "%s",
"userHandle": %s
}
}
""".formatted(
base64Url(credential.getRawId()),
base64Url(credential.getRawId()),
base64Url(response.getClientDataJSON()),
base64Url(response.getAuthenticatorData()),
base64Url(response.getSignature()),
response.getUserHandle() == null ? "null" : "\"" + base64Url(response.getUserHandle()) + "\"");
}
private static String base64Url(@Nullable final byte[] bytes) {
return Base64.getUrlEncoder().withoutPadding().encodeToString(bytes);
}
}
@@ -1,135 +0,0 @@
/*
* Copyright 2023 Signal Messenger, LLC
* SPDX-License-Identifier: AGPL-3.0-only
*/
package org.signal.integration;
import java.nio.charset.StandardCharsets;
import java.security.SecureRandom;
import java.util.Optional;
import java.util.UUID;
import javax.annotation.Nullable;
import org.signal.libsignal.protocol.util.KeyHelper;
import org.whispersystems.textsecuregcm.auth.UnidentifiedAccessUtil;
import org.whispersystems.textsecuregcm.entities.AccountAttributes;
import org.whispersystems.textsecuregcm.storage.DeviceCapability;
public class TestUser {
private final int registrationId;
@Nullable
private final Integer pniRegistrationId;
private final byte[] unidentifiedAccessKey;
@Nullable
private final String phoneNumber;
private final String accountPassword;
private final byte[] registrationPassword;
private UUID aciUuid;
@Nullable
private UUID pniUuid;
public static TestUser createNumberless(final String accountPassword, final byte[] accountRecoveryPassword) {
final int registrationId = KeyHelper.generateRegistrationId(false);
final byte[] unidentifiedAccessKey = Operations.randomBytes(UnidentifiedAccessUtil.UNIDENTIFIED_ACCESS_KEY_LENGTH);
return new TestUser(
registrationId,
null,
null,
unidentifiedAccessKey,
accountPassword,
accountRecoveryPassword);
}
public static TestUser createNumberlessForRecovery(final String accountPassword, final byte[] accountRecoveryPassword) {
// Recovering a numberless account requires PNI keys (though they are discarded by the server)
final int registrationId = KeyHelper.generateRegistrationId(false);
final int pniRegistrationId = KeyHelper.generateRegistrationId(false);
final byte[] unidentifiedAccessKey = new byte[UnidentifiedAccessUtil.UNIDENTIFIED_ACCESS_KEY_LENGTH];
new SecureRandom().nextBytes(unidentifiedAccessKey);
return new TestUser(
registrationId,
pniRegistrationId,
null,
unidentifiedAccessKey,
accountPassword,
accountRecoveryPassword);
}
public static TestUser create(final String phoneNumber, final String accountPassword, final byte[] registrationPassword) {
final int registrationId = KeyHelper.generateRegistrationId(false);
final int pniRegistrationId = KeyHelper.generateRegistrationId(false);
final byte[] unidentifiedAccessKey = new byte[UnidentifiedAccessUtil.UNIDENTIFIED_ACCESS_KEY_LENGTH];
new SecureRandom().nextBytes(unidentifiedAccessKey);
return new TestUser(
registrationId,
pniRegistrationId,
phoneNumber,
unidentifiedAccessKey,
accountPassword,
registrationPassword);
}
public TestUser(
final int registrationId,
@Nullable final Integer pniRegistrationId,
@Nullable final String phoneNumber,
final byte[] unidentifiedAccessKey,
final String accountPassword,
final byte[] registrationPassword) {
this.registrationId = registrationId;
this.pniRegistrationId = pniRegistrationId;
this.phoneNumber = phoneNumber;
this.unidentifiedAccessKey = unidentifiedAccessKey;
this.accountPassword = accountPassword;
this.registrationPassword = registrationPassword;
}
public int registrationId() {
return registrationId;
}
public Optional<String> phoneNumber() {
return Optional.ofNullable(phoneNumber);
}
public String accountPassword() {
return accountPassword;
}
public byte[] registrationPassword() {
return registrationPassword;
}
public UUID aciUuid() {
return aciUuid;
}
public Optional<UUID> pniUuid() {
return Optional.ofNullable(pniUuid);
}
public AccountAttributes accountAttributes() {
return new AccountAttributes(true, registrationId, pniRegistrationId, "".getBytes(StandardCharsets.UTF_8), "", true,
DeviceCapability.CAPABILITIES_REQUIRED_FOR_NEW_DEVICES, registrationPassword)
.setUnidentifiedAccessKey(unidentifiedAccessKey);
}
public void setAciUuid(final UUID aciUuid) {
this.aciUuid = aciUuid;
}
public void setPniUuid(@Nullable final UUID pniUuid) {
this.pniUuid = pniUuid;
}
}
@@ -1,158 +0,0 @@
/*
* Copyright 2026 Signal Messenger, LLC
* SPDX-License-Identifier: AGPL-3.0-only
*/
package org.signal.integration;
import com.google.protobuf.InvalidProtocolBufferException;
import io.github.resilience4j.retry.Retry;
import java.io.IOException;
import java.io.UncheckedIOException;
import java.nio.ByteBuffer;
import java.util.Collections;
import java.util.List;
import java.util.Optional;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.atomic.AtomicLong;
import org.eclipse.jetty.websocket.api.Callback;
import org.eclipse.jetty.websocket.api.Session;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.whispersystems.textsecuregcm.configuration.RetryConfiguration;
import org.whispersystems.textsecuregcm.entities.MessageProtos;
import org.whispersystems.textsecuregcm.util.SystemMapper;
import org.whispersystems.websocket.messages.WebSocketMessage;
import org.whispersystems.websocket.messages.WebSocketMessageFactory;
import org.whispersystems.websocket.messages.WebSocketRequestMessage;
import org.whispersystems.websocket.messages.WebSocketResponseMessage;
import org.whispersystems.websocket.messages.protobuf.ProtobufWebSocketMessageFactory;
public class WebsocketClientSession implements Session.Listener.AutoDemanding {
private static final Logger log = LoggerFactory.getLogger(WebsocketClientSession.class);
private static final Retry REQUEST_RETRY = Retry.of("integration-test-websocket-request",
new RetryConfiguration().<WebSocketResponseMessage>toRetryConfigBuilder()
.retryOnResult(response -> response.getStatus() >= 500)
.build());
private final WebSocketMessageFactory messageFactory = new ProtobufWebSocketMessageFactory();
private final AtomicLong requestId = new AtomicLong();
private final ConcurrentHashMap<Long, CompletableFuture<WebSocketResponseMessage>> responseFutures = new ConcurrentHashMap<>();
private final List<MessageProtos.Envelope> receivedEnvelopes = new CopyOnWriteArrayList<>();
private final CompletableFuture<Session> opened = new CompletableFuture<>();
private final CompletableFuture<Void> queueEmpty = new CompletableFuture<>();
private final CompletableFuture<Integer> closed = new CompletableFuture<>();
@Override
public void onWebSocketOpen(final Session session) {
opened.complete(session);
}
@Override
public void onWebSocketBinary(final ByteBuffer payload, final Callback callback) {
try {
final WebSocketMessage message = messageFactory.parseMessage(payload);
switch (message.getType()) {
case REQUEST_MESSAGE -> {
log.info("received request message {} {}", message.getRequestMessage().getVerb(), message.getRequestMessage().getPath());
switch (message.getRequestMessage().getPath()) {
case "/api/v1/message" -> acknowledge(message.getRequestMessage());
case "/api/v1/queue/empty" -> queueEmpty.complete(null);
default -> throw new IllegalStateException("Unexpected path: " + message.getRequestMessage().getPath());
}
}
case RESPONSE_MESSAGE -> {
final WebSocketResponseMessage response = message.getResponseMessage();
log.info("received response message {}", response.getStatus());
final CompletableFuture<WebSocketResponseMessage> future = responseFutures.remove(response.getRequestId());
if (future == null) {
throw new IllegalArgumentException("Received response with no matching request: " + response.getRequestId());
}
future.complete(response);
}
default -> throw new IllegalStateException("Unexpected message type: " + message.getType());
}
callback.succeed();
} catch (final Exception e) {
log.warn("Failed to process message received over the websocket", e);
callback.fail(e);
opened.join().close(1006, e.getMessage(), Callback.NOOP);
}
}
@Override
public void onWebSocketClose(final int statusCode, final String reason, final Callback callback) {
log.info("Received websocket close: {}", statusCode);
closed.complete(statusCode);
final IOException exception = new IOException("WebSocket closed: " + statusCode + " " + reason);
responseFutures.values()
.forEach(f -> f.completeExceptionally(exception));
responseFutures.clear();
if (!queueEmpty.isDone()) {
queueEmpty.completeExceptionally(exception);
}
callback.succeed();
}
public <T> WebSocketResponseMessage sendRequest(
final String verb,
final String path,
final List<String> headers,
final T body) {
return REQUEST_RETRY.executeSupplier(() -> {
final Session session = opened.join();
final long id = requestId.incrementAndGet();
final CompletableFuture<WebSocketResponseMessage> future = new CompletableFuture<>();
responseFutures.put(id, future);
final Optional<byte[]> maybeBody = Optional.ofNullable(body).map(Operations::encodeJsonBody);
final byte[] bytes = messageFactory.createRequest(Optional.of(id), verb, path, headers, maybeBody).toByteArray();
session.sendBinary(ByteBuffer.wrap(bytes), Callback.from(() -> {}, throwable -> {
if (responseFutures.remove(id) != null) {
future.completeExceptionally(throwable);
}
}));
return future.join();
});
}
public List<MessageProtos.Envelope> getReceivedEnvelopes() {
return receivedEnvelopes;
}
public void waitForQueueEmpty() {
queueEmpty.join();
}
public void close(final int closeCode) {
final Session session = opened.join();
session.close(closeCode, "client close", Callback.NOOP);
closed.join();
}
private void acknowledge(WebSocketRequestMessage message) {
final byte[] envelopeBytes = message.getBody()
.orElseThrow(() -> new IllegalStateException("Messages should have a response body"));
try {
final MessageProtos.Envelope envelope = MessageProtos.Envelope.parseFrom(envelopeBytes);
receivedEnvelopes.add(envelope);
final Session session = opened.join();
final WebSocketMessage response = messageFactory.createResponse(message.getRequestId(), 200, "",
Collections.emptyList(), Optional.empty());
session.sendBinary(ByteBuffer.wrap(response.toByteArray()), Callback.NOOP);
} catch (InvalidProtocolBufferException e) {
throw new IllegalStateException(e);
}
}
public static <R> R decode(Class<R> expectedType, WebSocketResponseMessage message) {
try {
return SystemMapper.jsonMapper()
.readValue(message.getBody().orElseThrow(() -> new IllegalStateException("No response body")), expectedType);
} catch (final IOException e) {
throw new UncheckedIOException(e);
}
}
}
@@ -1,25 +0,0 @@
/*
* Copyright 2023 Signal Messenger, LLC
* SPDX-License-Identifier: AGPL-3.0-only
*/
package org.signal.integration.config;
import jakarta.validation.Valid;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import org.whispersystems.textsecuregcm.configuration.DynamoDbClientFactory;
import java.util.List;
public record Config(@NotBlank String domain,
@NotEmpty List<@NotBlank String> rootCerts,
@NotNull @Valid DynamoDbClientFactory dynamoDbClient,
@NotNull @Valid DynamoDbTables dynamoDbTables,
@NotBlank String prescribedRegistrationNumber,
@NotBlank String prescribedRegistrationCode,
@NotBlank String prescribedReceiptSerial,
@NotBlank String prescribedReceiptCredential,
@NotBlank String serverZkPublicParams,
@NotNull @Valid WebAuthnConfiguration webAuthn) {
}
@@ -1,15 +0,0 @@
/*
* Copyright 2023 Signal Messenger, LLC
* SPDX-License-Identifier: AGPL-3.0-only
*/
package org.signal.integration.config;
import jakarta.validation.constraints.NotBlank;
public record DynamoDbTables(@NotBlank String registrationRecovery,
@NotBlank String verificationSessions,
@NotBlank String phoneNumberIdentifiers,
@NotBlank String changeNumberWaitingPeriods,
@NotBlank String redeemedReceipts) {
}
@@ -1,13 +0,0 @@
/*
* Copyright 2026 Signal Messenger, LLC
* SPDX-License-Identifier: AGPL-3.0-only
*/
package org.signal.integration.config;
import jakarta.validation.constraints.NotBlank;
public record WebAuthnConfiguration(
@NotBlank String relyingPartyId,
@NotBlank String origin) {
}
@@ -1,347 +0,0 @@
/*
* Copyright 2023 Signal Messenger, LLC
* SPDX-License-Identifier: AGPL-3.0-only
*/
package org.signal.integration;
import static org.junit.jupiter.api.Assertions.assertArrayEquals;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;
import com.eatthepath.otp.TimeBasedOneTimePasswordGenerator;
import com.google.protobuf.ByteString;
import com.webauthn4j.data.AttestationConveyancePreference;
import com.webauthn4j.data.AuthenticatorAttestationResponse;
import com.webauthn4j.data.AuthenticatorSelectionCriteria;
import com.webauthn4j.data.PublicKeyCredential;
import com.webauthn4j.data.PublicKeyCredentialCreationOptions;
import com.webauthn4j.data.PublicKeyCredentialParameters;
import com.webauthn4j.data.PublicKeyCredentialRpEntity;
import com.webauthn4j.data.PublicKeyCredentialType;
import com.webauthn4j.data.PublicKeyCredentialUserEntity;
import com.webauthn4j.data.ResidentKeyRequirement;
import com.webauthn4j.data.UserVerificationRequirement;
import com.webauthn4j.data.attestation.statement.COSEAlgorithmIdentifier;
import com.webauthn4j.data.client.Origin;
import com.webauthn4j.data.client.challenge.DefaultChallenge;
import com.webauthn4j.test.EmulatorUtil;
import com.webauthn4j.test.authenticator.webauthn.WebAuthnAuthenticatorAdaptor;
import com.webauthn4j.test.client.ClientPlatform;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
import java.time.Duration;
import java.time.Instant;
import java.util.Arrays;
import java.util.Base64;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import javax.crypto.SecretKey;
import javax.crypto.spec.SecretKeySpec;
import org.apache.commons.lang3.tuple.Pair;
import org.apache.http.HttpStatus;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Nested;
import org.junit.jupiter.api.Test;
import org.signal.chat.account.AccountsGrpc;
import org.signal.chat.account.ConfirmTotpKeyRequest;
import org.signal.chat.account.ConfirmTotpKeyResponse;
import org.signal.chat.account.FinishWebAuthnRegistrationRequest;
import org.signal.chat.account.FinishWebAuthnRegistrationResponse;
import org.signal.chat.account.GenerateTotpKeyRequest;
import org.signal.chat.account.GenerateTotpKeyResponse;
import org.signal.chat.account.ListMfaKeysRequest;
import org.signal.chat.account.ListMfaKeysResponse;
import org.signal.chat.account.StartWebAuthnRegistrationRequest;
import org.signal.chat.account.StartWebAuthnRegistrationResponse;
import org.signal.chat.account.TotpParameters;
import org.signal.integration.config.WebAuthnConfiguration;
import org.signal.libsignal.protocol.IdentityKey;
import org.signal.libsignal.protocol.ecc.ECKeyPair;
import org.signal.libsignal.usernames.BaseUsernameException;
import org.signal.libsignal.usernames.Username;
import org.signal.libsignal.zkgroup.InvalidInputException;
import org.signal.libsignal.zkgroup.VerificationFailedException;
import org.signal.libsignal.zkgroup.internal.ByteArray;
import org.whispersystems.textsecuregcm.entities.AccountIdentifierResponse;
import org.whispersystems.textsecuregcm.entities.AccountIdentityResponse;
import org.whispersystems.textsecuregcm.entities.ChangeNumberRequest;
import org.whispersystems.textsecuregcm.entities.ConfirmUsernameHashRequest;
import org.whispersystems.textsecuregcm.entities.ReserveUsernameHashRequest;
import org.whispersystems.textsecuregcm.entities.ReserveUsernameHashResponse;
import org.whispersystems.textsecuregcm.entities.UsernameHashResponse;
import org.whispersystems.textsecuregcm.identity.AciServiceIdentifier;
import org.whispersystems.textsecuregcm.storage.Device;
public class AccountTest {
@Test
public void testCreateNumberlessAccount()
throws VerificationFailedException, InvalidInputException {
final Operations.Receipt receipt = Operations.getPrescribedReceipt();
Operations.deleteReceipt(receipt.serial());
TestUser user = null;
try {
user = Operations.registerNumberlessUser(receipt.credential());
final Pair<Integer, AccountIdentityResponse> execute = Operations.apiGet("/v1/accounts/whoami")
.authorized(user)
.execute(AccountIdentityResponse.class);
assertEquals(HttpStatus.SC_OK, execute.getLeft());
} finally {
Operations.deleteReceipt(receipt.serial());
if (user != null) {
Operations.deleteUser(user);
}
}
}
@Nested
class RecoverWithMfa {
private TestUser user;
@BeforeEach
void setup() throws InvalidInputException, VerificationFailedException {
final Operations.Receipt receipt = Operations.getPrescribedReceipt();
// Clear receipt state in case a previous run had an unclean failure
Operations.deleteReceipt(receipt.serial());
user = Operations.registerNumberlessUser(receipt.credential());
}
@AfterEach
void teardown() throws InvalidInputException {
final Operations.Receipt receipt = Operations.getPrescribedReceipt();
Operations.deleteReceipt(receipt.serial());
if (user != null) {
Operations.deleteUser(user);
}
}
@Test
public void testRecoverWithTotp() throws NoSuchAlgorithmException, InvalidKeyException {
final GenerateTotpKeyResponse generateTotpKeyResponse =
getAccountsStubForUser(user).generateTotpKey(GenerateTotpKeyRequest.getDefaultInstance());
assertEquals(GenerateTotpKeyResponse.ResponseCase.KEY_GENERATED, generateTotpKeyResponse.getResponseCase());
final TotpParameters totpParameters = generateTotpKeyResponse.getKeyGenerated().getTotpParameters();
final TimeBasedOneTimePasswordGenerator totpGenerator = new TimeBasedOneTimePasswordGenerator(
Duration.ofSeconds(totpParameters.getTimeStepSeconds()),
totpParameters.getPasswordLength(),
totpParameters.getAlgorithm());
final SecretKey totpKey = new SecretKeySpec(
generateTotpKeyResponse.getKeyGenerated().getKey().toByteArray(),
totpParameters.getAlgorithm());
final byte[] totpMetadata = Operations.randomBytes(160);
final ConfirmTotpKeyResponse confirmTotpKeyResponse = getAccountsStubForUser(user)
.confirmTotpKey(ConfirmTotpKeyRequest.newBuilder()
.setOneTimePassword(totpGenerator.generateOneTimePassword(totpKey, Instant.now()))
.setMetadataCiphertext(ByteString.copyFrom(totpMetadata))
.build());
assertEquals(ConfirmTotpKeyResponse.ResponseCase.KEY_CONFIRMED, confirmTotpKeyResponse.getResponseCase());
final int keyId = confirmTotpKeyResponse.getKeyConfirmed().getKeyId();
final TestUser recoveredUser = Operations.recoverNumberlessUserWithTotp(user, () ->
totpGenerator.generateOneTimePassword(totpKey, Instant.now()));
assertEquals(user.aciUuid(), recoveredUser.aciUuid());
// MFA key should remain set after re-registration
final Map<Integer, ListMfaKeysResponse.MfaKeyMetadata> mfaKeys =
getAccountsStubForUser(recoveredUser).listMfaKeys(ListMfaKeysRequest.getDefaultInstance()).getKeysMap();
assertEquals(1, mfaKeys.size());
assertTrue(mfaKeys.containsKey(keyId));
assertEquals(ListMfaKeysResponse.MfaKeyMetadata.MfaKeyType.MFA_KEY_TYPE_TOTP, mfaKeys.get(keyId).getType());
assertArrayEquals(totpMetadata, mfaKeys.get(keyId).getMetadataCiphertext().toByteArray());
}
@Test
public void testRecoverWithWebAuthn() {
final WebAuthnConfiguration webAuthnConfiguration = Operations.getWebAuthnConfiguration();
final ClientPlatform clientPlatform = new ClientPlatform(new Origin(webAuthnConfiguration.origin()), new WebAuthnAuthenticatorAdaptor(EmulatorUtil.NONE_ATTESTATION_AUTHENTICATOR));
final COSEAlgorithmIdentifier algorithm = COSEAlgorithmIdentifier.ES256;
final StartWebAuthnRegistrationResponse startWebAuthnRegistrationResponse =
getAccountsStubForUser(user).startWebAuthnRegistration(StartWebAuthnRegistrationRequest.getDefaultInstance());
assertEquals(StartWebAuthnRegistrationResponse.ResponseCase.PARAMS,
startWebAuthnRegistrationResponse.getResponseCase());
final StartWebAuthnRegistrationResponse.WebAuthnCreateParameters webAuthnCreateParameters = startWebAuthnRegistrationResponse.getParams();
assertTrue(
webAuthnCreateParameters.getAllowedAlgorithmsList().contains(algorithm.getValue()));
final PublicKeyCredential<AuthenticatorAttestationResponse, ?> credential =
clientPlatform.create(new PublicKeyCredentialCreationOptions(
new PublicKeyCredentialRpEntity(webAuthnConfiguration.relyingPartyId(), "test"),
new PublicKeyCredentialUserEntity(webAuthnCreateParameters.getUserHandle().toByteArray(), "test", "test"),
new DefaultChallenge(),
List.of(new PublicKeyCredentialParameters(PublicKeyCredentialType.PUBLIC_KEY, algorithm)),
null,
List.of(),
new AuthenticatorSelectionCriteria(
null, false, ResidentKeyRequirement.DISCOURAGED, UserVerificationRequirement.DISCOURAGED),
AttestationConveyancePreference.NONE,
null));
final byte[] metadataCiphertext = Operations.randomBytes(160);
final FinishWebAuthnRegistrationResponse finishWebAuthnRegistrationResponse = getAccountsStubForUser(user)
.finishWebAuthnRegistration(FinishWebAuthnRegistrationRequest.newBuilder()
.setAttestationObject(ByteString.copyFrom(credential.getResponse().getAttestationObject()))
.setCollectedClientDataJsonBytes(ByteString.copyFrom(credential.getResponse().getClientDataJSON()))
.setMetadataCiphertext(ByteString.copyFrom(metadataCiphertext))
.build());
assertEquals(FinishWebAuthnRegistrationResponse.ResponseCase.KEY_CONFIRMED,
finishWebAuthnRegistrationResponse.getResponseCase());
final int keyId = finishWebAuthnRegistrationResponse.getKeyConfirmed().getKeyId();
final TestUser recoveredUser = Operations.recoverNumberlessUserWithWebAuthn(user, clientPlatform, credential.getRawId(),
webAuthnConfiguration.relyingPartyId());
assertEquals(user.aciUuid(), recoveredUser.aciUuid());
// MFA key should remain set after re-registration
final Map<Integer, ListMfaKeysResponse.MfaKeyMetadata> mfaKeys =
getAccountsStubForUser(recoveredUser).listMfaKeys(ListMfaKeysRequest.getDefaultInstance()).getKeysMap();
assertEquals(1, mfaKeys.size());
assertTrue(mfaKeys.containsKey(keyId));
assertEquals(ListMfaKeysResponse.MfaKeyMetadata.MfaKeyType.MFA_KEY_TYPE_WEBAUTHN, mfaKeys.get(keyId).getType());
assertArrayEquals(metadataCiphertext, mfaKeys.get(keyId).getMetadataCiphertext().toByteArray());
}
}
private static AccountsGrpc.AccountsBlockingStub getAccountsStubForUser(final TestUser user) {
return AccountsGrpc
.newBlockingStub(Operations.grpcChannel())
.withInterceptors(Operations.authorizationInterceptor(user, Device.PRIMARY_ID));
}
@Test
public void testCreateAccount() {
final TestUser user = Operations.newRegisteredUser("+19995550101");
try {
final Pair<Integer, AccountIdentityResponse> execute = Operations.apiGet("/v1/accounts/whoami")
.authorized(user)
.execute(AccountIdentityResponse.class);
assertEquals(HttpStatus.SC_OK, execute.getLeft());
} finally {
Operations.deleteUser(user);
}
}
@Test
public void changePhoneNumber() {
final TestUser user = Operations.newRegisteredUser("+19995550301");
final String targetNumber = "+19995550302";
final ECKeyPair pniIdentityKeyPair = ECKeyPair.generate();
final ChangeNumberRequest changeNumberRequest = new ChangeNumberRequest(null,
Operations.populateRandomRecoveryPassword(targetNumber),
targetNumber,
null,
new IdentityKey(pniIdentityKeyPair.getPublicKey()),
Collections.emptyList(),
Map.of(Device.PRIMARY_ID, Operations.generateSignedECPreKey(1, pniIdentityKeyPair)),
Map.of(Device.PRIMARY_ID, Operations.generateSignedKEMPreKey(2, pniIdentityKeyPair)),
Map.of(Device.PRIMARY_ID, 17));
try {
Operations.clearChangeNumberWaitingPeriod(user);
final AccountIdentityResponse accountIdentityResponse =
Operations.apiPut("/v2/accounts/number", changeNumberRequest)
.authorized(user)
.executeExpectSuccess(AccountIdentityResponse.class);
assertEquals(user.aciUuid(), accountIdentityResponse.uuid());
assertNotEquals(user.pniUuid(), accountIdentityResponse.pni());
assertEquals(Optional.of(targetNumber), accountIdentityResponse.number());
} finally {
Operations.deleteUser(user);
}
}
@Test
public void testUsernameOperations() throws Exception {
final TestUser user = Operations.newRegisteredUser("+19995550102");
try {
verifyFullUsernameLifecycle(user);
// no do it again to check changing usernames
verifyFullUsernameLifecycle(user);
} finally {
Operations.deleteUser(user);
}
}
private static void verifyFullUsernameLifecycle(final TestUser user) throws BaseUsernameException {
final String preferred = "test";
final List<Username> candidates = Username.candidatesFrom(preferred, preferred.length(), preferred.length() + 1);
// reserve a username
final ReserveUsernameHashRequest reserveUsernameHashRequest = new ReserveUsernameHashRequest(
candidates.stream()
.map(Username::getHash)
.map(ByteArray::serialize)
.toList());
// try unauthorized
Operations
.apiPut("/v1/accounts/username_hash/reserve", reserveUsernameHashRequest)
.executeExpectStatusCode(HttpStatus.SC_UNAUTHORIZED);
final ReserveUsernameHashResponse reserveUsernameHashResponse = Operations
.apiPut("/v1/accounts/username_hash/reserve", reserveUsernameHashRequest)
.authorized(user)
.executeExpectSuccess(ReserveUsernameHashResponse.class);
// find which one is the reserved username
final byte[] reservedHash = reserveUsernameHashResponse.usernameHash();
final Username reservedUsername = candidates.stream()
.filter(u -> Arrays.equals(u.getHash().serialize(), reservedHash))
.findAny()
.orElseThrow();
// confirm a username
final ConfirmUsernameHashRequest confirmUsernameHashRequest = new ConfirmUsernameHashRequest(
reservedUsername.getHash().serialize(),
reservedUsername.generateProof(),
"cluck cluck i'm a parrot".getBytes()
);
// try unauthorized
Operations
.apiPut("/v1/accounts/username_hash/confirm", confirmUsernameHashRequest)
.executeExpectStatusCode(HttpStatus.SC_UNAUTHORIZED);
Operations
.apiPut("/v1/accounts/username_hash/confirm", confirmUsernameHashRequest)
.authorized(user)
.executeExpectSuccess(UsernameHashResponse.class);
// lookup username
final AccountIdentifierResponse accountIdentifierResponse = Operations
.apiGet("/v1/accounts/username_hash/" + Base64.getUrlEncoder().encodeToString(reservedHash))
.executeExpectSuccess(AccountIdentifierResponse.class);
assertEquals(new AciServiceIdentifier(user.aciUuid()), accountIdentifierResponse.uuid());
// try authorized
Operations
.apiGet("/v1/accounts/username_hash/" + Base64.getUrlEncoder().encodeToString(reservedHash))
.authorized(user)
.executeExpectStatusCode(HttpStatus.SC_BAD_REQUEST);
// delete username
Operations
.apiDelete("/v1/accounts/username_hash")
.authorized(user)
.executeExpectSuccess();
}
}
@@ -1,73 +0,0 @@
/*
* Copyright 2023 Signal Messenger, LLC
* SPDX-License-Identifier: AGPL-3.0-only
*/
package org.signal.integration;
import static org.junit.jupiter.api.Assertions.assertArrayEquals;
import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertTimeoutPreemptively;
import com.google.common.net.HttpHeaders;
import jakarta.ws.rs.core.MediaType;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.time.Duration;
import java.util.List;
import java.util.concurrent.TimeUnit;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.Timeout;
import org.whispersystems.textsecuregcm.entities.IncomingMessage;
import org.whispersystems.textsecuregcm.entities.IncomingMessageList;
import org.whispersystems.textsecuregcm.entities.MessageProtos;
import org.whispersystems.textsecuregcm.entities.SendMessageResponse;
import org.whispersystems.textsecuregcm.storage.Device;
import org.whispersystems.websocket.messages.WebSocketResponseMessage;
@Timeout(value = 1, unit = TimeUnit.MINUTES, threadMode = Timeout.ThreadMode.SEPARATE_THREAD)
public class MessagingTest {
TestUser userA;
TestUser userB;
@BeforeEach
public void setup() {
userA = Operations.newRegisteredUser("+19995550102");
userB = Operations.newRegisteredUser("+19995550103");
}
@AfterEach
public void teardown() {
Operations.deleteUser(userA);
Operations.deleteUser(userB);
}
@Test
public void testSendMessageUnsealed() throws IOException {
final byte[] expectedContent = "Hello, World!".getBytes(StandardCharsets.UTF_8);
final IncomingMessage message = new IncomingMessage(1, Device.PRIMARY_ID, userB.registrationId(), expectedContent);
final IncomingMessageList messages = new IncomingMessageList(List.of(message), false, true, System.currentTimeMillis());
final WebsocketClientSession websocketA = Operations.authenticatedWebsocket(userA, Device.PRIMARY_ID);
final WebSocketResponseMessage responseMessage = websocketA.sendRequest(
"PUT",
"/v1/messages/%s".formatted(userB.aciUuid().toString()),
List.of(HttpHeaders.CONTENT_TYPE + ":" + MediaType.APPLICATION_JSON),
messages);
assertEquals(200, responseMessage.getStatus());
assertDoesNotThrow(() -> WebsocketClientSession.decode(SendMessageResponse.class, responseMessage));
final WebsocketClientSession websocketB = Operations.authenticatedWebsocket(userB, Device.PRIMARY_ID);
assertTimeoutPreemptively(Duration.ofSeconds(15), websocketB::waitForQueueEmpty);
assertEquals(1, websocketB.getReceivedEnvelopes().size());
final MessageProtos.Envelope envelope = websocketB.getReceivedEnvelopes().getFirst();
assertArrayEquals(expectedContent, envelope.getContent().toByteArray());
websocketB.close(1000);
websocketA.close(1000);
}
}
@@ -1,67 +0,0 @@
/*
* Copyright 2023 Signal Messenger, LLC
* SPDX-License-Identifier: AGPL-3.0-only
*/
package org.signal.integration;
import io.micrometer.common.util.StringUtils;
import org.apache.commons.lang3.tuple.Pair;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import org.whispersystems.textsecuregcm.entities.CreateVerificationSessionRequest;
import org.whispersystems.textsecuregcm.entities.SubmitVerificationCodeRequest;
import org.whispersystems.textsecuregcm.entities.UpdateVerificationSessionRequest;
import org.whispersystems.textsecuregcm.entities.VerificationCodeRequest;
import org.whispersystems.textsecuregcm.entities.VerificationSessionResponse;
public class RegistrationTest {
@Test
public void testRegistration() throws Exception {
final UpdateVerificationSessionRequest originalRequest = new UpdateVerificationSessionRequest(
"test", UpdateVerificationSessionRequest.PushTokenType.FCM, null, null, null, null);
final Operations.PrescribedVerificationNumber params = Operations.prescribedVerificationNumber();
final CreateVerificationSessionRequest input = new CreateVerificationSessionRequest(params.number(),
originalRequest);
final VerificationSessionResponse verificationSessionResponse = Operations
.apiPost("/v1/verification/session", input)
.executeExpectSuccess(VerificationSessionResponse.class);
final String sessionId = verificationSessionResponse.id();
Assertions.assertTrue(StringUtils.isNotBlank(sessionId));
final String pushChallenge = Operations.peekVerificationSessionPushChallenge(sessionId);
// supply push challenge
final UpdateVerificationSessionRequest updatedRequest = new UpdateVerificationSessionRequest(
"test", UpdateVerificationSessionRequest.PushTokenType.FCM, pushChallenge, null, null, null);
final VerificationSessionResponse pushChallengeSupplied = Operations
.apiPatch("/v1/verification/session/%s".formatted(sessionId), updatedRequest)
.executeExpectSuccess(VerificationSessionResponse.class);
Assertions.assertTrue(pushChallengeSupplied.allowedToRequestCode());
// request code
final VerificationCodeRequest verificationCodeRequest = new VerificationCodeRequest(
VerificationCodeRequest.Transport.SMS, "android-ng");
final VerificationSessionResponse codeRequested = Operations
.apiPost("/v1/verification/session/%s/code".formatted(sessionId), verificationCodeRequest)
.executeExpectSuccess(VerificationSessionResponse.class);
// verify code
final SubmitVerificationCodeRequest submitVerificationCodeRequest = new SubmitVerificationCodeRequest(
params.verificationCode());
final Pair<Integer, VerificationSessionResponse> codeVerified = Operations
.apiPut("/v1/verification/session/%s/code".formatted(sessionId), submitVerificationCodeRequest)
.execute(VerificationSessionResponse.class);
// If we succeeded but then retried a 500, we might have submitted a code when we were already verified
Assertions.assertTrue(codeVerified.getLeft() == 200 || codeVerified.getLeft() == 409,
"Unexpected response code: " + codeVerified.getLeft());
Assertions.assertTrue(codeVerified.getRight().verified());
}
}
Vendored
-295
View File
@@ -1,295 +0,0 @@
#!/bin/sh
# ----------------------------------------------------------------------------
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
# ----------------------------------------------------------------------------
# ----------------------------------------------------------------------------
# Apache Maven Wrapper startup batch script, version 3.3.4
#
# Optional ENV vars
# -----------------
# JAVA_HOME - location of a JDK home dir, required when download maven via java source
# MVNW_REPOURL - repo url base for downloading maven distribution
# MVNW_USERNAME/MVNW_PASSWORD - user and password for downloading maven
# MVNW_VERBOSE - true: enable verbose log; debug: trace the mvnw script; others: silence the output
# ----------------------------------------------------------------------------
set -euf
[ "${MVNW_VERBOSE-}" != debug ] || set -x
# OS specific support.
native_path() { printf %s\\n "$1"; }
case "$(uname)" in
CYGWIN* | MINGW*)
[ -z "${JAVA_HOME-}" ] || JAVA_HOME="$(cygpath --unix "$JAVA_HOME")"
native_path() { cygpath --path --windows "$1"; }
;;
esac
# set JAVACMD and JAVACCMD
set_java_home() {
# For Cygwin and MinGW, ensure paths are in Unix format before anything is touched
if [ -n "${JAVA_HOME-}" ]; then
if [ -x "$JAVA_HOME/jre/sh/java" ]; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
JAVACCMD="$JAVA_HOME/jre/sh/javac"
else
JAVACMD="$JAVA_HOME/bin/java"
JAVACCMD="$JAVA_HOME/bin/javac"
if [ ! -x "$JAVACMD" ] || [ ! -x "$JAVACCMD" ]; then
echo "The JAVA_HOME environment variable is not defined correctly, so mvnw cannot run." >&2
echo "JAVA_HOME is set to \"$JAVA_HOME\", but \"\$JAVA_HOME/bin/java\" or \"\$JAVA_HOME/bin/javac\" does not exist." >&2
return 1
fi
fi
else
JAVACMD="$(
'set' +e
'unset' -f command 2>/dev/null
'command' -v java
)" || :
JAVACCMD="$(
'set' +e
'unset' -f command 2>/dev/null
'command' -v javac
)" || :
if [ ! -x "${JAVACMD-}" ] || [ ! -x "${JAVACCMD-}" ]; then
echo "The java/javac command does not exist in PATH nor is JAVA_HOME set, so mvnw cannot run." >&2
return 1
fi
fi
}
# hash string like Java String::hashCode
hash_string() {
str="${1:-}" h=0
while [ -n "$str" ]; do
char="${str%"${str#?}"}"
h=$(((h * 31 + $(LC_CTYPE=C printf %d "'$char")) % 4294967296))
str="${str#?}"
done
printf %x\\n $h
}
verbose() { :; }
[ "${MVNW_VERBOSE-}" != true ] || verbose() { printf %s\\n "${1-}"; }
die() {
printf %s\\n "$1" >&2
exit 1
}
trim() {
# MWRAPPER-139:
# Trims trailing and leading whitespace, carriage returns, tabs, and linefeeds.
# Needed for removing poorly interpreted newline sequences when running in more
# exotic environments such as mingw bash on Windows.
printf "%s" "${1}" | tr -d '[:space:]'
}
scriptDir="$(dirname "$0")"
scriptName="$(basename "$0")"
# parse distributionUrl and optional distributionSha256Sum, requires .mvn/wrapper/maven-wrapper.properties
while IFS="=" read -r key value; do
case "${key-}" in
distributionUrl) distributionUrl=$(trim "${value-}") ;;
distributionSha256Sum) distributionSha256Sum=$(trim "${value-}") ;;
esac
done <"$scriptDir/.mvn/wrapper/maven-wrapper.properties"
[ -n "${distributionUrl-}" ] || die "cannot read distributionUrl property in $scriptDir/.mvn/wrapper/maven-wrapper.properties"
case "${distributionUrl##*/}" in
maven-mvnd-*bin.*)
MVN_CMD=mvnd.sh _MVNW_REPO_PATTERN=/maven/mvnd/
case "${PROCESSOR_ARCHITECTURE-}${PROCESSOR_ARCHITEW6432-}:$(uname -a)" in
*AMD64:CYGWIN* | *AMD64:MINGW*) distributionPlatform=windows-amd64 ;;
:Darwin*x86_64) distributionPlatform=darwin-amd64 ;;
:Darwin*arm64) distributionPlatform=darwin-aarch64 ;;
:Linux*x86_64*) distributionPlatform=linux-amd64 ;;
*)
echo "Cannot detect native platform for mvnd on $(uname)-$(uname -m), use pure java version" >&2
distributionPlatform=linux-amd64
;;
esac
distributionUrl="${distributionUrl%-bin.*}-$distributionPlatform.zip"
;;
maven-mvnd-*) MVN_CMD=mvnd.sh _MVNW_REPO_PATTERN=/maven/mvnd/ ;;
*) MVN_CMD="mvn${scriptName#mvnw}" _MVNW_REPO_PATTERN=/org/apache/maven/ ;;
esac
# apply MVNW_REPOURL and calculate MAVEN_HOME
# maven home pattern: ~/.m2/wrapper/dists/{apache-maven-<version>,maven-mvnd-<version>-<platform>}/<hash>
[ -z "${MVNW_REPOURL-}" ] || distributionUrl="$MVNW_REPOURL$_MVNW_REPO_PATTERN${distributionUrl#*"$_MVNW_REPO_PATTERN"}"
distributionUrlName="${distributionUrl##*/}"
distributionUrlNameMain="${distributionUrlName%.*}"
distributionUrlNameMain="${distributionUrlNameMain%-bin}"
MAVEN_USER_HOME="${MAVEN_USER_HOME:-${HOME}/.m2}"
MAVEN_HOME="${MAVEN_USER_HOME}/wrapper/dists/${distributionUrlNameMain-}/$(hash_string "$distributionUrl")"
exec_maven() {
unset MVNW_VERBOSE MVNW_USERNAME MVNW_PASSWORD MVNW_REPOURL || :
exec "$MAVEN_HOME/bin/$MVN_CMD" "$@" || die "cannot exec $MAVEN_HOME/bin/$MVN_CMD"
}
if [ -d "$MAVEN_HOME" ]; then
verbose "found existing MAVEN_HOME at $MAVEN_HOME"
exec_maven "$@"
fi
case "${distributionUrl-}" in
*?-bin.zip | *?maven-mvnd-?*-?*.zip) ;;
*) die "distributionUrl is not valid, must match *-bin.zip or maven-mvnd-*.zip, but found '${distributionUrl-}'" ;;
esac
# prepare tmp dir
if TMP_DOWNLOAD_DIR="$(mktemp -d)" && [ -d "$TMP_DOWNLOAD_DIR" ]; then
clean() { rm -rf -- "$TMP_DOWNLOAD_DIR"; }
trap clean HUP INT TERM EXIT
else
die "cannot create temp dir"
fi
mkdir -p -- "${MAVEN_HOME%/*}"
# Download and Install Apache Maven
verbose "Couldn't find MAVEN_HOME, downloading and installing it ..."
verbose "Downloading from: $distributionUrl"
verbose "Downloading to: $TMP_DOWNLOAD_DIR/$distributionUrlName"
# select .zip or .tar.gz
if ! command -v unzip >/dev/null; then
distributionUrl="${distributionUrl%.zip}.tar.gz"
distributionUrlName="${distributionUrl##*/}"
fi
# verbose opt
__MVNW_QUIET_WGET=--quiet __MVNW_QUIET_CURL=--silent __MVNW_QUIET_UNZIP=-q __MVNW_QUIET_TAR=''
[ "${MVNW_VERBOSE-}" != true ] || __MVNW_QUIET_WGET='' __MVNW_QUIET_CURL='' __MVNW_QUIET_UNZIP='' __MVNW_QUIET_TAR=v
# normalize http auth
case "${MVNW_PASSWORD:+has-password}" in
'') MVNW_USERNAME='' MVNW_PASSWORD='' ;;
has-password) [ -n "${MVNW_USERNAME-}" ] || MVNW_USERNAME='' MVNW_PASSWORD='' ;;
esac
if [ -z "${MVNW_USERNAME-}" ] && command -v wget >/dev/null; then
verbose "Found wget ... using wget"
wget ${__MVNW_QUIET_WGET:+"$__MVNW_QUIET_WGET"} "$distributionUrl" -O "$TMP_DOWNLOAD_DIR/$distributionUrlName" || die "wget: Failed to fetch $distributionUrl"
elif [ -z "${MVNW_USERNAME-}" ] && command -v curl >/dev/null; then
verbose "Found curl ... using curl"
curl ${__MVNW_QUIET_CURL:+"$__MVNW_QUIET_CURL"} -f -L -o "$TMP_DOWNLOAD_DIR/$distributionUrlName" "$distributionUrl" || die "curl: Failed to fetch $distributionUrl"
elif set_java_home; then
verbose "Falling back to use Java to download"
javaSource="$TMP_DOWNLOAD_DIR/Downloader.java"
targetZip="$TMP_DOWNLOAD_DIR/$distributionUrlName"
cat >"$javaSource" <<-END
public class Downloader extends java.net.Authenticator
{
protected java.net.PasswordAuthentication getPasswordAuthentication()
{
return new java.net.PasswordAuthentication( System.getenv( "MVNW_USERNAME" ), System.getenv( "MVNW_PASSWORD" ).toCharArray() );
}
public static void main( String[] args ) throws Exception
{
setDefault( new Downloader() );
java.nio.file.Files.copy( java.net.URI.create( args[0] ).toURL().openStream(), java.nio.file.Paths.get( args[1] ).toAbsolutePath().normalize() );
}
}
END
# For Cygwin/MinGW, switch paths to Windows format before running javac and java
verbose " - Compiling Downloader.java ..."
"$(native_path "$JAVACCMD")" "$(native_path "$javaSource")" || die "Failed to compile Downloader.java"
verbose " - Running Downloader.java ..."
"$(native_path "$JAVACMD")" -cp "$(native_path "$TMP_DOWNLOAD_DIR")" Downloader "$distributionUrl" "$(native_path "$targetZip")"
fi
# If specified, validate the SHA-256 sum of the Maven distribution zip file
if [ -n "${distributionSha256Sum-}" ]; then
distributionSha256Result=false
if [ "$MVN_CMD" = mvnd.sh ]; then
echo "Checksum validation is not supported for maven-mvnd." >&2
echo "Please disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties." >&2
exit 1
elif command -v sha256sum >/dev/null; then
if echo "$distributionSha256Sum $TMP_DOWNLOAD_DIR/$distributionUrlName" | sha256sum -c - >/dev/null 2>&1; then
distributionSha256Result=true
fi
elif command -v shasum >/dev/null; then
if echo "$distributionSha256Sum $TMP_DOWNLOAD_DIR/$distributionUrlName" | shasum -a 256 -c >/dev/null 2>&1; then
distributionSha256Result=true
fi
else
echo "Checksum validation was requested but neither 'sha256sum' or 'shasum' are available." >&2
echo "Please install either command, or disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties." >&2
exit 1
fi
if [ $distributionSha256Result = false ]; then
echo "Error: Failed to validate Maven distribution SHA-256, your Maven distribution might be compromised." >&2
echo "If you updated your Maven version, you need to update the specified distributionSha256Sum property." >&2
exit 1
fi
fi
# unzip and move
if command -v unzip >/dev/null; then
unzip ${__MVNW_QUIET_UNZIP:+"$__MVNW_QUIET_UNZIP"} "$TMP_DOWNLOAD_DIR/$distributionUrlName" -d "$TMP_DOWNLOAD_DIR" || die "failed to unzip"
else
tar xzf${__MVNW_QUIET_TAR:+"$__MVNW_QUIET_TAR"} "$TMP_DOWNLOAD_DIR/$distributionUrlName" -C "$TMP_DOWNLOAD_DIR" || die "failed to untar"
fi
# Find the actual extracted directory name (handles snapshots where filename != directory name)
actualDistributionDir=""
# First try the expected directory name (for regular distributions)
if [ -d "$TMP_DOWNLOAD_DIR/$distributionUrlNameMain" ]; then
if [ -f "$TMP_DOWNLOAD_DIR/$distributionUrlNameMain/bin/$MVN_CMD" ]; then
actualDistributionDir="$distributionUrlNameMain"
fi
fi
# If not found, search for any directory with the Maven executable (for snapshots)
if [ -z "$actualDistributionDir" ]; then
# enable globbing to iterate over items
set +f
for dir in "$TMP_DOWNLOAD_DIR"/*; do
if [ -d "$dir" ]; then
if [ -f "$dir/bin/$MVN_CMD" ]; then
actualDistributionDir="$(basename "$dir")"
break
fi
fi
done
set -f
fi
if [ -z "$actualDistributionDir" ]; then
verbose "Contents of $TMP_DOWNLOAD_DIR:"
verbose "$(ls -la "$TMP_DOWNLOAD_DIR")"
die "Could not find Maven distribution directory in extracted archive"
fi
verbose "Found extracted Maven distribution directory: $actualDistributionDir"
printf %s\\n "$distributionUrl" >"$TMP_DOWNLOAD_DIR/$actualDistributionDir/mvnw.url"
mv -- "$TMP_DOWNLOAD_DIR/$actualDistributionDir" "$MAVEN_HOME" || [ -d "$MAVEN_HOME" ] || die "fail to move MAVEN_HOME"
clean || :
exec_maven "$@"
Vendored
-189
View File
@@ -1,189 +0,0 @@
<# : batch portion
@REM ----------------------------------------------------------------------------
@REM Licensed to the Apache Software Foundation (ASF) under one
@REM or more contributor license agreements. See the NOTICE file
@REM distributed with this work for additional information
@REM regarding copyright ownership. The ASF licenses this file
@REM to you under the Apache License, Version 2.0 (the
@REM "License"); you may not use this file except in compliance
@REM with the License. You may obtain a copy of the License at
@REM
@REM https://www.apache.org/licenses/LICENSE-2.0
@REM
@REM Unless required by applicable law or agreed to in writing,
@REM software distributed under the License is distributed on an
@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@REM KIND, either express or implied. See the License for the
@REM specific language governing permissions and limitations
@REM under the License.
@REM ----------------------------------------------------------------------------
@REM ----------------------------------------------------------------------------
@REM Apache Maven Wrapper startup batch script, version 3.3.4
@REM
@REM Optional ENV vars
@REM MVNW_REPOURL - repo url base for downloading maven distribution
@REM MVNW_USERNAME/MVNW_PASSWORD - user and password for downloading maven
@REM MVNW_VERBOSE - true: enable verbose log; others: silence the output
@REM ----------------------------------------------------------------------------
@IF "%__MVNW_ARG0_NAME__%"=="" (SET __MVNW_ARG0_NAME__=%~nx0)
@SET __MVNW_CMD__=
@SET __MVNW_ERROR__=
@SET __MVNW_PSMODULEP_SAVE=%PSModulePath%
@SET PSModulePath=
@FOR /F "usebackq tokens=1* delims==" %%A IN (`powershell -noprofile "& {$scriptDir='%~dp0'; $script='%__MVNW_ARG0_NAME__%'; icm -ScriptBlock ([Scriptblock]::Create((Get-Content -Raw '%~f0'))) -NoNewScope}"`) DO @(
IF "%%A"=="MVN_CMD" (set __MVNW_CMD__=%%B) ELSE IF "%%B"=="" (echo %%A) ELSE (echo %%A=%%B)
)
@SET PSModulePath=%__MVNW_PSMODULEP_SAVE%
@SET __MVNW_PSMODULEP_SAVE=
@SET __MVNW_ARG0_NAME__=
@SET MVNW_USERNAME=
@SET MVNW_PASSWORD=
@IF NOT "%__MVNW_CMD__%"=="" ("%__MVNW_CMD__%" %*)
@echo Cannot start maven from wrapper >&2 && exit /b 1
@GOTO :EOF
: end batch / begin powershell #>
$ErrorActionPreference = "Stop"
if ($env:MVNW_VERBOSE -eq "true") {
$VerbosePreference = "Continue"
}
# calculate distributionUrl, requires .mvn/wrapper/maven-wrapper.properties
$distributionUrl = (Get-Content -Raw "$scriptDir/.mvn/wrapper/maven-wrapper.properties" | ConvertFrom-StringData).distributionUrl
if (!$distributionUrl) {
Write-Error "cannot read distributionUrl property in $scriptDir/.mvn/wrapper/maven-wrapper.properties"
}
switch -wildcard -casesensitive ( $($distributionUrl -replace '^.*/','') ) {
"maven-mvnd-*" {
$USE_MVND = $true
$distributionUrl = $distributionUrl -replace '-bin\.[^.]*$',"-windows-amd64.zip"
$MVN_CMD = "mvnd.cmd"
break
}
default {
$USE_MVND = $false
$MVN_CMD = $script -replace '^mvnw','mvn'
break
}
}
# apply MVNW_REPOURL and calculate MAVEN_HOME
# maven home pattern: ~/.m2/wrapper/dists/{apache-maven-<version>,maven-mvnd-<version>-<platform>}/<hash>
if ($env:MVNW_REPOURL) {
$MVNW_REPO_PATTERN = if ($USE_MVND -eq $False) { "/org/apache/maven/" } else { "/maven/mvnd/" }
$distributionUrl = "$env:MVNW_REPOURL$MVNW_REPO_PATTERN$($distributionUrl -replace "^.*$MVNW_REPO_PATTERN",'')"
}
$distributionUrlName = $distributionUrl -replace '^.*/',''
$distributionUrlNameMain = $distributionUrlName -replace '\.[^.]*$','' -replace '-bin$',''
$MAVEN_M2_PATH = "$HOME/.m2"
if ($env:MAVEN_USER_HOME) {
$MAVEN_M2_PATH = "$env:MAVEN_USER_HOME"
}
if (-not (Test-Path -Path $MAVEN_M2_PATH)) {
New-Item -Path $MAVEN_M2_PATH -ItemType Directory | Out-Null
}
$MAVEN_WRAPPER_DISTS = $null
if ((Get-Item $MAVEN_M2_PATH).Target[0] -eq $null) {
$MAVEN_WRAPPER_DISTS = "$MAVEN_M2_PATH/wrapper/dists"
} else {
$MAVEN_WRAPPER_DISTS = (Get-Item $MAVEN_M2_PATH).Target[0] + "/wrapper/dists"
}
$MAVEN_HOME_PARENT = "$MAVEN_WRAPPER_DISTS/$distributionUrlNameMain"
$MAVEN_HOME_NAME = ([System.Security.Cryptography.SHA256]::Create().ComputeHash([byte[]][char[]]$distributionUrl) | ForEach-Object {$_.ToString("x2")}) -join ''
$MAVEN_HOME = "$MAVEN_HOME_PARENT/$MAVEN_HOME_NAME"
if (Test-Path -Path "$MAVEN_HOME" -PathType Container) {
Write-Verbose "found existing MAVEN_HOME at $MAVEN_HOME"
Write-Output "MVN_CMD=$MAVEN_HOME/bin/$MVN_CMD"
exit $?
}
if (! $distributionUrlNameMain -or ($distributionUrlName -eq $distributionUrlNameMain)) {
Write-Error "distributionUrl is not valid, must end with *-bin.zip, but found $distributionUrl"
}
# prepare tmp dir
$TMP_DOWNLOAD_DIR_HOLDER = New-TemporaryFile
$TMP_DOWNLOAD_DIR = New-Item -Itemtype Directory -Path "$TMP_DOWNLOAD_DIR_HOLDER.dir"
$TMP_DOWNLOAD_DIR_HOLDER.Delete() | Out-Null
trap {
if ($TMP_DOWNLOAD_DIR.Exists) {
try { Remove-Item $TMP_DOWNLOAD_DIR -Recurse -Force | Out-Null }
catch { Write-Warning "Cannot remove $TMP_DOWNLOAD_DIR" }
}
}
New-Item -Itemtype Directory -Path "$MAVEN_HOME_PARENT" -Force | Out-Null
# Download and Install Apache Maven
Write-Verbose "Couldn't find MAVEN_HOME, downloading and installing it ..."
Write-Verbose "Downloading from: $distributionUrl"
Write-Verbose "Downloading to: $TMP_DOWNLOAD_DIR/$distributionUrlName"
$webclient = New-Object System.Net.WebClient
if ($env:MVNW_USERNAME -and $env:MVNW_PASSWORD) {
$webclient.Credentials = New-Object System.Net.NetworkCredential($env:MVNW_USERNAME, $env:MVNW_PASSWORD)
}
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
$webclient.DownloadFile($distributionUrl, "$TMP_DOWNLOAD_DIR/$distributionUrlName") | Out-Null
# If specified, validate the SHA-256 sum of the Maven distribution zip file
$distributionSha256Sum = (Get-Content -Raw "$scriptDir/.mvn/wrapper/maven-wrapper.properties" | ConvertFrom-StringData).distributionSha256Sum
if ($distributionSha256Sum) {
if ($USE_MVND) {
Write-Error "Checksum validation is not supported for maven-mvnd. `nPlease disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties."
}
Import-Module $PSHOME\Modules\Microsoft.PowerShell.Utility -Function Get-FileHash
if ((Get-FileHash "$TMP_DOWNLOAD_DIR/$distributionUrlName" -Algorithm SHA256).Hash.ToLower() -ne $distributionSha256Sum) {
Write-Error "Error: Failed to validate Maven distribution SHA-256, your Maven distribution might be compromised. If you updated your Maven version, you need to update the specified distributionSha256Sum property."
}
}
# unzip and move
Expand-Archive "$TMP_DOWNLOAD_DIR/$distributionUrlName" -DestinationPath "$TMP_DOWNLOAD_DIR" | Out-Null
# Find the actual extracted directory name (handles snapshots where filename != directory name)
$actualDistributionDir = ""
# First try the expected directory name (for regular distributions)
$expectedPath = Join-Path "$TMP_DOWNLOAD_DIR" "$distributionUrlNameMain"
$expectedMvnPath = Join-Path "$expectedPath" "bin/$MVN_CMD"
if ((Test-Path -Path $expectedPath -PathType Container) -and (Test-Path -Path $expectedMvnPath -PathType Leaf)) {
$actualDistributionDir = $distributionUrlNameMain
}
# If not found, search for any directory with the Maven executable (for snapshots)
if (!$actualDistributionDir) {
Get-ChildItem -Path "$TMP_DOWNLOAD_DIR" -Directory | ForEach-Object {
$testPath = Join-Path $_.FullName "bin/$MVN_CMD"
if (Test-Path -Path $testPath -PathType Leaf) {
$actualDistributionDir = $_.Name
}
}
}
if (!$actualDistributionDir) {
Write-Error "Could not find Maven distribution directory in extracted archive"
}
Write-Verbose "Found extracted Maven distribution directory: $actualDistributionDir"
Rename-Item -Path "$TMP_DOWNLOAD_DIR/$actualDistributionDir" -NewName $MAVEN_HOME_NAME | Out-Null
try {
Move-Item -Path "$TMP_DOWNLOAD_DIR/$MAVEN_HOME_NAME" -Destination $MAVEN_HOME_PARENT | Out-Null
} catch {
if (! (Test-Path -Path "$MAVEN_HOME" -PathType Container)) {
Write-Error "fail to move MAVEN_HOME"
}
} finally {
try { Remove-Item $TMP_DOWNLOAD_DIR -Recurse -Force | Out-Null }
catch { Write-Warning "Cannot remove $TMP_DOWNLOAD_DIR" }
}
Write-Output "MVN_CMD=$MAVEN_HOME/bin/$MVN_CMD"
-653
View File
@@ -1,653 +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>signal-build-artifacts</id>
<name>Signal Build Artifacts</name>
<url>https://build-artifacts.signal.org/libraries/maven</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>ossrh-snapshots</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
<modules>
<module>api-doc</module>
<module>integration-tests</module>
<module>service</module>
<module>websocket-resources</module>
</modules>
<properties>
<aws.sdk2.version>2.59.1</aws.sdk2.version>
<braintree.version>3.56.0</braintree.version>
<!-- Weird stuff happens with parameter annotation counts under Java 27 with versions of Byte Buddy older than
1.18.9, so we need to pull in a newer version than we'd get via Dropwizard -> Mockito -> Byte Buddy. We can drop
this when Dropwizard updates and pulls in a newer version of Byte Buddy. -->
<byte-buddy.version>1.18.17-jdk5</byte-buddy.version>
<commons-csv.version>1.14.1</commons-csv.version>
<commons-io.version>2.22.0</commons-io.version>
<dropwizard.version>5.0.2</dropwizard.version>
<!-- Note: We use x86_64 builds without AVX instructions enabled (i.e. FoundationDB versions with even-numbered
patch versions). -->
<foundationdb.version>7.3.76</foundationdb.version>
<foundationdb.api-version>730</foundationdb.api-version>
<foundationdb.client-library-sha256>af099848721d08904ff9e5d38fade0de24d92e86451ea491d9ab5ce84adcf62a</foundationdb.client-library-sha256>
<google-cloud-libraries.version>26.93.0</google-cloud-libraries.version>
<grpc.version>1.76.3</grpc.version> <!-- should be kept in sync with the value from Google libraries-bom -->
<guava.version>33.8.0-jre</guava.version>
<!-- several libraries (AWS, Google Cloud) use Apache httpclient transitively, and we need to align them -->
<httpclient.version>4.5.14</httpclient.version>
<jackson.version>2.23.0</jackson.version>
<java-otp.version>1.0.0</java-otp.version>
<jetty.version>12.1.9</jetty.version>
<junit-pioneer.version>2.3.0</junit-pioneer.version>
<jsr305.version>3.0.2</jsr305.version>
<kotlin.version>2.4.21</kotlin.version>
<!-- dropwizard references a constant removed in 1.6. See also: dependabot.yml -->
<logback.version>1.5.38</logback.version>
<logback-access-common.version>2.0.15</logback-access-common.version>
<lettuce.version>7.9.0.RELEASE</lettuce.version>
<libphonenumber.version>9.0.43</libphonenumber.version>
<log4j-bom.version>2.26.1</log4j-bom.version>
<luajava.version>4.1.0</luajava.version>
<micrometer.version>1.17.2</micrometer.version>
<netty.version>4.2.20.Final</netty.version>
<!-- netty-bom doesn't manage the BoringSSL uber-jar; keep in sync with netty's tcnative.version -->
<netty-tcnative.version>2.0.85.Final</netty-tcnative.version>
<!-- Instrumentation releases target upstream opentelemetry versions and include that BOM by reference -->
<opentelemetry-instrumentation.version>2.33.1</opentelemetry-instrumentation.version>
<!-- must be greater than or equal to the value from Google libraries-bom, see https://protobuf.dev/support/cross-version-runtime-guarantee/ -->
<!-- the latest 4.x should be fine https://central.sonatype.com/artifact/com.google.protobuf/protobuf-java/versions -->
<protobuf.version>4.36.2</protobuf.version>
<pushy.version>0.15.6</pushy.version>
<reactor-bom.version>2025.0.8</reactor-bom.version> <!-- 3.8.4, see https://github.com/reactor/reactor#bom-versioning-scheme -->
<resilience4j.version>2.4.0</resilience4j.version>
<semver4j.version>3.1.0</semver4j.version>
<simple-grpc.version>0.3.0</simple-grpc.version>
<slf4j.version>2.0.20</slf4j.version>
<stripe.version>34.1.0</stripe.version>
<swagger.version>2.2.55</swagger.version>
<testcontainers.version>2.0.5</testcontainers.version>
<webauthn4j.version>0.32.0.RELEASE</webauthn4j.version>
<!-- Images to use in tests via testcontainers. See also: prepull-testcontainers-images <profile> -->
<dynamodb.image>amazon/dynamodb-local:3.3.1@sha256:ff89bd48ff32cd8d9be5fee8873b65b8854dc408f1afe881be6eb00247bc0dab</dynamodb.image>
<localstack.image>localstack/localstack:4.14@sha256:3ebc37595918b8accb852f8048fef2aff047d465167edd655528065b07bc364a</localstack.image>
<redis.image>redis:7.4-alpine@sha256:6ab0b6e7381779332f97b8ca76193e45b0756f38d4c0dcda72dbb3c32061ab99</redis.image>
<redis-cluster.image>docker.io/bitnamilegacy/redis-cluster:7.4.3@sha256:a53d023fdfaf8a8d7ddc58da040d3494e4cb45772644618ffa44c42dcd32b9af</redis-cluster.image>
<docker.image>eclipse-temurin:27-jre-resolute@sha256:16a0cae9bfb17ab4257ac64e3d7585fc49233e7bdf3d376c4545289eaf193929</docker.image>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<groupId>org.whispersystems.textsecure</groupId>
<artifactId>TextSecureServer</artifactId>
<version>JGITVER</version>
<dependencyManagement>
<!-- note: order matters, and earlier declarations take precedence -->
<dependencies>
<!-- use a pinned version of jackson, rather than Dropwizard's BOM -->
<dependency>
<groupId>com.fasterxml.jackson</groupId>
<artifactId>jackson-bom</artifactId>
<version>${jackson.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<!-- use a pinned version of jetty, rather than Dropwizard's BOM -->
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-bom</artifactId>
<version>${jetty.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<!-- use a pinned version of jetty, rather than Dropwizard's BOM -->
<dependency>
<groupId>org.eclipse.jetty.ee10</groupId>
<artifactId>jetty-ee10-bom</artifactId>
<version>${jetty.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>io.netty</groupId>
<artifactId>netty-tcnative-boringssl-static</artifactId>
<version>${netty-tcnative.version}</version>
</dependency>
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-bom</artifactId>
<type>pom</type>
<scope>import</scope>
<version>${protobuf.version}</version>
</dependency>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>libraries-bom</artifactId>
<version>${google-cloud-libraries.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.dropwizard</groupId>
<artifactId>dropwizard-dependencies</artifactId>
<version>${dropwizard.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy</artifactId>
<version>${byte-buddy.version}</version>
</dependency>
<dependency>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy-agent</artifactId>
<version>${byte-buddy.version}</version>
</dependency>
<!-- Needed for gRPC with Java 9+ -->
<dependency>
<groupId>org.apache.tomcat</groupId>
<artifactId>annotations-api</artifactId>
<version>6.0.53</version>
<scope>provided</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>io.opentelemetry.instrumentation</groupId>
<artifactId>opentelemetry-instrumentation-bom</artifactId>
<version>${opentelemetry-instrumentation.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>io.projectreactor</groupId>
<artifactId>reactor-bom</artifactId>
<version>${reactor-bom.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-bom</artifactId>
<version>${kotlin.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>com.eatthepath</groupId>
<artifactId>java-otp</artifactId>
<version>${java-otp.version}</version>
</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.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-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>org.apache.commons</groupId>
<artifactId>commons-csv</artifactId>
<version>${commons-csv.version}</version>
</dependency>
<dependency>
<groupId>org.foundationdb</groupId>
<artifactId>fdb-java</artifactId>
<version>${foundationdb.version}</version>
</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>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.4.0</version>
</dependency>
<dependency>
<groupId>com.stripe</groupId>
<artifactId>stripe-java</artifactId>
<version>${stripe.version}</version>
</dependency>
<dependency>
<groupId>com.braintreepayments.gateway</groupId>
<artifactId>braintree-java</artifactId>
<version>${braintree.version}</version>
</dependency>
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
<version>${jsr305.version}</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>${guava.version}</version>
</dependency>
<dependency>
<groupId>com.redis</groupId>
<artifactId>testcontainers-redis</artifactId>
<version>3.0.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.signal</groupId>
<artifactId>libsignal-server</artifactId>
<version>0.108.0</version>
</dependency>
<dependency>
<groupId>org.signal</groupId>
<artifactId>simple-grpc-runtime</artifactId>
<version>${simple-grpc.version}</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-bom</artifactId>
<version>${log4j-bom.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>${httpclient.version}</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-core</artifactId>
<version>${logback.version}</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>${logback.version}</version>
</dependency>
<dependency>
<groupId>ch.qos.logback.access</groupId>
<artifactId>logback-access-common</artifactId>
<version>${logback-access-common.version}</version>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>testcontainers-bom</artifactId>
<version>${testcontainers.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>earth.adi</groupId>
<artifactId>testcontainers-foundationdb</artifactId>
<version>1.1.0</version>
<scope>test</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-all</artifactId>
<version>1.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>aws-crt-client</artifactId>
</dependency>
<dependency>
<groupId>org.wiremock</groupId>
<artifactId>wiremock-jetty12</artifactId>
<version>3.13.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit-pioneer</groupId>
<artifactId>junit-pioneer</artifactId>
<version>${junit-pioneer.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
<profiles>
<profile>
<id>include-spam-filter</id>
<activation>
<file>
<exists>spam-filter/pom.xml</exists>
</file>
</activation>
<modules>
<module>spam-filter</module>
</modules>
</profile>
<profile>
<id>exclude-spam-filter</id>
<activation>
<file>
<missing>spam-filter/pom.xml</missing>
</file>
</activation>
</profile>
<profile>
<!-- Starts pulling Testcontainers images in the background, reducing test blocks. This is primarily useful in CI,
where images are less likely to be cached.-->
<id>prepull-testcontainers-images</id>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<!-- Run once for the whole reactor, rather than once per module -->
<inherited>false</inherited>
<executions>
<execution>
<id>prepull-testcontainers-images</id>
<phase>initialize</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>sh</executable>
<arguments>
<argument>-c</argument>
<!-- Images are pulled one at a time to limit contention with the build. If any fails, then exit status
is non-zero, so failure is logged. -->
<argument>status=0; for image in "$@"; do docker pull -q "$image" || status=1; done; exit $status</argument>
<argument>sh</argument>
<argument>${redis-cluster.image}</argument>
<argument>${redis.image}</argument>
<argument>${dynamodb.image}</argument>
<argument>${localstack.image}</argument>
</arguments>
<async>true</async>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<build>
<extensions>
<extension>
<groupId>kr.motd.maven</groupId>
<artifactId>os-maven-plugin</artifactId>
<version>1.7.1</version>
</extension>
</extensions>
<pluginManagement>
<plugins>
<plugin>
<groupId>com.google.cloud.tools</groupId>
<artifactId>jib-maven-plugin</artifactId>
<version>3.5.2</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.6.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>3.6.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.5.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.6.2</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.8.0</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>3.7.0</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>properties-maven-plugin</artifactId>
<version>1.4.0</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.xolstice.maven.plugins</groupId>
<artifactId>protobuf-maven-plugin</artifactId>
<version>0.6.1</version>
<configuration>
<checkStaleness>false</checkStaleness>
<protocArtifact>com.google.protobuf:protoc:${protobuf.version}:exe:${os.detected.classifier}</protocArtifact>
<pluginId>grpc-java</pluginId>
<pluginArtifact>io.grpc:protoc-gen-grpc-java:${grpc.version}:exe:${os.detected.classifier}</pluginArtifact>
<protocPlugins>
<protocPlugin>
<id>simple</id>
<groupId>org.signal</groupId>
<artifactId>simple-grpc-generator</artifactId>
<version>${simple-grpc.version}</version>
<mainClass>org.signal.grpc.simple.SimpleGrpcGenerator</mainClass>
</protocPlugin>
</protocPlugins>
</configuration>
<executions>
<execution>
<goals>
<goal>compile</goal>
<goal>compile-custom</goal>
<goal>test-compile</goal>
<goal>test-compile-custom</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.16.0</version>
<configuration>
<release>27</release>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.5.1</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.11.0</version>
<executions>
<execution>
<!--
Set dependencies as properties for use in argLine property for mockito jar.
The property isn't needed until the test phase, and deferring it from the default
`initialize` addresses issues running lifecycle phases that precede `test` in isolation.
-->
<phase>process-test-classes</phase>
<goals>
<goal>properties</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.7.0</version>
<executions>
<execution>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<dependencyConvergence/>
<requireMavenVersion>
<version>3.9.11</version>
</requireMavenVersion>
</rules>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<version>3.2.0</version>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>3.2.0</version>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>
</project>
-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>
-106
View File
@@ -1,106 +0,0 @@
stripe.apiKey: unset
stripe.idempotencyKeyGenerator: abcdefg12345678= # base64 for creating request idempotency hash
braintree.publicKey: unset
braintree.privateKey: unset
appleAppStore.encodedKey: unset
directoryV2.client.userAuthenticationTokenSharedSecret: abcdefghijklmnopqrstuvwxyz0123456789ABCDEFG= # base64-encoded secret shared with CDS to generate auth tokens for Signal users
directoryV2.client.userIdTokenSharedSecret: bbcdefghijklmnopqrstuvwxyz0123456789ABCDEFG= # base64-encoded secret shared with CDS to generate auth identity tokens for Signal users
svr2.userAuthenticationTokenSharedSecret: abcdefghijklmnopqrstuvwxyz0123456789ABCDEFG= # base64-encoded secret shared with SVR2 to generate auth tokens for Signal users
svr2.userIdTokenSharedSecret: bbcdefghijklmnopqrstuvwxyz0123456789ABCDEFG= # base64-encoded secret shared with SVR2 to generate auth identity tokens for Signal users
svrb.userAuthenticationTokenSharedSecret: abcdefghijklmnopqrstuvwxyz0123456789ABCDEFG= # base64-encoded secret shared with SVRB to generate auth tokens for Signal users
svrb.userIdTokenSharedSecret: bbcdefghijklmnopqrstuvwxyz0123456789ABCDEFG= # base64-encoded secret shared with SVRB to generate auth identity tokens for Signal users
tus.userAuthenticationTokenSharedSecret: abcdefghijklmnopqrstuvwxyz0123456789ABCDEFG=
gcpAttachments.rsaSigningKey: |
-----BEGIN PRIVATE KEY-----
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
AAAAAAAA
-----END PRIVATE KEY-----
apn.teamId: team-id
apn.keyId: key-id
apn.signingKey: |
-----BEGIN PRIVATE KEY-----
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
AAAAAAAA
-----END PRIVATE KEY-----
fcm.credentials: |
{ "json": true }
cdn.accessKey: test # AWS Access Key ID
cdn.accessSecret: test # AWS Access Secret
cdn3StorageManager.clientSecret: test
unidentifiedDelivery.privateKey: ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789AAAAAAA
keyTransparencyService.clientPrivateKey: |
-----BEGIN PRIVATE KEY-----
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
AAAAAAAA
-----END PRIVATE KEY-----
storageService.userAuthenticationTokenSharedSecret: AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
zkConfig-libsignal-0.42.serverSecret: ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdef
callingZkConfigPreV101.serverSecret: ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzAA==
callingZkConfigV101.serverSecret: ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzAA==
chatZkConfig.serverSecret: ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzAA==
paymentsService.userAuthenticationTokenSharedSecret: AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= # base64-encoded 32-byte secret shared with MobileCoin services used to generate auth tokens for Signal users
paymentsService.fixerApiKey: unset
paymentsService.coinGeckoApiKey: unset
currentReportingKey.secret: AAAAAAAAAAA=
currentReportingKey.salt: AAAAAAAAAAA=
registrationService.collationKeySalt: AAAAAAAAAAA=
turn.cloudflare.apiToken: ABCDEFGHIJKLM
linkDevice.secret: AAAAAAAAAAA=
tlsKeyStore.password: unset
hlrLookup.apiKey: AAAAAAAAAAA
hlrLookup.apiSecret: AAAAAAAAAAA
foundationDbMessages.versionstampCipherKey.0: AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
registrationWebAuthn.userHandleBlindingSecret: AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
-577
View File
@@ -1,577 +0,0 @@
# Example, relatively minimal, configuration that passes validation (see `io.dropwizard.cli.CheckCommand`)
#
# `unset` values will need to be set to work properly.
# Most other values are technically valid for a local/demonstration environment, but are probably not production-ready.
logging:
level: INFO
appenders:
- type: console
threshold: ALL
timeZone: UTC
target: stdout
- type: otlp
tlsKeyStore:
password: secret://tlsKeyStore.password
stripe:
apiKey: secret://stripe.apiKey
idempotencyKeyGenerator: secret://stripe.idempotencyKeyGenerator
boostDescription: >
Example
supportedCurrenciesByPaymentMethod:
CARD:
- usd
- eur
SEPA_DEBIT:
- eur
braintree:
merchantId: unset
publicKey: secret://braintree.publicKey
privateKey: secret://braintree.privateKey
environment: unset
graphqlUrl: unset
merchantAccounts:
# ISO 4217 currency code and its corresponding sub-merchant account
'xts': unset
supportedCurrenciesByPaymentMethod:
PAYPAL:
- usd
pubSubPublisher:
project: example-project
topic: example-topic
credentialConfiguration: |
{
"credential": "configuration"
}
googlePlayBilling:
credentialsJson: |
{
"credential": "configuration"
}
packageName: package.name
applicationName: test
productIdToLevel: {}
appleAppStore:
env: SANDBOX
bundleId: bundle.name
appAppleId: 12345
issuerId: abcdefg
keyId: abcdefg
encodedKey: secret://appleAppStore.encodedKey
subscriptionGroupId: example_subscriptionGroupId
productIdToLevel: {}
appleRootCerts: []
appleDeviceCheck:
production: false
teamId: 0123456789
bundleId: bundle.name
deviceCheck:
backupRedemptionDuration: P30D
dynamoDbClient:
region: us-west-2 # AWS Region
dynamoDbTables:
accounts:
tableName: Example_Accounts
phoneNumberTableName: Example_Accounts_PhoneNumbers
phoneNumberIdentifierTableName: Example_Accounts_PhoneNumberIdentifiers
usernamesTableName: Example_Accounts_Usernames
usedLinkDeviceTokensTableName: Example_Accounts_UsedLinkDeviceTokens
appleDeviceChecks:
tableName: Example_AppleDeviceChecks
appleDeviceCheckPublicKeys:
tableName: Example_AppleDeviceCheckPublicKeys
backups:
tableName: Example_Backups
changeNumberWaitingPeriods:
tableName: Example_ChangeNumberWaitingPeriods
clientReleases:
tableName: Example_ClientReleases
deletedAccounts:
tableName: Example_DeletedAccounts
deletedAccountsLock:
tableName: Example_DeletedAccountsLock
donationPermits:
tableName: Example_DonationPermits
expiration: P7D # Duration of time until rows expire
issuedReceipts:
tableName: Example_IssuedReceipts
generator: abcdefg12345678= # random base64-encoded binary sequence
maxReceiptsPerSubscriptionPayment:
STRIPE: 1
BRAINTREE: 1
GOOGLE_PLAY_BILLING: 1
APPLE_APP_STORE: 1
ecKeys:
tableName: Example_Keys
ecSignedPreKeys:
tableName: Example_EC_Signed_Pre_Keys
pagedPqKeys:
tableName: Example_PQ_Paged_Keys
pqLastResortKeys:
tableName: Example_PQ_Last_Resort_Keys
messages:
tableName: Example_Messages
expiration: P30D # Duration of time until rows expire
onetimeDonations:
tableName: Example_OnetimeDonations
expiration: P90D
phoneNumberIdentifiers:
tableName: Example_PhoneNumberIdentifiers
profileAvatars:
tableName: Example_ProfileAvatars
profiles:
tableName: Example_Profiles
profilesV2:
tableName: Example_ProfilesV2
pushChallenge:
tableName: Example_PushChallenge
redeemedReceipts:
tableName: Example_RedeemedReceipts
registrationRecovery:
tableName: Example_RegistrationRecovery
expiration: P300D # Duration of time until rows expire
remoteConfig:
tableName: Example_RemoteConfig
reportMessage:
tableName: Example_ReportMessage
sandboxAccounts:
tableName: Example_SandboxAccounts
scheduledJobs:
tableName: Example_ScheduledJobs
expiration: P7D
subscriptions:
tableName: Example_Subscriptions
verificationSessions:
tableName: Example_VerificationSessions
pagedSingleUseKEMPreKeyStore:
bucket: preKeyBucket # S3 Bucket name
region: us-west-2 # AWS region
cacheCluster: # Redis server configuration for cache cluster
configurationUri: redis://redis.example.com:6379/
pubsub: # Redis server configuration for pubsub cluster
uri: redis://redis.example.com:6379/
pushSchedulerCluster: # Redis server configuration for push scheduler cluster
configurationUri: redis://redis.example.com:6379/
rateLimitersCluster: # Redis server configuration for rate limiters cluster
configurationUri: redis://redis.example.com:6379/
directoryV2:
client: # Configuration for interfacing with Contact Discovery Service v2 cluster
userAuthenticationTokenSharedSecret: secret://directoryV2.client.userAuthenticationTokenSharedSecret
userIdTokenSharedSecret: secret://directoryV2.client.userIdTokenSharedSecret
svr2:
uri: svr2.example.com
userAuthenticationTokenSharedSecret: secret://svr2.userAuthenticationTokenSharedSecret
userIdTokenSharedSecret: secret://svr2.userIdTokenSharedSecret
svrCaCertificates:
- |
-----BEGIN CERTIFICATE-----
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
AAAAAAAAAAAAAAAAAAAA
-----END CERTIFICATE-----
svrb:
uri: svrb.example.com
userAuthenticationTokenSharedSecret: secret://svrb.userAuthenticationTokenSharedSecret
userIdTokenSharedSecret: secret://svrb.userIdTokenSharedSecret
svrCaCertificates:
- |
-----BEGIN CERTIFICATE-----
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
AAAAAAAAAAAAAAAAAAAA
-----END CERTIFICATE-----
attachments:
maxAttachmentUploadSizeInBytes: 1024
maxMessageBackupUploadSizeInBytes: 1024
gcpAttachments: # GCP Storage configuration
domain: example.com
email: user@example.cocm
pathPrefix:
rsaSigningKey: secret://gcpAttachments.rsaSigningKey
tus:
uploadUri: https://example.org/upload
userAuthenticationTokenSharedSecret: secret://tus.userAuthenticationTokenSharedSecret
apn: # Apple Push Notifications configuration
sandbox: true
bundleId: com.example.textsecuregcm
keyId: secret://apn.keyId
teamId: secret://apn.teamId
signingKey: secret://apn.signingKey
fcm: # FCM configuration
credentials: secret://fcm.credentials
cdn:
baseUrl: https://cdn.example.com # Public base URL for objects in the bucket
bucket: cdn # S3 Bucket name
credentials:
accessKeyId: secret://cdn.accessKey
secretAccessKey: secret://cdn.accessSecret
region: us-west-2 # AWS region
cdn3StorageManager:
baseUri: https://storage-manager.example.com
clientId: example
clientSecret: secret://cdn3StorageManager.clientSecret
sourceSchemes:
2: gcs
3: r2
openTelemetry:
enabled: true
environment: dev
url: http://127.0.0.1:4318/
unidentifiedDelivery:
certificate: CgIIAQ==
privateKey: secret://unidentifiedDelivery.privateKey
expiresDays: 7
embedSigner: true
shortCode:
baseUrl: https://example.com/shortcodes/
storageService:
uri: storage.example.com
userAuthenticationTokenSharedSecret: secret://storageService.userAuthenticationTokenSharedSecret
storageCaCertificates:
- |
-----BEGIN CERTIFICATE-----
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
AAAAAAAAAAAAAAAAAAAA
-----END CERTIFICATE-----
callingZkConfigPreV101:
serverSecret: secret://callingZkConfigPreV101.serverSecret
callingZkConfig:
serverSecret: secret://callingZkConfigV101.serverSecret
chatZkConfig:
serverSecret: secret://chatZkConfig.serverSecret
groupsZkConfig:
serverPublic: ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyzAB==
serverSecret: secret://zkConfig-libsignal-0.42.serverSecret
dynamicConfig:
s3Region: a-region
s3Bucket: a-bucket
objectKey: dynamic-config.yaml
maxSize: 100000
refreshInterval: PT10S
remoteConfig:
globalConfig: # keys and values that are given to clients on GET /v1/config
EXAMPLE_KEY: VALUE
paymentsService:
userAuthenticationTokenSharedSecret: secret://paymentsService.userAuthenticationTokenSharedSecret
paymentCurrencies:
# list of symbols for supported currencies
- MOB
externalClients:
fixerApiKey: secret://paymentsService.fixerApiKey
coinGeckoApiKey: secret://paymentsService.coinGeckoApiKey
coinGeckoCurrencyIds:
MOB: mobilecoin
badges:
badges:
- id: TEST
category: other
sprites: # exactly 6
- sprite-1.png
- sprite-2.png
- sprite-3.png
- sprite-4.png
- sprite-5.png
- sprite-6.png
svg: example.svg
svgs:
- light: example-light.svg
dark: example-dark.svg
receiptLevels:
ONE_TIME_DONATION: TEST
subscription: # configuration for Stripe subscriptions
badgeExpiration: P30D
badgeGracePeriod: P15D
backupExpiration: P30D
backupGracePeriod: P15D
backupFreeTierMediaDuration: P30D
levels:
500:
badge: EXAMPLE
prices:
# list of ISO 4217 currency codes and amounts for the given badge level
xts:
amount: '10'
processorIds:
STRIPE: price_example # stripe Price ID
BRAINTREE: plan_example # braintree Plan ID
loginPurchase:
playProductId: login_example
playOptionId: login_option_example
appStoreProductId: login_example
oneTimeDonations:
sepaMaximumEuros: '10000'
boost:
expiration: P90D
badge: EXAMPLE
gift:
expiration: P90D
badge: EXAMPLE
currencies:
# ISO 4217 currency codes and amounts in those currencies
xts:
minimum: '0.5'
gift: '2'
boosts:
- '1'
- '2'
- '4'
- '8'
- '20'
- '40'
registrationService:
host: registration.example.com
port: 443
credentialConfigurationJson: |
{
"example": "example"
}
identityTokenAudience: https://registration.example.com
collationKeySalt: secret://registrationService.collationKeySalt
registrationCaCertificate: | # Registration service TLS certificate trust root
-----BEGIN CERTIFICATE-----
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
AAAAAAAAAAAAAAAAAAAA
-----END CERTIFICATE-----
keyTransparencyService:
host: kt.example.com
port: 443
tlsCertificate: |
-----BEGIN CERTIFICATE-----
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
AAAAAAAAAAAAAAAAAAAA
-----END CERTIFICATE-----
clientCertificate: |
-----BEGIN CERTIFICATE-----
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ/0123456789+abcdefghijklmnopqrstuvwxyz
AAAAAAAAAAAAAAAAAAAA
-----END CERTIFICATE-----
clientPrivateKey: secret://keyTransparencyService.clientPrivateKey
turn:
cloudflare:
apiToken: secret://turn.cloudflare.apiToken
endpoint: https://rtc.live.cloudflare.com/v1/turn/keys/LMNOP/credentials/generate
urls:
- turn:turn.example.com:80
urlsWithIps:
- turn:%s
- turn:%s:80?transport=tcp
- turns:%s:443?transport=tcp
requestedCredentialTtl: PT24H
clientCredentialTtl: PT12H
hostname: turn.cloudflare.example.com
numHttpClients: 1
linkDevice:
secret: secret://linkDevice.secret
externalRequestFilter:
grpcMethods:
- com.example.grpc.ExampleService/exampleMethod
paths:
- /example
permittedInternalRanges:
- 127.0.0.0/8
idlePrimaryDeviceReminder:
minIdleDuration: P30D
grpc:
port: 50051
websocketPort: 8080
asnTable:
s3Region: a-region
s3Bucket: a-bucket
objectKey: asn.tsv
maxSize: 100000
refreshInterval: PT10S
callQualitySurvey:
pubSubPublisher:
project: example-project
topic: example-topic
credentialConfiguration: |
{
"credential": "configuration"
}
hlrLookup:
apiKey: secret://hlrLookup.apiKey
apiSecret: secret://hlrLookup.apiSecret
foundationDbMessages:
maxWatchesPerClient: 10000
transactionTimeout: PT1S
transactionRetryLimit: 3
batchPriorityTransactionTimeout: PT5S
batchPriorityTransactionRetryLimit: 10
versionstampCipherKeys:
0: secret://foundationDbMessages.versionstampCipherKey.0
currentVersionstampCipherKey: 0
clusters:
"messages-0":
clusterFileUrl: http://clusterfiles.example.com/messages-0
"messages-1":
clusterFileUrl: http://clusterfiles.example.com/messages-1
"messages-2":
clusterFileUrl: http://clusterfiles.example.com/messages-2
"messages-3":
clusterFileUrl: http://clusterfiles.example.com/messages-3
epochs:
0:
- messages-0
- messages-1
1:
- messages-0
- messages-1
- messages-2
- messages-3
registrationWebAuthn:
relyingPartyId: example.org
origins:
- https://example.org
challengeTtl: PT2M
userHandleBlindingSecret: secret://registrationWebAuthn.userHandleBlindingSecret
-946
View File
@@ -1,946 +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>
<properties>
<apollo-api-jvm.version>3.8.6</apollo-api-jvm.version>
<commons-compress.version>1.28.0</commons-compress.version>
<dynamodb-lock-client.version>1.5.0</dynamodb-lock-client.version>
<firebase-admin.version>9.12.0</firebase-admin.version>
<libphonenumber-geocoder.version>3.43</libphonenumber-geocoder.version>
<google-androidpublisher.version>v3-rev20250904-2.0.0</google-androidpublisher.version>
<java-jwt.version>4.6.2</java-jwt.version>
<java-uuid-generator.version>5.2.0</java-uuid-generator.version>
<!-- *all* opentelemetry-logback-appender versions are "alpha" despite the advanced version number -->
<opentelemetry-logback-appender-1.0.version>${opentelemetry-instrumentation.version}-alpha</opentelemetry-logback-appender-1.0.version>
<storekit.version>5.2.0</storekit.version>
</properties>
<dependencies>
<dependency>
<groupId>com.auth0</groupId>
<artifactId>java-jwt</artifactId>
<version>${java-jwt.version}</version>
</dependency>
<dependency>
<groupId>com.google.apis</groupId>
<artifactId>google-api-services-androidpublisher</artifactId>
<version>${google-androidpublisher.version}</version>
</dependency>
<dependency>
<groupId>com.apple.itunes.storekit</groupId>
<artifactId>app-store-server-library</artifactId>
<version>${storekit.version}</version>
<exclusions>
<!-- conflicts with other users; resolved manually with explicit import -->
<exclusion>
<groupId>com.squareup.okio</groupId>
<artifactId>okio-jvm</artifactId>
</exclusion>
<!-- conflicts with our direct dependency -->
<exclusion>
<groupId>com.auth0</groupId>
<artifactId>java-jwt</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.webauthn4j</groupId>
<artifactId>webauthn4j-appattest</artifactId>
<version>${webauthn4j.version}</version>
</dependency>
<dependency>
<groupId>com.webauthn4j</groupId>
<artifactId>webauthn4j-core</artifactId>
<version>${webauthn4j.version}</version>
</dependency>
<dependency>
<groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-jaxrs2-jakarta</artifactId>
<version>${swagger.version}</version>
<exclusions>
<!-- conflicts with jackson-dataformat-yaml -->
<exclusion>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
</exclusion>
</exclusions>
</dependency>
<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>websocket-resources</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.signal</groupId>
<artifactId>libsignal-server</artifactId>
</dependency>
<dependency>
<groupId>org.signal</groupId>
<artifactId>simple-grpc-runtime</artifactId>
</dependency>
<dependency>
<groupId>io.dropwizard</groupId>
<artifactId>dropwizard-core</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-http2</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>org.eclipse.jetty.http2</groupId>
<artifactId>jetty-http2-client-transport</artifactId>
<scope>test</scope>
</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.access</groupId>
<artifactId>logback-access-common</artifactId>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
</dependency>
<dependency>
<groupId>io.dropwizard.metrics</groupId>
<artifactId>metrics-core</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>io.dropwizard</groupId>
<artifactId>dropwizard-testing</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.opentelemetry</groupId>
<artifactId>opentelemetry-sdk</artifactId>
</dependency>
<dependency>
<groupId>io.opentelemetry</groupId>
<artifactId>opentelemetry-exporter-otlp</artifactId>
</dependency>
<dependency>
<groupId>io.opentelemetry.instrumentation</groupId>
<artifactId>opentelemetry-logback-appender-1.0</artifactId>
<version>${opentelemetry-logback-appender-1.0.version}</version>
<exclusions>
<!-- conflicts with google-cloud-firestore; incubator packages aren't included in the opentelemetry BOM, and we don't use them -->
<exclusion>
<groupId>io.opentelemetry.instrumentation</groupId>
<artifactId>opentelemetry-instrumentation-api-incubator</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>party.iroiro.luajava</groupId>
<artifactId>luajava</artifactId>
<version>${luajava.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>party.iroiro.luajava</groupId>
<artifactId>lua51</artifactId>
<version>${luajava.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>party.iroiro.luajava</groupId>
<artifactId>lua51-platform</artifactId>
<version>${luajava.version}</version>
<classifier>natives-desktop</classifier>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.websocket</groupId>
<artifactId>jetty-websocket-jetty-api</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.ee10</groupId>
<artifactId>jetty-ee10-servlets</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.websocket</groupId>
<artifactId>jetty-websocket-jetty-client</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-csv</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-compress</artifactId>
<version>${commons-compress.version}</version>
</dependency>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-pubsub</artifactId>
</dependency>
<dependency>
<groupId>com.google.firebase</groupId>
<artifactId>firebase-admin</artifactId>
<version>${firebase-admin.version}</version>
<exclusions>
<exclusion>
<!-- google-cloud-storage pins 4.2.2, but jackson-dataformat-xml 2.22.x wants 4.3.0 -->
<groupId>org.codehaus.woodstox</groupId>
<artifactId>stax2-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<!-- jackson-dataformat-xml (via firebase-admin), wants >= 4.3.0 -->
<groupId>org.codehaus.woodstox</groupId>
<artifactId>stax2-api</artifactId>
<version>4.3.2</version>
</dependency>
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
</dependency>
<dependency>
<groupId>io.github.resilience4j</groupId>
<artifactId>resilience4j-bulkhead</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.github.resilience4j</groupId>
<artifactId>resilience4j-reactor</artifactId>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-netty</artifactId>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-protobuf</artifactId>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-stub</artifactId>
</dependency>
<!-- Needed for gRPC with Java 9+ -->
<dependency>
<groupId>org.apache.tomcat</groupId>
<artifactId>annotations-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-core</artifactId>
</dependency>
<dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-registry-otlp</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>org.foundationdb</groupId>
<artifactId>fdb-java</artifactId>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>apache-client</artifactId>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>netty-nio-client</artifactId>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>sts</artifactId>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>s3</artifactId>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>dynamodb</artifactId>
</dependency>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>dynamodb-lock-client</artifactId>
<version>${dynamodb-lock-client.version}</version>
</dependency>
<dependency>
<groupId>io.lettuce</groupId>
<artifactId>lettuce-core</artifactId>
</dependency>
<dependency>
<groupId>com.eatthepath</groupId>
<artifactId>java-otp</artifactId>
</dependency>
<dependency>
<groupId>com.eatthepath</groupId>
<artifactId>pushy</artifactId>
</dependency>
<dependency>
<groupId>com.eatthepath</groupId>
<artifactId>pushy-dropwizard-metrics-listener</artifactId>
</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>
<!-- Provides tools for mapping phone numbers to time zones, which is helpful for scheduling push notifications
during waking hours -->
<dependency>
<groupId>com.googlecode.libphonenumber</groupId>
<artifactId>geocoder</artifactId>
<version>${libphonenumber-geocoder.version}</version>
</dependency>
<dependency>
<groupId>net.sourceforge.argparse4j</groupId>
<artifactId>argparse4j</artifactId>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-buffer</artifactId>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-codec-haproxy</artifactId>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-codec-http2</artifactId>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-handler</artifactId>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-common</artifactId>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-resolver</artifactId>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-resolver-dns</artifactId>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-tcnative-boringssl-static</artifactId>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-transport</artifactId>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-transport-native-epoll</artifactId>
<classifier>linux-x86_64</classifier>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-pkitesting</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-testsuite-common</artifactId>
<scope>test</scope>
<version>${netty.version}</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.test-framework</groupId>
<artifactId>jersey-test-framework-core</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.test-framework.providers</groupId>
<artifactId>jersey-test-framework-provider-grizzly2</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.projectreactor</groupId>
<artifactId>reactor-core</artifactId>
</dependency>
<dependency>
<groupId>io.projectreactor</groupId>
<artifactId>reactor-core-micrometer</artifactId>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-params</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.projectreactor</groupId>
<artifactId>reactor-test</artifactId>
</dependency>
<dependency>
<groupId>com.redis</groupId>
<artifactId>testcontainers-redis</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.webauthn4j</groupId>
<artifactId>webauthn4j-test</artifactId>
<version>${webauthn4j.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.fasterxml.uuid</groupId>
<artifactId>java-uuid-generator</artifactId>
<version>${java-uuid-generator.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>testcontainers-localstack</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>testcontainers-junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>earth.adi</groupId>
<artifactId>testcontainers-foundationdb</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.auth</groupId>
<artifactId>google-auth-library-oauth2-http</artifactId>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk18on</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.stripe</groupId>
<artifactId>stripe-java</artifactId>
</dependency>
<dependency>
<groupId>com.braintreepayments.gateway</groupId>
<artifactId>braintree-java</artifactId>
</dependency>
<dependency>
<groupId>com.apollographql.apollo3</groupId>
<artifactId>apollo-api-jvm</artifactId>
<version>${apollo-api-jvm.version}</version>
<exclusions>
<!-- conflicts with kotlin-stdlib -->
<exclusion>
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
</exclusion>
<!-- conflicts with other users; resolved manually with explicit import -->
<exclusion>
<groupId>com.squareup.okio</groupId>
<artifactId>okio-jvm</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- to resolve conflicting imports from other dependencies -->
<dependency>
<groupId>com.squareup.okio</groupId>
<artifactId>okio-jvm</artifactId>
<!-- update dependabot.yml when this dependency is removed -->
<version>3.18.1</version>
</dependency>
</dependencies>
<profiles>
<profile>
<id>exclude-spam-filter</id>
<build>
<plugins>
<plugin>
<groupId>io.github.download-maven-plugin</groupId>
<artifactId>download-maven-plugin</artifactId>
<version>2.1.0</version>
<executions>
<execution>
<id>install-foundationdb-client-library</id>
<phase>prepare-package</phase>
<goals>
<goal>wget</goal>
</goals>
</execution>
</executions>
<configuration>
<url>https://github.com/apple/foundationdb/releases/download/${foundationdb.version}/libfdb_c.x86_64.so</url>
<outputDirectory>${project.build.directory}/jib-extra/usr/lib</outputDirectory>
<outputFileName>libfdb_c.so</outputFileName>
<sha256>${foundationdb.client-library-sha256}</sha256>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<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>
<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>
<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.google.cloud.tools</groupId>
<artifactId>jib-maven-plugin</artifactId>
<executions>
<execution>
<phase>deploy</phase>
<goals>
<goal>build</goal>
</goals>
</execution>
</executions>
<configuration>
<from>
<image>${docker.image}</image>
<platforms>
<platform>
<architecture>amd64</architecture>
<os>linux</os>
</platform>
<platform>
<architecture>arm64</architecture>
<os>linux</os>
</platform>
</platforms>
</from>
<to>
<image>${docker.repo}:${project.version}</image>
</to>
<container>
<mainClass>org.whispersystems.textsecuregcm.WhisperServerService</mainClass>
<jvmFlags>
<jvmFlag>-server</jvmFlag>
<jvmFlag>-Djava.awt.headless=true</jvmFlag>
<jvmFlag>-Djdk.nio.maxCachedBufferSize=262144</jvmFlag>
<jvmFlag>-Dlog4j2.formatMsgNoLookups=true</jvmFlag>
<jvmFlag>-Djdk.tls.server.newSessionTicketCount=0</jvmFlag>
<jvmFlag>-Djdk.tls.server.enableSessionTicketExtension=false</jvmFlag>
<jvmFlag>-XX:MaxRAMPercentage=75</jvmFlag>
<jvmFlag>-XX:+HeapDumpOnOutOfMemoryError</jvmFlag>
<jvmFlag>-XX:HeapDumpPath=/tmp/heapdump.bin</jvmFlag>
</jvmFlags>
<ports>
<port>8080</port>
</ports>
<creationTime>USE_CURRENT_TIMESTAMP</creationTime>
</container>
<extraDirectories>
<paths>
<path>
<from>${project.basedir}/config</from>
<includes>*.yml</includes>
<into>/usr/share/signal/</into>
</path>
<path>
<from>${project.build.directory}/jib-extra</from>
</path>
</paths>
</extraDirectories>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>include-spam-filter</id>
<build>
<plugins>
<plugin>
<groupId>com.google.cloud.tools</groupId>
<artifactId>jib-maven-plugin</artifactId>
<configuration>
<!-- we don't want jib to execute on this module -->
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>test-server</id>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<id>start-test-server</id>
<phase>integration-test</phase>
<goals>
<goal>java</goal>
</goals>
<configuration>
<mainClass>org.whispersystems.textsecuregcm.LocalWhisperServerService</mainClass>
<classpathScope>test</classpathScope>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<build>
<finalName>${project.parent.artifactId}-${project.version}</finalName>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>templating-maven-plugin</artifactId>
<version>3.2.0</version>
<executions>
<execution>
<id>filter-src</id>
<goals>
<goal>filter-sources</goal>
</goals>
</execution>
<execution>
<id>filter-test-src</id>
<goals>
<goal>filter-test-sources</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<!-- add-opens: work around PATCH not being a supported method on HttpUrlConnection -->
<argLine>-javaagent:${org.mockito:mockito-core:jar} --add-opens=java.base/java.net=ALL-UNNAMED</argLine>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>test-jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<id>check-all-service-config</id>
<phase>verify</phase>
<goals>
<goal>java</goal>
</goals>
<configuration>
<mainClass>org.whispersystems.textsecuregcm.CheckServiceConfigurations</mainClass>
<classpathScope>test</classpathScope>
<arguments>
<argument>${project.basedir}/config</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.github.aoudiamoncef</groupId>
<artifactId>apollo-client-maven-plugin</artifactId>
<version>7.1.0</version>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<services>
<braintree>
<compilationUnit>
<name>braintree</name>
<compilerParams>
<schemaPackageName>com.braintree.graphql.client</schemaPackageName>
<!-- override the default in 7.1.0, see https://github.com/aoudiamoncef/apollo-client-maven-plugin/issues/84 -->
<operationManifestFormat>none</operationManifestFormat>
</compilerParams>
</compilationUnit>
</braintree>
</services>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
@@ -1,9 +0,0 @@
# https://graphql.braintreepayments.com/reference/#Mutation--chargePaymentMethod
mutation ChargePayPalOneTimePayment($input: ChargePaymentMethodInput!) {
chargePaymentMethod(input: $input) {
transaction {
id,
status
}
}
}
@@ -1,6 +0,0 @@
mutation CreatePayPalBillingAgreement($input: CreatePayPalBillingAgreementInput!) {
createPayPalBillingAgreement(input: $input) {
approvalUrl,
billingAgreementToken
}
}
@@ -1,7 +0,0 @@
# https://graphql.braintreepayments.com/reference/#Mutation--createPayPalOneTimePayment
mutation CreatePayPalOneTimePayment($input: CreatePayPalOneTimePaymentInput!) {
createPayPalOneTimePayment(input: $input) {
approvalUrl,
paymentId
}
}
@@ -1,7 +0,0 @@
mutation TokenizePayPalBillingAgreement($input: TokenizePayPalBillingAgreementInput!) {
tokenizePayPalBillingAgreement(input: $input) {
paymentMethod {
id
}
}
}
@@ -1,8 +0,0 @@
# https://graphql.braintreepayments.com/reference/#Mutation--tokenizePayPalOneTimePayment
mutation TokenizePayPalOneTimePayment($input: TokenizePayPalOneTimePaymentInput!) {
tokenizePayPalOneTimePayment(input: $input) {
paymentMethod {
id
}
}
}
@@ -1,7 +0,0 @@
mutation VaultPaymentMethod($input: VaultPaymentMethodInput!) {
vaultPaymentMethod(input: $input) {
paymentMethod {
id
}
}
}
File diff suppressed because it is too large. Load diff
@@ -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,20 +0,0 @@
/*
* Copyright 2025 Signal Messenger, LLC
* SPDX-License-Identifier: AGPL-3.0-only
*/
package org.whispersystems.textsecuregcm.storage;
public class FoundationDbVersion {
private static final String VERSION = "${foundationdb.version}";
private static final int API_VERSION = ${foundationdb.api-version};
public static String getFoundationDbVersion() {
return VERSION;
}
public static int getFoundationDbApiVersion() {
return API_VERSION;
}
}
@@ -1,67 +0,0 @@
/*
* Copyright 2021 Signal Messenger, LLC
* SPDX-License-Identifier: AGPL-3.0-only
*/
package org.signal.i18n;
import com.google.common.annotations.VisibleForTesting;
import java.util.List;
import java.util.Locale;
import java.util.Objects;
import java.util.ResourceBundle;
import java.util.ResourceBundle.Control;
import java.util.stream.Collectors;
import javax.annotation.Nonnull;
public class HeaderControlledResourceBundleLookup {
private static final int MAX_LOCALES = 15;
private final ResourceBundleFactory resourceBundleFactory;
public HeaderControlledResourceBundleLookup() {
this(ResourceBundle::getBundle);
}
@VisibleForTesting
public HeaderControlledResourceBundleLookup(
@Nonnull final ResourceBundleFactory resourceBundleFactory) {
this.resourceBundleFactory = Objects.requireNonNull(resourceBundleFactory);
}
@Nonnull
private List<Locale> getAcceptableLocales(final List<Locale> acceptableLanguages) {
return acceptableLanguages.stream().limit(MAX_LOCALES).distinct().collect(Collectors.toList());
}
@Nonnull
public ResourceBundle getResourceBundle(final String baseName, final List<Locale> acceptableLocales) {
final List<Locale> deduplicatedLocales = getAcceptableLocales(acceptableLocales);
final Locale desiredLocale = deduplicatedLocales.isEmpty() ? Locale.getDefault() : deduplicatedLocales.get(0);
// define a control with a fallback order as specified in the header
Control control = new Control() {
@Override
public List<String> getFormats(final String baseName) {
Objects.requireNonNull(baseName);
return Control.FORMAT_PROPERTIES;
}
@Override
public Locale getFallbackLocale(final String baseName, final Locale locale) {
Objects.requireNonNull(baseName);
if (locale.equals(Locale.getDefault())) {
return null;
}
final int localeIndex = deduplicatedLocales.indexOf(locale);
if (localeIndex < 0 || localeIndex >= deduplicatedLocales.size() - 1) {
return Locale.getDefault();
}
// [0, deduplicatedLocales.size() - 2] is now the possible range for localeIndex
return deduplicatedLocales.get(localeIndex + 1);
}
};
return resourceBundleFactory.createBundle(baseName, desiredLocale, control);
}
}
@@ -1,13 +0,0 @@
/*
* Copyright 2021 Signal Messenger, LLC
* SPDX-License-Identifier: AGPL-3.0-only
*/
package org.signal.i18n;
import java.util.Locale;
import java.util.ResourceBundle;
public interface ResourceBundleFactory {
ResourceBundle createBundle(String baseName, Locale locale, ResourceBundle.Control control);
}
@@ -1,657 +0,0 @@
/*
* Copyright 2013 Signal Messenger, LLC
* SPDX-License-Identifier: AGPL-3.0-only
*/
package org.whispersystems.textsecuregcm;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.dropwizard.core.Configuration;
import jakarta.validation.Valid;
import jakarta.validation.constraints.NotNull;
import java.time.Duration;
import java.util.Collections;
import java.util.Map;
import org.whispersystems.textsecuregcm.attachments.TusConfiguration;
import org.whispersystems.textsecuregcm.configuration.ApnConfiguration;
import org.whispersystems.textsecuregcm.configuration.AppleAppStoreConfiguration;
import org.whispersystems.textsecuregcm.configuration.AppleDeviceCheckConfiguration;
import org.whispersystems.textsecuregcm.configuration.AttachmentsConfiguration;
import org.whispersystems.textsecuregcm.configuration.AwsCredentialsProviderFactory;
import org.whispersystems.textsecuregcm.configuration.BackupConfiguration;
import org.whispersystems.textsecuregcm.configuration.BadgesConfiguration;
import org.whispersystems.textsecuregcm.configuration.BraintreeConfiguration;
import org.whispersystems.textsecuregcm.configuration.BulkheadConfiguration;
import org.whispersystems.textsecuregcm.configuration.CallQualitySurveyConfiguration;
import org.whispersystems.textsecuregcm.configuration.Cdn3StorageManagerConfiguration;
import org.whispersystems.textsecuregcm.configuration.CdnConfiguration;
import org.whispersystems.textsecuregcm.configuration.ChangeNumberConfiguration;
import org.whispersystems.textsecuregcm.configuration.CircuitBreakerConfiguration;
import org.whispersystems.textsecuregcm.configuration.ClientReleaseConfiguration;
import org.whispersystems.textsecuregcm.configuration.DefaultAwsCredentialsFactory;
import org.whispersystems.textsecuregcm.configuration.DeviceCheckConfiguration;
import org.whispersystems.textsecuregcm.configuration.DirectoryV2Configuration;
import org.whispersystems.textsecuregcm.configuration.DynamoDbClientFactory;
import org.whispersystems.textsecuregcm.configuration.DynamoDbTables;
import org.whispersystems.textsecuregcm.configuration.ExternalRequestFilterConfiguration;
import org.whispersystems.textsecuregcm.configuration.FaultTolerantRedisClientFactory;
import org.whispersystems.textsecuregcm.configuration.FaultTolerantRedisClusterFactory;
import org.whispersystems.textsecuregcm.configuration.FcmConfiguration;
import org.whispersystems.textsecuregcm.configuration.FoundationDbMessagesConfiguration;
import org.whispersystems.textsecuregcm.configuration.GcpAttachmentsConfiguration;
import org.whispersystems.textsecuregcm.configuration.GenericZkConfig;
import org.whispersystems.textsecuregcm.configuration.GooglePlayBillingConfiguration;
import org.whispersystems.textsecuregcm.configuration.GrpcConfiguration;
import org.whispersystems.textsecuregcm.configuration.HlrLookupConfiguration;
import org.whispersystems.textsecuregcm.configuration.IdlePrimaryDeviceReminderConfiguration;
import org.whispersystems.textsecuregcm.configuration.KeyTransparencyServiceConfiguration;
import org.whispersystems.textsecuregcm.configuration.LinkDeviceSecretConfiguration;
import org.whispersystems.textsecuregcm.configuration.LoginPurchaseConfiguration;
import org.whispersystems.textsecuregcm.configuration.MessageByteLimitCardinalityEstimatorConfiguration;
import org.whispersystems.textsecuregcm.configuration.OneTimeDonationConfiguration;
import org.whispersystems.textsecuregcm.configuration.OpenTelemetryConfiguration;
import org.whispersystems.textsecuregcm.configuration.PagedSingleUseKEMPreKeyStoreConfiguration;
import org.whispersystems.textsecuregcm.configuration.PaymentsServiceConfiguration;
import org.whispersystems.textsecuregcm.configuration.RegistrationServiceClientFactory;
import org.whispersystems.textsecuregcm.configuration.RemoteConfigConfiguration;
import org.whispersystems.textsecuregcm.configuration.ReportMessageConfiguration;
import org.whispersystems.textsecuregcm.configuration.RetryConfiguration;
import org.whispersystems.textsecuregcm.configuration.S3ObjectMonitorFactory;
import org.whispersystems.textsecuregcm.configuration.SecureStorageServiceConfiguration;
import org.whispersystems.textsecuregcm.configuration.SecureValueRecoveryConfiguration;
import org.whispersystems.textsecuregcm.configuration.ShortCodeExpanderConfiguration;
import org.whispersystems.textsecuregcm.configuration.SpamFilterConfiguration;
import org.whispersystems.textsecuregcm.configuration.StripeConfiguration;
import org.whispersystems.textsecuregcm.configuration.SubscriptionConfiguration;
import org.whispersystems.textsecuregcm.configuration.TlsKeyStoreConfiguration;
import org.whispersystems.textsecuregcm.configuration.TotpConfiguration;
import org.whispersystems.textsecuregcm.configuration.TurnConfiguration;
import org.whispersystems.textsecuregcm.configuration.UnidentifiedDeliveryConfiguration;
import org.whispersystems.textsecuregcm.configuration.VirtualThreadConfiguration;
import org.whispersystems.textsecuregcm.configuration.WebAuthnConfiguration;
import org.whispersystems.textsecuregcm.configuration.ZkConfig;
import org.whispersystems.websocket.configuration.WebSocketConfiguration;
// @noinspection MismatchedQueryAndUpdateOfCollection, WeakerAccess
public class WhisperServerConfiguration extends Configuration {
@NotNull
@Valid
@JsonProperty
private TlsKeyStoreConfiguration tlsKeyStore;
@NotNull
@Valid
@JsonProperty
AwsCredentialsProviderFactory awsCredentialsProvider = new DefaultAwsCredentialsFactory();
@NotNull
@Valid
@JsonProperty
private StripeConfiguration stripe;
@NotNull
@Valid
@JsonProperty
private BraintreeConfiguration braintree;
@NotNull
@Valid
@JsonProperty
private GooglePlayBillingConfiguration googlePlayBilling;
@NotNull
@Valid
@JsonProperty
private AppleAppStoreConfiguration appleAppStore;
@NotNull
@Valid
@JsonProperty
private AppleDeviceCheckConfiguration appleDeviceCheck;
@NotNull
@Valid
@JsonProperty
private DeviceCheckConfiguration deviceCheck;
@NotNull
@Valid
@JsonProperty
private DynamoDbClientFactory dynamoDbClient;
@NotNull
@Valid
@JsonProperty
private DynamoDbTables dynamoDbTables;
@NotNull
@Valid
@JsonProperty
private AttachmentsConfiguration attachments;
@NotNull
@Valid
@JsonProperty
private GcpAttachmentsConfiguration gcpAttachments;
@NotNull
@Valid
@JsonProperty
private BackupConfiguration backup = new BackupConfiguration();
@NotNull
@Valid
@JsonProperty
private CdnConfiguration cdn;
@NotNull
@Valid
@JsonProperty
private Cdn3StorageManagerConfiguration cdn3StorageManager;
@NotNull
@Valid
@JsonProperty
private OpenTelemetryConfiguration openTelemetry;
@NotNull
@Valid
@JsonProperty
private FaultTolerantRedisClusterFactory cacheCluster;
@NotNull
@Valid
@JsonProperty
private FaultTolerantRedisClientFactory pubsub;
@NotNull
@Valid
@JsonProperty
private DirectoryV2Configuration directoryV2;
@NotNull
@Valid
@JsonProperty
private SecureValueRecoveryConfiguration svr2;
@NotNull
@Valid
@JsonProperty
private SecureValueRecoveryConfiguration svrb;
@NotNull
@Valid
@JsonProperty
private FaultTolerantRedisClusterFactory pushSchedulerCluster;
@NotNull
@Valid
@JsonProperty
private FaultTolerantRedisClusterFactory rateLimitersCluster;
@Valid
@NotNull
@JsonProperty
private WebSocketConfiguration webSocket = new WebSocketConfiguration();
@Valid
@NotNull
@JsonProperty
private FcmConfiguration fcm;
@Valid
@NotNull
@JsonProperty
private ApnConfiguration apn;
@Valid
@NotNull
@JsonProperty
private UnidentifiedDeliveryConfiguration unidentifiedDelivery;
@Valid
@NotNull
@JsonProperty
private ShortCodeExpanderConfiguration shortCode;
@Valid
@NotNull
@JsonProperty
private SecureStorageServiceConfiguration storageService;
@Valid
@NotNull
@JsonProperty
private PaymentsServiceConfiguration paymentsService;
@Valid
@NotNull
@JsonProperty
private GenericZkConfig callingZkConfigPreV101;
@Valid
@NotNull
@JsonProperty
private GenericZkConfig callingZkConfig;
@Valid
@NotNull
@JsonProperty
private GenericZkConfig chatZkConfig;
@Valid
@NotNull
@JsonProperty
private ZkConfig groupsZkConfig;
@Valid
@NotNull
@JsonProperty
private RemoteConfigConfiguration remoteConfig;
@Valid
@NotNull
@JsonProperty
private S3ObjectMonitorFactory dynamicConfig;
@Valid
@NotNull
@JsonProperty
private BadgesConfiguration badges;
@Valid
@JsonProperty
@NotNull
private SubscriptionConfiguration subscription;
@Valid
@JsonProperty
@NotNull
private OneTimeDonationConfiguration oneTimeDonations;
@Valid
@JsonProperty
@NotNull
private LoginPurchaseConfiguration loginPurchase;
@Valid
@JsonProperty
@NotNull
private PagedSingleUseKEMPreKeyStoreConfiguration pagedSingleUseKEMPreKeyStore;
@Valid
@NotNull
@JsonProperty
private ReportMessageConfiguration reportMessage = new ReportMessageConfiguration();
@Valid
@JsonProperty
private SpamFilterConfiguration spamFilter;
@Valid
@NotNull
@JsonProperty
private RegistrationServiceClientFactory registrationService;
@Valid
@NotNull
@JsonProperty
private TurnConfiguration turn;
@Valid
@NotNull
@JsonProperty
private TusConfiguration tus;
@Valid
@NotNull
@JsonProperty
private ClientReleaseConfiguration clientRelease = new ClientReleaseConfiguration(Duration.ofHours(4));
@Valid
@NotNull
@JsonProperty
private MessageByteLimitCardinalityEstimatorConfiguration messageByteLimitCardinalityEstimator = new MessageByteLimitCardinalityEstimatorConfiguration(Duration.ofDays(1));
@Valid
@NotNull
@JsonProperty
private LinkDeviceSecretConfiguration linkDevice;
@Valid
@NotNull
@JsonProperty
private VirtualThreadConfiguration virtualThread = new VirtualThreadConfiguration();
@Valid
@NotNull
@JsonProperty
private ExternalRequestFilterConfiguration externalRequestFilter;
@Valid
@NotNull
@JsonProperty
private KeyTransparencyServiceConfiguration keyTransparencyService;
@JsonProperty
private IdlePrimaryDeviceReminderConfiguration idlePrimaryDeviceReminder =
new IdlePrimaryDeviceReminderConfiguration(Duration.ofDays(30));
@JsonProperty
private Map<String, @Valid CircuitBreakerConfiguration> circuitBreakers = Collections.emptyMap();
@JsonProperty
private Map<String, @Valid RetryConfiguration> retries = Collections.emptyMap();
@JsonProperty
private Map<String, @Valid BulkheadConfiguration> bulkheads = Collections.emptyMap();
@Valid
@NotNull
@JsonProperty
private HlrLookupConfiguration hlrLookup;
@JsonProperty
@Valid
@NotNull
private RetryConfiguration generalRedisRetry = new RetryConfiguration();
@NotNull
@Valid
@JsonProperty
private GrpcConfiguration grpc;
@Valid
@NotNull
@JsonProperty
private S3ObjectMonitorFactory asnTable;
@Valid
@NotNull
@JsonProperty
private CallQualitySurveyConfiguration callQualitySurvey;
@Valid
@NotNull
@JsonProperty
private ChangeNumberConfiguration changeNumber = new ChangeNumberConfiguration(Duration.ofHours(1));
@Valid
@NotNull
@JsonProperty
private FoundationDbMessagesConfiguration foundationDbMessages;
@Valid
@NotNull
@JsonProperty
private TotpConfiguration registrationTotp = TotpConfiguration.DEFAULT;
@Valid
@NotNull
@JsonProperty
private WebAuthnConfiguration registrationWebAuthn;
public TlsKeyStoreConfiguration getTlsKeyStoreConfiguration() {
return tlsKeyStore;
}
public AwsCredentialsProviderFactory getAwsCredentialsConfiguration() {
return awsCredentialsProvider;
}
public StripeConfiguration getStripe() {
return stripe;
}
public BraintreeConfiguration getBraintree() {
return braintree;
}
public GooglePlayBillingConfiguration getGooglePlayBilling() {
return googlePlayBilling;
}
public AppleAppStoreConfiguration getAppleAppStore() {
return appleAppStore;
}
public AppleDeviceCheckConfiguration getAppleDeviceCheck() {
return appleDeviceCheck;
}
public DeviceCheckConfiguration getDeviceCheck() {
return deviceCheck;
}
public DynamoDbClientFactory getDynamoDbClientConfiguration() {
return dynamoDbClient;
}
public DynamoDbTables getDynamoDbTables() {
return dynamoDbTables;
}
public ShortCodeExpanderConfiguration getShortCodeRetrieverConfiguration() {
return shortCode;
}
public WebSocketConfiguration getWebSocketConfiguration() {
return webSocket;
}
public AttachmentsConfiguration getAttachments() {
return attachments;
}
public GcpAttachmentsConfiguration getGcpAttachmentsConfiguration() {
return gcpAttachments;
}
public BackupConfiguration getBackupConfiguration() {
return backup;
}
public FaultTolerantRedisClusterFactory getCacheClusterConfiguration() {
return cacheCluster;
}
public FaultTolerantRedisClientFactory getRedisPubSubConfiguration() {
return pubsub;
}
public SecureValueRecoveryConfiguration getSvr2Configuration() {
return svr2;
}
public SecureValueRecoveryConfiguration getSvrbConfiguration() {
return svrb;
}
public DirectoryV2Configuration getDirectoryV2Configuration() {
return directoryV2;
}
public SecureStorageServiceConfiguration getSecureStorageServiceConfiguration() {
return storageService;
}
public FaultTolerantRedisClusterFactory getPushSchedulerCluster() {
return pushSchedulerCluster;
}
public FaultTolerantRedisClusterFactory getRateLimitersCluster() {
return rateLimitersCluster;
}
public FcmConfiguration getFcmConfiguration() {
return fcm;
}
public ApnConfiguration getApnConfiguration() {
return apn;
}
public CdnConfiguration getCdnConfiguration() {
return cdn;
}
public Cdn3StorageManagerConfiguration getCdn3StorageManagerConfiguration() {
return cdn3StorageManager;
}
public OpenTelemetryConfiguration getOpenTelemetryConfiguration() {
return openTelemetry;
}
public UnidentifiedDeliveryConfiguration getDeliveryCertificate() {
return unidentifiedDelivery;
}
public PaymentsServiceConfiguration getPaymentsServiceConfiguration() {
return paymentsService;
}
/// ZK secret limited to Chat Service
public GenericZkConfig getChatZkConfig() {
return chatZkConfig;
}
/// ZK secret shared with Calling Service
public GenericZkConfig getCallingZkConfigPreV101() {
return callingZkConfigPreV101;
}
/// ZK secret shared with Calling Service
public GenericZkConfig getCallingZkConfig() {
return callingZkConfig;
}
/// ZK secret shared with Groups Service
public ZkConfig getGroupsZkConfig() {
return groupsZkConfig;
}
public RemoteConfigConfiguration getRemoteConfigConfiguration() {
return remoteConfig;
}
public S3ObjectMonitorFactory getDynamicConfig() {
return dynamicConfig;
}
public BadgesConfiguration getBadges() {
return badges;
}
public SubscriptionConfiguration getSubscription() {
return subscription;
}
public OneTimeDonationConfiguration getOneTimeDonations() {
return oneTimeDonations;
}
public LoginPurchaseConfiguration getLoginPurchase() {
return loginPurchase;
}
public PagedSingleUseKEMPreKeyStoreConfiguration getPagedSingleUseKEMPreKeyStore() {
return pagedSingleUseKEMPreKeyStore;
}
public ReportMessageConfiguration getReportMessageConfiguration() {
return reportMessage;
}
public SpamFilterConfiguration getSpamFilterConfiguration() {
return spamFilter;
}
public RegistrationServiceClientFactory getRegistrationServiceConfiguration() {
return registrationService;
}
public TurnConfiguration getTurnConfiguration() {
return turn;
}
public TusConfiguration getTus() {
return tus;
}
public ClientReleaseConfiguration getClientReleaseConfiguration() {
return clientRelease;
}
public MessageByteLimitCardinalityEstimatorConfiguration getMessageByteLimitCardinalityEstimator() {
return messageByteLimitCardinalityEstimator;
}
public LinkDeviceSecretConfiguration getLinkDeviceSecretConfiguration() {
return linkDevice;
}
public VirtualThreadConfiguration getVirtualThreadConfiguration() {
return virtualThread;
}
public ExternalRequestFilterConfiguration getExternalRequestFilterConfiguration() {
return externalRequestFilter;
}
public KeyTransparencyServiceConfiguration getKeyTransparencyServiceConfiguration() {
return keyTransparencyService;
}
public IdlePrimaryDeviceReminderConfiguration idlePrimaryDeviceReminderConfiguration() {
return idlePrimaryDeviceReminder;
}
public Map<String, CircuitBreakerConfiguration> getCircuitBreakerConfigurations() {
return circuitBreakers;
}
public Map<String, RetryConfiguration> getRetryConfigurations() {
return retries;
}
public Map<String, BulkheadConfiguration> getBulkheadConfigurations() {
return bulkheads;
}
public RetryConfiguration getGeneralRedisRetryConfiguration() {
return generalRedisRetry;
}
public GrpcConfiguration getGrpc() {
return grpc;
}
public S3ObjectMonitorFactory getAsnTableConfiguration() {
return asnTable;
}
public CallQualitySurveyConfiguration getCallQualitySurveyConfiguration() {
return callQualitySurvey;
}
public HlrLookupConfiguration getHlrLookupConfiguration() {
return hlrLookup;
}
public ChangeNumberConfiguration getChangeNumber() {
return changeNumber;
}
public FoundationDbMessagesConfiguration getFoundationDbMessagesConfiguration() {
return foundationDbMessages;
}
public TotpConfiguration getRegistrationTotpConfiguration() {
return registrationTotp;
}
public WebAuthnConfiguration getRegistrationWebAuthnConfiguration() {
return registrationWebAuthn;
}
}
File diff suppressed because it is too large. Load diff
@@ -1,18 +0,0 @@
/*
* Copyright 2013-2021 Signal Messenger, LLC
* SPDX-License-Identifier: AGPL-3.0-only
*/
package org.whispersystems.textsecuregcm.asn;
import static java.util.Objects.requireNonNull;
import com.google.i18n.phonenumbers.PhoneNumberUtil;
import javax.annotation.Nonnull;
public record AsnInfo(long asn, @Nonnull String regionCode) {
public AsnInfo {
requireNonNull(regionCode, "regionCode must not be null");
}
}
@@ -1,21 +0,0 @@
/*
* Copyright 2013-2021 Signal Messenger, LLC
* SPDX-License-Identifier: AGPL-3.0-only
*/
package org.whispersystems.textsecuregcm.asn;
import java.util.Optional;
import javax.annotation.Nonnull;
public interface AsnInfoProvider {
/// Gets ASN information for an IP address.
///
/// @param ipString a string representation of an IP address
///
/// @return ASN information for the given IP address or empty if no ASN information was found for the given IP address
Optional<AsnInfo> lookup(@Nonnull String ipString);
AsnInfoProvider EMPTY = _ -> Optional.empty();
}
@@ -1,166 +0,0 @@
/*
* Copyright 2013-2021 Signal Messenger, LLC
* SPDX-License-Identifier: AGPL-3.0-only
*/
package org.whispersystems.textsecuregcm.asn;
import static java.util.Objects.requireNonNull;
import com.google.common.annotations.VisibleForTesting;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.lang.invoke.MethodHandles;
import java.math.BigInteger;
import java.net.Inet4Address;
import java.net.Inet6Address;
import java.net.InetAddress;
import java.nio.ByteBuffer;
import java.util.HashMap;
import java.util.Map;
import java.util.NavigableMap;
import java.util.Optional;
import java.util.TreeMap;
import java.util.zip.GZIPInputStream;
import javax.annotation.Nonnull;
import com.google.common.net.InetAddresses;
import org.apache.commons.csv.CSVFormat;
import org.apache.commons.csv.CSVParser;
import org.apache.commons.csv.CSVRecord;
import org.apache.commons.lang3.Validate;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* {@code AsnInfoProvider} implementation that supports both IPv4 and IPv6.
*/
public class AsnInfoProviderImpl implements AsnInfoProvider {
private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
@Nonnull
private final NavigableMap<Long, AsnRange<Long>> asnBlocksByFirstIpv4;
@Nonnull
private final NavigableMap<BigInteger, AsnRange<BigInteger>> asnBlocksByFirstIpv6;
/**
* Creates an instance of {@code AsnInfoProviderImpl} using data from <a href="https://iptoasn.com/">iptoasn.com</a>.
* @param tsvGzInputStream gzip input stream representing the data.
*/
@Nonnull
public static AsnInfoProviderImpl fromTsvGz(@Nonnull final InputStream tsvGzInputStream) {
try (final GZIPInputStream inputStream = new GZIPInputStream(tsvGzInputStream)) {
return fromTsv(inputStream);
} catch (final IOException e) {
log.error("failed to ungzip the input stream", e);
throw new RuntimeException(e);
}
}
/**
* Creates an instance of {@code AsnInfoProviderImpl} using data from <a href="https://iptoasn.com/">iptoasn.com</a>.
* @param tsvInputStream input stream representing the data.
*/
@Nonnull
public static AsnInfoProviderImpl fromTsv(@Nonnull final InputStream tsvInputStream) {
try (final InputStreamReader tsvReader = new InputStreamReader(tsvInputStream)) {
final NavigableMap<Long, AsnRange<Long>> ip4asns = new TreeMap<>();
final NavigableMap<BigInteger, AsnRange<BigInteger>> ip6asns = new TreeMap<>();
final Map<Long, AsnInfo> asnInfoCache = new HashMap<>();
try (final CSVParser csvParser = CSVFormat.TDF.parse(tsvReader)) {
for (final CSVRecord record : csvParser) {
// format:
// range_start_ip_string range_end_ip_string AS_number country_code AS_description
final InetAddress startIp = InetAddresses.forString(record.get(0));
final InetAddress endIp = InetAddresses.forString(record.get(1));
final long asn = Long.parseLong(record.get(2));
final String regionCode = record.get(3);
// country code should be the same for any ASN, so we're caching AsnInfo objects
// not to have multiple instances with the same values
final AsnInfo asnInfo = asnInfoCache.computeIfAbsent(asn, k -> new AsnInfo(asn, regionCode));
if (!regionCode.equals(asnInfo.regionCode())) {
log.warn("ASN {} mapped to country codes {} and {}", asn, regionCode, asnInfo.regionCode());
}
// IPv4
if (startIp instanceof Inet4Address) {
final AsnRange<Long> asnRange = new AsnRange<>(
ip4BytesToLong((Inet4Address) startIp),
ip4BytesToLong((Inet4Address) endIp),
asnInfo
);
ip4asns.put(asnRange.from(), asnRange);
}
// IPv6
if (startIp instanceof Inet6Address) {
final AsnRange<BigInteger> asnRange = new AsnRange<>(
ip6BytesToBigInteger((Inet6Address) startIp),
ip6BytesToBigInteger((Inet6Address) endIp),
asnInfo
);
ip6asns.put(asnRange.from(), asnRange);
}
}
}
return new AsnInfoProviderImpl(ip4asns, ip6asns);
} catch (final Exception e) {
throw new RuntimeException(e);
}
}
public AsnInfoProviderImpl(
@Nonnull final NavigableMap<Long, AsnRange<Long>> asnBlocksByFirstIpv4,
@Nonnull final NavigableMap<BigInteger, AsnRange<BigInteger>> asnBlocksByFirstIpv6) {
this.asnBlocksByFirstIpv4 = requireNonNull(asnBlocksByFirstIpv4);
this.asnBlocksByFirstIpv6 = requireNonNull(asnBlocksByFirstIpv6);
}
@Nonnull
@Override
public Optional<AsnInfo> lookup(@Nonnull final String ipString) {
try {
final InetAddress address = InetAddresses.forString(ipString);
if (address instanceof Inet4Address ip4) {
final Long key = ip4BytesToLong(ip4);
return lookupInMap(asnBlocksByFirstIpv4, key);
}
if (address instanceof Inet6Address ip6) {
final BigInteger key = ip6BytesToBigInteger(ip6);
return lookupInMap(asnBlocksByFirstIpv6, key);
}
// safety net, should never happen
log.warn("Unknown InetAddress implementation: {}", address.getClass().getName());
} catch (final Exception e) {
log.error("Could not resolve ASN for IP string {}", ipString);
}
return Optional.empty();
}
@VisibleForTesting
protected static long ip4BytesToLong(@Nonnull final Inet4Address address) {
final byte[] arr = address.getAddress();
Validate.isTrue(arr.length == 4);
return Integer.toUnsignedLong(ByteBuffer.wrap(arr).getInt());
}
@VisibleForTesting
protected static BigInteger ip6BytesToBigInteger(@Nonnull final Inet6Address address) {
final byte[] arr = address.getAddress();
Validate.isTrue(arr.length == 16);
return new BigInteger(1, arr);
}
@Nonnull
private static <T extends Comparable<T>> Optional<AsnInfo> lookupInMap(
@Nonnull final NavigableMap<T, AsnRange<T>> map,
@Nonnull final T key) {
return Optional.ofNullable(map.floorEntry(key))
.filter(e -> e.getValue().contains(key) && e.getValue().asnInfo().asn() != 0)
.map(e -> e.getValue().asnInfo());
}
}
@@ -1,28 +0,0 @@
/*
* Copyright 2013-2021 Signal Messenger, LLC
* SPDX-License-Identifier: AGPL-3.0-only
*/
package org.whispersystems.textsecuregcm.asn;
import static java.util.Objects.requireNonNull;
import javax.annotation.Nonnull;
import org.apache.commons.lang3.Validate;
public record AsnRange<T extends Comparable<T>>(@Nonnull T from,
@Nonnull T to,
@Nonnull AsnInfo asnInfo) {
public AsnRange {
requireNonNull(from);
requireNonNull(to);
requireNonNull(asnInfo);
Validate.isTrue(from.compareTo(to) <= 0);
}
boolean contains(@Nonnull final T element) {
requireNonNull(element);
return from.compareTo(element) <= 0
&& element.compareTo(to) <= 0;
}
}
@@ -1,15 +0,0 @@
/*
* Copyright 2023 Signal Messenger, LLC
* SPDX-License-Identifier: AGPL-3.0-only
*/
package org.whispersystems.textsecuregcm.attachments;
import java.util.Map;
public interface AttachmentGenerator {
record Descriptor(Map<String, String> headers, String signedUploadLocation) {}
Descriptor generateAttachment(final String key, final long uploadLength);
}
@@ -1,20 +0,0 @@
/*
* Copyright 2026 Signal Messenger, LLC
* SPDX-License-Identifier: AGPL-3.0-only
*/
package org.whispersystems.textsecuregcm.attachments;
import java.security.SecureRandom;
import java.util.Base64;
public class AttachmentUtil {
public static final String CDN3_EXPERIMENT_NAME = "cdn3";
private AttachmentUtil() {}
public static String generateAttachmentKey(final SecureRandom secureRandom) {
final byte[] bytes = new byte[15];
secureRandom.nextBytes(bytes);
return Base64.getUrlEncoder().encodeToString(bytes);
}
}
@@ -1,53 +0,0 @@
/*
* Copyright 2023 Signal Messenger, LLC
* SPDX-License-Identifier: AGPL-3.0-only
*/
package org.whispersystems.textsecuregcm.attachments;
import org.whispersystems.textsecuregcm.gcp.CanonicalRequest;
import org.whispersystems.textsecuregcm.gcp.CanonicalRequestGenerator;
import org.whispersystems.textsecuregcm.gcp.CanonicalRequestSigner;
import javax.annotation.Nonnull;
import java.io.IOException;
import java.security.InvalidKeyException;
import java.security.spec.InvalidKeySpecException;
import java.time.ZoneOffset;
import java.time.ZonedDateTime;
import java.util.Map;
public class GcsAttachmentGenerator implements AttachmentGenerator {
@Nonnull
private final CanonicalRequestGenerator canonicalRequestGenerator;
@Nonnull
private final CanonicalRequestSigner canonicalRequestSigner;
public GcsAttachmentGenerator(@Nonnull String domain, @Nonnull String email,
@Nonnull String pathPrefix, @Nonnull String rsaSigningKey)
throws IOException, InvalidKeyException, InvalidKeySpecException {
this.canonicalRequestGenerator = new CanonicalRequestGenerator(domain, email, pathPrefix);
this.canonicalRequestSigner = new CanonicalRequestSigner(rsaSigningKey);
}
@Override
public Descriptor generateAttachment(final String key, final long uploadLength) {
final ZonedDateTime now = ZonedDateTime.now(ZoneOffset.UTC);
final CanonicalRequest canonicalRequest = canonicalRequestGenerator.createFor(key, now, uploadLength);
return new Descriptor(getHeaderMap(canonicalRequest), getSignedUploadLocation(canonicalRequest));
}
private String getSignedUploadLocation(@Nonnull CanonicalRequest canonicalRequest) {
return "https://" + canonicalRequest.getDomain() + canonicalRequest.getResourcePath()
+ '?' + canonicalRequest.getCanonicalQuery()
+ "&X-Goog-Signature=" + canonicalRequestSigner.sign(canonicalRequest);
}
private static Map<String, String> getHeaderMap(@Nonnull CanonicalRequest canonicalRequest) {
return Map.of(
"host", canonicalRequest.getDomain(),
"x-goog-content-length-range", "1," + canonicalRequest.getMaxSizeInBytes(),
"x-goog-resumable", "start");
}
}
@@ -1,43 +0,0 @@
/*
* Copyright 2023 Signal Messenger, LLC
* SPDX-License-Identifier: AGPL-3.0-only
*/
package org.whispersystems.textsecuregcm.attachments;
import org.apache.http.HttpHeaders;
import org.whispersystems.textsecuregcm.auth.JwtGenerator;
import org.whispersystems.textsecuregcm.util.HeaderUtils;
import java.nio.charset.StandardCharsets;
import java.time.Clock;
import java.time.Duration;
import java.util.Base64;
import java.util.Map;
public class TusAttachmentGenerator implements AttachmentGenerator {
private static final String ATTACHMENTS = "attachments";
private final JwtGenerator jwtGenerator;
private final String tusUri;
private final Duration tokenExpiration;
public TusAttachmentGenerator(final TusConfiguration cfg) {
this.tusUri = cfg.uploadUri();
this.tokenExpiration = cfg.tokenExpiration();
this.jwtGenerator = new JwtGenerator(cfg.userAuthenticationTokenSharedSecret().value(), Clock.systemUTC());
}
@Override
public Descriptor generateAttachment(final String key, final long uploadLength) {
final String token = jwtGenerator.generateJwt(ATTACHMENTS, key, tokenExpiration,
builder -> builder.withClaim(JwtGenerator.MAX_LENGTH_CLAIM_KEY, uploadLength));
final String b64Key = Base64.getEncoder().encodeToString(key.getBytes(StandardCharsets.UTF_8));
final Map<String, String> headers = Map.of(
HttpHeaders.AUTHORIZATION, HeaderUtils.bearerAuthHeader(token),
"Upload-Metadata", String.format("filename %s", b64Key)
);
return new Descriptor(headers, tusUri + "/" + ATTACHMENTS);
}
}
@@ -1,31 +0,0 @@
/*
* Copyright 2023 Signal Messenger, LLC
* SPDX-License-Identifier: AGPL-3.0-only
*/
package org.whispersystems.textsecuregcm.attachments;
import com.google.common.annotations.VisibleForTesting;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import java.time.Duration;
import org.hibernate.validator.constraints.time.DurationMin;
import org.whispersystems.textsecuregcm.configuration.secrets.SecretBytes;
import org.whispersystems.textsecuregcm.util.ExactlySize;
public record TusConfiguration(
@ExactlySize(32) SecretBytes userAuthenticationTokenSharedSecret,
@NotEmpty String uploadUri,
// The TUS server enforces its own `MAX_TOKEN_AGE`, so this must be greater than or equal to it.
// https://github.com/signalapp/tus-server/tree/main/src/index.ts
@NotNull @DurationMin(days = 7) Duration tokenExpiration){
@VisibleForTesting
public static final Duration DEFAULT_TOKEN_EXPIRATION = Duration.ofDays(7);
public TusConfiguration {
if (tokenExpiration == null) {
tokenExpiration = DEFAULT_TOKEN_EXPIRATION;
}
}
}
@@ -1,149 +0,0 @@
/*
* Copyright 2013 Signal Messenger, LLC
* SPDX-License-Identifier: AGPL-3.0-only
*/
package org.whispersystems.textsecuregcm.auth;
import static org.whispersystems.textsecuregcm.metrics.MetricsUtil.name;
import com.google.common.annotations.VisibleForTesting;
import io.dropwizard.auth.Authenticator;
import io.dropwizard.auth.basic.BasicCredentials;
import io.micrometer.core.instrument.Metrics;
import io.micrometer.core.instrument.Tags;
import java.time.Clock;
import java.time.Duration;
import java.time.Instant;
import java.time.temporal.ChronoUnit;
import java.util.Optional;
import java.util.UUID;
import org.apache.commons.lang3.StringUtils;
import org.whispersystems.textsecuregcm.storage.Account;
import org.whispersystems.textsecuregcm.storage.AccountsManager;
import org.whispersystems.textsecuregcm.storage.Device;
import org.whispersystems.textsecuregcm.util.Pair;
import org.whispersystems.textsecuregcm.util.Util;
public class AccountAuthenticator implements Authenticator<BasicCredentials, AuthenticatedDevice> {
private static final String AUTHENTICATION_COUNTER_NAME = name(AccountAuthenticator.class, "authentication");
private static final String AUTHENTICATION_SUCCEEDED_TAG_NAME = "succeeded";
private static final String AUTHENTICATION_FAILURE_REASON_TAG_NAME = "reason";
private static final String DAYS_SINCE_LAST_SEEN_DISTRIBUTION_NAME = name(AccountAuthenticator.class, "daysSinceLastSeen");
private static final String IS_PRIMARY_DEVICE_TAG = "isPrimary";
@VisibleForTesting
static final char DEVICE_ID_SEPARATOR = '.';
private final AccountsManager accountsManager;
private final Clock clock;
public AccountAuthenticator(AccountsManager accountsManager) {
this(accountsManager, Clock.systemUTC());
}
@VisibleForTesting
public AccountAuthenticator(AccountsManager accountsManager, Clock clock) {
this.accountsManager = accountsManager;
this.clock = clock;
}
static Pair<String, Byte> getIdentifierAndDeviceId(final String basicUsername) {
final String identifier;
final byte deviceId;
final int deviceIdSeparatorIndex = basicUsername.indexOf(DEVICE_ID_SEPARATOR);
if (deviceIdSeparatorIndex == -1) {
identifier = basicUsername;
deviceId = Device.PRIMARY_ID;
} else {
identifier = basicUsername.substring(0, deviceIdSeparatorIndex);
deviceId = Byte.parseByte(basicUsername.substring(deviceIdSeparatorIndex + 1));
}
return new Pair<>(identifier, deviceId);
}
@Override
public Optional<AuthenticatedDevice> authenticate(BasicCredentials basicCredentials) {
boolean succeeded = false;
String failureReason = null;
try {
final UUID accountUuid;
final byte deviceId;
{
final Pair<String, Byte> identifierAndDeviceId = getIdentifierAndDeviceId(basicCredentials.getUsername());
accountUuid = UUID.fromString(identifierAndDeviceId.first());
deviceId = identifierAndDeviceId.second();
}
Optional<Account> account = accountsManager.getByAccountIdentifier(accountUuid);
if (account.isEmpty()) {
failureReason = "noSuchAccount";
return Optional.empty();
}
Optional<Device> device = account.get().getDevice(deviceId);
if (device.isEmpty()) {
failureReason = "noSuchDevice";
return Optional.empty();
}
SaltedTokenHash deviceSaltedTokenHash = device.get().getAuthTokenHash();
if (deviceSaltedTokenHash.verify(basicCredentials.getPassword())) {
succeeded = true;
final Account authenticatedAccount = updateLastSeen(account.get(), device.get());
return Optional.of(new AuthenticatedDevice(authenticatedAccount.getAccountIdentifier(),
device.get().getId(),
Instant.ofEpochMilli(authenticatedAccount.getPrimaryDevice().getLastSeen())));
} else {
failureReason = "incorrectPassword";
return Optional.empty();
}
} catch (IllegalArgumentException | InvalidAuthorizationHeaderException iae) {
failureReason = "invalidHeader";
return Optional.empty();
} finally {
Tags tags = Tags.of(
AUTHENTICATION_SUCCEEDED_TAG_NAME, String.valueOf(succeeded));
if (StringUtils.isNotBlank(failureReason)) {
tags = tags.and(AUTHENTICATION_FAILURE_REASON_TAG_NAME, failureReason);
}
Metrics.counter(AUTHENTICATION_COUNTER_NAME, tags).increment();
}
}
@VisibleForTesting
public Account updateLastSeen(Account account, Device device) {
// compute a non-negative integer between 0 and 86400.
long n = Util.ensureNonNegativeLong(account.getAccountIdentifier().getLeastSignificantBits());
final long lastSeenOffsetSeconds = n % ChronoUnit.DAYS.getDuration().toSeconds();
// produce a truncated timestamp which is either today at UTC midnight
// or yesterday at UTC midnight, based on per-user randomized offset used.
final long todayInMillisWithOffset = Util.todayInMillisGivenOffsetFromNow(clock,
Duration.ofSeconds(lastSeenOffsetSeconds).negated());
// only update the device's last seen time when it falls behind the truncated timestamp.
// this ensures a few things:
// (1) each account will only update last-seen at most once per day
// (2) these updates will occur throughout the day rather than all occurring at UTC midnight.
if (device.getLastSeen() < todayInMillisWithOffset) {
Metrics.summary(DAYS_SINCE_LAST_SEEN_DISTRIBUTION_NAME, IS_PRIMARY_DEVICE_TAG, String.valueOf(device.isPrimary()))
.record(Duration.ofMillis(todayInMillisWithOffset - device.getLastSeen()).toDays());
return accountsManager.updateDeviceLastSeen(account.getAccountIdentifier(), device, Util.todayInMillis(clock));
}
return account;
}
}
@@ -1,30 +0,0 @@
/*
* Copyright 2013-2020 Signal Messenger, LLC
* SPDX-License-Identifier: AGPL-3.0-only
*/
package org.whispersystems.textsecuregcm.auth;
import jakarta.ws.rs.WebApplicationException;
import jakarta.ws.rs.core.Response;
import java.util.Base64;
public class Anonymous {
private final byte[] unidentifiedSenderAccessKey;
public Anonymous(String header) {
try {
this.unidentifiedSenderAccessKey = Base64.getDecoder().decode(header);
if (unidentifiedSenderAccessKey.length != UnidentifiedAccessUtil.UNIDENTIFIED_ACCESS_KEY_LENGTH) {
throw new WebApplicationException("access key length must be 16", Response.Status.UNAUTHORIZED);
}
} catch (IllegalArgumentException e) {
throw new WebApplicationException(e, Response.Status.UNAUTHORIZED);
}
}
public byte[] getAccessKey() {
return unidentifiedSenderAccessKey;
}
}
@@ -1,20 +0,0 @@
/*
* Copyright 2023 Signal Messenger, LLC
* SPDX-License-Identifier: AGPL-3.0-only
*/
package org.whispersystems.textsecuregcm.auth;
import org.signal.libsignal.zkgroup.backups.BackupCredentialType;
import org.signal.libsignal.zkgroup.backups.BackupLevel;
import org.whispersystems.textsecuregcm.util.ua.UserAgent;
import javax.annotation.Nullable;
public record AuthenticatedBackupUser(
byte[] backupId,
BackupCredentialType credentialType,
BackupLevel backupLevel,
String backupDir,
String mediaDir,
@Nullable UserAgent userAgent) {
}
@@ -1,25 +0,0 @@
/*
* Copyright 2021 Signal Messenger, LLC
* SPDX-License-Identifier: AGPL-3.0-only
*/
package org.whispersystems.textsecuregcm.auth;
import java.security.Principal;
import java.time.Instant;
import java.util.UUID;
import javax.security.auth.Subject;
public record AuthenticatedDevice(UUID accountIdentifier, byte deviceId, Instant primaryDeviceLastSeen)
implements Principal {
@Override
public String getName() {
return null;
}
@Override
public boolean implies(final Subject subject) {
return false;
}
}
@@ -1,94 +0,0 @@
/*
* Copyright 2013-2021 Signal Messenger, LLC
* SPDX-License-Identifier: AGPL-3.0-only
*/
package org.whispersystems.textsecuregcm.auth;
import java.util.Base64;
import org.apache.commons.lang3.StringUtils;
import org.whispersystems.textsecuregcm.util.Pair;
public class BasicAuthorizationHeader {
private final String username;
private final byte deviceId;
private final String password;
private BasicAuthorizationHeader(final String username, final byte deviceId, final String password) {
this.username = username;
this.deviceId = deviceId;
this.password = password;
}
public static BasicAuthorizationHeader fromString(final String header) throws InvalidAuthorizationHeaderException {
try {
if (StringUtils.isBlank(header)) {
throw new InvalidAuthorizationHeaderException("Blank header");
}
final int spaceIndex = header.indexOf(' ');
if (spaceIndex == -1) {
throw new InvalidAuthorizationHeaderException("Invalid authorization header: " + header);
}
final String authorizationType = header.substring(0, spaceIndex);
if (!"Basic".equals(authorizationType)) {
throw new InvalidAuthorizationHeaderException("Unsupported authorization method: " + authorizationType);
}
final String credentials;
try {
credentials = new String(Base64.getDecoder().decode(header.substring(spaceIndex + 1)));
} catch (final IndexOutOfBoundsException e) {
throw new InvalidAuthorizationHeaderException("Missing credentials");
}
if (StringUtils.isEmpty(credentials)) {
throw new InvalidAuthorizationHeaderException("Bad decoded value: " + credentials);
}
final int credentialSeparatorIndex = credentials.indexOf(':');
if (credentialSeparatorIndex == -1) {
throw new InvalidAuthorizationHeaderException("Badly-formatted credentials: " + credentials);
}
final String usernameComponent = credentials.substring(0, credentialSeparatorIndex);
final String username;
final byte deviceId;
{
final Pair<String, Byte> identifierAndDeviceId =
AccountAuthenticator.getIdentifierAndDeviceId(usernameComponent);
username = identifierAndDeviceId.first();
deviceId = identifierAndDeviceId.second();
}
final String password = credentials.substring(credentialSeparatorIndex + 1);
if (StringUtils.isAnyBlank(username, password)) {
throw new InvalidAuthorizationHeaderException("Username or password were blank");
}
return new BasicAuthorizationHeader(username, deviceId, password);
} catch (final IllegalArgumentException | IndexOutOfBoundsException e) {
throw new InvalidAuthorizationHeaderException(e);
}
}
public String getUsername() {
return username;
}
public long getDeviceId() {
return deviceId;
}
public String getPassword() {
return password;
}
}
@@ -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.protobuf.ByteString;
import com.google.protobuf.InvalidProtocolBufferException;
import java.util.concurrent.TimeUnit;
import org.signal.libsignal.protocol.ecc.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.util.UUIDUtil;
public class CertificateGenerator {
private final ECPrivateKey privateKey;
private final int expiresDays;
private final boolean embedSigner;
private final ServerCertificate serverCertificate;
private final int serverCertificateId;
public CertificateGenerator(byte[] serverCertificate, ECPrivateKey privateKey, int expiresDays, boolean embedSigner)
throws InvalidProtocolBufferException {
this.privateKey = privateKey;
this.expiresDays = expiresDays;
this.embedSigner = embedSigner;
this.serverCertificate = ServerCertificate.parseFrom(serverCertificate);
this.serverCertificateId = ServerCertificate.Certificate
.parseFrom(this.serverCertificate.getCertificate())
.getId();
}
public byte[] createFor(final Account account, final byte deviceId, boolean includeE164) {
if (includeE164 && account.getNumber().isEmpty()) {
throw new IllegalArgumentException();
}
SenderCertificate.Certificate.Builder builder = SenderCertificate.Certificate.newBuilder()
.setSenderDevice(Math.toIntExact(deviceId))
.setExpires(System.currentTimeMillis() + TimeUnit.DAYS.toMillis(expiresDays))
.setIdentityKey(ByteString.copyFrom(account.getAccountIdentityKey().serialize()))
.setSenderUuid(UUIDUtil.toByteString(account.getAccountIdentifier()));
if (includeE164) {
builder.setSenderE164(account.getNumber().get());
}
if (embedSigner) {
builder.setSignerCertificate(serverCertificate);
} else {
builder.setSignerId(serverCertificateId);
}
byte[] certificate = builder.build().toByteArray();
byte[] signature;
signature = privateKey.calculateSignature(certificate);
return SenderCertificate.newBuilder()
.setCertificate(ByteString.copyFrom(certificate))
.setSignature(ByteString.copyFrom(signature))
.build()
.toByteArray();
}
}
@@ -1,20 +0,0 @@
/*
* Copyright 2013-2021 Signal Messenger, LLC
* SPDX-License-Identifier: AGPL-3.0-only
*/
package org.whispersystems.textsecuregcm.auth;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* Indicates that an endpoint may change the "enabled" state of one or more devices associated with an account, and that
* any websockets associated with the account may need to be refreshed after a call to that endpoint.
*/
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
public @interface ChangesLinkedDevices {
}
@@ -1,20 +0,0 @@
/*
* Copyright 2024 Signal Messenger, LLC
* SPDX-License-Identifier: AGPL-3.0-only
*/
package org.whispersystems.textsecuregcm.auth;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* Indicates that an endpoint changes the phone number and PNI keys associated with an account, and that
* any websockets associated with the account may need to be refreshed after a call to that endpoint.
*/
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
public @interface ChangesPhoneNumber {
}
@@ -1,163 +0,0 @@
/*
* Copyright 2024 Signal Messenger, LLC
* SPDX-License-Identifier: AGPL-3.0-only
*/
package org.whispersystems.textsecuregcm.auth;
import com.fasterxml.jackson.core.JsonProcessingException;
import io.github.resilience4j.circuitbreaker.CallNotPermittedException;
import io.netty.resolver.dns.DnsNameResolver;
import jakarta.ws.rs.core.Response;
import java.io.IOException;
import java.net.Inet6Address;
import java.net.URI;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.time.Duration;
import java.util.List;
import java.util.UUID;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.ScheduledExecutorService;
import javax.annotation.Nullable;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.whispersystems.textsecuregcm.configuration.dynamic.DynamicConfiguration;
import org.whispersystems.textsecuregcm.experiment.ExperimentEnrollmentManager;
import org.whispersystems.textsecuregcm.http.FaultTolerantHttpClient;
import org.whispersystems.textsecuregcm.storage.DynamicConfigurationManager;
import org.whispersystems.textsecuregcm.util.SystemMapper;
public class CloudflareTurnCredentialsManager {
private static final Logger logger = LoggerFactory.getLogger(CloudflareTurnCredentialsManager.class);
private final List<String> cloudflareTurnUrls;
private final List<String> cloudflareTurnUrlsWithIps;
private final String cloudflareTurnHostname;
private final HttpRequest getCredentialsRequest;
private final FaultTolerantHttpClient cloudflareTurnClient;
private final DnsNameResolver dnsNameResolver;
private final DynamicConfigurationManager<DynamicConfiguration> dynamicConfigurationManager;
private final ExperimentEnrollmentManager experimentEnrollmentManager;
private final Duration clientCredentialTtl;
private record CredentialRequest(long ttl) {}
private record CloudflareTurnResponse(IceServer iceServers) {
private record IceServer(
String username,
String credential,
List<String> urls) {
}
}
public CloudflareTurnCredentialsManager(final String cloudflareTurnApiToken,
final String cloudflareTurnEndpoint,
final Duration requestedCredentialTtl,
final Duration clientCredentialTtl,
final List<String> cloudflareTurnUrls,
final List<String> cloudflareTurnUrlsWithIps,
final String cloudflareTurnHostname,
final int cloudflareTurnNumHttpClients,
@Nullable final String circuitBreakerConfigurationName,
final ExecutorService executor,
@Nullable final String retryConfigurationName,
final ScheduledExecutorService retryExecutor,
final DnsNameResolver dnsNameResolver,
final DynamicConfigurationManager<DynamicConfiguration> dynamicConfigurationManager,
final ExperimentEnrollmentManager experimentEnrollmentManager) {
this.cloudflareTurnClient = FaultTolerantHttpClient.newBuilder("cloudflare-turn", executor)
.withCircuitBreaker(circuitBreakerConfigurationName)
.withRetry(retryConfigurationName, retryExecutor)
.withNumClients(cloudflareTurnNumHttpClients)
.build();
this.cloudflareTurnUrls = cloudflareTurnUrls;
this.cloudflareTurnUrlsWithIps = cloudflareTurnUrlsWithIps;
this.cloudflareTurnHostname = cloudflareTurnHostname;
this.dnsNameResolver = dnsNameResolver;
this.dynamicConfigurationManager = dynamicConfigurationManager;
this.experimentEnrollmentManager = experimentEnrollmentManager;
final String credentialsRequestBody;
try {
credentialsRequestBody =
SystemMapper.jsonMapper().writeValueAsString(new CredentialRequest(requestedCredentialTtl.toSeconds()));
} catch (final JsonProcessingException e) {
throw new IllegalArgumentException(e);
}
// We repeat the same request to Cloudflare every time, so we can construct it once and re-use it
this.getCredentialsRequest = HttpRequest.newBuilder()
.uri(URI.create(cloudflareTurnEndpoint))
.header("Content-Type", "application/json")
.header("Authorization", String.format("Bearer %s", cloudflareTurnApiToken))
.POST(HttpRequest.BodyPublishers.ofString(credentialsRequestBody))
.build();
this.clientCredentialTtl = clientCredentialTtl;
}
public TurnToken retrieveFromCloudflare(UUID accountUuid) throws IOException {
final List<String> cloudflareTurnComposedUrls;
final List<String> turnUrls;
final List<String> turnUrlsWithIps;
final String turnHostname;
if (experimentEnrollmentManager.isEnrolled(accountUuid, "turnBeta")) {
turnUrls = dynamicConfigurationManager.getConfiguration().getTurnConfiguration().getUrls();
turnUrlsWithIps = dynamicConfigurationManager.getConfiguration().getTurnConfiguration().getUrlsWithIps();
turnHostname = dynamicConfigurationManager.getConfiguration().getTurnConfiguration().getHostname();
} else {
turnUrls = this.cloudflareTurnUrls;
turnUrlsWithIps = this.cloudflareTurnUrlsWithIps;
turnHostname = this.cloudflareTurnHostname;
}
try {
cloudflareTurnComposedUrls = dnsNameResolver.resolveAll(turnHostname).get().stream()
.map(i -> switch (i) {
case Inet6Address i6 -> "[" + i6.getHostAddress() + "]";
default -> i.getHostAddress();
})
.flatMap(i -> turnUrlsWithIps.stream().map(u -> u.formatted(i)))
.toList();
} catch (Exception e) {
throw new IOException(e);
}
final HttpResponse<String> response;
try {
response = cloudflareTurnClient.send(getCredentialsRequest, HttpResponse.BodyHandlers.ofString());
} catch (Exception e) {
if (e instanceof CallNotPermittedException cnpe) {
// the circuit breaker is open, and this can escape up to the exception mapper
throw cnpe;
}
logger.warn("failed to make http request to Cloudflare Turn: {}", e.getMessage());
throw new IOException(e);
}
if (response.statusCode() != Response.Status.CREATED.getStatusCode()) {
logger.warn("failure request credentials from Cloudflare Turn (code={}): {}", response.statusCode(), response);
throw new IOException("Cloudflare Turn http failure : " + response.statusCode());
}
final CloudflareTurnResponse cloudflareTurnResponse = SystemMapper.jsonMapper()
.readValue(response.body(), CloudflareTurnResponse.class);
return new TurnToken(
cloudflareTurnResponse.iceServers().username(),
cloudflareTurnResponse.iceServers().credential(),
clientCredentialTtl.toSeconds(),
turnUrls,
cloudflareTurnComposedUrls,
turnHostname
);
}
}
@@ -1,30 +0,0 @@
/*
* Copyright 2021 Signal Messenger, LLC
* SPDX-License-Identifier: AGPL-3.0-only
*/
package org.whispersystems.textsecuregcm.auth;
import jakarta.ws.rs.WebApplicationException;
import jakarta.ws.rs.core.Response;
import jakarta.ws.rs.core.Response.Status;
import java.util.Base64;
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 != UnidentifiedAccessUtil.UNIDENTIFIED_ACCESS_KEY_LENGTH) {
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;
}
}
Loaded 100 of 1414 files, more files were not shown because too many files have changed in this diff. Show more