What is authentication in system architecture?
Authentication verifies the identity of a user, service, or application. It answers the question: who is making this request?
Questions 151-175: Security Architecture, Multi-Tenancy & Disaster Recovery.
Open a question for the full answer, code and interview guidance.
Authentication verifies the identity of a user, service, or application. It answers the question: who is making this request?
Authorization determines what an authenticated identity is allowed to do. It is evaluated after identity is established and can depend on roles, claims, policies, resource ownership, tenant boundaries, or business rules.
Least privilege means giving users, services, processes, and infrastructure only the permissions they need for their required tasks and no broader access than necessary.
Defense in depth uses multiple independent security controls so failure of one control does not automatically expose the entire system.
Zero Trust is a security approach that avoids assuming a request is trustworthy merely because it originates from an internal network. Access decisions are based on verified identity, device or workload context, policy, and least privilege.
TLS protects data in transit by providing encryption and server authentication, and it can also support client authentication. HTTPS is HTTP carried over TLS.
Mutual TLS authenticates both sides of a TLS connection with certificates. The server presents its certificate as usual, and the client also presents a certificate that the server validates.
Encryption at rest protects stored data when it resides on disks, database files, backups, object storage, or other persistent media.
Secrets management is the controlled storage, distribution, rotation, and auditing of sensitive values such as API keys, database passwords, certificates, and signing credentials.
Configuration files can be copied, logged, packaged, or committed accidentally. Storing production credentials directly in appsettings.json increases the chance that secrets are exposed with application files or source control.
Token-based authentication uses a security token representing an authenticated identity and associated authorization information or references. A client presents the token to an API, which validates it before serving protected resources.
JWT, or JSON Web Token, is a compact token format containing encoded claims and protected by a digital signature or message authentication mechanism. JWTs are commonly used as access tokens, although OAuth does not require access tokens to be JWTs.
OAuth 2.0 is an authorization framework that allows clients to obtain limited access to protected resources. It defines roles and flows for issuing and using access tokens.
OpenID Connect is an identity layer built on OAuth 2.0. It enables clients to authenticate users and obtain standardized identity information, including an ID token.
Rate limiting restricts request volume and can reduce abuse, brute-force attempts, accidental loops, and resource exhaustion. Limits may be applied per IP, user, API key, tenant, route, or another identity.
A Web Application Firewall inspects and filters HTTP traffic before it reaches an application. It can block or challenge traffic matching known malicious patterns, protocol violations, or configured rules.
Input validation verifies that incoming data satisfies the expected shape, range, format, and business constraints before it is used.
Parameterized queries separate SQL command structure from user-supplied values. The database treats parameter values as data rather than executable SQL syntax.
Multi-tenancy is an architecture in which one software system serves multiple customer organizations, called tenants, while maintaining appropriate separation of their data and configuration.
Common models include a shared database with shared tables and TenantId, a shared database with separate schemas, and a separate database per tenant. Hybrid approaches are also possible.
Tenant identity should be derived from a trusted authenticated context and enforced consistently in authorization and data access. Queries, commands, caches, background jobs, and exported files must all preserve the tenant boundary.
Tenant-aware caching ensures cached entries belonging to one tenant cannot be returned to another. Cache keys commonly include the tenant identifier along with the resource identifier.
Disaster recovery is the set of plans, systems, and procedures used to restore service and data after a major failure such as regional infrastructure loss, destructive operator error, or severe data corruption.
RTO, Recovery Time Objective, is the target maximum time to restore an acceptable service after a disruption. RPO, Recovery Point Objective, is the target maximum amount of data loss measured in time.
Backup creates recoverable copies of data for restoration after loss or corruption. Replication maintains additional copies that follow changes from a source. High availability is the broader capability to keep a service operating through failures, often using redundancy and automated failover.