Loading tutorials
Authorization header. The previous chapter covered that. Here you take a token apart. Later chapters cover which claims to trust and how Spring Security verifies the signature.5 min readapplication.yml. Here you will learn what a signature proves, which algorithms matter in practice, and how Spring Security 5 min readspring-boot-starter-oauth2-resource-server dependency. It also assumes you know what a JWT is and why the signature matters. Here you will see what the JwtDecoder does, how Boot builds one from 5 min readSecurityFilterChain and issuer-uri setup from the earlier chapters), and that you know the registered cla5 min readSecurityFilterChain bean. It also assumes you know what a JWT claim is (the previous chapters covered iss, sub, aud, exp, and the scope claim). By the end, you will know how Spring Security turns the claims of a validated 5 min readGrantedAuthority values (for example SCOPE_orders.read). Here we focus on request rules: the URL-based part of authorization, declared in the `Se5 min readSecurityFilterChain decide access by URL and HTTP method. They can't see the method arguments, the loaded domain object, or the result. This chapter adds method security, which runs checks inside the call, at the method boundary. It assumes you have the resource server from th4 min readoauth2ResourceServer(...jwt...) from earlier chapters), know the main HTTP status codes, and can read a Spring Security filter chain. It explains why the API returns 401 or 403, what the WWW-Authenticate header ca5 min readMockMvc, and that you have the resource server configuration from the earlier chapters: a SecurityFilterChain with oauth2ResourceServer().jwt(), @EnableMethodSecurity, and the OrderController shown below. You need `sprin4 min readSecurityFilterChain, an understanding of SCOPE_ authorities, and the 401 and 403 behavior. Here you swap local JWT validation for remote validation and see what changes.5 min readkid and jwk-set-uri mean, and how NimbusJwtDecoder verifies a signature. Here you will see what happens to those pieces when the authorization server replaces its signing key.6 min readSecurityFilterChain with oauth2ResourceServer, a JwtDecoder with issuer and audience checks, and an understanding of exp, iss, and aud. A correctly configured resource server can still be unsafe in practice. The remaining ris5 min read