mirror of
https://github.com/open-policy-agent/opa.git
synced 2026-08-13 03:42:35 -06:00
14ff052432
Fixes https://github.com/open-policy-agent/opa/issues/6925 This change modifies the `io.jwt.encode_sign` built-in to marshal the parameters as JSON before signing the JWT. The previous implementation was using String(), which was a sort of pseudo-JSON that was almost correct but used the wrong JSON syntax for the set type. I have chosen to marshal the headers in the same way as the payload as the 'crit' header can also be an array type. I marshal the signature the same way for consistency with the other two. Signed-off-by: Charlie Egan <charlie@styra.com>