Skip to content
This repository was archived by the owner on Nov 11, 2019. It is now read-only.

Commit 8fd1b6f

Browse files
committed
Merge branch 'master' into Override-RememberMeConfigurer.key
2 parents ff64c22 + 0cafcf3 commit 8fd1b6f

File tree

3,429 files changed

+132638
-31047
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

3,429 files changed

+132638
-31047
lines changed

.editorconfig

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ trim_trailing_whitespace = true
99
insert_final_newline = true
1010
max_line_length = 120
1111

12-
[*.java]
12+
[*.{java,xml}]
1313
indent_style = tab
1414
indent_size = 4
15-
charset = latin1
15+
charset = utf-8
1616
continuation_indent_size = 8
1717

18-
[*.xml]
18+
ij_smart_tabs = false
19+
ij_java_align_multiline_parameters = false
20+
21+
[*.gradle]
1922
indent_style = tab
20-
indent_size = 4
21-
charset = latin1
22-
continuation_indent_size = 8

.github/ISSUE_REPLY_TEMPLATES.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
2+
### Complete and Minimal Sample
3+
4+
It would be very helpful if you could provide a complete and minimal sample that reproduces the issue and share it via a GitHub repository. This will allow us to efficiently troubleshoot and help resolve the issue. The sample should contain the minimum amount of code to reproduce the issue along with detailed steps on how to reproduce. Please see the following references for what a complete and minimal sample should consist of.
5+
6+
- https://stackoverflow.com/help/mcve
7+
8+
### Post questions on StackOverflow not GitHub
9+
10+
Thanks for getting in touch, but it feels like this is a question that would be better suited to [Stack Overflow](https://stackoverflow.com/). As mentioned in [the guidelines for contributing](https://github.com/spring-projects/spring-security/blob/master/CONTRIBUTING.md#using-github-issues), we prefer to use GitHub issues only for bugs and enhancements. Feel free to update this issue with a link to the re-posted question (so that other people can find it) or add some more details if you feel this is a genuine bug.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,7 @@ For Security Vulnerabilities, please use https://pivotal.io/security#reporting
33
-->
44

55
<!--
6-
Thanks for contributing to Spring Security. Please provide a brief description of your pull-request and reference any related issue numbers (prefix references with #).
6+
Before creating new features, we recommend creating an issue to discuss the feature. This ensures that everyone is on the same page before extensive work is done.
7+
8+
Thanks for contributing to Spring Security. Please provide a brief description of your pull-request and reference any related issue numbers (prefix references with gh-).
79
-->

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ target/
88
.project
99
.DS_Store
1010
.settings/
11-
.idea/
11+
.idea/*
1212
out/
1313
bin/
1414
intellij/
@@ -23,3 +23,7 @@ atlassian-ide-plugin.xml
2323
!etc/eclipse/.checkstyle
2424
.checkstyle
2525
s101plugin.state
26+
.attach_pid*
27+
28+
!.idea/checkstyle-idea.xml
29+
!.idea/externalDependencies.xml

.idea/checkstyle-idea.xml

Lines changed: 19 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/externalDependencies.xml

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
language: java
22

33
jdk:
4-
- oraclejdk8
4+
- openjdk8
55

66
os:
77
- linux

CODE_OF_CONDUCT.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,5 @@ appropriate to the circumstances. Maintainers are obligated to maintain confiden
4040
with regard to the reporter of an incident.
4141

4242
This Code of Conduct is adapted from the
43-
http://contributor-covenant.org[Contributor Covenant], version 1.3.0, available at
44-
http://contributor-covenant.org/version/1/3/0/[contributor-covenant.org/version/1/3/0/]
43+
https://contributor-covenant.org[Contributor Covenant], version 1.3.0, available at
44+
https://contributor-covenant.org/version/1/3/0/[contributor-covenant.org/version/1/3/0/]

CONTRIBUTING.md

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Each Spring module is slightly different than another in terms of team size, num
1212

1313
# Importing into IDE
1414

15-
The following provides information on setting up a development environment that can run the sample in [Spring Tool Suite 3.6.0+](http://www.springsource.org/sts). Other IDE's should work using Gradle's IDE support, but have not been tested.
15+
The following provides information on setting up a development environment that can run the sample in [Spring Tool Suite 3.6.0+](https://www.springsource.org/sts). Other IDE's should work using Gradle's IDE support, but have not been tested.
1616

1717
* IDE Setup
1818
* Install Spring Tool Suite 3.6.0+
@@ -25,14 +25,26 @@ The following provides information on setting up a development environment that
2525
As of new versions of Spring Tool Suite, you might need to install Groovy Eclipse pointing directly to the updates plugin location. To install Groovy Eclipse on Spring Tool Suite based on Eclipse Oxigen you must do the following steps:
2626

2727
Help->Install New Software...->Add the following URL into _Work with_ field:
28-
http://dist.springsource.org/snapshot/GRECLIPSE/e4.7/
28+
https://dist.springsource.org/snapshot/GRECLIPSE/e4.7/
2929

3030
# Understand the basics
3131
Not sure what a pull request is, or how to submit one? Take a look at GitHub's excellent [help documentation first](https://help.github.com/articles/using-pull-requests).
3232

3333
# Search GitHub issues; create an issue if necessary
3434
Is there already an issue that addresses your concern? Do a bit of searching in our [GitHub issues ](https://github.com/spring-projects/spring-security/issues) to see if you can find something similar. If not, please create a new issue before submitting a pull request unless the change is not a user facing issue.
3535

36+
# Using GitHub Issues
37+
We use GitHub issues to track bugs and enhancements.
38+
If you have a general usage question please ask on [Stack Overflow](https://stackoverflow.com).
39+
The Spring Security team and the broader community monitor the [`spring-security`](https://stackoverflow.com/tags/spring-security) tag.
40+
41+
If you are reporting a bug, please help to speed up problem diagnosis by providing as much
42+
information as possible. Ideally, that would include a small
43+
[sample project](https://github.com/spring-projects/spring-boot-issues) that reproduces the
44+
problem.
45+
46+
47+
3648
# Discuss non-trivial contribution ideas with committers
3749
If you're considering anything more than correcting a typo or fixing a minor bug, please discuss it on the [Spring Security Gitter](https://gitter.im/spring-projects/spring-security) before submitting a pull request. We're happy to provide guidance but please spend an hour or two researching the subject on your own including searching the forums for prior discussions.
3850

@@ -47,7 +59,7 @@ Create your topic branch to be submitted as a pull request from master. The Spri
4759
# Use short branch names
4860
Branches used when submitting pull requests should preferably be named according to GitHub issues, e.g. 'gh-1234' or 'gh-1234-fix-npe'. Otherwise, use succinct, lower-case, dash (-) delimited names, such as 'fix-warnings', 'fix-typo', etc. This is important, because branch names show up in the merge commits that result from accepting pull requests, and should be as expressive and concise as possible.
4961

50-
#Keep commits focused
62+
# Keep commits focused
5163

5264
Remember each ticket should be focused on a single item of interest since the tickets are used to produce the changelog. Since each commit should be tied to a single GitHub issue, ensure that your commits are focused. For example, do not include an update to a transitive library in your commit unless the GitHub is to update the library. Reviewing your commits is essential before sending a pull request.
5365

@@ -60,12 +72,12 @@ Please carefully follow the whitespace and formatting conventions already presen
6072
1. Aim to wrap code at 120 characters, but favor readability over wrapping
6173
1. Preserve existing formatting; i.e. do not reformat code for its own sake
6274
1. Search the codebase using git grep and other tools to discover common naming conventions, etc.
63-
1. Latin-1 (ISO-8859-1) encoding for Java sources; use native2ascii to convert if necessary
75+
1. UTF-8 encoding for Java sources
6476

6577
Whitespace management tips
6678

67-
1. You can use the [AnyEdit Eclipse plugin](http://marketplace.eclipse.org/content/anyedit-tools) to ensure spaces are used and to clean up trailing whitespaces.
68-
1. Use git's pre-commit.sample hook to prevent invalid whitespace from being pushed out. You can enable it by moving ~/spring-security/.git/hooks/pre-commit.sample to ~/spring-security/.git/hooks/pre-commit and ensuring it is executable. For more information on hooks refer to [Pro Git's Pre-Commit Hook's section](http://git-scm.com/book/cs/ch7-3.html)
79+
1. You can use the [AnyEdit Eclipse plugin](https://marketplace.eclipse.org/content/anyedit-tools) to ensure spaces are used and to clean up trailing whitespaces.
80+
1. Use git's pre-commit.sample hook to prevent invalid whitespace from being pushed out. You can enable it by moving ~/spring-security/.git/hooks/pre-commit.sample to ~/spring-security/.git/hooks/pre-commit and ensuring it is executable. For more information on hooks refer to [Pro Git's Pre-Commit Hook's section](https://git-scm.com/book/cs/ch7-3.html)
6981

7082
# Add Apache license header to all new classes
7183

@@ -77,7 +89,7 @@ Whitespace management tips
7789
* you may not use this file except in compliance with the License.
7890
* You may obtain a copy of the License at
7991
*
80-
* http://www.apache.org/licenses/LICENSE-2.0
92+
* https://www.apache.org/licenses/LICENSE-2.0
8193
*
8294
* Unless required by applicable law or agreed to in writing, software
8395
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -116,7 +128,7 @@ Search the codebase to find related unit tests and add additional `@Test` method
116128
2. New test methods should not start with test. This is an old JUnit3 convention and is not necessary since the method is annotated with @Test.
117129

118130
# Update spring-security-x.y.rnc for schema changes
119-
Update the [RELAX NG](http://www.relaxng.org) schema `spring-security-x.y.rnc` instead of `spring-security-x.y.xsd` if you contribute changes to supported XML configuration. The XML schema file can be generated the following Gradle task:
131+
Update the [RELAX NG](https://relaxng.org/) schema `spring-security-x.y.rnc` instead of `spring-security-x.y.xsd` if you contribute changes to supported XML configuration. The XML schema file can be generated the following Gradle task:
120132

121133
<pre>
122134
./gradlew spring-security-config:rncToXsd
@@ -125,7 +137,7 @@ Update the [RELAX NG](http://www.relaxng.org) schema `spring-security-x.y.rnc` i
125137
Changes to the XML schema will be overwritten by the Gradle build task.
126138

127139
# Squash commits
128-
Use git rebase --interactive, git add --patch and other tools to "squash" multiple commits into atomic changes. In addition to the man pages for git, there are many resources online to help you understand how these tools work. Here is one: http://book.git-scm.com/4_interactive_rebasing.html.
140+
Use `git rebase --interactive`, `git add --patch` and other tools to "squash" multiple commits into atomic changes. In addition to the man pages for git, there are many resources online to help you understand how these tools work. Here from the [Git SCM Book](https://git-scm.com/book/en/v2/Git-Tools-Rewriting-History).
129141

130142
# Use real name in git commits
131143
Please configure git to use your real first and last name for any commits you intend to submit as pull requests. For example, this is not acceptable:

Jenkinsfile

Lines changed: 67 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,16 @@ try {
1313
stage('Check') {
1414
node {
1515
checkout scm
16+
sh "git clean -dfx"
1617
try {
17-
sh "./gradlew clean check --refresh-dependencies --no-daemon --stacktrace"
18+
withEnv(["JAVA_HOME=${ tool 'jdk8' }"]) {
19+
sh "./gradlew clean check --refresh-dependencies --no-daemon --stacktrace"
20+
}
1821
} catch(Exception e) {
1922
currentBuild.result = 'FAILED: check'
2023
throw e
2124
} finally {
22-
junit '**/build/*-results/*.xml'
25+
junit '**/build/test-results/*/*.xml'
2326
}
2427
}
2528
}
@@ -28,9 +31,16 @@ try {
2831
stage('Sonar') {
2932
node {
3033
checkout scm
34+
sh "git clean -dfx"
3135
withCredentials([string(credentialsId: 'spring-sonar.login', variable: 'SONAR_LOGIN')]) {
3236
try {
33-
sh "./gradlew clean sonarqube -PexcludeProjects='**/samples/**' -Dsonar.host.url=$SPRING_SONAR_HOST_URL -Dsonar.login=$SONAR_LOGIN --refresh-dependencies --no-daemon --stacktrace"
37+
withEnv(["JAVA_HOME=${ tool 'jdk8' }"]) {
38+
if ("master" == env.BRANCH_NAME) {
39+
sh "./gradlew sonarqube -PexcludeProjects='**/samples/**' -Dsonar.host.url=$SPRING_SONAR_HOST_URL -Dsonar.login=$SONAR_LOGIN --refresh-dependencies --no-daemon --stacktrace"
40+
} else {
41+
sh "./gradlew sonarqube -PexcludeProjects='**/samples/**' -Dsonar.projectKey='spring-security-${env.BRANCH_NAME}' -Dsonar.projectName='spring-security-${env.BRANCH_NAME}' -Dsonar.host.url=$SPRING_SONAR_HOST_URL -Dsonar.login=$SONAR_LOGIN --refresh-dependencies --no-daemon --stacktrace"
42+
}
43+
}
3444
} catch(Exception e) {
3545
currentBuild.result = 'FAILED: sonar'
3646
throw e
@@ -43,8 +53,11 @@ try {
4353
stage('Snapshot Tests') {
4454
node {
4555
checkout scm
56+
sh "git clean -dfx"
4657
try {
47-
sh "./gradlew clean test -PspringVersion='5.+' -PreactorVersion=Californium-BUILD-SNAPSHOT -PspringDataVersion=Lovelace-BUILD-SNAPSHOT --refresh-dependencies --no-daemon --stacktrace"
58+
withEnv(["JAVA_HOME=${ tool 'jdk8' }"]) {
59+
sh "./gradlew clean test -PforceMavenRepositories=snapshot -PspringVersion='5.+' -PreactorVersion=Dysprosium-BUILD-SNAPSHOT -PspringDataVersion=Lovelace-BUILD-SNAPSHOT --refresh-dependencies --no-daemon --stacktrace"
60+
}
4861
} catch(Exception e) {
4962
currentBuild.result = 'FAILED: snapshots'
5063
throw e
@@ -56,9 +69,10 @@ try {
5669
stage('JDK 9') {
5770
node {
5871
checkout scm
72+
sh "git clean -dfx"
5973
try {
6074
withEnv(["JAVA_HOME=${ tool 'jdk9' }"]) {
61-
sh "./gradlew clean test --no-daemon --stacktrace"
75+
sh "./gradlew clean test --refresh-dependencies --no-daemon --stacktrace"
6276
}
6377
} catch(Exception e) {
6478
currentBuild.result = 'FAILED: jdk9'
@@ -71,9 +85,10 @@ try {
7185
stage('JDK 10') {
7286
node {
7387
checkout scm
88+
sh "git clean -dfx"
7489
try {
7590
withEnv(["JAVA_HOME=${ tool 'jdk10' }"]) {
76-
sh "./gradlew clean test --no-daemon --stacktrace"
91+
sh "./gradlew clean test --refresh-dependencies --no-daemon --stacktrace"
7792
}
7893
} catch(Exception e) {
7994
currentBuild.result = 'FAILED: jdk10'
@@ -82,32 +97,52 @@ try {
8297
}
8398
}
8499
},
85-
jdk11: {
86-
stage('JDK 11') {
87-
node {
88-
checkout scm
89-
try {
90-
withEnv(["JAVA_HOME=${ tool 'jdk11' }"]) {
91-
sh "./gradlew clean test --no-daemon --stacktrace"
92-
}
93-
} catch(Exception e) {
94-
currentBuild.result = 'FAILED: jdk11'
95-
throw e
96-
}
97-
}
98-
}
100+
jdk11: {
101+
stage('JDK 11') {
102+
node {
103+
checkout scm
104+
sh "git clean -dfx"
105+
try {
106+
withEnv(["JAVA_HOME=${ tool 'jdk11' }"]) {
107+
sh "./gradlew clean test --refresh-dependencies --no-daemon --stacktrace"
108+
}
109+
} catch(Exception e) {
110+
currentBuild.result = 'FAILED: jdk11'
111+
throw e
112+
}
113+
}
114+
}
115+
},
116+
jdk12: {
117+
stage('JDK 12') {
118+
node {
119+
checkout scm
120+
sh "git clean -dfx"
121+
try {
122+
withEnv(["JAVA_HOME=${ tool 'openjdk12' }"]) {
123+
sh "./gradlew clean test --refresh-dependencies --no-daemon --stacktrace"
124+
}
125+
} catch(Exception e) {
126+
currentBuild.result = 'FAILED: jdk12'
127+
throw e
128+
}
129+
}
130+
}
99131
}
100132

101133
if(currentBuild.result == 'SUCCESS') {
102134
parallel artifacts: {
103135
stage('Deploy Artifacts') {
104136
node {
105137
checkout scm
138+
sh "git clean -dfx"
106139
withCredentials([file(credentialsId: 'spring-signing-secring.gpg', variable: 'SIGNING_KEYRING_FILE')]) {
107140
withCredentials([string(credentialsId: 'spring-gpg-passphrase', variable: 'SIGNING_PASSWORD')]) {
108141
withCredentials([usernamePassword(credentialsId: 'oss-token', passwordVariable: 'OSSRH_PASSWORD', usernameVariable: 'OSSRH_USERNAME')]) {
109142
withCredentials([usernamePassword(credentialsId: '02bd1690-b54f-4c9f-819d-a77cb7a9822c', usernameVariable: 'ARTIFACTORY_USERNAME', passwordVariable: 'ARTIFACTORY_PASSWORD')]) {
110-
sh "./gradlew deployArtifacts finalizeDeployArtifacts -Psigning.secretKeyRingFile=$SIGNING_KEYRING_FILE -Psigning.keyId=$SPRING_SIGNING_KEYID -Psigning.password='$SIGNING_PASSWORD' -PossrhUsername=$OSSRH_USERNAME -PossrhPassword=$OSSRH_PASSWORD -PartifactoryUsername=$ARTIFACTORY_USERNAME -PartifactoryPassword=$ARTIFACTORY_PASSWORD --refresh-dependencies --no-daemon --stacktrace"
143+
withEnv(["JAVA_HOME=${ tool 'jdk8' }"]) {
144+
sh "./gradlew deployArtifacts finalizeDeployArtifacts -Psigning.secretKeyRingFile=$SIGNING_KEYRING_FILE -Psigning.keyId=$SPRING_SIGNING_KEYID -Psigning.password='$SIGNING_PASSWORD' -PossrhUsername=$OSSRH_USERNAME -PossrhPassword=$OSSRH_PASSWORD -PartifactoryUsername=$ARTIFACTORY_USERNAME -PartifactoryPassword=$ARTIFACTORY_PASSWORD --refresh-dependencies --no-daemon --stacktrace"
145+
}
111146
}
112147
}
113148
}
@@ -119,8 +154,11 @@ try {
119154
stage('Deploy Docs') {
120155
node {
121156
checkout scm
157+
sh "git clean -dfx"
122158
withCredentials([file(credentialsId: 'docs.spring.io-jenkins_private_ssh_key', variable: 'DEPLOY_SSH_KEY')]) {
123-
sh "./gradlew deployDocs -PdeployDocsSshKeyPath=$DEPLOY_SSH_KEY -PdeployDocsSshUsername=$SPRING_DOCS_USERNAME --refresh-dependencies --no-daemon --stacktrace"
159+
withEnv(["JAVA_HOME=${ tool 'jdk8' }"]) {
160+
sh "./gradlew deployDocs -PdeployDocsSshKeyPath=$DEPLOY_SSH_KEY -PdeployDocsSshUsername=$SPRING_DOCS_USERNAME --refresh-dependencies --no-daemon --stacktrace"
161+
}
124162
}
125163
}
126164
}
@@ -129,13 +167,19 @@ try {
129167
stage('Deploy Schema') {
130168
node {
131169
checkout scm
170+
sh "git clean -dfx"
132171
withCredentials([file(credentialsId: 'docs.spring.io-jenkins_private_ssh_key', variable: 'DEPLOY_SSH_KEY')]) {
133-
sh "./gradlew deploySchema -PdeployDocsSshKeyPath=$DEPLOY_SSH_KEY -PdeployDocsSshUsername=$SPRING_DOCS_USERNAME --refresh-dependencies --no-daemon --stacktrace"
172+
withEnv(["JAVA_HOME=${ tool 'jdk8' }"]) {
173+
sh "./gradlew deploySchema -PdeployDocsSshKeyPath=$DEPLOY_SSH_KEY -PdeployDocsSshUsername=$SPRING_DOCS_USERNAME --refresh-dependencies --no-daemon --stacktrace"
174+
}
134175
}
135176
}
136177
}
137178
}
138179
}
180+
} catch(Exception e) {
181+
currentBuild.result = 'FAILED: deploys'
182+
throw e
139183
} finally {
140184
def buildStatus = currentBuild.result
141185
def buildNotSuccess = !SUCCESS.equals(buildStatus)

0 commit comments

Comments
 (0)