Difference between Authentication and Authorization in LLD System Design (original) (raw)

Last Updated : 12 Dec, 2024

Two fundamental ideas in system design, particularly in low-level design (LLD), are authentication and authorization. While authorization establishes what resources or actions a user is permitted to access, authentication confirms a person's identity. Both are essential for building secure systems but serve different purposes. This article explains the differences between these two processes.

Authentication-and-Authorization

Table of Content

What is Authentication?

The process of authenticating persons or entities attempting to access a computer system, application, or network is utilized in system design. By limiting access to just authorized people or systems, it guards against unlawful use of resources and sensitive data.

Authentication Methods

Determining what functions or actions a person, system, or other entity is permitted to carry out within a software system or network is known as authorization. Ensuring that only authorized individuals or entities have access to particular resources, functionality, or information is an essential component of security.

Authorization Models

After the authentication step, users want access to specific data to do their tasks. For this, they need authorization. Here are some common authorization methods:

Differences between Authentication and Authorization

Aspect Authentication Authorization
Definition Verifies the user's identity. Determines the user's access to resources or actions.
Focus "Who are you?" "What are you allowed to do?"
Process Typically involves usernames, passwords, or biometrics. Involves checking permissions or roles assigned to the user.
Order Happens before Authorization. Happens after Authentication.
Scope Ensures the user is genuine. Ensures the user has access rights.
Implementation Login pages, OTP, fingerprint scans. Role-based access control (RBAC), policy checks.
Example Entering a password to log into an account. Checking if the logged-in user can view or edit a file.
Security Purpose Protects against unauthorized user access. Protects against unauthorized actions by authenticated users.

Conclusion

When you're designing a system, it's super important to understand two big things: authentication and authorization.

By paying attention to these details when building a system, developers can make sure it's not just good at confirming identities but also good at controlling who gets access to what. This helps a lot in preventing unauthorized actions and keeping data safe.