System Design · Module 03
Authentication, authorization and security
- Lessons
- 12
- Free
- 1
- Reading
- ~4 h
Your progress
0 / 12 lessons done
Sign in to trackLessons
- Authentication vs authorization: identity vs permissionsFreeA working login does not protect every endpoint. You need separate checks to prevent customers, sellers and staff from accessing the wrong data.
- Password storage: hashing and saltingPassword storage determines what a stolen database reveals. You also need to keep deliberately expensive password checks from exhausting your login servers.
- Sessions and cookies: keeping users logged inLogin bugs often appear after a restart, a second server or a logout. Understanding where session state lives helps you prevent unexpected sign-outs and continued access after logout.
- JWT: stateless authentication tokensYou will meet JWTs in API middleware and identity integrations. Understanding their trust boundaries helps you avoid accepting forged tokens or promising logout behavior your system cannot provide.
- OAuth 2.0 and OpenID Connect: third-party loginA third-party login button crosses several trust boundaries. You need to know what each returned value proves before your application creates a session.
- Service authentication: API keys and mTLSBackground workers and backend applications need identities too. Their credentials must survive deployments without letting one compromised caller access every internal endpoint.
- Access control models: RBAC and ABACMost business applications need more than a logged-in check. You need rules that remain understandable as teams, ownership and resource states change.
- Encryption in transit and at restHTTPS and encrypted disks protect different boundaries. Engineers need to identify the gaps between them, especially when proxies, backups and database exports create new copies of sensitive data.
- Secrets management: keeping credentials out of codeApplications need database passwords, API keys and signing keys. Managing their delivery and replacement prevents routine deployments and credential changes from becoming security incidents or outages.
- Web security: SQL injection, XSS and CSRFA request can carry a valid session and still be dangerous. These attacks explain why database queries, page rendering and browser requests need separate security controls.
- Multi-tenancy: isolating customer dataA valid login does not prove that someone may access a particular organization’s records. Tenant isolation makes that boundary explicit across requests, storage and background work.
- Design: login and single sign-onLogin crosses browser, application, database and identity-provider boundaries. A design must preserve those boundaries during retries, deployments and account changes, not only during a successful sign-in.
Practise with
Terms this module teaches 48
Open glossaryAccess token
A credential an application presents to an API to exercise granted access.
API key
A credential presented to an API to identify a calling application or account.
Attribute-based access control
An access-control model that evaluates facts about a person, resource, action and environment against a policy.
Authenticated encryption
Encryption that protects confidentiality and detects unauthorized modification of the protected data.
Authentication
Establishing confidence that a caller controls the means of signing into a particular account.
Authorization
Deciding whether a caller may perform a requested action on a resource.
Authorization policy
A rule or set of rules that determines whether an action is allowed.
Bearer credential
A credential that can be used by whoever possesses it, without separate proof of a private key.
Bearer token
A credential that a recipient accepts based on possession, without separate proof of a holder-specific key.
Content Security Policy
A browser-enforced policy that restricts resources and execution permitted by a page.
Cookie
A name-value pair a browser stores and returns on requests that match its sending rules.
Credential rotation
Replacing an accepted credential and moving its consumers to the replacement.
Cross-site request forgery
An attack that causes a browser to perform an unwanted authenticated action on another site.
Cross-site scripting
A vulnerability that lets attacker-controlled content execute as code in a web page.
Encryption
Transforming readable data into ciphertext using a key, so recovering the data requires the appropriate decryption authority.
Envelope encryption
Encrypting data with a data key, then encrypting that data key with a separate wrapping key.
HTML sanitization
Processing untrusted HTML to retain permitted markup and remove dangerous constructs according to a policy.
ID token
An OpenID Connect token containing claims about an authenticated user and the authentication, intended for a particular client.
Identity provider
A service that authenticates people and supplies identity information to applications through an agreed protocol.
JWT (JSON Web Token)
A signed token that carries claims, such as a user id and an expiry time, so a server can check it without looking up a session.
JWT claim
A statement carried in a JWT payload, such as its subject, issuer or expiration time.
Key management service
A service that controls access to cryptographic keys and operations using those keys.
Least privilege
Granting only the access needed for the intended work.
Memory-hard function
A function designed to require substantial working memory, with additional computation needed when less memory is used.
Multi-tenancy
Serving several customer organizations through shared software or infrastructure while enforcing their access boundaries.
Mutual TLS
TLS authentication in which both peers authenticate, commonly using certificates and proof of their corresponding private keys.
OAuth 2.0
A framework that lets an application obtain permission to access an API without receiving the user's password for that API.
Offline password attack
Testing password guesses against copied password records without contacting the application.
OpenID Connect
An identity layer on OAuth 2.0 that lets an application verify authentication performed by an identity provider.
Output encoding
Representing data safely for a specific output context so it is not interpreted as surrounding syntax.
Parameterized query
A query supplied to a database API with its SQL structure separate from its data values.
Password salt
A fresh random value supplied to a password-hashing function and stored with its result.
Password verifier
Stored data used to check whether a submitted password matches the registered password without storing the original password.
Password work factor
A setting that controls the computational or memory expense of a password-hashing calculation.
Permission
A grant to perform a named operation on a resource or within a defined scope.
Principal
The verified identity acting on a request, such as a customer account.
Proof Key for Code Exchange
A mechanism that connects an authorization code exchange to a secret verifier created when the authorization request began.
Role-based access control
An access-control model that assigns permissions to roles and assigns roles to users.
Row-level security
Database policies that restrict which individual rows a database role may read or change.
Secret
A value whose possession grants access or another sensitive capability.
Secrets manager
A service that stores secret values and controls their retrieval.
Session
A record that connects later requests to an earlier interaction, such as a successful login.
Session fixation
An attack that keeps an attacker-known session token in use after a victim signs in.
Session token
A credential a client presents to identify a session.
Single sign-on
Using an existing identity-provider login to sign into another application without necessarily entering credentials again.
SQL injection
A vulnerability where untrusted data changes the syntax or meaning of a database query.
Tenant
An organization or customer group whose private resources form an access boundary within a shared application.
Workload identity
An identity assigned to a running application or job rather than to a person or network address.