cloudflared-mirror/token
Eduardo Gomes 18eecaf151 AUTH-6633 Fix cloudflared access login + warp as auth
## Summary
cloudflared access login and cloudflared access curl fails when the Access application has warp_as_auth enabled.

This bug originates from a 4 year old inconsistency where tokens signed by the nginx-fl-access module include 'aud' as a string, while tokens signed by the access authentication worker include 'aud' as an array of strings.
When the new(ish) feature warp_as_auth is enabled for the app, the fl module signs the token as opposed to the worker like usually.


I'm going to bring this up to the Access team, and try to figure out a way to consolidate this discrepancy without breaking behaviour.

Meanwhile we have this [CUSTESC ](https://jira.cfdata.org/browse/CUSTESC-47987), so I'm making cloudflared more lenient by accepting both []string and string in the token 'aud' field.



Tested this by compiling and running cloudflared access curls to my domains


Closes AUTH-6633
2025-01-21 04:00:28 -08:00
..
encrypt.go TUN-6917: Bump go to 1.19.3 2022-11-07 09:19:19 -08:00
launch_browser_darwin.go TUN-7584: Bump go 1.20.6 2023-07-26 13:52:40 -07:00
launch_browser_other.go TUN-7584: Bump go 1.20.6 2023-07-26 13:52:40 -07:00
launch_browser_unix.go TUN-7584: Bump go 1.20.6 2023-07-26 13:52:40 -07:00
launch_browser_windows.go TUN-7584: Bump go 1.20.6 2023-07-26 13:52:40 -07:00
path.go AUTH-3455: Generate short-lived ssh cert per hostname 2021-03-25 10:38:43 -05:00
shell.go TUN-4067: Reformat code for consistent import order, grouping, and fix formatting. Added goimports target to the Makefile to make this easier in the future. 2021-03-24 10:53:29 -05:00
signal_test.go AUTH-5682 Org token flow in Access logins should pass CF_AppSession cookie 2023-12-18 09:42:33 -06:00
token.go AUTH-6633 Fix cloudflared access login + warp as auth 2025-01-21 04:00:28 -08:00
token_test.go AUTH-6633 Fix cloudflared access login + warp as auth 2025-01-21 04:00:28 -08:00
transfer.go AUTH-4887 Add aud parameter to token transfer url 2023-04-19 21:01:24 +00:00