Skip to main content

Spring Security, Authentication vs Authorization, JWT, OAuth 2.0 and OpenID Connect

Learn Spring Security, Authentication vs Authorization, JWT, OAuth 2.0 and OpenID Connect (Phase 8 · Security (Essential), Microservices) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.

Authentication vs authorization, and security in a microservice world • Authentication (AuthN) : who are you? Authorization (AuthZ) : what may you do? In microservices, authentication happens once (at an identity provider / auth server) and the proof travels as a token ; every service validates the token and authorises locally ("trust nobody": zero trust). Avoid per-service login forms and shared session stores. • Architecture: Authorization Server / IdP (Keycloak, Spring Authorization Server, Okta, Auth0, Entra ID) issues tokens; the API gateway and services are OAuth2 resource servers ;...

More lessons in Phase 8 · Security (Essential)