惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

MyScale Blog
MyScale Blog
J
Java Code Geeks
Vercel News
Vercel News
A
About on SuperTechFans
G
Google Developers Blog
C
Check Point Blog
腾讯CDC
N
Netflix TechBlog - Medium
博客园 - 司徒正美
S
SegmentFault 最新的问题
D
DataBreaches.Net
博客园_首页
美团技术团队
Stack Overflow Blog
Stack Overflow Blog
博客园 - 聂微东
量子位
雷峰网
雷峰网
IT之家
IT之家
小众软件
小众软件
Blog — PlanetScale
Blog — PlanetScale
博客园 - 三生石上(FineUI控件)
H
Help Net Security
宝玉的分享
宝玉的分享
博客园 - 叶小钗

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
Authentication vs Authorization: Understanding the Differ...
sonali kumari shahi · 2026-06-03 · via DEV Community

sonali kumari shahi

When I started learning Spring Security, I kept seeing two terms everywhere:

Authentication and Authorization

At first, they sounded almost the same to me.
But as I learned more, I realized they answer two completely different questions.
Understanding this difference is important because these concepts are at the heart of every secure application.
Let's break them down in the simplest way possible.

Authentication: Who Are You?

Authentication is the process of verifying a user's identity.
In simple words, the application asks: "Who are you?"

For example, when you log in using your username and password:

   Username: sonali
   Password: ********

The application checks whether these credentials are correct.
If they are correct, you are authenticated.

Think of it like entering a college campus.
The security guard checks your ID card to confirm that you are actually a student.
That's authentication.
✅ Identity Verified

Authorization: What Are You Allowed To Do?

After authentication, another question is asked: "What are you allowed to do?"
This is authorization.
Even if two users are logged in, they may not have the same permissions.

For example:

  • Admin can manage users
  • Employee can view data
  • Customer can access only their own account

Authorization decides what resources a user can access.

Using the same college example:
The security guard verified your identity at the gate.
But that doesn't mean you can enter every room on campus.
Some rooms may be restricted to staff members only.
That's authorization.
✅ Permission Check

How Spring Security Uses Them

Whenever a request enters a Spring Boot application:
Request

Authentication

Authorization

Controller

First, Spring Security verifies the user.
Then it checks whether the user has permission to access the requested resource.
Only after both checks pass does the request reach the controller.

The Big Takeaway

Authentication and Authorization work together, but they solve different problems.

Authentication confirms your identity.
Authorization determines your permissions.

A simple way to remember:
Authentication = Who are you?
Authorization = What can you do?

Once I understood this difference, many Spring Security concepts became much easier to understand. I hope this explanation helps you too.