Tim Möhlmann
c8e0b30e17
fix(oidc): return bad request for base64 errors ( #7730 )
...
* fix(oidc): return bad request for base64 errors
We've recently noticed an increased amount of 500: internal server error status returns on zitadel cloud.
The source of these errors appear to be erroneous input in fields that are supposed to be bas64 formatted.
```
time=2024-04-08T14:05:47.600Z level=ERROR msg="request error" oidc_error.parent="ID=OIDC-AhX2u Message=Errors.Internal Parent=(illegal base64 data at input byte 8)" oidc_error.description=Errors.Internal oidc_error.type=server_error status_code=500
```
Within the possible code paths of the token endpoint there are a couple of uses of base64.Encoding.DecodeString of which a returned error was not properly wrapped, but returned as-is.
This causes the oidc error handler to return a 500 with the `OIDC-AhX2u` ID.
We were not able to pinpoint the exact errors that are happening to any one call of `DecodeString`.
This fix wraps all errors from `DecodeString` so that proper 400: bad request is returned with information about the error. Each wrapper now has an unique error ID, so that logs will contain the source of the error as well.
This bug was reported internally by the ops team.
* catch op.ErrInvalidRefreshToken
2024-04-09 08:42:59 +02:00
..
2023-12-08 15:30:55 +01:00
2024-02-26 12:49:43 +02:00
2024-02-26 12:49:43 +02:00
2024-03-14 09:56:23 +00:00
2024-02-26 12:49:43 +02:00
2024-02-26 12:49:43 +02:00
2024-02-26 12:49:43 +02:00
2024-02-26 12:49:43 +02:00
2024-02-26 12:49:43 +02:00
2023-12-08 15:30:55 +01:00
2023-12-08 15:30:55 +01:00
2023-12-08 15:30:55 +01:00
2023-12-08 15:30:55 +01:00
2023-12-05 17:01:03 +00:00
2024-04-05 09:35:49 +00:00
2023-10-19 12:19:10 +02:00
2024-04-05 09:35:49 +00:00
2024-04-05 09:35:49 +00:00
2023-10-27 17:43:13 +00:00
2023-10-27 17:43:13 +00:00
2022-12-01 13:31:46 +01:00
2022-04-26 23:01:45 +00:00
2023-12-20 13:21:08 +01:00
2024-04-03 09:06:21 +03:00
2024-04-03 09:06:21 +03:00
2024-04-05 09:35:49 +00:00
2023-10-19 15:21:31 +00:00
2022-04-26 23:01:45 +00:00
2022-04-26 23:01:45 +00:00
2022-10-17 19:19:15 +00:00
2023-09-29 11:26:14 +02:00
2024-01-10 15:02:17 +00:00
2024-01-10 15:02:17 +00:00
2023-12-08 15:30:55 +01:00
2024-04-05 09:35:49 +00:00
2023-12-08 15:30:55 +01:00
2023-10-27 17:43:13 +00:00
2024-04-03 10:43:43 +00:00
2023-12-08 15:30:55 +01:00
2023-12-08 15:30:55 +01:00
2024-04-03 10:43:43 +00:00
2023-12-08 15:30:55 +01:00
2023-12-08 15:30:55 +01:00
2023-10-19 12:19:10 +02:00
2023-12-08 15:30:55 +01:00
2023-12-08 15:30:55 +01:00
2023-10-19 12:19:10 +02:00
2023-12-08 15:30:55 +01:00
2023-12-08 15:30:55 +01:00
2023-10-19 15:21:31 +00:00
2024-04-05 09:35:49 +00:00
2023-12-08 15:30:55 +01:00
2024-03-20 10:18:46 +00:00
2024-03-12 13:50:13 +00:00
2024-03-20 10:18:46 +00:00
2024-04-03 10:43:43 +00:00
2023-12-08 15:30:55 +01:00
2023-12-19 10:25:50 +00:00
2024-04-03 10:43:43 +00:00
2023-12-08 15:30:55 +01:00
2023-12-08 15:30:55 +01:00
2024-04-05 09:35:49 +00:00
2024-04-05 09:35:49 +00:00
2023-12-08 15:30:55 +01:00
2023-12-08 15:30:55 +01:00
2023-12-08 15:30:55 +01:00
2023-12-08 15:30:55 +01:00
2022-04-26 23:01:45 +00:00
2023-12-08 15:30:55 +01:00
2023-12-08 15:30:55 +01:00
2023-10-19 15:21:31 +00:00
2022-04-26 23:01:45 +00:00
2023-12-08 15:30:55 +01:00
2023-12-08 15:30:55 +01:00
2023-12-08 15:30:55 +01:00
2023-12-08 15:30:55 +01:00
2023-12-21 10:03:37 +01:00
2023-10-26 05:54:09 +00:00
2023-12-08 15:30:55 +01:00
2023-12-08 15:30:55 +01:00
2022-04-26 23:01:45 +00:00
2023-10-19 12:19:10 +02:00
2024-04-03 10:43:43 +00:00
2023-12-19 10:25:50 +00:00
2023-12-19 10:25:50 +00:00
2024-04-03 10:43:43 +00:00
2024-04-03 10:43:43 +00:00
2023-12-08 15:30:55 +01:00
2023-01-25 09:49:41 +01:00
2023-12-08 15:30:55 +01:00
2023-12-08 15:30:55 +01:00
2024-04-03 10:43:43 +00:00
2023-12-08 15:30:55 +01:00
2023-12-08 15:30:55 +01:00
2024-04-03 10:43:43 +00:00
2023-12-08 15:30:55 +01:00
2023-12-08 15:30:55 +01:00
2024-04-03 10:43:43 +00:00
2023-12-08 15:30:55 +01:00
2023-12-08 15:30:55 +01:00
2023-03-28 21:36:52 +02:00
2023-12-08 15:30:55 +01:00
2023-12-08 15:30:55 +01:00
2024-03-20 10:18:46 +00:00
2024-02-28 10:21:11 +00:00
2023-10-19 12:19:10 +02:00
2023-12-08 15:30:55 +01:00
2023-12-08 15:30:55 +01:00
2023-10-10 12:45:45 +00:00
2023-12-08 15:30:55 +01:00
2024-04-05 09:35:49 +00:00
2022-04-26 23:01:45 +00:00
2022-09-12 18:18:08 +02:00
2022-09-12 18:18:08 +02:00
2024-01-17 10:16:48 +00:00
2024-01-17 10:16:48 +00:00
2024-01-17 10:16:48 +00:00
2024-01-17 10:16:48 +00:00
2024-04-05 09:35:49 +00:00
2022-04-26 23:01:45 +00:00
2022-10-07 09:44:28 +00:00
2023-07-06 08:38:13 +02:00
2022-04-26 23:01:45 +00:00
2024-03-20 10:18:46 +00:00
2024-03-20 10:18:46 +00:00
2024-04-09 08:42:59 +02:00
2022-04-26 23:01:45 +00:00
2023-12-08 15:30:55 +01:00
2023-12-08 15:30:55 +01:00
2023-03-28 21:36:52 +02:00
2022-04-26 23:01:45 +00:00
2023-12-08 15:30:55 +01:00
2023-12-08 15:30:55 +01:00
2022-04-26 23:01:45 +00:00
2023-12-08 15:30:55 +01:00
2023-12-08 15:30:55 +01:00
2023-10-19 15:21:31 +00:00
2023-12-08 15:30:55 +01:00
2023-12-08 15:30:55 +01:00
2022-04-26 23:01:45 +00:00
2023-12-08 15:30:55 +01:00
2023-12-08 15:30:55 +01:00
2024-04-03 10:43:43 +00:00
2023-12-08 15:30:55 +01:00
2023-12-08 15:30:55 +01:00
2024-04-03 10:43:43 +00:00
2023-12-08 15:30:55 +01:00
2023-12-08 15:30:55 +01:00
2024-04-05 09:35:49 +00:00
2024-04-05 09:35:49 +00:00
2023-12-08 15:30:55 +01:00
2023-12-08 15:30:55 +01:00
2023-12-08 15:30:55 +01:00
2023-12-08 15:30:55 +01:00
2022-04-26 23:01:45 +00:00
2023-12-08 15:30:55 +01:00
2023-12-08 15:30:55 +01:00
2022-09-20 14:32:09 +00:00
2023-12-08 15:30:55 +01:00
2023-12-08 15:30:55 +01:00
2022-11-30 17:01:17 +01:00
2023-12-08 15:30:55 +01:00
2023-12-08 15:30:55 +01:00
2023-12-21 10:03:37 +01:00
2024-04-03 10:43:43 +00:00
2023-12-08 15:30:55 +01:00
2023-12-08 15:30:55 +01:00
2024-04-03 10:43:43 +00:00
2023-12-08 15:30:55 +01:00
2023-12-08 15:30:55 +01:00
2022-11-30 17:01:17 +01:00
2022-04-26 23:01:45 +00:00
2024-04-03 10:43:43 +00:00
2023-12-19 10:25:50 +00:00
2023-12-19 10:25:50 +00:00
2024-04-03 10:43:43 +00:00
2023-12-08 15:30:55 +01:00
2023-12-08 15:30:55 +01:00
2023-01-25 09:49:41 +01:00
2023-12-08 15:30:55 +01:00
2023-12-08 15:30:55 +01:00
2024-04-03 10:43:43 +00:00
2023-12-08 15:30:55 +01:00
2023-12-08 15:30:55 +01:00
2024-04-03 10:43:43 +00:00
2023-12-08 15:30:55 +01:00
2023-12-08 15:30:55 +01:00
2023-03-28 21:36:52 +02:00
2023-12-08 15:30:55 +01:00
2023-12-08 15:30:55 +01:00
2024-04-05 09:35:49 +00:00
2023-12-21 10:03:37 +01:00
2023-12-08 15:30:55 +01:00
2024-04-05 09:35:49 +00:00
2023-10-26 05:54:09 +00:00
2022-04-26 23:01:45 +00:00
2023-07-20 04:06:16 +00:00
2022-04-26 23:01:45 +00:00
2023-01-25 09:49:41 +01:00
2022-12-08 08:11:49 +01:00
2022-04-26 23:01:45 +00:00
2023-12-08 15:30:55 +01:00
2022-04-26 23:01:45 +00:00
2023-03-28 21:36:52 +02:00
2024-04-05 09:35:49 +00:00
2024-04-05 09:35:49 +00:00
2024-04-05 09:35:49 +00:00
2024-04-05 09:35:49 +00:00
2024-04-03 10:43:43 +00:00
2024-04-05 09:35:49 +00:00
2023-12-08 15:30:55 +01:00
2022-04-26 23:01:45 +00:00
2024-04-05 09:35:49 +00:00
2024-04-05 09:35:49 +00:00
2024-04-05 09:35:49 +00:00
2023-04-05 11:42:00 +00:00
2023-12-08 15:30:55 +01:00
2023-12-08 15:30:55 +01:00
2023-12-08 15:30:55 +01:00
2024-04-05 09:35:49 +00:00
2023-04-11 15:07:32 +00:00
2022-04-26 23:01:45 +00:00
2023-12-08 15:30:55 +01:00
2023-12-08 15:30:55 +01:00
2022-04-26 23:01:45 +00:00
2023-12-08 15:30:55 +01:00
2023-12-08 15:30:55 +01:00
2022-04-26 23:01:45 +00:00
2023-12-08 15:30:55 +01:00
2023-12-08 15:30:55 +01:00
2022-04-26 23:01:45 +00:00
2022-04-26 23:01:45 +00:00
2023-12-08 15:30:55 +01:00
2023-12-08 15:30:55 +01:00
2023-12-08 15:30:55 +01:00
2023-12-08 15:30:55 +01:00
2023-12-08 15:30:55 +01:00
2023-12-08 15:30:55 +01:00
2023-10-19 12:19:10 +02:00
2023-09-15 16:58:45 +02:00
2023-12-08 15:30:55 +01:00
2023-12-08 15:30:55 +01:00
2023-12-09 08:59:51 +00:00
2023-12-05 11:12:01 +00:00
2023-12-08 15:30:55 +01:00
2024-04-08 08:15:44 +00:00
2023-08-11 15:36:18 +00:00
2023-12-09 08:59:51 +00:00
2024-04-05 09:35:49 +00:00
2024-04-05 09:35:49 +00:00
2023-12-09 08:59:51 +00:00
2023-12-08 15:30:55 +01:00
2023-12-08 15:30:55 +01:00
2024-04-05 09:35:49 +00:00
2023-10-19 12:19:10 +02:00
2023-12-08 15:30:55 +01:00
2023-12-08 15:30:55 +01:00
2023-12-08 15:30:55 +01:00
2023-12-08 15:30:55 +01:00
2022-04-26 23:01:45 +00:00
2024-03-20 10:18:46 +00:00
2024-03-12 13:50:13 +00:00
2024-03-20 10:18:46 +00:00
2023-10-19 15:21:31 +00:00
2024-01-02 14:26:31 +00:00
2023-08-15 12:47:05 +00:00
2023-12-08 15:30:55 +01:00
2023-12-21 10:03:37 +01:00
2022-04-26 23:01:45 +00:00
2022-08-24 11:38:59 +02:00
2023-12-08 15:30:55 +01:00
2024-04-03 10:43:43 +00:00
2024-04-03 10:43:43 +00:00
2022-04-26 23:01:45 +00:00
2023-12-08 15:30:55 +01:00
2023-12-08 15:30:55 +01:00
2023-12-08 15:30:55 +01:00
2023-12-08 15:30:55 +01:00
2023-04-25 09:02:29 +02:00
2023-12-08 15:30:55 +01:00
2024-04-05 09:35:49 +00:00
2024-04-03 10:43:43 +00:00
2024-04-05 09:35:49 +00:00
2024-04-05 09:35:49 +00:00
2023-09-07 14:06:11 +00:00
2023-08-15 12:47:05 +00:00
2023-12-08 15:30:55 +01:00
2024-04-05 09:35:49 +00:00
2024-04-05 09:35:49 +00:00
2024-04-05 09:35:49 +00:00
2024-04-05 09:35:49 +00:00
2024-04-03 10:43:43 +00:00
2023-12-08 15:30:55 +01:00
2024-04-05 09:35:49 +00:00
2024-04-03 10:43:43 +00:00
2023-12-08 15:30:55 +01:00
2023-12-08 15:30:55 +01:00
2024-04-03 10:43:43 +00:00
2024-03-20 10:18:46 +00:00
2024-04-04 15:58:40 +00:00
2024-04-05 09:35:49 +00:00
2023-08-11 15:36:18 +00:00
2024-04-05 09:35:49 +00:00
2024-04-05 09:35:49 +00:00
2023-08-04 11:35:36 +02:00
2023-12-08 18:22:07 +01:00
2024-03-27 18:22:17 +00:00
2024-04-03 10:43:43 +00:00
2023-12-08 15:30:55 +01:00
2024-03-13 18:21:19 +00:00
2024-04-05 09:35:49 +00:00
2024-04-05 09:35:49 +00:00
2024-04-05 09:35:49 +00:00
2023-12-08 15:30:55 +01:00
2023-12-08 15:30:55 +01:00
2022-07-06 14:09:49 +02:00
2022-11-30 17:01:17 +01:00
2023-12-08 15:30:55 +01:00
2023-12-08 15:30:55 +01:00
2024-04-03 10:43:43 +00:00
2023-12-08 15:30:55 +01:00
2023-12-08 15:30:55 +01:00
2024-04-03 10:43:43 +00:00
2023-12-08 15:30:55 +01:00
2023-12-08 15:30:55 +01:00
2024-03-12 13:50:13 +00:00
2024-03-12 13:50:13 +00:00
2024-03-12 13:50:13 +00:00
2024-03-20 10:18:46 +00:00
2024-02-14 07:22:55 +00:00
2024-04-05 09:35:49 +00:00
2024-04-05 09:35:49 +00:00
2024-04-05 09:35:49 +00:00
2023-12-21 10:03:37 +01:00
2024-04-05 09:35:49 +00:00
2024-04-05 09:35:49 +00:00
2024-04-05 09:35:49 +00:00
2024-04-05 09:35:49 +00:00
2024-04-05 09:35:49 +00:00
2024-02-14 07:22:55 +00:00
2024-04-05 09:35:49 +00:00
2023-12-21 10:03:37 +01:00
2023-12-08 15:30:55 +01:00
2023-08-02 18:57:53 +02:00
2023-12-08 15:30:55 +01:00
2023-06-27 14:36:07 +02:00
2023-12-21 10:03:37 +01:00
2023-12-21 10:03:37 +01:00
2024-04-05 09:35:49 +00:00