Questions tagged [jwk]

A JSON Web Key is a JSON data structure that represents a cryptographic key.

A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key.

The specification for this structure is in RFC 7517.

218 questions
0
votes
1 answer

how to decode and verify aws cognito JWT IdToken from nodeJS and Browser?

I would like to decode & verify the IdToken provided by AWS cognito. Simple code that could be used on NodeJs(server) and Browser (the same code). I tried to use the classic jwt-decode but it has some problems on the browser side due dependencies on…
Jaekov Segovia
  • 113
  • 1
  • 7
0
votes
1 answer

Spring - jwkSet throwing null pointer

I've got two apps deployed to a jboss7 server, a springboot oauth app (app1) and an api app (app2) that uses the token it generates. Both apps deploy and run fine, however when I deploy app2 and app1 is already running, app1 will fail to instantiate…
PT_C
  • 1,178
  • 5
  • 24
  • 57
0
votes
1 answer

JWT decode requires audience #870

I tried to use the documentation found in here: https://pyjwt.readthedocs.io/en/latest/usage.html#retrieve-rsa-signing-keys-from-a-jwks-endpoint related to the validation of a JWT token using JWKS but it was not working for me using Keycloak…
ddtxra
  • 35
  • 5
0
votes
1 answer

Requesting certificate for JWKS from CA

If I want to use a non self-signed cert to use in a JWK file, what type of cert should I request from the CA? SSL or Code-signing cert?
rodders
  • 354
  • 1
  • 11
0
votes
1 answer

How do I set the signingkey from a jwk to verify a jwt with jjwt

To verify and parse the jwt token the code is public static Claims decodeJWT(String jwt) { //This line will throw an exception if it is not a signed JWS (as expected) Claims claims = Jwts.parser() …
Julian
  • 334
  • 4
  • 18
0
votes
0 answers

SignJWT : TypeError: Key for the ES256 algorithm must be one of type KeyObject or CryptoKey

I am trying to connect to gcloud ksm and the a sign a message. My private is loaded from the json file. The isssue is, when i run the code. i get this error "TypeError: Key for the ES256 algorithm must be one of type KeyObject or CryptoKey. " at …
kams
  • 45
  • 1
  • 12
0
votes
2 answers

Convert jwk to pem in nest.js

I have this jwk key that I wanto convert into pem: const jwkey = { kty: 'RSA', kid: 'eecb0ced-4d49-4100-9547-841e4100b756', n: '...very long string', e: 'AQAB', alg: 'RS256', use: 'sig', }; I have tried the libraries like jose, node-rsa…
0
votes
1 answer

How to import backend exported public key in frontend

hi i'm trying to import a jwk generated from the server in my flutter app var signeature = JsonWebSignature.fromCompactSerialization(response.body); var payload = signeature.unverifiedPayload; Map key =…
Zophirel
  • 3
  • 1
0
votes
0 answers

JWK and python cryptography package - can't reproduce matching pub key

I have a JWK generated on a test website: key = { "kty": "EC", "d": "MXrxKTl_o9yIQlExYy9c1LcWZX_OwX3aw-oGP0flUdo", "use": "sig", "crv": "secp256k1", "kid": "Im53aoD8zJoHzOXmfIAUkncONCIeR1pgy_nhvQrwN3s", …
T. Rossi
  • 465
  • 1
  • 6
  • 23
0
votes
1 answer

Converting a .pem RSA Public and Private Key to .der X.509 certificates or JWK strings

I working on a project that uses JSON Web Tokens (JWT). I already have the code that creates the token that is signed by an RSA algorithm which was created by the openssl genrsa -des3 -out .pem 3076. I want to check the…
0
votes
1 answer

Import a pem format public key using import_key API of Azure key vault (python)

Is there a way to import a .pem format public key (starting with -----BEGIN PUBLIC KEY----- and ending with -----END PUBLIC KEY-----) into the Azure key vault in python? Ideally, import_key() method takes the JsonWebKey format to import a RSA public…
Arpana
  • 1
0
votes
0 answers

How to include Request Body in JWT signature

How do I add request Json body in JWT Signature? JWT authorization header is only used for security purpose which means basically claims are security related information or requester details. how can I include post request body in JWT signature…
VJ496
  • 1
0
votes
1 answer

How to convert java.security.PrivateKey to JWK (JSON) format in Android?

I have seen some examples to convert java.security.PublicKey to JWK but I could not find an example to convert java.security.PrivateKey to JWK (JSON) format in Android. Is that even possible? Is there a way to do this without using any 3rd-party…
Ashwin
  • 53
  • 5
0
votes
0 answers

How do I load a JWK into a Java PublicKey object?

I currently have a JWK public key in the following json format(in a file called public_key.json, that public key is a sample): { "productId": "some-product", "kid": "abc123...", "exp": 1669574140, "y": "ABC....", "kty": "EC", …
Thierry Lam
  • 45,304
  • 42
  • 117
  • 144
0
votes
1 answer

Why does jwt verification fail? Quarkus with smallrye jwt, HS256

I have a quarkus app which does not generate jwt tokens itself but possesses a secret key of HS256-signed tokens (qwertyuiopasdfghjklzxcvbnm123456). I need to verify tokens of the incoming network requests, but for every request I get the…
E. Dn
  • 940
  • 1
  • 9
  • 21