Authentication interview questions
JSON Web Tokens (JWT), JWT Signatures, Plaintext Passwords, Salting and BCrypt
81 questions with answers and explanations · 81 flashcards
Questions (page 2 of 2)
- In a stateless JWT authentication system, how can you effectively revoke a token?Multiple choiceHard
- Which OWASP vulnerability does using prepared statements help mitigate?Multiple choiceMedium
- Why is it important to understand that JWT Payloads are not encrypted?Multiple choiceMedium
- Why does a CSRF token in web applications matter in practice?Multiple choiceEasy
- How would you explain a potential risk of using a long-lived JWT without refresh tokens in an interview?Multiple choiceHard
- Which of the following is a benefit of using BCrypt for password hashing?Multiple choiceMedium
- Which part of a JWT token can be used to verify the integrity and authenticity of the token?Multiple choiceMedium
- Which component of the Spring Security filter chain is directly responsible for processing JWTs?Multiple choiceMedium
- How does a prepared statement enhance security in database interactions?Multiple choiceMedium
- When preventing SQL injection attacks in Java, why is using 'PreparedStatement' preferred over plain 'Statement'?Multiple choiceHard
- How does HTML encoding help prevent stored XSS (Cross-Site Scripting) attacks?Multiple choiceMedium
- How does the concept of a 'bcrypt work factor' contribute to password security?Multiple choiceMedium
- Why does a signature in a JWT token matter in this design?Multiple choiceEasy
- How can a developer prevent stored XSS in user-generated content?Multiple choiceMedium
- How would you explain a significant advantage of using stateless JWT tokens over traditional session-based authentication in an interview?Multiple choiceHard
- Why should passwords never be stored in plaintext in a database?Multiple choiceEasy
- How does appending a unique random 'Salt' to passwords enhance security?Multiple choiceMedium
- Why do teams use JWTs over traditional JSESSIONID cookies in a distributed system in production code?Multiple choiceEasy
- When using BCrypt to hash passwords, why should you consider increasing the work factor over time?Multiple choiceMedium
- Why do teams use BCrypt for hashing passwords in a Java application in production code?Multiple choiceEasy
- Why does signing-key rotation matter even if tokens validate correctly today?Multiple choiceHard
- How can you mitigate replay attacks when using JWTs in an e-commerce application?Multiple choiceHard
- What does the 'exp' claim in a JWT represent?Multiple choiceEasy
- Which of the following best describes the 'Work Factor' in BCrypt?Multiple choiceMedium
- In Spring Security, where would you typically configure the JWT Filter in the Security Filter Chain?Multiple choiceMedium
- Why does a JWT ecosystem need the kid header during key rotation?Multiple choiceMedium
- In the context of stateless JWT tokens, what is the role of the signature?Multiple choiceMedium
- How does HTML encoding help prevent stored XSS attacks?Multiple choiceMedium
- How does a server verify the authenticity of a JWT without a database lookup?Multiple choiceMedium
- How can a developer mitigate the risk of JWT replay attacks?Multiple choiceHard
- How would you explain a common strategy to mitigate CSRF attacks in a Java web application using JWTs in an interview?Multiple choiceHard