George Joseph
7d615466ee
res_pjsip_authenticator_digest: Make correct error messages appear again.
...
When an incoming request can't be matched to an endpoint, the "artificial"
auth object is used to create a challenge to return in a 401 response and we
emit a "No matching endpoint found" log message. If the client then responds
with an Authorization header but the request still can't be matched to an
endpoint, the verification will fail and, as before, we'll create a challenge
to return in a 401 response and we emit a "No matching endpoint found" log
message. HOWEVER, because there WAS an Authorization header and it failed
verification, we should have also been emitting a "Failed to authenticate"
log message but weren't because there was a check that short-circuited that
it if the artificial auth was used. Since many admins use the "Failed to
authenticate" message with log parsers like fail2ban, those attempts were not
being recognized as suspicious.
Changes:
* digest_check_auth() now always emits the "Failed to authenticate" log
message if verification of an Authorization header failed even if the
artificial auth was used.
* The verification logic was refactored to be clearer about the handling
of the return codes from verify().
* Comments were added clarify what return codes digest_check_auth() should
return to the distributor and the implications of changing them.
Resolves : #1095
2025-01-29 09:57:57 -07:00
..
2023-05-08 18:13:35 +00:00
2024-09-12 18:45:46 +00:00
2025-01-23 18:36:04 +00:00
2024-05-09 13:56:11 +00:00
2023-01-31 12:59:16 -06:00
2025-01-23 18:36:04 +00:00
2025-01-29 09:57:43 -07:00
2024-03-07 14:17:23 +00:00
2025-01-23 18:36:04 +00:00
2021-12-03 10:38:39 -06:00
2024-09-12 18:45:46 +00:00
2022-03-23 18:08:17 -05:00
2023-05-08 18:13:35 +00:00
2022-12-08 12:37:12 -06:00
2025-01-23 18:36:04 +00:00
2022-04-26 14:26:48 -05:00
2025-01-23 18:36:04 +00:00
2021-11-18 16:25:51 -06:00
2021-11-18 16:25:51 -06:00
2021-11-18 16:25:51 -06:00
2021-11-18 16:25:51 -06:00
2021-11-18 16:25:51 -06:00
2023-09-06 16:55:59 +00:00
2021-11-18 16:25:51 -06:00
2021-11-18 16:25:51 -06:00
2021-11-18 16:25:51 -06:00
2021-11-18 16:25:51 -06:00
2021-11-18 16:25:51 -06:00
2025-01-23 18:36:04 +00:00
2024-03-07 14:17:22 +00:00
2020-01-14 09:36:44 -06:00
2024-07-11 13:22:44 +00:00
2019-10-24 09:18:38 -05:00
2019-10-24 09:18:38 -05:00
2024-03-07 14:17:22 +00:00
2025-01-23 18:36:04 +00:00
2021-12-03 10:38:39 -06:00
2024-03-07 14:17:22 +00:00
2022-07-08 09:28:23 -05:00
2021-11-15 16:37:34 -06:00
2021-12-03 10:38:39 -06:00
2023-09-06 16:55:59 +00:00
2025-01-23 18:36:03 +00:00
2022-08-01 09:58:58 -05:00
2021-11-15 16:37:34 -06:00
2023-07-10 11:49:48 +00:00
2023-07-10 11:49:48 +00:00
2025-01-23 18:36:04 +00:00
2021-03-10 04:22:36 -06:00
2021-03-10 04:22:36 -06:00
2018-12-13 17:03:59 -05:00
2021-06-10 16:30:28 -05:00
2021-03-10 04:22:36 -06:00
2021-03-10 04:22:36 -06:00
2021-03-10 04:22:36 -06:00
2021-03-10 04:22:36 -06:00
2021-03-10 04:22:36 -06:00
2022-07-12 07:52:12 -05:00
2022-07-12 07:52:12 -05:00
2020-11-20 13:51:02 -06:00
2018-11-18 15:08:16 -05:00
2025-01-23 18:36:04 +00:00
2025-01-23 18:36:04 +00:00
2021-11-15 16:37:34 -06:00
2024-03-07 14:17:22 +00:00
2025-01-23 18:36:04 +00:00
2025-01-23 18:36:04 +00:00
2025-01-23 18:36:03 +00:00
2025-01-23 18:36:04 +00:00
2025-01-23 18:36:04 +00:00
2019-04-23 17:40:15 -05:00
2025-01-23 18:36:04 +00:00
2021-12-03 10:38:39 -06:00
2025-01-23 18:36:04 +00:00
2025-01-23 18:36:03 +00:00
2025-01-23 18:36:04 +00:00
2025-01-23 18:36:04 +00:00
2025-01-23 18:36:04 +00:00
2025-01-23 18:36:04 +00:00
2022-12-13 10:52:58 -06:00
2025-01-29 09:57:57 -07:00
2024-03-07 14:17:23 +00:00
2024-09-12 18:45:46 +00:00
2022-09-13 04:51:00 -05:00
2022-09-13 04:51:00 -05:00
2020-11-19 16:14:33 -06:00
2024-01-12 18:29:19 +00:00
2020-04-20 11:03:26 -05:00
2022-09-13 04:51:00 -05:00
2025-01-23 18:36:04 +00:00
2024-01-12 18:29:19 +00:00
2024-01-12 18:29:19 +00:00
2022-09-26 15:03:32 -05:00
2025-01-23 18:36:04 +00:00
2022-03-24 12:00:58 -05:00
2024-09-12 18:45:46 +00:00
2023-09-06 16:55:59 +00:00
2024-01-12 18:29:19 +00:00
2024-01-12 18:29:20 +00:00
2025-01-23 18:36:04 +00:00
2020-04-20 11:03:26 -05:00
2025-01-23 18:36:03 +00:00
2025-01-23 18:36:04 +00:00
2025-01-23 18:36:04 +00:00
2024-07-11 13:22:44 +00:00
2025-01-23 18:36:04 +00:00
2020-12-16 08:01:11 -06:00
2025-01-23 18:36:04 +00:00
2025-01-23 18:36:04 +00:00
2024-05-09 13:56:11 +00:00
2025-01-23 18:36:03 +00:00
2023-07-10 11:49:48 +00:00
2023-05-08 18:13:36 +00:00
2024-11-14 20:01:01 +00:00
2024-05-09 13:56:11 +00:00
2024-03-07 14:17:23 +00:00
2024-05-09 13:56:11 +00:00
2024-03-07 14:17:22 +00:00
2024-01-12 18:29:18 +00:00
2024-11-14 20:01:01 +00:00
2022-01-17 08:25:58 -06:00
2021-11-15 16:37:34 -06:00
2025-01-23 18:36:04 +00:00
2019-05-20 20:33:58 -05:00
2020-01-14 10:07:20 -06:00
2021-03-16 10:30:43 -05:00
2025-01-23 18:36:04 +00:00
2025-01-23 18:36:03 +00:00
2018-11-18 15:08:16 -05:00
2025-01-23 18:36:04 +00:00
2021-11-15 16:37:34 -06:00
2025-01-23 18:36:03 +00:00
2018-11-21 09:56:16 -05:00
2024-01-12 18:29:18 +00:00
2024-03-07 14:17:22 +00:00
2024-11-14 20:01:00 +00:00
2018-11-21 09:56:16 -05:00
2021-11-15 16:37:34 -06:00
2024-01-12 18:29:18 +00:00
2023-01-30 08:26:18 -06:00
2024-09-12 18:45:46 +00:00
2025-01-23 18:36:04 +00:00
2024-09-26 11:02:03 -05:00
2020-06-08 10:50:16 -05:00
2021-12-03 10:38:39 -06:00
2024-01-12 18:29:19 +00:00
2024-11-14 20:01:00 +00:00
2018-12-11 12:29:09 -05:00
2025-01-23 18:36:04 +00:00
2025-01-23 18:36:04 +00:00
2024-11-14 20:01:00 +00:00