Skip to content

Commit 95a1ccb

Browse files
Fix Broken Links in Docs
Closes gh-9869
1 parent 4060f83 commit 95a1ccb

File tree

19 files changed

+34
-24
lines changed

19 files changed

+34
-24
lines changed

docs/guides/src/docs/asciidoc/_includes/setting-up-the-sample-boot.asc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ download-url: the URL to download the Spring Security distribution
1212

1313
== Setting up the sample
1414

15-
This section outlines how to setup a workspace within https://spring.io/tools/sts[Spring Tool Suite (STS)] so that you can follow along with this guide. The next section outlines generic steps for how to apply Spring Security to your existing application. While you could simply apply the steps to your existing application, we encourage you to follow along with this guide in order to reduce the complexity.
15+
This section outlines how to setup a workspace within https://spring.io/tools[Eclipse IDE with Spring Tools] so that you can follow along with this guide. The next section outlines generic steps for how to apply Spring Security to your existing application. While you could simply apply the steps to your existing application, we encourage you to follow along with this guide in order to reduce the complexity.
1616

1717
=== Obtaining the sample project
1818

docs/guides/src/docs/asciidoc/_includes/setting-up-the-sample.asc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ download-url: the URL to download the Spring Security distribution
1212

1313
== Setting up the sample
1414

15-
This section outlines how to setup a workspace within https://spring.io/tools/sts[Spring Tool Suite (STS)] so that you can follow along with this guide. The next section outlines generic steps for how to apply Spring Security to your existing application. While you could simply apply the steps to your existing application, we encourage you to follow along with this guide in order to reduce the complexity.
15+
This section outlines how to setup a workspace within https://spring.io/tools[Eclipse IDE with Spring Tools] so that you can follow along with this guide. The next section outlines generic steps for how to apply Spring Security to your existing application. While you could simply apply the steps to your existing application, we encourage you to follow along with this guide in order to reduce the complexity.
1616

1717
=== Obtaining the sample project
1818

docs/manual/spring-security-docs-manual.gradle

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,27 @@ asciidoctor {
1414
}
1515

1616
asciidoctorj {
17+
def docsTag = snapshotBuild ? 'current' : project.version
1718
def ghTag = snapshotBuild ? 'main' : project.version
1819
def ghUrl = "https://github.com/spring-projects/spring-security/tree/$ghTag"
1920
def ghOldSamplesUrl = "https://github.com/spring-projects/spring-security/tree/5.4.x/samples"
2021
def ghSamplesUrl = "https://github.com/spring-projects/spring-security-samples/tree/$ghTag"
22+
def securityDocsUrl = "https://docs.spring.io/spring-security/site/docs/$docsTag"
23+
def oldSecurityApiUrl = "https://docs.spring.io/spring-security/site/docs/5.4.x/api/"
24+
def springVersion = "5.3.x"
25+
def securityApiUrl = "$securityDocsUrl/api/"
26+
def securityReferenceUrl = "$securityDocsUrl/reference/html5/"
27+
def springFrameworkApiUrl = "https://docs.spring.io/spring-framework/docs/$springVersion/javadoc-api/"
2128
attributes 'spring-security-version' : project.version,
2229
'spring-boot-version' : springBootVersion,
2330
revnumber : project.version,
2431
'gh-url': ghUrl,
2532
'gh-samples-url': ghSamplesUrl,
26-
'gh-old-samples-url': ghOldSamplesUrl
33+
'gh-old-samples-url': ghOldSamplesUrl,
34+
'old-security-api-url': oldSecurityApiUrl,
35+
'security-api-url': securityApiUrl,
36+
'security-reference-url': securityReferenceUrl,
37+
'spring-framework-api-url': springFrameworkApiUrl
2738
attributeProvider resolvedVersions(project.configurations.testRuntimeClasspath)
2839
}
2940

docs/manual/src/docs/asciidoc/_includes/about/exploits/csrf.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ This means that requests with the HTTP method `GET`, `HEAD`, `OPTIONS`, and `TRA
114114

115115
[[csrf-protection-stp]]
116116
=== Synchronizer Token Pattern
117-
The predominant and most comprehensive way to protect against CSRF attacks is to use the https://www.owasp.org/index.php/Cross-Site_Request_Forgery_(CSRF)_Prevention_Cheat_Sheet#General_Recommendation:_Synchronizer_Token_Pattern[Synchronizer Token Pattern].
117+
The predominant and most comprehensive way to protect against CSRF attacks is to use the https://cheatsheetseries.owasp.org/cheatsheets/Cross-Site_Request_Forgery_Prevention_Cheat_Sheet.html#synchronizer-token-pattern[Synchronizer Token Pattern].
118118
This solution is to ensure that each HTTP request requires, in addition to our session cookie, a secure random generated value called a CSRF token must be present in the HTTP request.
119119

120120
When an HTTP request is submitted, the server must look up the expected CSRF token and compare it against the actual CSRF token in the HTTP request.
@@ -348,7 +348,7 @@ This allows the expected CSRF token to outlive the session.
348348
One might ask why the expected CSRF token isn't stored in a cookie by default.
349349
This is because there are known exploits in which headers (for example, to specify the cookies) can be set by another domain.
350350
This is the same reason Ruby on Rails https://weblog.rubyonrails.org/2011/2/8/csrf-protection-bypass-in-ruby-on-rails/[no longer skips CSRF checks when the header X-Requested-With is present].
351-
See http://lists.webappsec.org/pipermail/websecurity_lists.webappsec.org/2011-February/007533.html[this webappsec.org thread] for details on how to perform the exploit.
351+
See https://web.archive.org/web/20210221120355/https://lists.webappsec.org/pipermail/websecurity_lists.webappsec.org/2011-February/007533.html[this webappsec.org thread] for details on how to perform the exploit.
352352
Another disadvantage is that by removing the state (that is, the timeout), you lose the ability to forcibly invalidate the token if it is compromised.
353353

354354
// FIXME: Document timeout with lengthy form expire. We do not want to automatically replay that request because it can lead to exploit

docs/manual/src/docs/asciidoc/_includes/about/exploits/headers.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ This portion of the documentation discusses the general topic of Security HTTP R
77
Refer to the relevant sections for specific information on Security HTTP Response Headers <<servlet-headers,servlet>> and <<webflux-headers,WebFlux>> based applications.
88
====
99

10-
There are many https://www.owasp.org/index.php/OWASP_Secure_Headers_Project#tab=Headers[HTTP response headers] that can be used to increase the security of web applications.
10+
There are many https://owasp.org/www-project-secure-headers/#div-headers[HTTP response headers] that can be used to increase the security of web applications.
1111
This section is dedicated to the various HTTP response headers that Spring Security provides explicit support for.
1212
If necessary, Spring Security can also be configured to provide <<headers-custom,custom headers>>.
1313

@@ -267,7 +267,7 @@ Content-Security-Policy: script-src https://trustedscripts.example.com; report-u
267267
----
268268
====
269269

270-
https://www.w3.org/TR/CSP2/#violation-reports[Violation reports] are standard JSON structures that can be captured either by the web application's own API or by a publicly hosted CSP violation reporting service, such as, https://report-uri.io/.
270+
https://www.w3.org/TR/CSP2/#violation-reports[Violation reports] are standard JSON structures that can be captured either by the web application's own API or by a publicly hosted CSP violation reporting service, such as, https://report-uri.com/.
271271

272272
The `Content-Security-Policy-Report-Only` header provides the capability for web application authors and administrators to monitor security policies, rather than enforce them.
273273
This header is typically used when experimenting and/or developing security policies for a site.

docs/manual/src/docs/asciidoc/_includes/about/exploits/http.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Without proper configuration, the application server will not know that the load
2525

2626
To fix this you can use https://tools.ietf.org/html/rfc7239[RFC 7239] to specify that a load balancer is being used.
2727
To make the application aware of this, you need to either configure your application server aware of the X-Forwarded headers.
28-
For example Tomcat uses the https://tomcat.apache.org/tomcat-8.0-doc/api/org/apache/catalina/valves/RemoteIpValve.html[RemoteIpValve] and Jetty uses https://download.eclipse.org/jetty/stable-9/apidocs/org/eclipse/jetty/server/ForwardedRequestCustomizer.html[ForwardedRequestCustomizer].
28+
For example Tomcat uses the https://tomcat.apache.org/tomcat-8.0-doc/api/org/apache/catalina/valves/RemoteIpValve.html[RemoteIpValve] and Jetty uses https://www.eclipse.org/jetty/javadoc/jetty-9/org/eclipse/jetty/server/ForwardedRequestCustomizer.html[ForwardedRequestCustomizer].
2929
Alternatively, Spring users can leverage https://github.com/spring-projects/spring-framework/blob/v4.3.3.RELEASE/spring-web/src/main/java/org/springframework/web/filter/ForwardedHeaderFilter.java[ForwardedHeaderFilter].
3030

3131
Spring Boot users may use the `server.use-forward-headers` property to configure the application.

docs/manual/src/docs/asciidoc/_includes/about/getting-spring-security.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ The topics in this section provide detail on how to consume Spring Security when
2424
=== Spring Boot with Maven
2525

2626
Spring Boot provides a `spring-boot-starter-security` starter that aggregates Spring Security-related dependencies together.
27-
The simplest and preferred way to use the starter is to use https://docs.spring.io/initializr/docs/current/reference/htmlsingle/[Spring Initializr] by using an IDE integration (https://joshlong.com/jl/blogPost/tech_tip_geting_started_with_spring_boot.html[Eclipse], https://www.jetbrains.com/help/idea/spring-boot.html#d1489567e2[IntelliJ], https://github.com/AlexFalappa/nb-springboot/wiki/Quick-Tour[NetBeans]) or through https://start.spring.io.
27+
The simplest and preferred way to use the starter is to use https://docs.spring.io/initializr/docs/current/reference/html/[Spring Initializr] by using an IDE integration (https://joshlong.com/jl/blogPost/tech_tip_geting_started_with_spring_boot.html[Eclipse], https://www.jetbrains.com/help/idea/spring-boot.html#d1489567e2[IntelliJ], https://github.com/AlexFalappa/nb-springboot/wiki/Quick-Tour[NetBeans]) or through https://start.spring.io.
2828

2929
Alternatively, you can manually add the starter, as the following example shows:
3030

@@ -196,7 +196,7 @@ The following topics provide detail on how to consume Spring Security when using
196196
=== Spring Boot with Gradle
197197

198198
Spring Boot provides a `spring-boot-starter-security` starter that aggregates Spring Security related dependencies together.
199-
The simplest and preferred method to use the starter is to use https://docs.spring.io/initializr/docs/current/reference/htmlsingle/[Spring Initializr] by using an IDE integration (https://joshlong.com/jl/blogPost/tech_tip_geting_started_with_spring_boot.html[Eclipse], https://www.jetbrains.com/help/idea/spring-boot.html#d1489567e2[IntelliJ], https://github.com/AlexFalappa/nb-springboot/wiki/Quick-Tour[NetBeans]) or through https://start.spring.io.
199+
The simplest and preferred method to use the starter is to use https://docs.spring.io/initializr/docs/current/reference/html/[Spring Initializr] by using an IDE integration (https://joshlong.com/jl/blogPost/tech_tip_geting_started_with_spring_boot.html[Eclipse], https://www.jetbrains.com/help/idea/spring-boot.html#d1489567e2[IntelliJ], https://github.com/AlexFalappa/nb-springboot/wiki/Quick-Tour[NetBeans]) or through https://start.spring.io.
200200

201201
Alternatively, you can manually add the starter, as the following example shows:
202202

docs/manual/src/docs/asciidoc/_includes/servlet/appendix/faq.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ To get around this, you can disable session fixation protection, but in newer Se
257257
Note that switching between HTTP and HTTPS is not a good idea in general, as any application which uses HTTP at all is vulnerable to man-in-the-middle attacks.
258258
To be truly secure, the user should begin accessing your site in HTTPS and continue using it until they log out.
259259
Even clicking on an HTTPS link from a page accessed over HTTP is potentially risky.
260-
If you need more convincing, check out a tool like https://www.thoughtcrime.org/software/sslstrip/[sslstrip].
260+
If you need more convincing, check out a tool like https://github.com/moxie0/sslstrip/[sslstrip].
261261

262262

263263
==== I'm not switching between HTTP and HTTPS but my session is still getting lost
@@ -378,7 +378,7 @@ For third-party jars the situation isn't always quite so obvious.
378378
A good starting point is to copy those from one of the pre-built sample applications WEB-INF/lib directories.
379379
For a basic application, you can start with the tutorial sample.
380380
If you want to use LDAP, with an embedded test server, then use the LDAP sample as a starting point.
381-
The reference manual also includes https://static.springsource.org/spring-security/site/docs/3.1.x/reference/springsecurity-single.html#appendix-dependencies[an appendix] listing the first-level dependencies for each Spring Security module with some information on whether they are optional and what they are required for.
381+
The reference manual also includes {security-reference-url}#modules[an appendix] listing the first-level dependencies for each Spring Security module with some information on whether they are optional and what they are required for.
382382

383383
If you are building your project with maven, then adding the appropriate Spring Security modules as dependencies to your pom.xml will automatically pull in the core jars that the framework requires.
384384
Any which are marked as "optional" in the Spring Security POM files will have to be added to your own pom.xml file if you need them.

docs/manual/src/docs/asciidoc/_includes/servlet/appendix/proxy-server.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Without proper configuration, the application server will not know that the load
77

88
To fix this you can use https://tools.ietf.org/html/rfc7239[RFC 7239] to specify that a load balancer is being used.
99
To make the application aware of this, you need to either configure your application server aware of the X-Forwarded headers.
10-
For example Tomcat uses the https://tomcat.apache.org/tomcat-8.0-doc/api/org/apache/catalina/valves/RemoteIpValve.html[RemoteIpValve] and Jetty uses https://download.eclipse.org/jetty/stable-9/apidocs/org/eclipse/jetty/server/ForwardedRequestCustomizer.html[ForwardedRequestCustomizer].
10+
For example Tomcat uses the https://tomcat.apache.org/tomcat-8.0-doc/api/org/apache/catalina/valves/RemoteIpValve.html[RemoteIpValve] and Jetty uses https://www.eclipse.org/jetty/javadoc/jetty-9/org/eclipse/jetty/server/ForwardedRequestCustomizer.html[ForwardedRequestCustomizer].
1111
Alternatively, Spring 4.3+ users can leverage https://github.com/spring-projects/spring-framework/blob/v4.3.3.RELEASE/spring-web/src/main/java/org/springframework/web/filter/ForwardedHeaderFilter.java[ForwardedHeaderFilter].
1212

1313
Spring Boot users may use the `server.use-forward-headers` property to configure the application.

docs/manual/src/docs/asciidoc/_includes/servlet/architecture/delegating-filter-proxy.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[[servlet-delegatingfilterproxy]]
22
= DelegatingFilterProxy
33

4-
Spring provides a `Filter` implementation named {security-api-url}org/springframework/web/filter/DelegatingFilterProxy.html/[`DelegatingFilterProxy`] that allows bridging between the Servlet container's lifecycle and Spring's `ApplicationContext`.
4+
Spring provides a `Filter` implementation named {spring-framework-api-url}org/springframework/web/filter/DelegatingFilterProxy.html[`DelegatingFilterProxy`] that allows bridging between the Servlet container's lifecycle and Spring's `ApplicationContext`.
55
The Servlet container allows registering ``Filter``s using its own standards, but it is not aware of Spring defined Beans.
66
`DelegatingFilterProxy` can be registered via standard Servlet container mechanisms, but delegate all the work to a Spring Bean that implements `Filter`.
77

0 commit comments

Comments
 (0)