QuizzesSpring Boot Security: Basics of OAuth2 Resource Server
beginner
spring

Spring Boot Security: Basics of OAuth2 Resource Server

A beginner's quiz on implementing OAuth2 Resource Server with Spring Boot Security.

15 minutes 15 questions Pass at 70%
Time Limit
15 minutes - timer starts when you begin
Change Answers Freely
Revisit and change any answer before submitting
Full Review After Submit
Correct answers and explanations shown for every question
Auto-submit on timeout
Quiz submits automatically when time runs out

Questions in this quiz

15 questions on Spring Boot Security: Basics of OAuth2 Resource Server. Work through them here, then start the quiz to answer them and see your score.

  1. 1.What is the primary purpose of an OAuth2 Resource Server?

    • ATo manage user sessions
    • BTo authenticate users
    • CTo protect resources by validating access tokens
    • DTo store user credentials
  2. 2.Which Spring Boot dependency is essential for setting up an OAuth2 Resource Server?

    • Aspring-boot-starter-data-jpa
    • Bspring-boot-starter-oauth2-resource-server
    • Cspring-boot-starter-security
    • Dspring-boot-starter-web
  3. 3.In Spring Security, which annotation is used to enable resource server capabilities?

    • A@EnableWebSecurity
    • B@EnableOAuth2Sso
    • C@EnableAuthorizationServer
    • D@EnableResourceServer
  4. 4.What is the default endpoint for checking the validity of an access token in Spring Boot?

    • A/oauth/check_token
    • B/oauth/token
    • C/oauth/authorize
    • D/oauth/introspect
  5. 5.Which HTTP header is typically used to pass the access token to a resource server?

    • AAuthorization
    • BToken
    • CAccess-Token
    • DX-Auth-Token
  6. 6.What format is commonly used for access tokens in OAuth2?

    • AJWT
    • BXML
    • CCSV
    • DPlain Text
  7. 7.In a Spring Boot application, where do you configure the resource server properties?

    • ABoth A and B
    • Bapplication.yml
    • Cpom.xml
    • Dapplication.properties
  8. 8.Which method in Spring Security is used to configure HTTP security for a resource server?

    • Aconfigure(AuthenticationManagerBuilder auth)
    • Bconfigure(HttpSecurity http)
    • Cconfigure(WebSecurity web)
    • Dconfigure(ResourceServerSecurityConfigurer resources)
  9. 9.What is the role of the 'BearerTokenAuthenticationFilter' in a Spring Boot OAuth2 Resource Server?

    • AIt manages user sessions
    • BIt encrypts access tokens
    • CIt validates bearer tokens in incoming requests
    • DIt authenticates users using username and password
  10. 10.Which property is used to specify the location of the public key for JWT validation in Spring Boot?

    • Aspring.security.oauth2.resourceserver.jwt.key-uri
    • Bspring.security.oauth2.resourceserver.jwt.jwk-set-uri
    • Cspring.security.oauth2.resourceserver.jwt.key-value
    • Dspring.security.oauth2.resourceserver.jwt.public-key-location
  11. 11.What is the purpose of the 'JwtDecoder' bean in a Spring Boot OAuth2 Resource Server?

    • ATo encode JWTs
    • BTo generate access tokens
    • CTo manage user sessions
    • DTo decode and validate JWTs
  12. 12.Which class is typically extended to configure a Spring Boot OAuth2 Resource Server?

    • AAuthorizationServerConfigurerAdapter
    • BWebSecurityConfigurerAdapter
    • CResourceServerConfigurerAdapter
    • DOAuth2SsoConfigurerAdapter
  13. 13.What is the default token type used in OAuth2?

    • AJWT
    • BBearer
    • CMAC
    • DSAML
  14. 14.Which of the following is NOT a responsibility of an OAuth2 Resource Server?

    • ADecoding JWTs
    • BProtecting resources
    • CProviding user authentication
    • DValidating access tokens
  15. 15.In Spring Boot, which annotation is used to configure method-level security in a resource server?

    • A@PreAuthorize
    • B@RolesAllowed
    • C@EnableGlobalMethodSecurity
    • D@Secured