-
Hello all, I am trying to use a JWS to transfer unverified data between applications. My understanding is that an unsecured JWT is a JWS object where in the JOSE header the value of the alg element is set to none. In other words, an unsecured JWT is a JWS without a signature. So the first thing I tried was creating a JWT without a signature:
I got this response:
So, ok, it won't let me serialize without a signature, so let's sign it and send it over:
Cool, that works. Let's take a look at what's on the other side of the socket:
That results in the following:
Of course the payload is not verified, this is just supposed to be a simple transfer of data, using JWT as a common format to use. I just don't know how to specify that I don't want it to be verified. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
@smacz42 the API is purposefully built to prevent using it without signing and verification steps, so that it is hard to make errors that would be disastrous in security applications. The None algorithm is disabled by default, for example. And as you can see no payload is released without verification. That said I can't possibly understand what is the point of constructing a JWT if you do not want to sign it. What properties are you looking at? What gain do you have from using this formatting if you do not use it for what it is intended to do? |
Beta Was this translation helpful? Give feedback.
-
To get an unverified payload: payload = jwstoken.objects.get("payload") This isn't recommended for obvious reasons. In my case I needed the option to view any payload, verified or not. |
Beta Was this translation helpful? Give feedback.
@smacz42 the API is purposefully built to prevent using it without signing and verification steps, so that it is hard to make errors that would be disastrous in security applications. The None algorithm is disabled by default, for example. And as you can see no payload is released without verification.
That said I can't possibly understand what is the point of constructing a JWT if you do not want to sign it. What properties are you looking at? What gain do you have from using this formatting if you do not use it for what it is intended to do?