ich eine funktionierende Java-Code für authentifying JWT unterzeichnet mit einem Elliptic Curve Digital Signatures (ECDSA) mit SHA-2 ES256 privaten Schlüssel portiert.Fehlersignatur von JWT Überprüfung unterzeichnet mit ES256 auf aws Lambda-Funktion
Die folgende Ausnahme, wenn ich es richtig verstehe, schlägt vor, dass die zugrundeliegende Runtime-Plattform ES256 nicht unterstützt.
Ich bin überrascht, weil AWS Lambda auf der letzten Java 8 open jdk funktioniert und ich dachte, die Kryptografie war vorinstalliert.
Was fehlt mir?
Ist das ein Fehler in JOSE4J? Eine Einschränkung der AWS Lambda-Infrastruktur?
Caused by: org.jose4j.lang.UnresolvableKeyException: Unable to find a suitable verification key for JWS w/ header {"kid":"staging_0","alg":"ES256"} due to an unexpected exception (org.jose4j.lang.InvalidAlgorithmException: ES256 is an unknown, unsupported or unavailable alg algorithm (not one of [none, HS256, HS384, HS512, RS256, RS384, RS512]).) selecting from keys: [org.jose4j.jwk.EllipticCurveJsonWebKey{kty=EC, kid=staging_0, x=jz84fmrLuG5T9cnT-ydQdGjqk2iX2PsVYIcABTkXiqc, y=6oGYrjWEjhUSea5q7izitbcp5o7QlkArnm49OA0cPlI, crv=P-256}, org.jose4j.jwk.EllipticCurveJsonWebKey{kty=EC, kid=prod_0, x=cd5u73HnAueI1mgjuk9JSvU0ekonRCafffwaG-_D5VM, y=QjOMm1fqw3Aevkzzd-RVmlcmGMwPS9uajFN4nLnTwFc, crv=P-256}]
at org.jose4j.keys.resolvers.JwksVerificationKeyResolver.resolveKey(JwksVerificationKeyResolver.java:54)
at org.jose4j.jwt.consumer.JwtConsumer.processContext(JwtConsumer.java:190)
... 6 more
Caused by: org.jose4j.lang.InvalidAlgorithmException: ES256 is an unknown, unsupported or unavailable alg algorithm (not one of [none, HS256, HS384, HS512, RS256, RS384, RS512]).
at org.jose4j.jwa.AlgorithmFactory.getAlgorithm(AlgorithmFactory.java:51)
at org.jose4j.jws.JsonWebSignature.getAlgorithm(JsonWebSignature.java:142)
at org.jose4j.jws.JsonWebSignature.getAlgorithm(JsonWebSignature.java:35)
at org.jose4j.jwk.SelectorSupport.commonFilterForInbound(SelectorSupport.java:49)
at org.jose4j.jwk.VerificationJwkSelector.selectList(VerificationJwkSelector.java:39)
at org.jose4j.jwk.VerificationJwkSelector.select(VerificationJwkSelector.java:33)
at org.jose4j.keys.resolvers.JwksVerificationKeyResolver.resolveKey(JwksVerificationKeyResolver.java:47)
... 7 more