• 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:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
  • Paul Clapham
Sheriffs:
  • paul wheaton
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Piet Souris
Bartenders:
  • Mike London

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

 
Ranch Hand
Posts: 32
  • 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: 51
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
Ranch Hand
Posts: 32
  • 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!
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic