0001-master-main.patch 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254
  1. From 006b9b960797d279b31cf8c8d16f1549c5632b2c Mon Sep 17 00:00:00 2001
  2. From: Rob Winch <rwinch@users.noreply.github.com>
  3. Date: Mon, 26 Apr 2021 16:50:35 -0500
  4. Subject: [PATCH 1/3] master->main
  5. Closes gh-9683
  6. ---
  7. .github/workflows/continuous-integration-workflow.yml | 10 +++++-----
  8. CONTRIBUTING.adoc | 6 +++---
  9. README.adoc | 6 +++---
  10. .../org/springframework/gradle/sagan/SaganApi.java | 2 +-
  11. docs/guides/spring-security-docs-guides.gradle | 2 +-
  12. docs/guides/src/docs/asciidoc/Guardfile | 2 +-
  13. docs/manual/spring-security-docs-manual.gradle | 2 +-
  14. .../src/docs/asciidoc/_includes/about/community.adoc | 2 +-
  15. .../src/docs/asciidoc/_includes/reactive/x509.adoc | 2 +-
  16. .../asciidoc/_includes/servlet/appendix/namespace.adoc | 2 +-
  17. .../_includes/servlet/integrations/servlet-api.adoc | 1 -
  18. .../_includes/servlet/integrations/websocket.adoc | 2 --
  19. .../_includes/servlet/java-configuration/index.adoc | 2 +-
  20. .../_includes/servlet/kotlin-configuration/index.adoc | 2 +-
  21. 14 files changed, 20 insertions(+), 23 deletions(-)
  22. diff --git a/.github/workflows/continuous-integration-workflow.yml b/.github/workflows/continuous-integration-workflow.yml
  23. index 58358c6e59..65201e4596 100644
  24. --- a/.github/workflows/continuous-integration-workflow.yml
  25. +++ b/.github/workflows/continuous-integration-workflow.yml
  26. @@ -3,7 +3,7 @@ name: CI
  27. on:
  28. push:
  29. branches:
  30. - - master
  31. + - main
  32. schedule:
  33. - cron: '0 10 * * *' # Once per day at 10am UTC
  34. workflow_dispatch: # Manual trigger
  35. @@ -102,16 +102,16 @@ jobs:
  36. uses: actions/setup-java@v1
  37. with:
  38. java-version: '11'
  39. - - name: Run Sonar on given (non-master) branch
  40. - if: ${{ github.ref != 'refs/heads/master' }}
  41. + - name: Run Sonar on given (non-main) branch
  42. + if: ${{ github.ref != 'refs/heads/main' }}
  43. run: |
  44. export BRANCH=${GITHUB_REF#refs/heads/}
  45. export GRADLE_ENTERPRISE_CACHE_USERNAME="$GRADLE_ENTERPRISE_CACHE_USER"
  46. export GRADLE_ENTERPRISE_CACHE_PASSWORD="$GRADLE_ENTERPRISE_CACHE_PASSWORD"
  47. export GRADLE_ENTERPRISE_ACCESS_KEY="$GRADLE_ENTERPRISE_SECRET_ACCESS_KEY"
  48. ./gradlew sonarqube -PartifactoryUsername="$ARTIFACTORY_USERNAME" -PartifactoryPassword="$ARTIFACTORY_PASSWORD" -PexcludeProjects='**/samples/**' -Dsonar.projectKey="spring-security-${GITHUB_REF#refs/heads/}" -Dsonar.projectName="spring-security-${GITHUB_REF#refs/heads/}" -Dsonar.host.url="$SONAR_URL" -Dsonar.login="$SONAR_TOKEN" --stacktrace
  49. - - name: Run Sonar on master
  50. - if: ${{ github.ref == 'refs/heads/master' }}
  51. + - name: Run Sonar on main
  52. + if: ${{ github.ref == 'refs/heads/main' }}
  53. run: |
  54. export GRADLE_ENTERPRISE_CACHE_USERNAME="$GRADLE_ENTERPRISE_CACHE_USER"
  55. export GRADLE_ENTERPRISE_CACHE_PASSWORD="$GRADLE_ENTERPRISE_CACHE_PASSWORD"
  56. diff --git a/CONTRIBUTING.adoc b/CONTRIBUTING.adoc
  57. index e951f69040..0599fb99ec 100644
  58. --- a/CONTRIBUTING.adoc
  59. +++ b/CONTRIBUTING.adoc
  60. @@ -4,7 +4,7 @@ _Please refer back to this document as a checklist before issuing any pull reque
  61. = Code of Conduct
  62. -Please see our https://github.com/spring-projects/.github/blob/master/CODE_OF_CONDUCT.md[code of conduct].
  63. +Please see our https://github.com/spring-projects/.github/blob/main/CODE_OF_CONDUCT.md[code of conduct].
  64. = Similar but different
  65. @@ -43,9 +43,9 @@ If you're considering anything more than correcting a typo or fixing a minor bug
  66. If you have not previously done so, please fill out and submit the https://cla.pivotal.io/sign/spring[Contributor License Agreement].
  67. -= Create your branch from master
  68. += Create your branch from main
  69. -Create your topic branch to be submitted as a pull request from master. The Spring team will consider your pull request for backporting on a case-by-case basis; you don't need to worry about submitting anything for backporting.
  70. +Create your topic branch to be submitted as a pull request from main. The Spring team will consider your pull request for backporting on a case-by-case basis; you don't need to worry about submitting anything for backporting.
  71. = Use short branch names
  72. diff --git a/README.adoc b/README.adoc
  73. index 4fda007d1a..6cb3f95061 100644
  74. --- a/README.adoc
  75. +++ b/README.adoc
  76. @@ -1,6 +1,6 @@
  77. image::https://badges.gitter.im/Join%20Chat.svg[Gitter,link=https://gitter.im/spring-projects/spring-security?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge]
  78. -image:https://github.com/spring-projects/spring-security/workflows/CI/badge.svg?branch=master["Build Status", link="https://github.com/spring-projects/spring-security/actions?query=workflow%3ACI"]
  79. +image:https://github.com/spring-projects/spring-security/workflows/CI/badge.svg?branch=main["Build Status", link="https://github.com/spring-projects/spring-security/actions?query=workflow%3ACI"]
  80. image:https://img.shields.io/badge/Revved%20up%20by-Gradle%20Enterprise-06A0CE?logo=Gradle&labelColor=02303A["Revved up by Gradle Enterprise", link="https://ge.spring.io/scans?search.rootProjectNames=spring-security"]
  81. @@ -12,7 +12,7 @@ a minimum and also requires Java 8.
  82. For a detailed list of features and access to the latest release, please visit https://spring.io/projects[Spring projects].
  83. == Code of Conduct
  84. -Please see our https://github.com/spring-projects/.github/blob/master/CODE_OF_CONDUCT.md[code of conduct]
  85. +Please see our https://github.com/spring-projects/.github/blob/main/CODE_OF_CONDUCT.md[code of conduct]
  86. == Downloading Artifacts
  87. See https://docs.spring.io/spring-security/site/docs/current/reference/html5/#getting[Getting Spring Security] for how to obtain Spring Security.
  88. @@ -60,7 +60,7 @@ Check out the https://stackoverflow.com/questions/tagged/spring-security[Spring
  89. https://spring.io/services[Commercial support] is available too.
  90. == Contributing
  91. -https://help.github.com/articles/creating-a-pull-request[Pull requests] are welcome; see the https://github.com/spring-projects/spring-security/blob/master/CONTRIBUTING.adoc[contributor guidelines] for details.
  92. +https://help.github.com/articles/creating-a-pull-request[Pull requests] are welcome; see the https://github.com/spring-projects/spring-security/blob/main/CONTRIBUTING.adoc[contributor guidelines] for details.
  93. == License
  94. Spring Security is Open Source software released under the
  95. diff --git a/buildSrc/src/main/java/org/springframework/gradle/sagan/SaganApi.java b/buildSrc/src/main/java/org/springframework/gradle/sagan/SaganApi.java
  96. index d40f296c20..24eeb3111c 100644
  97. --- a/buildSrc/src/main/java/org/springframework/gradle/sagan/SaganApi.java
  98. +++ b/buildSrc/src/main/java/org/springframework/gradle/sagan/SaganApi.java
  99. @@ -23,7 +23,7 @@ import java.io.IOException;
  100. import java.util.Base64;
  101. /**
  102. - * Implements necessary calls to the Sagan API See https://github.com/spring-io/sagan/blob/master/sagan-site/src/docs/asciidoc/index.adoc
  103. + * Implements necessary calls to the Sagan API See https://spring.io/restdocs/index.html
  104. */
  105. public class SaganApi {
  106. private String baseUrl = "https://spring.io/api";
  107. diff --git a/docs/guides/spring-security-docs-guides.gradle b/docs/guides/spring-security-docs-guides.gradle
  108. index 6c337c030a..8876dddd93 100644
  109. --- a/docs/guides/spring-security-docs-guides.gradle
  110. +++ b/docs/guides/spring-security-docs-guides.gradle
  111. @@ -28,7 +28,7 @@ ext.spec = copySpec {
  112. }
  113. def getDownloadUrl() {
  114. - snapshotBuild ? "https://github.com/spring-projects/spring-security/archive/master.zip" : "https://github.com/spring-projects/spring-security/archive/${project.version}.zip"
  115. + snapshotBuild ? "https://github.com/spring-projects/spring-security/archive/main.zip" : "https://github.com/spring-projects/spring-security/archive/${project.version}.zip"
  116. }
  117. diff --git a/docs/guides/src/docs/asciidoc/Guardfile b/docs/guides/src/docs/asciidoc/Guardfile
  118. index ec57b640f2..1075c0114c 100644
  119. --- a/docs/guides/src/docs/asciidoc/Guardfile
  120. +++ b/docs/guides/src/docs/asciidoc/Guardfile
  121. @@ -5,7 +5,7 @@ guard 'shell' do
  122. watch(/^.*\.asc$/) {|m|
  123. Asciidoctor.render_file(m[0], :to_dir => "build/", :safe => Asciidoctor::SafeMode::UNSAFE, :attributes=> {'toc' => '', 'idprefix' => '', 'idseparator' => '-', 'copycss' => '', 'icons' => 'font', 'source-highlighter' => 'prettify', 'sectanchors' => '', 'toc-placement' => 'preamble', 'revnumber' => '3.2.0.CI-SNAPSHOT',
  124. 'spring-security-version' => '3.2.0.CI-SNAPSHOT',
  125. - 'download-url' => 'https://github.com/spring-projects/spring-security/archive/master.zip',
  126. + 'download-url' => 'https://github.com/spring-projects/spring-security/archive/main.zip',
  127. 'include-maven-repository' => '_includes/maven-repository-snapshot.asc' })
  128. }
  129. end
  130. diff --git a/docs/manual/spring-security-docs-manual.gradle b/docs/manual/spring-security-docs-manual.gradle
  131. index a0a2ececd9..75c245f7de 100644
  132. --- a/docs/manual/spring-security-docs-manual.gradle
  133. +++ b/docs/manual/spring-security-docs-manual.gradle
  134. @@ -14,7 +14,7 @@ asciidoctor {
  135. }
  136. asciidoctorj {
  137. - def ghTag = snapshotBuild ? 'master' : project.version
  138. + def ghTag = snapshotBuild ? 'main' : project.version
  139. def ghUrl = "https://github.com/spring-projects/spring-security/tree/$ghTag"
  140. attributes 'spring-security-version' : project.version,
  141. 'spring-boot-version' : springBootVersion,
  142. diff --git a/docs/manual/src/docs/asciidoc/_includes/about/community.adoc b/docs/manual/src/docs/asciidoc/_includes/about/community.adoc
  143. index dc83c0c68c..893d17727b 100644
  144. --- a/docs/manual/src/docs/asciidoc/_includes/about/community.adoc
  145. +++ b/docs/manual/src/docs/asciidoc/_includes/about/community.adoc
  146. @@ -19,7 +19,7 @@ The following are some of the best ways to get help:
  147. == Becoming Involved
  148. We welcome your involvement in the Spring Security project.
  149. There are many ways to contribute, including answering questions on Stack Overflow, writing new code, improving existing code, assisting with documentation, developing samples or tutorials, reporting bugs, or simply making suggestions.
  150. -For more information, see our https://github.com/spring-projects/spring-security/blob/master/CONTRIBUTING.adoc[Contributing] documentation.
  151. +For more information, see our https://github.com/spring-projects/spring-security/blob/main/CONTRIBUTING.adoc[Contributing] documentation.
  152. [[community-source]]
  153. == Source Code
  154. diff --git a/docs/manual/src/docs/asciidoc/_includes/reactive/x509.adoc b/docs/manual/src/docs/asciidoc/_includes/reactive/x509.adoc
  155. index 4dc59526cc..694b905093 100644
  156. --- a/docs/manual/src/docs/asciidoc/_includes/reactive/x509.adoc
  157. +++ b/docs/manual/src/docs/asciidoc/_includes/reactive/x509.adoc
  158. @@ -49,4 +49,4 @@ public SecurityWebFilterChain securityWebFilterChain(ServerHttpSecurity http) {
  159. In this example, a username is extracted from the OU field of a client certificate instead of CN, and account lookup using `ReactiveUserDetailsService` is not performed at all. Instead, if the provided certificate issued to an OU named "Trusted Org Unit", a request will be authenticated.
  160. -For an example of configuring Netty and `WebClient` or `curl` command-line tool to use mutual TLS and enable X.509 authentication, please refer to https://github.com/spring-projects/spring-security/tree/master/samples/boot/webflux-x509.
  161. +For an example of configuring Netty and `WebClient` or `curl` command-line tool to use mutual TLS and enable X.509 authentication, please refer to https://github.com/spring-projects/spring-security-samples/tree/main/servlet/java-configuration/authentication/x509.
  162. diff --git a/docs/manual/src/docs/asciidoc/_includes/servlet/appendix/namespace.adoc b/docs/manual/src/docs/asciidoc/_includes/servlet/appendix/namespace.adoc
  163. index a9e321ff59..87d802ca8e 100644
  164. --- a/docs/manual/src/docs/asciidoc/_includes/servlet/appendix/namespace.adoc
  165. +++ b/docs/manual/src/docs/asciidoc/_includes/servlet/appendix/namespace.adoc
  166. @@ -4,7 +4,7 @@ This appendix provides a reference to the elements available in the security nam
  167. If you haven't used the namespace before, please read the <<ns-config,introductory chapter>> on namespace configuration, as this is intended as a supplement to the information there.
  168. Using a good quality XML editor while editing a configuration based on the schema is recommended as this will provide contextual information on which elements and attributes are available as well as comments explaining their purpose.
  169. The namespace is written in https://relaxng.org/[RELAX NG] Compact format and later converted into an XSD schema.
  170. -If you are familiar with this format, you may wish to examine the https://raw.githubusercontent.com/spring-projects/spring-security/master/config/src/main/resources/org/springframework/security/config/spring-security-4.1.rnc[schema file] directly.
  171. +If you are familiar with this format, you may wish to examine the https://raw.githubusercontent.com/spring-projects/spring-security/main/config/src/main/resources/org/springframework/security/config/spring-security-4.1.rnc[schema file] directly.
  172. [[nsa-web]]
  173. === Web Application Security
  174. diff --git a/docs/manual/src/docs/asciidoc/_includes/servlet/integrations/servlet-api.adoc b/docs/manual/src/docs/asciidoc/_includes/servlet/integrations/servlet-api.adoc
  175. index e57d545c15..5e4077c3f9 100644
  176. --- a/docs/manual/src/docs/asciidoc/_includes/servlet/integrations/servlet-api.adoc
  177. +++ b/docs/manual/src/docs/asciidoc/_includes/servlet/integrations/servlet-api.adoc
  178. @@ -1,7 +1,6 @@
  179. [[servletapi]]
  180. == Servlet API integration
  181. This section describes how Spring Security is integrated with the Servlet API.
  182. -The https://github.com/spring-projects/spring-security/tree/master/samples/xml/servletapi[servletapi-xml] sample application demonstrates the usage of each of these methods.
  183. [[servletapi-25]]
  184. diff --git a/docs/manual/src/docs/asciidoc/_includes/servlet/integrations/websocket.adoc b/docs/manual/src/docs/asciidoc/_includes/servlet/integrations/websocket.adoc
  185. index fcd99840d9..ffcf46b5a4 100644
  186. --- a/docs/manual/src/docs/asciidoc/_includes/servlet/integrations/websocket.adoc
  187. +++ b/docs/manual/src/docs/asciidoc/_includes/servlet/integrations/websocket.adoc
  188. @@ -4,8 +4,6 @@
  189. Spring Security 4 added support for securing https://docs.spring.io/spring/docs/current/spring-framework-reference/html/websocket.html[Spring's WebSocket support].
  190. This section describes how to use Spring Security's WebSocket support.
  191. -NOTE: You can find a complete working sample of WebSocket security at https://github.com/spring-projects/spring-session/tree/master/spring-session-samples/spring-session-sample-boot-websocket.
  192. -
  193. .Direct JSR-356 Support
  194. ****
  195. Spring Security does not provide direct JSR-356 support because doing so would provide little value.
  196. diff --git a/docs/manual/src/docs/asciidoc/_includes/servlet/java-configuration/index.adoc b/docs/manual/src/docs/asciidoc/_includes/servlet/java-configuration/index.adoc
  197. index 6367f402f6..3ba5432ddc 100644
  198. --- a/docs/manual/src/docs/asciidoc/_includes/servlet/java-configuration/index.adoc
  199. +++ b/docs/manual/src/docs/asciidoc/_includes/servlet/java-configuration/index.adoc
  200. @@ -7,7 +7,7 @@ Since Spring Security 3.2 there has been Spring Security Java Configuration supp
  201. If you are familiar with the <<ns-config>> then you should find quite a few similarities between it and the Security Java Configuration support.
  202. -NOTE: Spring Security provides https://github.com/spring-projects/spring-security/tree/master/samples/javaconfig[lots of sample applications] which demonstrate the use of Spring Security Java Configuration.
  203. +NOTE: Spring Security provides https://github.com/spring-projects/spring-security-samples/tree/main/servlet/java-configuration[lots of sample applications] which demonstrate the use of Spring Security Java Configuration.
  204. == Hello Web Security Java Configuration
  205. diff --git a/docs/manual/src/docs/asciidoc/_includes/servlet/kotlin-configuration/index.adoc b/docs/manual/src/docs/asciidoc/_includes/servlet/kotlin-configuration/index.adoc
  206. index 2e38e0ec35..767ab7ed80 100644
  207. --- a/docs/manual/src/docs/asciidoc/_includes/servlet/kotlin-configuration/index.adoc
  208. +++ b/docs/manual/src/docs/asciidoc/_includes/servlet/kotlin-configuration/index.adoc
  209. @@ -4,7 +4,7 @@
  210. Spring Security Kotlin Configuration support has been available since Spring Security 5.3.
  211. It enables users to easily configure Spring Security using a native Kotlin DSL.
  212. -NOTE: Spring Security provides https://github.com/spring-projects/spring-security/tree/master/samples/boot/kotlin[a sample application] which demonstrates the use of Spring Security Kotlin Configuration.
  213. +NOTE: Spring Security provides https://github.com/spring-projects/spring-security-samples/tree/main/servlet/spring-boot/kotlin/hello-security[a sample application] which demonstrates the use of Spring Security Kotlin Configuration.
  214. [[kotlin-config-httpsecurity]]
  215. == HttpSecurity
  216. --
  217. 2.24.1