Score:0

If I sign-then-encrypt a JWT, how does a 3rd party validate that the JWE message is valid?

es flag

Since it is preferred to sign-then-encrypt I was wondering how can another party validate that the message is valid?

The use case I had was the following...

  1. Client authenticates and gets the access token, the access token is a signed JWT from authorization server
  2. Client verifies that the JWT is signed by a key that the client recognizes
  3. Client sends requests with the JWT passed on the header as Bearer token.
  4. when server receives the request, it does a quick check to see if JWT is signed by a key that the resource server recognizes.

Now I want to change that so that the client doesn't need to see the content.

  1. Client authenticates and gets the access token, the access token is JWE from authorization server. Encrypted with public key of resource server.
  2. IS THIS POSSIBLE? Client verifies that the JWE is signed by a key that the client recognizes
  3. Client sends requests with the JWE passed on the header as Bearer token.
  4. IS THIS POSSIBLE? Resource Server verifies that the JWE is signed by a key that the resource server recognizes
  5. Resource server decrypts the JWE to get the JWT claims.

Given the use case above, it makes more sense to encrypt-then-sign, or sign-encrypt-then-sign.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.