mosquitto-jwt-auth icon indicating copy to clipboard operation
mosquitto-jwt-auth copied to clipboard

ValidationError(UnsupportedKeyAlgorithm) when using EC (ES256) alg with JWKS file

Open kgeorgy opened this issue 3 years ago • 4 comments

I'm not sure if it's a mosquitto-jwt-auth related issue or an issue in the biscuit library, but it make it difficult to use with EC based key pair.

kgeorgy avatar Apr 12 '22 07:04 kgeorgy

An example of JWKS file here:

{
  "keys": [
    {
      "kid": "848cb986-9d09-4985-838e-b6cb5cc320e0",
      "kty": "EC",
      "use": "sig",
      "alg": "ES256",
      "crv": "P-256",
      "x": "V029NJ-9S_iE8CeDeeegki97ve8p-9R5rb4hYv0tfhg",
      "y": "w4WjIaNL37d0E9tf5W26apDwkftkelz6jrWHhplHmfc"
    }
  ]
}

kgeorgy avatar Apr 12 '22 07:04 kgeorgy

This is indeed biscuit related. https://github.com/lawliet89/biscuit/blob/53e94cd41c50cda39fd7df0a0ba68f2d3b702130/src/jws/compact.rs#L201

wiomoc avatar Apr 12 '22 08:04 wiomoc

Thank's for the response, I'll open a issue there. I'll let you decide if we should close this issue, or wait that it is supported in biscuit.

kgeorgy avatar Apr 12 '22 08:04 kgeorgy

(see also #14).

@kgeorgy -- can you link the issue you opened in the biscuit project?

abh avatar Dec 31 '22 12:12 abh