r/SpringBoot • Junior Dev • Oct 19 '24

is spring security enough to have a fully secured system (auth, endpoints...) ?

Well I'm building a RESTful API for my project, I'm about to set up security for auth and my endpoints, so my question is can we have a fully secured system only by spring security without the need of any 3rd party tools like JWT or oauth2...

27 Upvotes

10 comments sorted by

9

u/wpfeiffe Oct 19 '24

Yes it will support your own auth out of the box. If you are good with session based security, there is just a little bit to implement/config and it locks down endpoints, supports CORS security etc. It defaults to least access principles. Not the easiest to work with but it is secure when configured correctly.

1

u/Yew2S Junior Dev Oct 19 '24

Thanks man I'm going to do my research about this, any blogs or youtube channels would you recommend ?

7

u/wpfeiffe Oct 19 '24

This is a pretty deep dive but gives you most of the basics if I recall. https://youtu.be/iJ2muJniikY?si=ONV_a2z5pLfwzVLF

7

u/smutje187 Oct 19 '24

JWT is not a third party tool, Spring can produce JWT on its own - it’s just a signed JSON document.

2

u/Yew2S Junior Dev Oct 19 '24

yeah yeah I know I used the wrong keyword for that

5

u/http_error_408 Oct 19 '24

RemindMe! 252h

4

u/[deleted] Oct 20 '24

[removed] — view removed comment

1

u/Yew2S Junior Dev Oct 20 '24

very informative, thanks mate