Interview Questions

Get ready for your next interview with our comprehensive question library

Security Architecture (AuthN/AuthZ) Interview Questions

Filter by Difficulty

1.

What is the difference between Authentication and Authorization?

beginner

Authentication (AuthN) verifies "who you are" - confirming the identity of a user, system, or entity.
Authorization (AuthZ) determines "what you can do" - deciding what resources or actions an authenticated entity is permitted to access.

Key differences:

  • Authentication happens first and establishes identity
  • Authorization happens after authentication and grants permissions
  • Authentication is binary (you are or aren't who you claim to be)
  • Authorization is granular (different levels of access to different resources)

Real-world analogy: Think of entering a secure building:

  • Authentication: Showing your ID badge at the entrance to prove your identity
  • Authorization: The badge determines which floors, rooms, and systems you can access
2.

Explain the different authentication factors and provide examples of each.

beginner

Authentication factors are categorized into three types:

  1. Something you know (Knowledge factors):
    • Passwords, PINs, security questions
    • Passphrases, secret keys
  2. Something you have (Possession factors):
    • Smartphones with authenticator apps
    • Hardware tokens, smart cards
    • SMS tokens, email confirmations
  3. Something you are (Inherence factors):
    • Fingerprints, facial recognition
    • Retina scans, voice patterns
    • Behavioral biometrics (typing patterns)
      Multi-Factor Authentication (MFA) combines two or more of these factors to enhance security. For example, using a password (knowledge) + SMS code (possession) provides stronger security than password alone.
3.

What is the Principle of Least Privilege and how do you implement it?

beginner

The Principle of Least Privilege means granting users, systems, and processes only the minimum permissions necessary to perform their job functions.
Implementation strategies:

  1. Start with zero access: Grant permissions only when needed
  2. Regular access reviews: Periodically audit and remove unnecessary permissions
  3. Time-bound access: Use temporary elevated privileges when possible
  4. Segregation of duties: Divide critical functions among multiple people
  5. Just-in-time access: Provide elevated access only when requested and approved
    Example implementation:
  • Database admin needs read access to production during normal operation
  • Write access granted only during approved maintenance windows
  • Emergency access requires additional approval and is automatically logged
    Benefits:
  • Reduces attack surface
  • Limits blast radius of compromises
  • Improves compliance posture
  • Reduces insider threat risk
4.

What are the security implications of different password storage methods?

intermediate

Upgrade to Premium to see the answer

Upgrade to Premium
5.

How does Single Sign-On (SSO) work and what are its benefits and risks?

intermediate

Upgrade to Premium to see the answer

Upgrade to Premium
6.

Explain JWT (JSON Web Tokens) structure and security considerations.

intermediate

Upgrade to Premium to see the answer

Upgrade to Premium
7.

Compare RBAC (Role-Based Access Control) and ABAC (Attribute-Based Access Control).

intermediate

Upgrade to Premium to see the answer

Upgrade to Premium
8.

Explain the OAuth 2.0 flow and its use cases.

intermediate

Upgrade to Premium to see the answer

Upgrade to Premium
9.

What is OpenID Connect and how does it extend OAuth 2.0?

intermediate

Upgrade to Premium to see the answer

Upgrade to Premium
10.

How does SAML differ from OAuth 2.0/OIDC and when would you use each?

intermediate

Upgrade to Premium to see the answer

Upgrade to Premium
11.

How do you implement secure session management?

intermediate

Upgrade to Premium to see the answer

Upgrade to Premium
12.

What is API security and how do you secure REST APIs?

intermediate

Upgrade to Premium to see the answer

Upgrade to Premium
13.

How do you prevent and detect credential stuffing attacks?

intermediate

Upgrade to Premium to see the answer

Upgrade to Premium
14.

How do you protect against Cross-Site Request Forgery (CSRF) in authentication systems?

intermediate

Upgrade to Premium to see the answer

Upgrade to Premium
15.

How do you implement secure password reset functionality?

intermediate

Upgrade to Premium to see the answer

Upgrade to Premium
16.

What are the security considerations for implementing social login (OAuth with third parties)?

intermediate

Upgrade to Premium to see the answer

Upgrade to Premium
17.

How do you design authorization for microservices architecture?

expert

Upgrade to Premium to see the answer

Upgrade to Premium
18.

Explain Zero Trust Architecture and its impact on authentication/authorization.

expert

Upgrade to Premium to see the answer

Upgrade to Premium
19.

What are the risks of improper JWT implementation and how do you mitigate them?

expert

Upgrade to Premium to see the answer

Upgrade to Premium
20.

How do you design authentication for a high-scale distributed system?

expert

Upgrade to Premium to see the answer

Upgrade to Premium
Showing 1 to 20 of 25 results

Premium Plan

$10.00 /monthly
  • Access all premium content - interview questions, and other learning resources

  • We regularly update our features and content, to ensure you get the most relevant and updated premium content.

  • 1000 monthly credits

  • Cancel anytime