• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

liveProject: Protecting User Data with Spring Security and OAuth2 - Symmetric or Asymmetric JWTs

 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Good day,

If you are building a simple application where you expect a small numbers of users only or you don't expect to be big/popular, does it matter if you use/issue symmetric or asymmetric JWTs?

Regards,
Joey
 
Author
Posts: 29
5
Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Joey,

Thanks for the question. My rule of thumb is this one. If the app needs to share keys, you have to use asymmetric.
You should never be allowed to share a symmetric key, regardless of the number of users, since the symmetric key is private.
Once one has the symmetric key, they can use it to sign tokens. Using asymmetric key pairs gives you the advantage of only sharing
the public key to those who only need to check the signature.

Cheers!
Laurentiu
 
Jose Samonte
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you very much for the response!
 
reply
    Bookmark Topic Watch Topic
  • New Topic