diff --git a/fence/jwt/keys.py b/fence/jwt/keys.py index 6e247eaed..d08e9d5f0 100644 --- a/fence/jwt/keys.py +++ b/fence/jwt/keys.py @@ -188,7 +188,7 @@ def public_key_to_jwk(self): except AttributeError: # there is no need to decode values that are already strings pass - jwk_dict.update({"use": "sig", "key_ops": "verify", "kid": self.kid}) + jwk_dict.update({"use": "sig", "key_ops": ["verify"], "kid": self.kid}) return jwk_dict diff --git a/tests/rfc7517/test_jwks.py b/tests/rfc7517/test_jwks.py index 7a74025f9..29d036dec 100644 --- a/tests/rfc7517/test_jwks.py +++ b/tests/rfc7517/test_jwks.py @@ -41,7 +41,7 @@ def test_response_values(app, client): assert key["alg"] == "RS256" assert key["kty"] == "RSA" assert key["use"] == "sig" - assert key["key_ops"] == "verify" + assert key["key_ops"] == ["verify"] assert key["kid"] in app_kids # Attempt to reproduce the public key from the JWK response. key_pem = jwk.construct(key).to_pem().decode("utf-8")