Spring Boot Security Quiz - MCQ - Multiple Choice Questions
Q. What does Spring Security provide?
A. Authentication and Authorization supportB. Logging support
C. Database connectivity
D. UI templates
Q. Which authentication mechanism does Spring Security support?
A. OAuth2B. JWT
C. Basic Authentication
D. All of the above
Q. Which of the following is not a core concept of Spring Security?
A. AuthenticationB. Authorization
C. Dependency Injection
D. Password Encryption
Q. Which annotation in Spring Security is used to secure a method or class?
@Secure@Protect
@Secured
@Guarded
Q. Which interface in Spring Security is used to encode passwords?
PasswordEncoderSecurityEncoder
CredentialEncoder
Encryptor
Q. Which authentication provider in Spring Security supports LDAP authentication?
DaoAuthenticationProviderLdapAuthenticationProvider
InMemoryAuthenticationProvider
JdbcUserDetailsManager
Q. How can you configure method-level security in Spring Security?
Using configuration classesUsing @Secured annotation
Using XML configuration
All of the above
Q. What is CSRF protection in Spring Security?
Cross-Site Request Forgery protectionCross-Site Scripting protection
Cross-Origin Resource Sharing protection
Cross-Site Replay protection
Q. What is the purpose of the Remember-Me functionality in Spring Security?
To remember user credentialsTo remember user preferences
To remember user sessions
To remember secured resources
Q. Which authentication provider in Spring Security is suitable for custom authentication logic?
DaoAuthenticationProviderInMemoryAuthenticationProvider
AbstractUserDetailsAuthenticationProvider
LdapAuthenticationProvider