The approach uses mTLS (client auth) in HAProxy, letting valid client certificates fetch the signed tokens, which then can be used with the (demo service) for 60 seconds.
With this approach, the JWT is no longer treated directly as a JWT, but instead is treated as a signed blob with custom processing, then treated as a JWT under the hood.
For JWT generation and validation starting point (as used in the prototype osprey 1) see https://github.com/jpegleg/royal_blobs_jwt_service
For JWT generation and validation starting point + program execution template (as used in the prototype osprey 2) see https://github.com/jpegleg/fixadm
Compile the royal_blobs_jwt_service with cargo, put the binary in the Docker build dir with this is a working demonstration:
https://github.com/jpegleg/osprey_validator/tree/main/docker/osprey_1
Compile the fixadm_service with cargo, put the binary in the Docker build dir along with the demo files and generated files:
https://github.com/jpegleg/osprey_validator/tree/main/docker/osprey_2
Compile the three_pki with cargo, put the binary in the Docker build dir along with the demo files and generated files:
https://github.com/jpegleg/osprey_validator/tree/main/docker/osprey_3