Skip to content

Commit 8524808

Browse files
committed
Add Dark Mode CSS Style
Closes gh-14834
1 parent 7881660 commit 8524808

File tree

13 files changed

+29
-0
lines changed

13 files changed

+29
-0
lines changed

docs/modules/ROOT/pages/servlet/architecture.adoc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ The picture below shows the typical layering of the handlers for a single HTTP r
1414

1515
.FilterChain
1616
[[servlet-filterchain-figure]]
17+
[.invert-dark]
1718
image::{figures}/filterchain.png[]
1819

1920
The client sends a request to the application, and the container creates a `FilterChain` which contains the ``Filter``s and `Servlet` that should process the `HttpServletRequest` based on the path of the request URI.
@@ -67,6 +68,7 @@ Here is a picture of how `DelegatingFilterProxy` fits into the <<servlet-filters
6768

6869
.DelegatingFilterProxy
6970
[[servlet-delegatingfilterproxy-figure]]
71+
[.invert-dark]
7072
image::{figures}/delegatingfilterproxy.png[]
7173

7274
`DelegatingFilterProxy` looks up __Bean Filter~0~__ from the `ApplicationContext` and then invokes __Bean Filter~0~__.
@@ -115,6 +117,7 @@ Since `FilterChainProxy` is a Bean, it is typically wrapped in a <<servlet-deleg
115117

116118
.FilterChainProxy
117119
[[servlet-filterchainproxy-figure]]
120+
[.invert-dark]
118121
image::{figures}/filterchainproxy.png[]
119122

120123
[[servlet-securityfilterchain]]
@@ -124,6 +127,7 @@ image::{figures}/filterchainproxy.png[]
124127

125128
.SecurityFilterChain
126129
[[servlet-securityfilterchain-figure]]
130+
[.invert-dark]
127131
image::{figures}/securityfilterchain.png[]
128132

129133
The <<servlet-security-filters,Security Filters>> in `SecurityFilterChain` are typically Beans, but they are registered with `FilterChainProxy` instead of <<servlet-delegatingfilterproxy>>.
@@ -146,6 +150,7 @@ This allows providing a totally separate configuration for different _slices_ of
146150

147151
.Multiple SecurityFilterChain
148152
[[servlet-multi-securityfilterchain-figure]]
153+
[.invert-dark]
149154
image::{figures}/multi-securityfilterchain.png[]
150155

151156
In the <<servlet-multi-securityfilterchain-figure>> Figure `FilterChainProxy` decides which `SecurityFilterChain` should be used.
@@ -391,6 +396,7 @@ The {security-api-url}org/springframework/security/web/access/ExceptionTranslati
391396

392397
`ExceptionTranslationFilter` is inserted into the <<servlet-filterchainproxy>> as one of the <<servlet-security-filters>>.
393398

399+
[.invert-dark]
394400
image::{figures}/exceptiontranslationfilter.png[]
395401

396402

docs/modules/ROOT/pages/servlet/authentication/architecture.adoc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ This also gives a good idea of the high level flow of authentication and how pie
2222
At the heart of Spring Security's authentication model is the `SecurityContextHolder`.
2323
It contains the <<servlet-authentication-securitycontext>>.
2424

25+
[.invert-dark]
2526
image::{figures}/securitycontextholder.png[]
2627

2728
The `SecurityContextHolder` is where Spring Security stores the details of who is xref:features/authentication/index.adoc#authentication[authenticated].
@@ -171,6 +172,7 @@ While the implementation of `AuthenticationManager` could be anything, the most
171172
Each `AuthenticationProvider` has an opportunity to indicate that authentication should be successful, fail, or indicate it cannot make a decision and allow a downstream `AuthenticationProvider` to decide.
172173
If none of the configured ``AuthenticationProvider``s can authenticate, then authentication will fail with a `ProviderNotFoundException` which is a special `AuthenticationException` that indicates the `ProviderManager` was not configured to support the type of `Authentication` that was passed into it.
173174

175+
[.invert-dark]
174176
image::{figures}/providermanager.png[]
175177

176178
In practice each `AuthenticationProvider` knows how to perform a specific type of authentication.
@@ -180,11 +182,13 @@ This allows each `AuthenticationProvider` to do a very specific type of authenti
180182
`ProviderManager` also allows configuring an optional parent `AuthenticationManager` which is consulted in the event that no `AuthenticationProvider` can perform authentication.
181183
The parent can be any type of `AuthenticationManager`, but it is often an instance of `ProviderManager`.
182184

185+
[.invert-dark]
183186
image::{figures}/providermanager-parent.png[]
184187

185188
In fact, multiple `ProviderManager` instances might share the same parent `AuthenticationManager`.
186189
This is somewhat common in scenarios where there are multiple xref:servlet/architecture.adoc#servlet-securityfilterchain[`SecurityFilterChain`] instances that have some authentication in common (the shared parent `AuthenticationManager`), but also different authentication mechanisms (the different `ProviderManager` instances).
187190

191+
[.invert-dark]
188192
image::{figures}/providermanagers-parent.png[]
189193

190194
[[servlet-authentication-providermanager-erasing-credentials]]
@@ -230,6 +234,7 @@ Before the credentials can be authenticated, Spring Security typically requests
230234

231235
Next, the `AbstractAuthenticationProcessingFilter` can authenticate any authentication requests that are submitted to it.
232236

237+
[.invert-dark]
233238
image::{figures}/abstractauthenticationprocessingfilter.png[]
234239

235240
image:{icondir}/number_1.png[] When the user submits their credentials, the `AbstractAuthenticationProcessingFilter` creates an <<servlet-authentication-authentication,`Authentication`>> from the `HttpServletRequest` to be authenticated.

docs/modules/ROOT/pages/servlet/authentication/passwords/basic.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Let's take a look at how HTTP Basic Authentication works within Spring Security.
99
First, we see the https://tools.ietf.org/html/rfc7235#section-4.1[WWW-Authenticate] header is sent back to an unauthenticated client.
1010

1111
.Sending WWW-Authenticate Header
12+
[.invert-dark]
1213
image::{figures}/basicauthenticationentrypoint.png[]
1314

1415
The figure builds off our xref:servlet/architecture.adoc#servlet-securityfilterchain[`SecurityFilterChain`] diagram.
@@ -26,6 +27,7 @@ Below is the flow for the username and password being processed.
2627

2728
[[servlet-authentication-basicauthenticationfilter]]
2829
.Authenticating Username and Password
30+
[.invert-dark]
2931
image::{figures}/basicauthenticationfilter.png[]
3032

3133
The figure builds off our xref:servlet/architecture.adoc#servlet-securityfilterchain[`SecurityFilterChain`] diagram.

docs/modules/ROOT/pages/servlet/authentication/passwords/dao-authentication-provider.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Let's take a look at how `DaoAuthenticationProvider` works within Spring Securit
88
The figure explains details of how the xref:servlet/authentication/architecture.adoc#servlet-authentication-authenticationmanager[`AuthenticationManager`] in figures from xref:servlet/authentication/passwords/index.adoc#servlet-authentication-unpwd-input[Reading the Username & Password] works.
99

1010
.`DaoAuthenticationProvider` Usage
11+
[.invert-dark]
1112
image::{figures}/daoauthenticationprovider.png[]
1213

1314
image:{icondir}/number_1.png[] The authentication `Filter` from xref:servlet/authentication/passwords/index.adoc#servlet-authentication-unpwd-input[Reading the Username & Password] passes a `UsernamePasswordAuthenticationToken` to the `AuthenticationManager` which is implemented by xref:servlet/authentication/architecture.adoc#servlet-authentication-providermanager[`ProviderManager`].

docs/modules/ROOT/pages/servlet/authentication/passwords/form.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Let's take a look at how form based log in works within Spring Security.
1010
First, we see how the user is redirected to the log in form.
1111

1212
.Redirecting to the Log In Page
13+
[.invert-dark]
1314
image::{figures}/loginurlauthenticationentrypoint.png[]
1415

1516
The figure builds off our xref:servlet/architecture.adoc#servlet-securityfilterchain[`SecurityFilterChain`] diagram.
@@ -30,6 +31,7 @@ When the username and password are submitted, the `UsernamePasswordAuthenticatio
3031
The `UsernamePasswordAuthenticationFilter` extends xref:servlet/authentication/architecture.adoc#servlet-authentication-abstractprocessingfilter[AbstractAuthenticationProcessingFilter], so this diagram should look pretty similar.
3132

3233
.Authenticating Username and Password
34+
[.invert-dark]
3335
image::{figures}/usernamepasswordauthenticationfilter.png[]
3436

3537
The figure builds off our xref:servlet/architecture.adoc#servlet-securityfilterchain[`SecurityFilterChain`] diagram.

docs/modules/ROOT/pages/servlet/authentication/persistence.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,7 @@ In Spring Security 6, the example shown above is the default configuration.
187187

188188
The {security-api-url}org/springframework/security/web/context/SecurityContextPersistenceFilter.html[`SecurityContextPersistenceFilter`] is responsible for persisting the `SecurityContext` between requests using the xref::servlet/authentication/persistence.adoc#securitycontextrepository[`SecurityContextRepository`].
189189

190+
[.invert-dark]
190191
image::{figures}/securitycontextpersistencefilter.png[]
191192

192193
image:{icondir}/number_1.png[] Before running the rest of the application, `SecurityContextPersistenceFilter` loads the `SecurityContext` from the `SecurityContextRepository` and sets it on the `SecurityContextHolder`.
@@ -208,6 +209,7 @@ To avoid these problems, the `SecurityContextPersistenceFilter` wraps both the `
208209

209210
The {security-api-url}org/springframework/security/web/context/SecurityContextHolderFilter.html[`SecurityContextHolderFilter`] is responsible for loading the `SecurityContext` between requests using the xref::servlet/authentication/persistence.adoc#securitycontextrepository[`SecurityContextRepository`].
210211

212+
[.invert-dark]
211213
image::{figures}/securitycontextholderfilter.png[]
212214

213215
image:{icondir}/number_1.png[] Before running the rest of the application, `SecurityContextHolderFilter` loads the `SecurityContext` from the `SecurityContextRepository` and sets it on the `SecurityContextHolder`.

docs/modules/ROOT/pages/servlet/authorization/architecture.adoc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ For method security, you can use `AuthorizationManagerBeforeMethodInterceptor` a
7373

7474
[[authz-authorization-manager-implementations]]
7575
.Authorization Manager Implementations
76+
[.invert-dark]
7677
image::{figures}/authorizationhierarchy.png[]
7778

7879
Using this approach, a composition of `AuthorizationManager` implementations can be polled on an authorization decision.
@@ -271,6 +272,7 @@ Whilst users can implement their own `AccessDecisionManager` to control all aspe
271272

272273
[[authz-access-voting]]
273274
.Voting Decision Manager
275+
[.invert-dark]
274276
image::{figures}/access-decision-voting.png[]
275277

276278
Using this approach, a series of `AccessDecisionVoter` implementations are polled on an authorization decision.
@@ -330,6 +332,7 @@ For example, you'll find a https://spring.io/blog/2009/01/03/spring-security-cus
330332

331333
[[authz-after-invocation]]
332334
.After Invocation Implementation
335+
[.invert-dark]
333336
image::{figures}/after-invocation.png[]
334337

335338
Like many other parts of Spring Security, `AfterInvocationManager` has a single concrete implementation, `AfterInvocationProviderManager`, which polls a list of ``AfterInvocationProvider``s.

docs/modules/ROOT/pages/servlet/authorization/authorize-http-requests.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ Instead of the authentication needing to be looked up for every request, it will
4646
When `authorizeHttpRequests` is used instead of `authorizeRequests`, then {security-api-url}org/springframework/security/web/access/intercept/AuthorizationFilter.html[`AuthorizationFilter`] is used instead of xref:servlet/authorization/authorize-requests.adoc#servlet-authorization-filtersecurityinterceptor[`FilterSecurityInterceptor`].
4747

4848
.Authorize HttpServletRequest
49+
[.invert-dark]
4950
image::{figures}/authorizationfilter.png[]
5051

5152
* image:{icondir}/number_1.png[] First, the `AuthorizationFilter` obtains an xref:servlet/authentication/architecture.adoc#servlet-authentication-authentication[Authentication] from the xref:servlet/authentication/architecture.adoc#servlet-authentication-securitycontextholder[SecurityContextHolder].

docs/modules/ROOT/pages/servlet/authorization/authorize-requests.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ The {security-api-url}org/springframework/security/web/access/intercept/FilterSe
1212
It is inserted into the xref:servlet/architecture.adoc#servlet-filterchainproxy[FilterChainProxy] as one of the xref:servlet/architecture.adoc#servlet-security-filters[Security Filters].
1313

1414
.Authorize HttpServletRequest
15+
[.invert-dark]
1516
image::{figures}/filtersecurityinterceptor.png[]
1617

1718
* image:{icondir}/number_1.png[] First, the `FilterSecurityInterceptor` obtains an xref:servlet/authentication/architecture.adoc#servlet-authentication-authentication[Authentication] from the xref:servlet/authentication/architecture.adoc#servlet-authentication-securitycontextholder[SecurityContextHolder].

docs/modules/ROOT/pages/servlet/oauth2/resource-server/index.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ Let's take a look at how Bearer Token Authentication works within Spring Securit
2121
First, we see that, like xref:servlet/authentication/passwords/basic.adoc#servlet-authentication-basic[Basic Authentication], the https://tools.ietf.org/html/rfc7235#section-4.1[WWW-Authenticate] header is sent back to an unauthenticated client.
2222

2323
.Sending WWW-Authenticate Header
24+
[.invert-dark]
2425
image::{figures}/bearerauthenticationentrypoint.png[]
2526

2627
The figure above builds off our xref:servlet/architecture.adoc#servlet-securityfilterchain[`SecurityFilterChain`] diagram.
@@ -38,6 +39,7 @@ Below is the flow for the bearer token being processed.
3839

3940
[[oauth2resourceserver-authentication-bearertokenauthenticationfilter]]
4041
.Authenticating Bearer Token
42+
[.invert-dark]
4143
image::{figures}/bearertokenauthenticationfilter.png[]
4244

4345
The figure builds off our xref:servlet/architecture.adoc#servlet-securityfilterchain[`SecurityFilterChain`] diagram.

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ Let's take a look at how `JwtAuthenticationProvider` works within Spring Securit
9292
The figure explains details of how the xref:servlet/authentication/architecture.adoc#servlet-authentication-authenticationmanager[`AuthenticationManager`] in figures from <<oauth2resourceserver-authentication-bearertokenauthenticationfilter,Reading the Bearer Token>> works.
9393

9494
.`JwtAuthenticationProvider` Usage
95+
[.invert-dark]
9596
image::{figures}/jwtauthenticationprovider.png[]
9697

9798
image:{icondir}/number_1.png[] The authentication `Filter` from <<oauth2resourceserver-authentication-bearertokenauthenticationfilter,Reading the Bearer Token>> passes a `BearerTokenAuthenticationToken` to the `AuthenticationManager` which is implemented by xref:servlet/authentication/architecture.adoc#servlet-authentication-providermanager[`ProviderManager`].

docs/modules/ROOT/pages/servlet/oauth2/resource-server/opaque-token.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ Let's take a look at how `OpaqueTokenAuthenticationProvider` works within Spring
8888
The figure explains details of how the xref:servlet/authentication/architecture.adoc#servlet-authentication-authenticationmanager[`AuthenticationManager`] in figures from <<oauth2resourceserver-authentication-bearertokenauthenticationfilter,Reading the Bearer Token>> works.
8989

9090
.`OpaqueTokenAuthenticationProvider` Usage
91+
[.invert-dark]
9192
image::{figures}/opaquetokenauthenticationprovider.png[]
9293

9394
image:{icondir}/number_1.png[] The authentication `Filter` from <<oauth2resourceserver-authentication-bearertokenauthenticationfilter,Reading the Bearer Token>> passes a `BearerTokenAuthenticationToken` to the `AuthenticationManager` which is implemented by xref:servlet/authentication/architecture.adoc#servlet-authentication-providermanager[`ProviderManager`].

docs/modules/ROOT/pages/servlet/saml2/login/overview.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ First, we see that, like xref:servlet/oauth2/login/index.adoc[OAuth 2.0 Login],
77
It does this through a series of redirects.
88

99
.Redirecting to Asserting Party Authentication
10+
[.invert-dark]
1011
image::{figures}/saml2webssoauthenticationrequestfilter.png[]
1112

1213
The figure above builds off our xref:servlet/architecture.adoc#servlet-securityfilterchain[`SecurityFilterChain`] and xref:servlet/authentication/architecture.adoc#servlet-authentication-abstractprocessingfilter[`AbstractAuthenticationProcessingFilter`] diagrams:
@@ -29,6 +30,7 @@ image:{icondir}/number_6.png[] The browser then POSTs the `<saml2:Response>` to
2930

3031
[[servlet-saml2login-authentication-saml2webssoauthenticationfilter]]
3132
.Authenticating a `<saml2:Response>`
33+
[.invert-dark]
3234
image::{figures}/saml2webssoauthenticationfilter.png[]
3335

3436
The figure builds off our xref:servlet/architecture.adoc#servlet-securityfilterchain[`SecurityFilterChain`] diagram.

0 commit comments

Comments
 (0)