Skip to content

Commit 4501ae7

Browse files
committed
Update Reactive Resource Server startup exceptations
Issue gh-16708 Signed-off-by: Josh Cummings <3627351+jzheaux@users.noreply.github.com>
1 parent 48112d3 commit 4501ae7

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

  • docs/modules/ROOT/pages/reactive/oauth2/resource-server

docs/modules/ROOT/pages/reactive/oauth2/resource-server/jwt.adoc

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,17 +39,18 @@ This endpoint is referred to as a https://openid.net/specs/openid-connect-discov
3939

4040
When this property and these dependencies are used, Resource Server automatically configures itself to validate JWT-encoded Bearer Tokens.
4141

42-
It achieves this through a deterministic startup process:
42+
It achieves this through a deterministic discovery process it launches at the first request containing a JWT:
4343

4444
. Hit the Provider Configuration or Authorization Server Metadata endpoint, processing the response for the `jwks_url` property.
4545
. Configure the validation strategy to query `jwks_url` for valid public keys.
4646
. Configure the validation strategy to validate each JWT's `iss` claim against `https://idp.example.com`.
4747

48-
A consequence of this process is that the authorization server must be receiving requests in order for Resource Server to successfully start up.
48+
One benefit of deferring this process is that Resource Server startup is not coupled to the authorization server's availability.
4949

5050
[NOTE]
5151
====
52-
If the authorization server is down when Resource Server queries it (given appropriate timeouts), then startup fails.
52+
This deferral is managed by javadoc:org.springframework.security.oauth2.jwt.SupplierReactiveJwtDecoder[`SupplierReactiveJwtDecoder`].
53+
Consider wrapping any <<webflux-oauth2resourceserver-decoder-bean,`JwtDecoder` `@Bean`>> you declare in order to preserve this behavior.
5354
====
5455

5556
=== Runtime Expectations
@@ -85,7 +86,7 @@ From here, consider jumping to:
8586
[[webflux-oauth2resourceserver-jwt-jwkseturi]]
8687
=== Specifying the Authorization Server JWK Set Uri Directly
8788

88-
If the authorization server does not support any configuration endpoints, or if Resource Server must be able to start up independently from the authorization server, you can supply `jwk-set-uri` as well:
89+
If the authorization server does not support any configuration endpoints, or if Resource Server must be able to initialize independently from the authorization server, you can supply `jwk-set-uri` as well:
8990

9091
[source,yaml]
9192
----

0 commit comments

Comments
 (0)