1
0
mirror of synced 2026-07-08 20:30:04 +00:00

Compare commits

..

112 Commits

Author SHA1 Message Date
Joe Grandja 16b28f5a2f Release 5.4.8 2021-08-16 11:12:40 -04:00
Joe Grandja 067bdd0dd9 Lock Dependencies for Release 2021-08-16 11:12:40 -04:00
Joe Grandja 2f81cbc577 Update to Spring Boot 2.4.8
Closes gh-10181
2021-08-16 11:12:21 -04:00
Steve Riesenberg dc81e1c86b Revert "URL encode client credentials"
This reverts commit 5243b1b8a8.

Issue gh-9610 gh-9861
Closes gh-10018
2021-07-20 13:29:29 -05:00
dmitrilc 6878ff7487 Update oauth2-resourceserver.adoc
fix the name of the parameter, from failure to badCredentials

Replaces AuthenticationFailureEvent

Remove AuthenticationFailureEvent Reference

Closes gh-10062
2021-07-16 12:03:35 -06:00
Luke Quinane c5a50bd7ec Fix typos
Closes gh-10050
2021-07-08 09:48:28 -03:00
Daniel Garnier-Moiroux 37e2cc4e89 Fix Saml2WebSsoAuthenticationRequestFilter javadoc
Closes gh-10025
2021-06-30 13:55:35 +02:00
Rob Winch ad45a74b34 Update to use s01.oss.sonatype.org
Closes gh-10015
2021-06-29 16:36:42 -05:00
Rob Winch 84118a7d44 Remove -PdeployDocsHost=docs-ip.spring.io
Closes gh-10021
2021-06-29 16:17:38 -05:00
Rob Winch fb83ddabe2 Update to spring-build-conventions:0.0.38
Closes gh-10020
2021-06-29 16:14:43 -05:00
/usr/local/ΕΨΗΕΛΩΝ 50a17f58db Improve AuthenticationManagerBeanDefinitionParser XML parsing
Closes gh-7282
2021-06-28 12:19:39 +02:00
Eleftheria Stein e313e6b89a Apply DefaultLoginPageConfigurer before logout
If they are not applied in this order, then the LogoutConfigurer cannot
set the logoutSuccessUrl, because the DefaultLoginPageGeneratingFilter
does not exist yet.
This impacts users that inject the default HttpSecurity bean.

Closes gh-9973
2021-06-24 11:09:19 +02:00
Steve Riesenberg 5137a653ff Next Development Version 2021-06-21 13:02:52 -05:00
Steve Riesenberg c17767883f Revert "Lock Dependencies for Release"
This reverts commit d71be4ca28.
2021-06-21 12:57:05 -05:00
Josh Cummings 73e6ef2ace Release 5.4.7 2021-06-21 10:33:21 -06:00
Josh Cummings d71be4ca28 Lock Dependencies for Release 2021-06-21 10:33:10 -06:00
Eleftheria Stein 0c1bce5c82 Disable default logout page when logout disabled
Closes gh-9475
2021-06-17 17:17:06 +02:00
Arnaud Mergey 1cd4ffeeb7 fix typo preventing full exception to be displayed in log
closes gh-9901
2021-06-17 08:40:55 -06:00
Christian Frommeyer 1d48f31e4b Replace StringUtils from oauth2-oidc-sdk
SecurityMockServerConfigurers.java previously used the StringUtils from
the optional oauth2-oidc-sdk dependency. Replacing this with the
StringUtils from the spring framework this should not force adding the
dependency in cases where it is not actually used.

Closes gh-9923
2021-06-16 13:23:23 -06:00
Steve Riesenberg a108868529 Store one request by default in WebSessionOAuth2ServerAuthorizationRequestRepository
Related to gh-9649
Closes gh-9857
Closes gh-9912
2021-06-15 11:44:34 -05:00
Marcus Hert da Coregio ac371d5de6 Fix Adding Filter Relative to Custom Filter
Closes gh-9787
2021-06-14 15:57:52 -03:00
Josh Cummings e601d9692e Anonymous Authentication Argument Resolution Docs
Closes gh-3338
2021-06-08 16:22:49 -06:00
Josh Cummings 18d04f2551 Fix Getting Started Link
Closes gh-6502
2021-06-08 13:49:14 -06:00
Josh Cummings b9e1901f19 Format PayloadInterceptorRSocket
Issue gh-9345
2021-06-04 12:56:37 -06:00
Josh Cummings 5666246187 PayloadInterceptorRSocket retains all payloads
Flux#skip discards its corresponding elements, meaning that they
aren't intended for reuse. When using RSocket's ByteBufPayloads,
this means that the bytes are releaseed back into RSocket's pool.

Since the downstream request may still need the skipped payload,
we should construct the publisher in a different way so as to
avoid the preemptive release.

Deferring Spring JavaFormat to clarify what changed.

Closes gh-9345
2021-06-04 12:55:33 -06:00
Steve Riesenberg 5243b1b8a8 URL encode client credentials
Closes gh-9610
2021-06-03 09:29:25 -05:00
Eleftheria Stein 43f3de7de1 Fix Resource Server clock skew default value in docs
Closes gh-6611
2021-06-02 12:46:52 +03:00
Josh Cummings 24c3c52254 Polish postLogoutRedirectUri encoding
Issue gh-9511
2021-05-26 13:58:28 -06:00
Hans Hosea Schaefer 499701e67a Encode postLogoutRedirectUri query params
Now encodes already encoded queryparameters in postLogoutRedirectUrl
correctly

Closes gh-9511
2021-05-26 13:58:23 -06:00
Marcus Hert da Coregio 4d18d06d9c Adjust createNewSessionIfAllowed to prevent NPE
Ensure that isTransientAuthentication reuses the same authentication object from saveContext

Closes gh-8947
2021-05-26 13:51:52 -03:00
Steve Riesenberg 9d0db200eb Handle encoded spaces in the root dn
Fixes an issue where provider URLs passed to the constructor of the
DefaultSpringSecurityContextSource can be URL encoded, resulting in
an invalid base dn. Additionally adds support for list constructor
to support spaces in base dn.

Closes gh-9742
2021-05-26 11:26:24 -05:00
Steve Riesenberg 589eccc547 Handle custom status codes in error handler
Fixes an issue where custom status codes in the error response cause an
IllegalArgumentException to be thrown when resolving an HttpStatus.

Closes gh-9741
2021-05-25 15:08:05 -05:00
Rob Winch f3436f25fb Additional HttpSessionOAuth2AuthorizationRequestRepository tests
Issue gh-5145
2021-05-13 14:01:04 -04:00
Craig Andrews e447a35cf2 HttpSessionOAuth2AuthorizationRequestRepository: store one request by default
Add setAllowMultipleAuthorizationRequests allowing applications to
revert to the previous functionality should they need to do so.

Closes gh-5145
Intentionally regresses gh-5110
2021-05-13 14:00:53 -04:00
Rob Winch 4a2f493be0 docs.af.pivotal.io->docs-ip.spring.io
Closes gh-9686
2021-04-27 09:30:41 -05:00
kevin ec46ce08c9 Release ByteBuf
Closes gh-9661
2021-04-26 13:22:06 -06:00
Josh Cummings 2c625f30e0 Add NPE Guards
- Like values, names are only validated if they are not null

Closes gh-9598
2021-04-22 11:28:25 -06:00
Joe Grandja 6725b1324a WebFlux httpBasic() matches on XHR requests
Closes gh-9660
2021-04-20 09:09:42 -04:00
Craig Andrews b97e93a486 Add guard around logger.debug statement
The log message involves string concatenation, the cost of which
should only be incurred if debug logging is enabled

Issue gh-9648
2021-04-16 10:37:48 -06:00
Rob Winch 26788a7309 Fix HttpSecurity.addFilter* Ordering
Closes gh-9633
2021-04-14 17:49:33 -05:00
Denis Washington 67d5520194 Limit oauth2Login() links to redirect-based flows
This prevents the generated login page from showing links for
authorization grant types like "client_credentials" which are
not redirect-based, and thus not meant for interactive use in
the browser.

Closes gh-9457
2021-04-14 05:36:57 -04:00
Joe Grandja c381503f7b Next Development Version 2021-04-12 13:47:56 -04:00
Joe Grandja 8850ccb1c6 Revert "Lock Dependencies"
This reverts commit 924ceac681.
2021-04-12 13:47:04 -04:00
Joe Grandja 321e6a8742 Release 5.4.6 2021-04-12 13:36:39 -04:00
Joe Grandja 924ceac681 Lock Dependencies 2021-04-12 13:36:39 -04:00
Joe Grandja 951cb844dd Update to Spring Boot 2.4.4 2021-04-12 13:36:28 -04:00
佚名 9570d0cada Add null check in CsrfFilter and CsrfWebFilter
Solve the problem that CsrfFilter and CsrfWebFilter
throws NPE exception when comparing two byte array
is equal in low JDK version.

When JDK version is lower than 1.8.0_45, method
java.security.MessageDigest#isEqual does not verify
whether the two arrays are null. And the above two
class call this method without null judgment.

ZiQiang Zhao<1694392889@qq.com>

Closes gh-9561
2021-04-09 21:47:11 -06:00
Eleftheria Stein e7ee70384d Consider Order on SecurityFilterChain bean definitions
Closes gh-9154
2021-03-24 11:08:49 +02:00
Josh Cummings d192b3eb91 Next Development Version 2021-02-17 16:00:33 -07:00
Josh Cummings 71e0967b53 Revert "Lock Dependencies for Release"
This reverts commit 8c04074264.
2021-02-17 15:59:48 -07:00
Josh Cummings 45bca751c7 Release 5.4.5 2021-02-17 14:59:57 -07:00
Josh Cummings 8c04074264 Lock Dependencies for Release 2021-02-17 14:59:17 -07:00
Andy Wilkinson 7db6c9189e Downgrade to Nimbus JOSE JWT 8.+ 2021-02-12 10:56:35 +00:00
Josh Cummings f6a2850753 Next Development Version 2021-02-11 18:38:25 -07:00
Josh Cummings cf032d86d6 Revert "Lock Dependencies"
This reverts commit 9535a41d5a.
2021-02-11 18:38:07 -07:00
Josh Cummings abc523c063 Release 5.4.4 2021-02-11 18:00:01 -07:00
Josh Cummings 9535a41d5a Lock Dependencies 2021-02-11 17:43:39 -07:00
Rob Winch 4b6b417d5a Additional Test for HttpSessionSecurityContextRepository
Issue gh-9387
2021-02-11 17:39:49 -07:00
Rob Winch c72a6fac04 Optimize HttpSessionSecurityContextRepository
Closes gh-9387
2021-02-11 17:39:48 -07:00
Josh Cummings 357446ba9d Next Development Version 2021-02-11 17:35:08 -07:00
Josh Cummings f449da8b78 Revert "Lock Dependencies"
This reverts commit d17ebf53f9.
2021-02-11 17:28:01 -07:00
Josh Cummings 9fbcfd9513 Release 5.4.3 2021-02-11 16:56:28 -07:00
Josh Cummings d17ebf53f9 Lock Dependencies 2021-02-11 16:56:28 -07:00
Josh Cummings c241f643ad Update to GAE 1.9.86
Closes gh-9448
2021-02-11 16:56:21 -07:00
Josh Cummings d4461dc856 Update to Spring Boot 2.4.2
Closes gh-9447
2021-02-11 16:56:12 -07:00
Josh Cummings ad0ad06705 Update to Kotlin 1.4.30
Closes gh-9446
2021-02-11 16:55:59 -07:00
Josh Cummings db76882f75 Fix Test Configuration
- Typo in PlaceholderConfig was causing Windows builds to
resolve the CLASSPATH environment variable

Closes gh-9421
2021-02-10 11:34:43 -07:00
kavi87 27e6743fd6 Update saml2-login.adoc
Fix example on registering custom marshaller for saml request
2021-02-04 10:10:04 -07:00
Josh Cummings e79141a188 Downgrade nimbus-jose-jwt to 8.+
Closes gh-9399
2021-02-03 13:18:18 -07:00
Josh Cummings da7141eb5b Polish Tests
Issue gh-9331
2021-02-03 09:13:38 -07:00
happier233 e30d78086a Configure CurrentSecurityContextArgumentResolver BeanResolver
Closes gh-9331
2021-02-03 09:13:28 -07:00
Mayur Patel fc24c7991c Allow null or empty authorities for DefaultOAuth2User
Make DefaultOAuth2User more inline with other part of
spring-security.
For example,
- DefaultOAuth2AuthenticatedPrincipal
- AbstractAuthenticationToken

Closes gh-9366
2021-02-01 17:26:56 -05:00
Josh Cummings 42013ee3a1 Change Example Name
Closes gh-9379
2021-01-28 11:23:47 -07:00
Rob Winch 21f03b53f2 Use spring-build-conventions:0.0.37 2021-01-25 20:26:35 -06:00
Benjamin Faal f6b678f137 Make user info response status check error only
Closes gh-9336
2021-01-25 10:23:49 -05:00
Josh Cummings 76657631fd Migrate SAML 2.0 Tests and Docs to PCFOne
Issue gh-9362
2021-01-22 15:13:41 -07:00
Josh Cummings 3f2057364e Migrate SAML 2.0 Samples to PCFOne
Closes gh-9362
2021-01-22 11:22:28 -07:00
Josh Cummings a8a66480be Fix SAML 2.0 Javaconfig Sample
Issue gh-9362
2021-01-22 11:22:22 -07:00
Eleftheria Stein 1f4aa8fe4f Provide artifactoryUsername/Password in docs and schema jobs 2021-01-22 14:45:25 +01:00
Eleftheria Stein 420e8227d4 Resolve artifacts from Maven Central first
- Use spring-build-conventions:0.0.36
- Add https://repo.spring.io/release to reference

Closes gh-9367
2021-01-22 13:28:35 +01:00
tristanessquare 580b988e7f Fix NullPointerException
- Caused by a malformed WWW-Authenticate value

Closes gh-9364
2021-01-21 16:22:29 -07:00
Rob Winch acb5ae607b Constant Time Comparison for CSRF tokens
Closes gh-9291
2021-01-20 16:09:21 -06:00
Rob Winch 77a1befcc2 Fix Checkstyle for CsrfWebFilter
Issue gh-9337
2021-01-12 11:38:01 -06:00
Rob Winch 61b75bb2d6 Fix CsrfWebFilter error message when expected CSRF not found
Closes gh-9337
2021-01-12 11:19:11 -06:00
Eleftheria Stein 429caeacc9 Fix bug with multiple AuthenticationManager beans
Closes gh-9256
2021-01-06 18:19:13 +01:00
Josh Cummings 8c93d95818 Renew Sample Certificate
Closes gh-9320
2021-01-04 12:11:19 -07:00
Ovidiu Popa b8175bccd2 OidcIdToken cannot be serialized to JSON if token contains claim of type JSONArray or JSONObject
ObjectToListStringConverter and ObjectToMapStringObjectConverter were checking if the source object is of type List or Map and if the first element or key is a String. If we have a JSONArray containing Strings the above check will pass, meaning that a JSONArray will be returned which is not serializable (same applies to JSONObject)

With this change, even if the check is passing a new List or Map will be returned.

Closes gh-9210
2020-12-03 10:54:00 -05:00
Josh Cummings 00375da173 Next Development Version 2020-12-02 22:21:21 -07:00
Josh Cummings 1af21a9d02 Revert "Lock Dependencies for 5.4.2"
This reverts commit 046bc9789f.
2020-12-02 22:21:02 -07:00
Josh Cummings 9effebe934 Release 5.4.2 2020-12-02 17:36:26 -07:00
Josh Cummings 046bc9789f Lock Dependencies for 5.4.2 2020-12-02 17:36:26 -07:00
Josh Cummings 423d3682d0 Update to Google App Engine 1.9.83
Closes gh-9250
2020-12-02 17:36:08 -07:00
Josh Cummings 1f5591198e Update to Kotlin 1.4.20
Closes gh-9249
2020-12-02 17:36:02 -07:00
Josh Cummings 0a95d3cfa8 Update to Spring Boot 2.4.0
Closes gh-9248
2020-12-02 16:37:41 -07:00
Josh Cummings 28bede808a Update SAML 2.0 Metadata URL Docs
Closes gh-9133
2020-12-02 14:34:18 -07:00
Eleftheria Stein 1d96579265 Fix CookieRequestCache for URL encoded query parameters
Avoid populating the saved request parameters with encoded values. Since the query strings of the request and saved URL are compared and must be equal, we can just use the parameters from the incoming request.

Closes gh-9203
2020-11-26 18:35:59 +01:00
Rob Winch 8b71d213f9 Use artifactoryUsername/Password for plugin repositories 2020-11-16 15:40:31 -06:00
Rob Winch 27f2391aa6 Provide artifactoryUsername/Password 2020-11-16 15:15:28 -06:00
Rob Winch 9b29edd756 Update to spring-build-conventions:0.0.35.RELEASE 2020-11-16 15:15:10 -06:00
Hideaki Matsunami 690be8ba30 add white space before strong notation. 2020-10-30 15:49:33 -06:00
Josh Cummings 574073d93f Constrain Snapshot Parameters for Maintenance Branch
Closes gh-9162
2020-10-28 16:31:32 -06:00
Ayush Kohli ecf910c374 Closes gh-8196
Add leveloffset
2020-10-28 14:57:03 -06:00
Josh Cummings 1f04db417b Update snapshot command
Closes gh-9124
2020-10-12 18:02:30 -06:00
Josh Cummings 63cd32682c Update Test Controllers
Closes gh-9121
2020-10-12 18:01:48 -06:00
Rob Winch 3d9e5d4bc3 Update to Gradle 6.6.1
Use version ordering feature

Closes gh-9122
2020-10-12 18:01:31 -06:00
Matthias Luppi 02645b8c82 Rework community.adoc
Fix link to CONTRIBUTING.adoc and use proper name of Stack Overflow
according to their trademark guidelines (two words, capital letters)
2020-10-12 13:35:34 -06:00
Matthias Luppi 0836a1d5fb Rework CONTRIBUTING.adoc
Several fixes were applied: Syntax corrected, links updated, improved
some paragraphs, restored parts that were removed in the conversion to
adoc format (see: a8b438587b)
2020-10-12 13:35:34 -06:00
Josh Cummings 84737e7b23 Revert "Lock Dependencies for 5.4.1"
This reverts commit 48ac47418d.
2020-10-07 16:38:48 -06:00
Josh Cummings 11d3ab4249 Next Development Version 2020-10-07 16:33:37 -06:00
Josh Cummings dbce9b5b66 Release 5.4.1 2020-10-07 16:01:35 -06:00
Josh Cummings 48ac47418d Lock Dependencies for 5.4.1 2020-10-07 16:01:34 -06:00
Josh Cummings 66ceb4dc10 Constrain Dependencies for Maintenance Branch 2020-10-07 16:01:34 -06:00
5235 changed files with 177168 additions and 102000 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
# EditorConfig for Spring Security
# see https://github.com/spring-projects/spring-security/blob/master/CONTRIBUTING.adoc#mind-the-whitespace
# see https://github.com/spring-projects/spring-security/blob/master/CONTRIBUTING.md#mind-the-whitespace
root = true
-17
View File
@@ -1,17 +0,0 @@
# Normalize line endings to auto.
* text auto
# Ensure that line endings for DOS batch files are not modified.
*.bat -text
# Ensure the following are treated as binary.
*.cer binary
*.graffle binary
*.jar binary
*.jpeg binary
*.jpg binary
*.keystore binary
*.odg binary
*.otg binary
*.png binary
*.hsx binary
+1 -1
View File
@@ -1,5 +1,5 @@
<!--
For Security Vulnerabilities, please use https://spring.io/security-policy
For Security Vulnerabilities, please use https://pivotal.io/security#reporting
-->
### Summary
-20
View File
@@ -1,20 +0,0 @@
{
"index_name": "security-docs",
"start_urls": [
"https://docs.spring.io/spring-security/reference/"
],
"selectors": {
"lvl0": {
"selector": "//nav[@class='crumbs']//li[@class='crumb'][last()-1]",
"type": "xpath",
"global": true,
"default_value": "Home"
},
"lvl1": ".doc h1",
"lvl2": ".doc h2",
"lvl3": ".doc h3",
"lvl4": ".doc h4",
"text": ".doc p, .doc td.content, .doc th.tableblock"
}
}
-20
View File
@@ -1,20 +0,0 @@
#!/bin/bash
HOST="$1"
HOST_PATH="$2"
SSH_PRIVATE_KEY="$3"
SSH_KNOWN_HOST="$4"
if [ "$#" -ne 4 ]; then
echo -e "not enough arguments USAGE:\n\n$0 \$HOST \$HOST_PATH \$SSH_PRIVATE_KEY \$SSH_KNOWN_HOSTS \n\n" >&2
exit 1
fi
# Use a non-default path to avoid overriding when testing locally
SSH_PRIVATE_KEY_PATH=~/.ssh/github-actions-docs
install -m 600 -D /dev/null "$SSH_PRIVATE_KEY_PATH"
echo "$SSH_PRIVATE_KEY" > "$SSH_PRIVATE_KEY_PATH"
echo "$SSH_KNOWN_HOST" > ~/.ssh/known_hosts
rsync --delete -avze "ssh -i $SSH_PRIVATE_KEY_PATH" docs/build/site/ "$HOST:$HOST_PATH"
rm -f "$SSH_PRIVATE_KEY_PATH"
@@ -1,21 +0,0 @@
#!/bin/bash
###
# Docs
# config.json https://docsearch.algolia.com/docs/config-file
# Run the crawler https://docsearch.algolia.com/docs/run-your-own/#run-the-crawl-from-the-docker-image
### USAGE
if [ "$#" -ne 3 ]; then
echo -e "not enough arguments USAGE:\n\n$0 \$ALGOLIA_APPLICATION_ID \$ALGOLIA_API_KEY \$CONFIG_FILE\n\n" >&2
exit 1
fi
# Script Parameters
APPLICATION_ID=$1
API_KEY=$2
CONFIG_FILE=$3
#### Script
script_dir=$(dirname $0)
docker run -e "APPLICATION_ID=$APPLICATION_ID" -e "API_KEY=$API_KEY" -e "CONFIG=$(cat $CONFIG_FILE | jq -r tostring)" algolia/docsearch-scraper
-5
View File
@@ -1,5 +0,0 @@
REPOSITORY_REF="$1"
TOKEN="$2"
curl -H "Accept: application/vnd.github.everest-preview+json" -H "Authorization: token ${TOKEN}" --request POST --data '{"event_type": "request-build-reference"}' https://api.github.com/repos/${REPOSITORY_REF}/dispatches
echo "Requested Build for $REPOSITORY_REF"
-16
View File
@@ -1,16 +0,0 @@
name: Update Algolia Index
on:
schedule:
- cron: '0 10 * * *' # Once per day at 10am UTC
workflow_dispatch: # Manual trigger
jobs:
update:
name: Update Algolia Index
runs-on: ubuntu-latest
steps:
- name: Checkout Source
uses: actions/checkout@v2
- name: Update Index
run: ${GITHUB_WORKSPACE}/.github/actions/algolia-docsearch-scraper.sh "${{ secrets.ALGOLIA_APPLICATION_ID }}" "${{ secrets.ALGOLIA_WRITE_API_KEY }}" "${GITHUB_WORKSPACE}/.github/actions/algolia-config.json"
-32
View File
@@ -1,32 +0,0 @@
name: Generate Antora Files and Request Build
on:
workflow_dispatch:
push:
branches-ignore:
- 'gh-pages'
tags: '**'
env:
GH_ACTIONS_REPO_TOKEN: ${{ secrets.GH_ACTIONS_REPO_TOKEN }}
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Source
uses: actions/checkout@v2
- name: Generate antora.yml
run: ./gradlew :spring-security-docs:generateAntora
- name: Extract Branch Name
id: extract_branch_name
run: echo "##[set-output name=generated_branch_name;]$(echo ${GITHUB_REPOSITORY}/${GITHUB_REF##*/})"
- name: Push generated antora files to the spring-generated-docs
uses: JamesIves/github-pages-deploy-action@4.1.4
with:
branch: ${{ steps.extract_branch_name.outputs.generated_branch_name }} # The branch the action should deploy to.
folder: "docs/build/generateAntora" # The folder the action should deploy.
repository-name: "spring-io/spring-generated-docs"
token: ${{ secrets.GH_ACTIONS_REPO_TOKEN }}
- name: Dispatch Build Request
run: ${GITHUB_WORKSPACE}/.github/actions/dispatch.sh 'spring-projects/spring-security' "$GH_ACTIONS_REPO_TOKEN"
@@ -1,17 +0,0 @@
name: Clean build artifacts
on:
schedule:
- cron: '0 10 * * *' # Once per day at 10am UTC
jobs:
main:
runs-on: ubuntu-latest
steps:
- name: Delete artifacts in cron job
env:
GH_ACTIONS_REPO_TOKEN: ${{ secrets.GH_ACTIONS_REPO_TOKEN }}
run: |
echo "Running clean build artifacts logic"
output=$(curl -X GET -H "Authorization: token $GH_ACTIONS_REPO_TOKEN" https://api.github.com/repos/spring-projects/spring-security/actions/artifacts | grep '"id"' | cut -d : -f2 | sed 's/,*$//g')
echo Output is $output
for id in $output; do curl -X DELETE -H "Authorization: token $GH_ACTIONS_REPO_TOKEN" https://api.github.com/repos/spring-projects/spring-security/actions/artifacts/$id; done;
@@ -1,211 +0,0 @@
name: CI
on:
push:
schedule:
- cron: '0 10 * * *' # Once per day at 10am UTC
workflow_dispatch: # Manual trigger
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
GRADLE_ENTERPRISE_CACHE_USER: ${{ secrets.GRADLE_ENTERPRISE_CACHE_USER }}
GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ secrets.GRADLE_ENTERPRISE_CACHE_PASSWORD }}
GRADLE_ENTERPRISE_SECRET_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_SECRET_ACCESS_KEY }}
COMMIT_OWNER: ${{ github.event.pusher.name }}
COMMIT_SHA: ${{ github.sha }}
STRUCTURE101_LICENSEID: ${{ secrets.STRUCTURE101_LICENSEID }}
ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
RUN_JOBS: ${{ github.repository == 'spring-projects/spring-security' }}
jobs:
prerequisites:
name: Pre-requisites for building
runs-on: ubuntu-latest
outputs:
runjobs: ${{ steps.continue.outputs.runjobs }}
steps:
- id: continue
name: Determine if should continue
if: env.RUN_JOBS == 'true'
run: echo "::set-output name=runjobs::true"
build_jdk_11:
name: Build JDK 11
needs: [prerequisites]
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
if: needs.prerequisites.outputs.runjobs
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: '11'
- name: Setup gradle user name
run: |
mkdir -p ~/.gradle
echo 'systemProp.user.name=spring-builds+github' >> ~/.gradle/gradle.properties
- name: Cache Gradle packages
uses: actions/cache@v2
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
- name: Build with Gradle
env:
GRADLE_ENTERPRISE_CACHE_USERNAME: ${{ secrets.GRADLE_ENTERPRISE_CACHE_USER }}
GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ secrets.GRADLE_ENTERPRISE_CACHE_PASSWORD }}
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_SECRET_ACCESS_KEY }}
run: ./gradlew clean build --continue -PartifactoryUsername="$ARTIFACTORY_USERNAME" -PartifactoryPassword="$ARTIFACTORY_PASSWORD"
snapshot_tests:
name: Test against snapshots
needs: [prerequisites]
runs-on: ubuntu-latest
if: needs.prerequisites.outputs.runjobs
steps:
- uses: actions/checkout@v2
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: '11'
- name: Setup gradle user name
run: |
mkdir -p ~/.gradle
echo 'systemProp.user.name=spring-builds+github' >> ~/.gradle/gradle.properties
- name: Snapshot Tests
run: |
export GRADLE_ENTERPRISE_CACHE_USERNAME="$GRADLE_ENTERPRISE_CACHE_USER"
export GRADLE_ENTERPRISE_CACHE_PASSWORD="$GRADLE_ENTERPRISE_CACHE_PASSWORD"
export GRADLE_ENTERPRISE_ACCESS_KEY="$GRADLE_ENTERPRISE_SECRET_ACCESS_KEY"
./gradlew test --refresh-dependencies -PartifactoryUsername="$ARTIFACTORY_USERNAME" -PartifactoryPassword="$ARTIFACTORY_PASSWORD" -PforceMavenRepositories=snapshot -PspringVersion='5.+' -PreactorVersion='20+' -PspringDataVersion='Neumann-BUILD-SNAPSHOT' -PrsocketVersion=1.1.0-SNAPSHOT -PspringBootVersion=2.4.0-SNAPSHOT -PlocksDisabled --stacktrace
check_samples:
name: Check Samples project
needs: [prerequisites]
runs-on: ubuntu-latest
if: needs.prerequisites.outputs.runjobs
steps:
- uses: actions/checkout@v2
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: '11'
- name: Setup gradle user name
run: |
mkdir -p ~/.gradle
echo 'systemProp.user.name=spring-builds+github' >> ~/.gradle/gradle.properties
- name: Check samples project
run: |
export GRADLE_ENTERPRISE_CACHE_USERNAME="$GRADLE_ENTERPRISE_CACHE_USER"
export GRADLE_ENTERPRISE_CACHE_PASSWORD="$GRADLE_ENTERPRISE_CACHE_PASSWORD"
export GRADLE_ENTERPRISE_ACCESS_KEY="$GRADLE_ENTERPRISE_SECRET_ACCESS_KEY"
./gradlew checkSamples --stacktrace
check_tangles:
name: Check for Package Tangles
needs: [ prerequisites ]
runs-on: ubuntu-latest
if: needs.prerequisites.outputs.runjobs
steps:
- uses: actions/checkout@v2
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: '11'
- name: Setup gradle user name
run: |
mkdir -p ~/.gradle
echo 'systemProp.user.name=spring-builds+github' >> ~/.gradle/gradle.properties
- name: Check for package tangles
run: |
export GRADLE_ENTERPRISE_CACHE_USERNAME="$GRADLE_ENTERPRISE_CACHE_USER"
export GRADLE_ENTERPRISE_CACHE_PASSWORD="$GRADLE_ENTERPRISE_CACHE_PASSWORD"
export GRADLE_ENTERPRISE_ACCESS_KEY="$GRADLE_ENTERPRISE_SECRET_ACCESS_KEY"
./gradlew check s101 -Ps101.licenseId="$STRUCTURE101_LICENSEID" --stacktrace
deploy_artifacts:
name: Deploy Artifacts
needs: [build_jdk_11, snapshot_tests, check_samples, check_tangles]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: '11'
- name: Setup gradle user name
run: |
mkdir -p ~/.gradle
echo 'systemProp.user.name=spring-builds+github' >> ~/.gradle/gradle.properties
- name: Deploy artifacts
run: |
export GRADLE_ENTERPRISE_CACHE_USERNAME="$GRADLE_ENTERPRISE_CACHE_USER"
export GRADLE_ENTERPRISE_CACHE_PASSWORD="$GRADLE_ENTERPRISE_CACHE_PASSWORD"
export GRADLE_ENTERPRISE_ACCESS_KEY="$GRADLE_ENTERPRISE_SECRET_ACCESS_KEY"
./gradlew publishArtifacts finalizeDeployArtifacts -PossrhUsername="$OSSRH_TOKEN_USERNAME" -PossrhPassword="$OSSRH_TOKEN_PASSWORD" -PartifactoryUsername="$ARTIFACTORY_USERNAME" -PartifactoryPassword="$ARTIFACTORY_PASSWORD" --stacktrace
env:
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.GPG_PRIVATE_KEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.GPG_PASSPHRASE }}
OSSRH_TOKEN_USERNAME: ${{ secrets.OSSRH_S01_TOKEN_USERNAME }}
OSSRH_TOKEN_PASSWORD: ${{ secrets.OSSRH_S01_TOKEN_PASSWORD }}
ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
deploy_docs:
name: Deploy Docs
needs: [build_jdk_11, snapshot_tests, check_samples, check_tangles]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: '11'
- name: Setup gradle user name
run: |
mkdir -p ~/.gradle
echo 'systemProp.user.name=spring-builds+github' >> ~/.gradle/gradle.properties
- name: Deploy Docs
run: |
export GRADLE_ENTERPRISE_CACHE_USERNAME="$GRADLE_ENTERPRISE_CACHE_USER"
export GRADLE_ENTERPRISE_CACHE_PASSWORD="$GRADLE_ENTERPRISE_CACHE_PASSWORD"
export GRADLE_ENTERPRISE_ACCESS_KEY="$GRADLE_ENTERPRISE_SECRET_ACCESS_KEY"
./gradlew deployDocs -PdeployDocsSshKey="$DOCS_SSH_KEY" -PdeployDocsSshUsername="$DOCS_USERNAME" -PdeployDocsHost="$DOCS_HOST" --stacktrace
env:
DOCS_USERNAME: ${{ secrets.DOCS_USERNAME }}
DOCS_SSH_KEY: ${{ secrets.DOCS_SSH_KEY }}
DOCS_HOST: ${{ secrets.DOCS_HOST }}
deploy_schema:
name: Deploy Schema
needs: [build_jdk_11, snapshot_tests, check_samples, check_tangles]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: '11'
- name: Setup gradle user name
run: |
mkdir -p ~/.gradle
echo 'systemProp.user.name=spring-builds+github' >> ~/.gradle/gradle.properties
- name: Deploy Schema
run: |
export GRADLE_ENTERPRISE_CACHE_USERNAME="$GRADLE_ENTERPRISE_CACHE_USER"
export GRADLE_ENTERPRISE_CACHE_PASSWORD="$GRADLE_ENTERPRISE_CACHE_PASSWORD"
export GRADLE_ENTERPRISE_ACCESS_KEY="$GRADLE_ENTERPRISE_SECRET_ACCESS_KEY"
./gradlew deploySchema -PdeployDocsSshKey="$DOCS_SSH_KEY" -PdeployDocsSshUsername="$DOCS_USERNAME" -PdeployDocsHost="$DOCS_HOST" --stacktrace --info
env:
DOCS_USERNAME: ${{ secrets.DOCS_USERNAME }}
DOCS_SSH_KEY: ${{ secrets.DOCS_SSH_KEY }}
DOCS_HOST: ${{ secrets.DOCS_HOST }}
notify_result:
name: Check for failures
needs: [build_jdk_11, snapshot_tests, check_samples, check_tangles, deploy_artifacts, deploy_docs, deploy_schema]
if: failure()
runs-on: ubuntu-latest
steps:
- name: Send Slack message
uses: Gamesight/slack-workflow-status@v1.0.1
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
slack_webhook_url: ${{ secrets.SLACK_WEBHOOK_URL }}
channel: '#spring-security-ci'
name: 'CI Notifier'
-33
View File
@@ -1,33 +0,0 @@
name: Build & Deploy Reference
on:
repository_dispatch:
types: request-build-reference
schedule:
- cron: '0 10 * * *' # Once per day at 10am UTC
workflow_dispatch: # Manual trigger
jobs:
deploy:
name: deploy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'adopt'
cache: gradle
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@e6e38bacfdf1a337459f332974bb2327a31aaf4b
- name: Build with Gradle
run: ./gradlew :spring-security-docs:antora --stacktrace
- name: Cleanup Gradle Cache
# Remove some files from the Gradle cache, so they aren't cached by GitHub Actions.
# Restoring these files from a GitHub Actions cache might cause problems for future builds.
run: |
rm -f ~/.gradle/caches/modules-2/modules-2.lock
rm -f ~/.gradle/caches/modules-2/gc.properties
- name: Deploy
run: ${GITHUB_WORKSPACE}/.github/actions/algolia-deploy.sh "${{ secrets.DOCS_USERNAME }}@${{ secrets.DOCS_HOST }}" "/opt/www/domains/spring.io/docs/htdocs/spring-security/reference/" "${{ secrets.DOCS_SSH_KEY }}" "${{ secrets.DOCS_SSH_HOST_KEY }}"
@@ -1,33 +0,0 @@
name: Check Milestone
on:
milestone:
types: [created, opened, edited]
env:
DUE_ON: ${{ github.event.milestone.due_on }}
TITLE: ${{ github.event.milestone.title }}
jobs:
spring-releasetrain-checks:
name: Check DueOn is on a Release Date
runs-on: ubuntu-latest
steps:
- name: Print Milestone Being Checked
run: echo "Validating DueOn '$DUE_ON' for milestone '$TITLE'"
- name: Validate DueOn
if: env.DUE_ON != ''
run: |
export TOOL_VERSION=0.1.1
wget "https://repo.maven.apache.org/maven2/io/spring/releasetrain/spring-release-train-tools/$TOOL_VERSION/spring-release-train-tools-$TOOL_VERSION.jar"
java -cp "spring-release-train-tools-$TOOL_VERSION.jar" io.spring.releasetrain.CheckMilestoneDueOnMain --dueOn "$DUE_ON" --expectedDayOfWeek MONDAY --expectedMondayCount 3
notify_result:
name: Check for failures
needs: [spring-releasetrain-checks]
if: failure()
runs-on: ubuntu-latest
steps:
- name: Send Slack message
uses: Gamesight/slack-workflow-status@v1.0.1
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
slack_webhook_url: ${{ secrets.SLACK_WEBHOOK_URL }}
channel: '#spring-security-ci'
name: 'CI Notifier'
+3 -9
View File
@@ -2,27 +2,21 @@ name: PR Build
on: pull_request
env:
RUN_JOBS: ${{ github.repository == 'spring-projects/spring-security' }}
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- if: env.RUN_JOBS == 'true'
uses: actions/checkout@v2
- uses: actions/checkout@v2
- name: Set up JDK
if: env.RUN_JOBS == 'true'
uses: actions/setup-java@v1
with:
java-version: '11'
java-version: '8'
- name: Cache Gradle packages
if: env.RUN_JOBS == 'true'
uses: actions/cache@v2
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
- name: Build with Gradle
if: env.RUN_JOBS == 'true'
run: ./gradlew clean build --continue --scan
+4 -1
View File
@@ -3,14 +3,17 @@
<component name="CheckStyle-IDEA">
<option name="configuration">
<map>
<entry key="active-configuration" value="PROJECT_RELATIVE:$PROJECT_DIR$/etc/checkstyle/checkstyle.xml:spring-security" />
<entry key="checkstyle-version" value="8.14" />
<entry key="copy-libs" value="false" />
<entry key="location-0" value="BUNDLED:(bundled):Sun Checks" />
<entry key="location-1" value="BUNDLED:(bundled):Google Checks" />
<entry key="location-2" value="PROJECT_RELATIVE:$PROJECT_DIR$/etc/checkstyle/checkstyle.xml:spring-security" />
<entry key="property-2.config_loc" value="$PROJECT_DIR$/etc/checkstyle" />
<entry key="scan-before-checkin" value="false" />
<entry key="scanscope" value="JavaOnlyWithTests" />
<entry key="suppress-errors" value="false" />
</map>
</option>
</component>
</project>
</project>
-6
View File
@@ -1,6 +0,0 @@
# Use sdkman to run "sdk env" to initialize with correct JDK version
# Enable auto-env through the sdkman_auto_env config
# See https://sdkman.io/usage#config
# A summary is to add the following to ~/.sdkman/etc/config
# sdkman_auto_env=true
java=11.0.14-tem
+3 -3
View File
@@ -4,7 +4,7 @@ _Please refer back to this document as a checklist before issuing any pull reque
= Code of Conduct
Please see our https://github.com/spring-projects/.github/blob/main/CODE_OF_CONDUCT.md[code of conduct].
Please see our https://github.com/spring-projects/.github/blob/master/CODE_OF_CONDUCT.md[code of conduct].
= Similar but different
@@ -43,9 +43,9 @@ If you're considering anything more than correcting a typo or fixing a minor bug
If you have not previously done so, please fill out and submit the https://cla.pivotal.io/sign/spring[Contributor License Agreement].
= Create your branch from main
= Create your branch from master
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.
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.
= Use short branch names
Vendored
+245
View File
@@ -0,0 +1,245 @@
def projectProperties = [
[$class: 'BuildDiscarderProperty',
strategy: [$class: 'LogRotator', numToKeepStr: '5']],
pipelineTriggers([cron('@daily')])
]
properties(projectProperties)
def SUCCESS = hudson.model.Result.SUCCESS.toString()
currentBuild.result = SUCCESS
def GRADLE_ENTERPRISE_CACHE_USER = usernamePassword(credentialsId: 'gradle_enterprise_cache_user',
passwordVariable: 'GRADLE_ENTERPRISE_CACHE_PASSWORD',
usernameVariable: 'GRADLE_ENTERPRISE_CACHE_USERNAME')
def GRADLE_ENTERPRISE_SECRET_ACCESS_KEY = string(credentialsId: 'gradle_enterprise_secret_access_key',
variable: 'GRADLE_ENTERPRISE_ACCESS_KEY')
def SPRING_SIGNING_SECRING = file(credentialsId: 'spring-signing-secring.gpg', variable: 'SIGNING_KEYRING_FILE')
def SPRING_GPG_PASSPHRASE = string(credentialsId: 'spring-gpg-passphrase', variable: 'SIGNING_PASSWORD')
def OSSRH_S01_CREDENTIALS = usernamePassword(credentialsId: 'oss-s01-token', passwordVariable: 'OSSRH_S01_TOKEN_PASSWORD', usernameVariable: 'OSSRH_S01_TOKEN_USERNAME')
def ARTIFACTORY_CREDENTIALS = usernamePassword(credentialsId: '02bd1690-b54f-4c9f-819d-a77cb7a9822c', usernameVariable: 'ARTIFACTORY_USERNAME', passwordVariable: 'ARTIFACTORY_PASSWORD')
def JENKINS_PRIVATE_SSH_KEY = file(credentialsId: 'docs.spring.io-jenkins_private_ssh_key', variable: 'DEPLOY_SSH_KEY')
def SONAR_LOGIN_CREDENTIALS = string(credentialsId: 'spring-sonar.login', variable: 'SONAR_LOGIN')
def jdkEnv(String jdk = 'jdk8') {
def jdkTool = tool(jdk)
return "JAVA_HOME=${ jdkTool }"
}
try {
parallel check: {
stage('Check') {
node {
checkout scm
sh "git clean -dfx"
try {
withCredentials([GRADLE_ENTERPRISE_CACHE_USER,
GRADLE_ENTERPRISE_SECRET_ACCESS_KEY,
ARTIFACTORY_CREDENTIALS]) {
withEnv([jdkEnv(),
"GRADLE_ENTERPRISE_CACHE_USERNAME=${GRADLE_ENTERPRISE_CACHE_USERNAME}",
"GRADLE_ENTERPRISE_CACHE_PASSWORD=${GRADLE_ENTERPRISE_CACHE_PASSWORD}",
"GRADLE_ENTERPRISE_ACCESS_KEY=${GRADLE_ENTERPRISE_ACCESS_KEY}"]) {
sh "./gradlew check -PartifactoryUsername=$ARTIFACTORY_USERNAME -PartifactoryPassword=$ARTIFACTORY_PASSWORD --stacktrace"
}
}
} catch(Exception e) {
currentBuild.result = 'FAILED: check'
throw e
} finally {
junit '**/build/test-results/*/*.xml'
}
}
}
},
sonar: {
stage('Sonar') {
node {
checkout scm
sh "git clean -dfx"
withCredentials([SONAR_LOGIN_CREDENTIALS,
GRADLE_ENTERPRISE_CACHE_USER,
GRADLE_ENTERPRISE_SECRET_ACCESS_KEY,
ARTIFACTORY_CREDENTIALS]) {
try {
withEnv([jdkEnv(),
"GRADLE_ENTERPRISE_CACHE_USERNAME=${GRADLE_ENTERPRISE_CACHE_USERNAME}",
"GRADLE_ENTERPRISE_CACHE_PASSWORD=${GRADLE_ENTERPRISE_CACHE_PASSWORD}",
"GRADLE_ENTERPRISE_ACCESS_KEY=${GRADLE_ENTERPRISE_ACCESS_KEY}"]) {
if ("master" == env.BRANCH_NAME) {
sh "./gradlew sonarqube -PartifactoryUsername=$ARTIFACTORY_USERNAME -PartifactoryPassword=$ARTIFACTORY_PASSWORD -PexcludeProjects='**/samples/**' -Dsonar.host.url=$SPRING_SONAR_HOST_URL -Dsonar.login=$SONAR_LOGIN --stacktrace"
} else {
sh "./gradlew sonarqube -PartifactoryUsername=$ARTIFACTORY_USERNAME -PartifactoryPassword=$ARTIFACTORY_PASSWORD -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 --stacktrace"
}
}
} catch(Exception e) {
currentBuild.result = 'FAILED: sonar'
throw e
}
}
}
}
},
snapshots: {
stage('Snapshot Tests') {
node {
checkout scm
sh "git clean -dfx"
try {
withCredentials([GRADLE_ENTERPRISE_CACHE_USER,
GRADLE_ENTERPRISE_SECRET_ACCESS_KEY,
ARTIFACTORY_CREDENTIALS]) {
withEnv([jdkEnv(),
"GRADLE_ENTERPRISE_CACHE_USERNAME=${GRADLE_ENTERPRISE_CACHE_USERNAME}",
"GRADLE_ENTERPRISE_CACHE_PASSWORD=${GRADLE_ENTERPRISE_CACHE_PASSWORD}",
"GRADLE_ENTERPRISE_ACCESS_KEY=${GRADLE_ENTERPRISE_ACCESS_KEY}"]) {
sh "./gradlew test -PartifactoryUsername=$ARTIFACTORY_USERNAME -PartifactoryPassword=$ARTIFACTORY_PASSWORD --refresh-dependencies -PforceMavenRepositories=snapshot -PspringVersion='5.2.+' -PreactorVersion='Dysprosium-BUILD-SNAPSHOT' -PspringDataVersion='Neumann-BUILD-SNAPSHOT' -PrsocketVersion='1.0.+' -PspringBootVersion='2.3.+' -PlocksDisabled --stacktrace"
}
}
} catch(Exception e) {
currentBuild.result = 'FAILED: snapshots'
throw e
}
}
}
},
jdk11: {
stage('JDK 11') {
node {
checkout scm
sh "git clean -dfx"
try {
withCredentials([GRADLE_ENTERPRISE_CACHE_USER,
GRADLE_ENTERPRISE_SECRET_ACCESS_KEY,
ARTIFACTORY_CREDENTIALS]) {
withEnv([jdkEnv("jdk11"),
"GRADLE_ENTERPRISE_CACHE_USERNAME=${GRADLE_ENTERPRISE_CACHE_USERNAME}",
"GRADLE_ENTERPRISE_CACHE_PASSWORD=${GRADLE_ENTERPRISE_CACHE_PASSWORD}",
"GRADLE_ENTERPRISE_ACCESS_KEY=${GRADLE_ENTERPRISE_ACCESS_KEY}"]) {
sh "./gradlew test -PartifactoryUsername=$ARTIFACTORY_USERNAME -PartifactoryPassword=$ARTIFACTORY_PASSWORD --stacktrace"
}
}
} catch(Exception e) {
currentBuild.result = 'FAILED: jdk11'
throw e
}
}
}
},
jdk12: {
stage('JDK 12') {
node {
checkout scm
sh "git clean -dfx"
try {
withCredentials([GRADLE_ENTERPRISE_CACHE_USER,
GRADLE_ENTERPRISE_SECRET_ACCESS_KEY,
ARTIFACTORY_CREDENTIALS]) {
withEnv([jdkEnv("openjdk12"),
"GRADLE_ENTERPRISE_CACHE_USERNAME=${GRADLE_ENTERPRISE_CACHE_USERNAME}",
"GRADLE_ENTERPRISE_CACHE_PASSWORD=${GRADLE_ENTERPRISE_CACHE_PASSWORD}",
"GRADLE_ENTERPRISE_ACCESS_KEY=${GRADLE_ENTERPRISE_ACCESS_KEY}"]) {
sh "./gradlew test -PartifactoryUsername=$ARTIFACTORY_USERNAME -PartifactoryPassword=$ARTIFACTORY_PASSWORD --stacktrace"
}
}
} catch(Exception e) {
currentBuild.result = 'FAILED: jdk12'
throw e
}
}
}
}
if(currentBuild.result == 'SUCCESS') {
parallel artifacts: {
stage('Deploy Artifacts') {
node {
checkout scm
sh "git clean -dfx"
withCredentials([SPRING_SIGNING_SECRING,
SPRING_GPG_PASSPHRASE,
OSSRH_S01_CREDENTIALS,
ARTIFACTORY_CREDENTIALS,
GRADLE_ENTERPRISE_CACHE_USER,
GRADLE_ENTERPRISE_SECRET_ACCESS_KEY]) {
withEnv([jdkEnv(),
"GRADLE_ENTERPRISE_CACHE_USERNAME=${GRADLE_ENTERPRISE_CACHE_USERNAME}",
"GRADLE_ENTERPRISE_CACHE_PASSWORD=${GRADLE_ENTERPRISE_CACHE_PASSWORD}",
"GRADLE_ENTERPRISE_ACCESS_KEY=${GRADLE_ENTERPRISE_ACCESS_KEY}"]) {
sh "./gradlew deployArtifacts -Psigning.secretKeyRingFile=$SIGNING_KEYRING_FILE -Psigning.keyId=$SPRING_SIGNING_KEYID -Psigning.password='$SIGNING_PASSWORD' -PossrhTokenUsername=$OSSRH_S01_TOKEN_USERNAME -PossrhTokenPassword=$OSSRH_S01_TOKEN_PASSWORD -PartifactoryUsername=$ARTIFACTORY_USERNAME -PartifactoryPassword=$ARTIFACTORY_PASSWORD --stacktrace --no-parallel"
sh "./gradlew finalizeDeployArtifacts -Psigning.secretKeyRingFile=$SIGNING_KEYRING_FILE -Psigning.keyId=$SPRING_SIGNING_KEYID -Psigning.password='$SIGNING_PASSWORD' -PossrhTokenUsername=$OSSRH_S01_TOKEN_USERNAME -PossrhTokenPassword=$OSSRH_S01_TOKEN_PASSWORD -PartifactoryUsername=$ARTIFACTORY_USERNAME -PartifactoryPassword=$ARTIFACTORY_PASSWORD --stacktrace --no-parallel"
}
}
}
}
},
docs: {
stage('Deploy Docs') {
node {
checkout scm
sh "git clean -dfx"
withCredentials([JENKINS_PRIVATE_SSH_KEY,
SPRING_GPG_PASSPHRASE,
OSSRH_S01_CREDENTIALS,
ARTIFACTORY_CREDENTIALS,
GRADLE_ENTERPRISE_CACHE_USER,
GRADLE_ENTERPRISE_SECRET_ACCESS_KEY]) {
withEnv([jdkEnv(),
"GRADLE_ENTERPRISE_CACHE_USERNAME=${GRADLE_ENTERPRISE_CACHE_USERNAME}",
"GRADLE_ENTERPRISE_CACHE_PASSWORD=${GRADLE_ENTERPRISE_CACHE_PASSWORD}",
"GRADLE_ENTERPRISE_ACCESS_KEY=${GRADLE_ENTERPRISE_ACCESS_KEY}"]) {
sh "./gradlew deployDocs -PartifactoryUsername=$ARTIFACTORY_USERNAME -PartifactoryPassword=$ARTIFACTORY_PASSWORD -PdeployDocsSshKeyPath=$DEPLOY_SSH_KEY -PdeployDocsSshUsername=$SPRING_DOCS_USERNAME --stacktrace"
}
}
}
}
},
schema: {
stage('Deploy Schema') {
node {
checkout scm
sh "git clean -dfx"
withCredentials([JENKINS_PRIVATE_SSH_KEY,
SPRING_GPG_PASSPHRASE,
OSSRH_S01_CREDENTIALS,
ARTIFACTORY_CREDENTIALS,
GRADLE_ENTERPRISE_CACHE_USER,
GRADLE_ENTERPRISE_SECRET_ACCESS_KEY]) {
withEnv([jdkEnv(),
"GRADLE_ENTERPRISE_CACHE_USERNAME=${GRADLE_ENTERPRISE_CACHE_USERNAME}",
"GRADLE_ENTERPRISE_CACHE_PASSWORD=${GRADLE_ENTERPRISE_CACHE_PASSWORD}",
"GRADLE_ENTERPRISE_ACCESS_KEY=${GRADLE_ENTERPRISE_ACCESS_KEY}"]) {
sh "./gradlew deploySchema -PartifactoryUsername=$ARTIFACTORY_USERNAME -PartifactoryPassword=$ARTIFACTORY_PASSWORD -PdeployDocsSshKeyPath=$DEPLOY_SSH_KEY -PdeployDocsSshUsername=$SPRING_DOCS_USERNAME --stacktrace"
}
}
}
}
}
}
} catch(Exception e) {
currentBuild.result = 'FAILED: deploys'
throw e
} finally {
def buildStatus = currentBuild.result
def buildNotSuccess = !SUCCESS.equals(buildStatus)
def lastBuildNotSuccess = !SUCCESS.equals(currentBuild.previousBuild?.result)
if(buildNotSuccess || lastBuildNotSuccess) {
stage('Notifiy') {
node {
final def RECIPIENTS = [[$class: 'DevelopersRecipientProvider'], [$class: 'RequesterRecipientProvider']]
def subject = "${buildStatus}: Build ${env.JOB_NAME} ${env.BUILD_NUMBER} status is now ${buildStatus}"
def details = """The build status changed to ${buildStatus}. For details see ${env.BUILD_URL}"""
emailext (
subject: subject,
body: details,
recipientProviders: RECIPIENTS,
to: "$SPRING_SECURITY_TEAM_EMAILS"
)
}
}
}
}
+7 -11
View File
@@ -1,9 +1,5 @@
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]
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"]
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"]
= Spring Security
Spring Security provides security services for the https://docs.spring.io[Spring IO Platform]. Spring Security 5.0 requires Spring 5.0 as
@@ -12,17 +8,17 @@ a minimum and also requires Java 8.
For a detailed list of features and access to the latest release, please visit https://spring.io/projects[Spring projects].
== Code of Conduct
Please see our https://github.com/spring-projects/.github/blob/main/CODE_OF_CONDUCT.md[code of conduct]
Please see our https://github.com/spring-projects/.github/blob/master/CODE_OF_CONDUCT.md[code of conduct]
== Downloading Artifacts
See https://docs.spring.io/spring-security/site/docs/current/reference/html5/#getting[Getting Spring Security] for how to obtain Spring Security.
See https://github.com/spring-projects/spring-framework/wiki/Downloading-Spring-artifacts[downloading Spring artifacts] for Maven repository information.
== Documentation
Be sure to read the https://docs.spring.io/spring-security/site/docs/current/reference/htmlsingle/[Spring Security Reference].
Extensive JavaDoc for the Spring Security code is also available in the https://docs.spring.io/spring-security/site/docs/current/api/[Spring Security API Documentation].
== Quick Start
See https://docs.spring.io/spring-security/site/docs/current/reference/html5/#servlet-hello[Hello Spring Security] to get started with a "Hello, World" application.
See https://docs.spring.io/spring-security/site/docs/5.4.x/reference/html5/#servlet-hello[Hello Spring Security] to get started with a "Hello, World" application.
== Building from Source
Spring Security uses a https://gradle.org[Gradle]-based build system.
@@ -30,9 +26,9 @@ In the instructions below, https://vimeo.com/34436402[`./gradlew`] is invoked fr
a cross-platform, self-contained bootstrap mechanism for the build.
=== Prerequisites
https://help.github.com/set-up-git-redirect[Git] and the https://www.oracle.com/technetwork/java/javase/downloads[JDK11 build].
https://help.github.com/set-up-git-redirect[Git] and the https://www.oracle.com/technetwork/java/javase/downloads[JDK8 build].
Be sure that your `JAVA_HOME` environment variable points to the `jdk-11` folder extracted from the JDK download.
Be sure that your `JAVA_HOME` environment variable points to the `jdk1.8.0` folder extracted from the JDK download.
=== Check out sources
[indent=0]
@@ -43,7 +39,7 @@ git clone git@github.com:spring-projects/spring-security.git
=== Install all spring-\* jars into your local Maven cache
[indent=0]
----
./gradlew publishToMavenLocal
./gradlew install
----
=== Compile and test; build all jars, distribution zips, and docs
@@ -60,7 +56,7 @@ Check out the https://stackoverflow.com/questions/tagged/spring-security[Spring
https://spring.io/services[Commercial support] is available too.
== Contributing
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.
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.
== License
Spring Security is Open Source software released under the
-184
View File
@@ -1,184 +0,0 @@
= Update Dependencies
Ensure you have no changes in your local repository.
Change to a new branch.
For example:
[source,bash]
----
$ git checkout -b 5.5.0-RC1-dependencies
----
Review the rules in build.gradle to ensure the rules make sense.
For example, we should not allow major version updates in a patch release.
Also ensure that all of the exclusions still make sense.
The following Gradle command will update your dependencies creating a commit for each dependency update.
The first invocation of the command will take quite a while (~20 minutes depending on internet speed) to run because it is indexing all the versions of all the dependencies.
[source,bash]
----
$ ./gradlew updateDependencies
----
Review the commits to ensure that the updated dependency versions make sense for this release. For example, we should not perform a major version update for a patch release.
[source,bash]
----
$ git log
----
If any of the versions dont make sense, update `build.gradle` to ensure that the version is excluded.
Run all the checks:
[source,bash]
----
$ ./gradlew check
----
If they dont work, you can run a git bisect to discover what broke the build.
Fix any commits that broke the build.
Check out the original brach:
[source,bash]
----
$ git checkout -
----
The following command will update the dependencies again but this time creating a ticket for each update and placing `Closes gh-<number>` in the commit. Replacing the following values:
* <github-personal-access-token> - Replace with a https://github.com/settings/tokens[GitHub personal access token] that has a scope of `public_repo`
* <next-version> - Replace with the title of the milestone you are releasing now (i.e. 5.5.0-RC1)
[source,bash]
----
$ ./gradlew updateDependencies -PupdateMode=GITHUB_ISSUE -PgitHubAccessToken=<github-personal-access-token> -PnextVersion=<next-version>
----
Apply any fixes from your previous branch that were necessary.
= Check All Issues are Closed
The following command will check if there are any open issues for the ticket.
Before running the command, replace the following values:
* <github-personal-access-token> - Replace with a https://github.com/settings/tokens[GitHub personal access token] that has a scope of `public_repo`. This is optional since you are unlikely to reach the rate limit for such a simple check.
* <next-version> - Replace with the title of the milestone you are releasing now (i.e. 5.5.0-RC1)
[source,bash]
----
$ ./gradlew gitHubCheckMilestoneHasNoOpenIssues -PgitHubAccessToken=<github-personal-access-token> -PnextVersion=<next-version>
----
Alternatively, you can manually check using https://github.com/spring-projects/spring-security/milestones
= Update Release Version
Update the version number in `gradle.properties` for the release, for example `5.5.0-M1`, `5.5.0-RC1`, `5.5.0`
= Update Antora Version
You will need to update the antora.yml version.
If you are unsure of what the values should be, the following task will instruct you what the expected values are:
[source,bash]
----
./gradlew :spring-security-docs:antoraCheckVersion
----
= Build Locally
Run the build using
[source,bash]
----
$ ./gradlew check
----
= Push the Release Commit
Push the commit and GitHub actions will build and deploy the artifacts
If you are pushing to Maven Central, then you can get notified when its uploaded by running the following:
[source,bash]
----
$ ./scripts/release/wait-for-done.sh 5.5.0
----
= Announce the release on Slack
* Announce via Slack on
https://pivotal.slack.com/messages/spring-release[#spring-release],
including the keyword `+spring-security-announcing+` in the message.
Something like:
....
spring-security-announcing 5.5.0 is available.
....
= Tag the release
* Tag the release and then push the tag
....
git tag 5.4.0-RC1
git push origin 5.4.0-RC1
....
== 7. Update to Next Development Version
* Update `gradle.properties` version to next `+SNAPSHOT+` version, update antora.yml, and then push
== 8. Update version on project page
The following command will update https://spring.io/projects/spring-security#learn with the new release version using the following parameters
<github-personal-access-token> - Replace with a https://github.com/settings/tokens[GitHub personal access token] that has a scope of `public_repo`
<next-version> - Replace with the milestone you are releasing now (i.e. 5.5.0-RC1)
<previous-version> - Replace with the previous release which will be removed from the listed versions (i.e. 5.5.0-M3)
[source,bash]
----
$ ./gradlew saganCreateRelease saganDeleteRelease -PgitHubAccessToken=<github-personal-access-token> -PnextVersion=<next-version> -PpreviousVersion=<previous-version>
----
== 9. Update Release Notes on GitHub
Generate the Release Notes replacing:
* <next-version> - Replace with the milestone you are releasing now (i.e. 5.5.0-RC1)
----
$ ./gradlew generateChangelog -PnextVersion=<next-version>
----
* Copy the release notes to your clipboard (your mileage may vary with
the following command)
....
cat build/changelog/release-notes.md | xclip -selection clipboard
....
* Create the
https://github.com/spring-projects/spring-security/releases[release on
GitHub], associate it with the tag, and paste the generated notes
== 10. Close / Create Milestone
* In
https://github.com/spring-projects/spring-security/milestones[GitHub
Milestones], create a new milestone for the next release version
* Move any open issues from the existing milestone you just released to
the new milestone
* Close the milestone for the release.
== 11. Announce the release on other channels
* Create a https://spring.io/admin/blog[Blog]
* Tweet from [@SpringSecurity](https://twitter.com/springsecurity)
@@ -0,0 +1,7 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.
io.projectreactor:reactor-bom:Dysprosium-SR22
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.springframework.data:spring-data-releasetrain:Neumann-SR9
org.springframework:spring-framework-bom:5.2.16.RELEASE
@@ -0,0 +1,7 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.
io.projectreactor:reactor-bom:Dysprosium-SR22
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.springframework.data:spring-data-releasetrain:Neumann-SR9
org.springframework:spring-framework-bom:5.2.16.RELEASE
@@ -0,0 +1,26 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.
antlr:antlr:2.7.7
ch.qos.logback:logback-classic:1.2.5
ch.qos.logback:logback-core:1.2.5
com.google.code.findbugs:jsr305:3.0.2
com.google.errorprone:error_prone_annotations:2.3.4
com.google.guava:failureaccess:1.0.1
com.google.guava:guava:29.0-jre
com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava
com.google.j2objc:j2objc-annotations:1.3
com.puppycrawl.tools:checkstyle:8.32
commons-beanutils:commons-beanutils:1.9.4
commons-collections:commons-collections:3.2.2
info.picocli:picocli:4.2.0
io.projectreactor:reactor-bom:Dysprosium-SR22
io.spring.javaformat:spring-javaformat-checkstyle:0.0.25
io.spring.nohttp:nohttp-checkstyle:0.0.3.RELEASE
io.spring.nohttp:nohttp:0.0.3.RELEASE
net.sf.saxon:Saxon-HE:9.9.1-7
org.antlr:antlr4-runtime:4.8-1
org.checkerframework:checker-qual:2.11.1
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.springframework.data:spring-data-releasetrain:Neumann-SR9
org.springframework:spring-framework-bom:5.2.16.RELEASE
@@ -0,0 +1,15 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.
io.projectreactor:reactor-bom:Dysprosium-SR22
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.springframework.data:spring-data-releasetrain:Neumann-SR9
org.springframework:spring-aop:5.2.16.RELEASE
org.springframework:spring-beans:5.2.16.RELEASE
org.springframework:spring-context:5.2.16.RELEASE
org.springframework:spring-core:5.2.16.RELEASE
org.springframework:spring-expression:5.2.16.RELEASE
org.springframework:spring-framework-bom:5.2.16.RELEASE
org.springframework:spring-jcl:5.2.16.RELEASE
org.springframework:spring-jdbc:5.2.16.RELEASE
org.springframework:spring-tx:5.2.16.RELEASE
@@ -0,0 +1,15 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.
io.projectreactor:reactor-bom:Dysprosium-SR22
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.springframework.data:spring-data-releasetrain:Neumann-SR9
org.springframework:spring-aop:5.2.16.RELEASE
org.springframework:spring-beans:5.2.16.RELEASE
org.springframework:spring-context:5.2.16.RELEASE
org.springframework:spring-core:5.2.16.RELEASE
org.springframework:spring-expression:5.2.16.RELEASE
org.springframework:spring-framework-bom:5.2.16.RELEASE
org.springframework:spring-jcl:5.2.16.RELEASE
org.springframework:spring-jdbc:5.2.16.RELEASE
org.springframework:spring-tx:5.2.16.RELEASE
@@ -0,0 +1,7 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.
io.projectreactor:reactor-bom:Dysprosium-SR22
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.springframework.data:spring-data-releasetrain:Neumann-SR9
org.springframework:spring-framework-bom:5.2.16.RELEASE
@@ -0,0 +1,15 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.
io.projectreactor:reactor-bom:Dysprosium-SR22
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.springframework.data:spring-data-releasetrain:Neumann-SR9
org.springframework:spring-aop:5.2.16.RELEASE
org.springframework:spring-beans:5.2.16.RELEASE
org.springframework:spring-context:5.2.16.RELEASE
org.springframework:spring-core:5.2.16.RELEASE
org.springframework:spring-expression:5.2.16.RELEASE
org.springframework:spring-framework-bom:5.2.16.RELEASE
org.springframework:spring-jcl:5.2.16.RELEASE
org.springframework:spring-jdbc:5.2.16.RELEASE
org.springframework:spring-tx:5.2.16.RELEASE
@@ -0,0 +1,8 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.
io.projectreactor:reactor-bom:Dysprosium-SR22
org.jacoco:org.jacoco.agent:0.8.2
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.springframework.data:spring-data-releasetrain:Neumann-SR9
org.springframework:spring-framework-bom:5.2.16.RELEASE
@@ -0,0 +1,15 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.
io.projectreactor:reactor-bom:Dysprosium-SR22
org.jacoco:org.jacoco.agent:0.8.2
org.jacoco:org.jacoco.ant:0.8.2
org.jacoco:org.jacoco.core:0.8.2
org.jacoco:org.jacoco.report:0.8.2
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.ow2.asm:asm-analysis:6.2.1
org.ow2.asm:asm-commons:6.2.1
org.ow2.asm:asm-tree:6.2.1
org.ow2.asm:asm:6.2.1
org.springframework.data:spring-data-releasetrain:Neumann-SR9
org.springframework:spring-framework-bom:5.2.16.RELEASE
@@ -0,0 +1,7 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.
io.projectreactor:reactor-bom:Dysprosium-SR22
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.springframework.data:spring-data-releasetrain:Neumann-SR9
org.springframework:spring-framework-bom:5.2.16.RELEASE
@@ -0,0 +1,9 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.
io.projectreactor:reactor-bom:Dysprosium-SR22
net.sf.ehcache:ehcache:2.10.9.2
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.slf4j:slf4j-api:1.7.32
org.springframework.data:spring-data-releasetrain:Neumann-SR9
org.springframework:spring-framework-bom:5.2.16.RELEASE
@@ -0,0 +1,7 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.
io.projectreactor:reactor-bom:Dysprosium-SR22
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.springframework.data:spring-data-releasetrain:Neumann-SR9
org.springframework:spring-framework-bom:5.2.16.RELEASE
@@ -0,0 +1,15 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.
io.projectreactor:reactor-bom:Dysprosium-SR22
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.springframework.data:spring-data-releasetrain:Neumann-SR9
org.springframework:spring-aop:5.2.16.RELEASE
org.springframework:spring-beans:5.2.16.RELEASE
org.springframework:spring-context:5.2.16.RELEASE
org.springframework:spring-core:5.2.16.RELEASE
org.springframework:spring-expression:5.2.16.RELEASE
org.springframework:spring-framework-bom:5.2.16.RELEASE
org.springframework:spring-jcl:5.2.16.RELEASE
org.springframework:spring-jdbc:5.2.16.RELEASE
org.springframework:spring-tx:5.2.16.RELEASE
@@ -0,0 +1,15 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.
io.projectreactor:reactor-bom:Dysprosium-SR22
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.springframework.data:spring-data-releasetrain:Neumann-SR9
org.springframework:spring-aop:5.2.16.RELEASE
org.springframework:spring-beans:5.2.16.RELEASE
org.springframework:spring-context:5.2.16.RELEASE
org.springframework:spring-core:5.2.16.RELEASE
org.springframework:spring-expression:5.2.16.RELEASE
org.springframework:spring-framework-bom:5.2.16.RELEASE
org.springframework:spring-jcl:5.2.16.RELEASE
org.springframework:spring-jdbc:5.2.16.RELEASE
org.springframework:spring-tx:5.2.16.RELEASE
@@ -0,0 +1,7 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.
io.projectreactor:reactor-bom:Dysprosium-SR22
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.springframework.data:spring-data-releasetrain:Neumann-SR9
org.springframework:spring-framework-bom:5.2.16.RELEASE
@@ -0,0 +1,7 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.
io.projectreactor:reactor-bom:Dysprosium-SR22
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.springframework.data:spring-data-releasetrain:Neumann-SR9
org.springframework:spring-framework-bom:5.2.16.RELEASE
@@ -0,0 +1,7 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.
io.projectreactor:reactor-bom:Dysprosium-SR22
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.springframework.data:spring-data-releasetrain:Neumann-SR9
org.springframework:spring-framework-bom:5.2.16.RELEASE
@@ -0,0 +1,24 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.
io.projectreactor:reactor-bom:Dysprosium-SR22
junit:junit:4.12
net.bytebuddy:byte-buddy-agent:1.10.15
net.bytebuddy:byte-buddy:1.10.15
org.assertj:assertj-core:3.17.2
org.hamcrest:hamcrest-core:1.3
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.mockito:mockito-core:3.5.15
org.objenesis:objenesis:3.1
org.springframework.data:spring-data-releasetrain:Neumann-SR9
org.springframework:spring-aop:5.2.16.RELEASE
org.springframework:spring-beans:5.2.16.RELEASE
org.springframework:spring-context-support:5.2.16.RELEASE
org.springframework:spring-context:5.2.16.RELEASE
org.springframework:spring-core:5.2.16.RELEASE
org.springframework:spring-expression:5.2.16.RELEASE
org.springframework:spring-framework-bom:5.2.16.RELEASE
org.springframework:spring-jcl:5.2.16.RELEASE
org.springframework:spring-jdbc:5.2.16.RELEASE
org.springframework:spring-test:5.2.16.RELEASE
org.springframework:spring-tx:5.2.16.RELEASE
@@ -0,0 +1,24 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.
io.projectreactor:reactor-bom:Dysprosium-SR22
junit:junit:4.12
net.bytebuddy:byte-buddy-agent:1.10.15
net.bytebuddy:byte-buddy:1.10.15
org.assertj:assertj-core:3.17.2
org.hamcrest:hamcrest-core:1.3
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.mockito:mockito-core:3.5.15
org.objenesis:objenesis:3.1
org.springframework.data:spring-data-releasetrain:Neumann-SR9
org.springframework:spring-aop:5.2.16.RELEASE
org.springframework:spring-beans:5.2.16.RELEASE
org.springframework:spring-context-support:5.2.16.RELEASE
org.springframework:spring-context:5.2.16.RELEASE
org.springframework:spring-core:5.2.16.RELEASE
org.springframework:spring-expression:5.2.16.RELEASE
org.springframework:spring-framework-bom:5.2.16.RELEASE
org.springframework:spring-jcl:5.2.16.RELEASE
org.springframework:spring-jdbc:5.2.16.RELEASE
org.springframework:spring-test:5.2.16.RELEASE
org.springframework:spring-tx:5.2.16.RELEASE
@@ -0,0 +1,7 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.
io.projectreactor:reactor-bom:Dysprosium-SR22
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.springframework.data:spring-data-releasetrain:Neumann-SR9
org.springframework:spring-framework-bom:5.2.16.RELEASE
@@ -0,0 +1,25 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.
io.projectreactor:reactor-bom:Dysprosium-SR22
junit:junit:4.12
net.bytebuddy:byte-buddy-agent:1.10.15
net.bytebuddy:byte-buddy:1.10.15
org.assertj:assertj-core:3.17.2
org.hamcrest:hamcrest-core:1.3
org.hsqldb:hsqldb:2.5.2
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.mockito:mockito-core:3.5.15
org.objenesis:objenesis:3.1
org.springframework.data:spring-data-releasetrain:Neumann-SR9
org.springframework:spring-aop:5.2.16.RELEASE
org.springframework:spring-beans:5.2.16.RELEASE
org.springframework:spring-context-support:5.2.16.RELEASE
org.springframework:spring-context:5.2.16.RELEASE
org.springframework:spring-core:5.2.16.RELEASE
org.springframework:spring-expression:5.2.16.RELEASE
org.springframework:spring-framework-bom:5.2.16.RELEASE
org.springframework:spring-jcl:5.2.16.RELEASE
org.springframework:spring-jdbc:5.2.16.RELEASE
org.springframework:spring-test:5.2.16.RELEASE
org.springframework:spring-tx:5.2.16.RELEASE
@@ -0,0 +1,25 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.
io.projectreactor:reactor-bom:Dysprosium-SR22
junit:junit:4.12
net.bytebuddy:byte-buddy-agent:1.10.15
net.bytebuddy:byte-buddy:1.10.15
org.assertj:assertj-core:3.17.2
org.hamcrest:hamcrest-core:1.3
org.hsqldb:hsqldb:2.5.2
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.mockito:mockito-core:3.5.15
org.objenesis:objenesis:3.1
org.springframework.data:spring-data-releasetrain:Neumann-SR9
org.springframework:spring-aop:5.2.16.RELEASE
org.springframework:spring-beans:5.2.16.RELEASE
org.springframework:spring-context-support:5.2.16.RELEASE
org.springframework:spring-context:5.2.16.RELEASE
org.springframework:spring-core:5.2.16.RELEASE
org.springframework:spring-expression:5.2.16.RELEASE
org.springframework:spring-framework-bom:5.2.16.RELEASE
org.springframework:spring-jcl:5.2.16.RELEASE
org.springframework:spring-jdbc:5.2.16.RELEASE
org.springframework:spring-test:5.2.16.RELEASE
org.springframework:spring-tx:5.2.16.RELEASE
@@ -0,0 +1,25 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.
io.projectreactor:reactor-bom:Dysprosium-SR22
junit:junit:4.12
net.bytebuddy:byte-buddy-agent:1.10.15
net.bytebuddy:byte-buddy:1.10.15
org.assertj:assertj-core:3.17.2
org.hamcrest:hamcrest-core:1.3
org.hsqldb:hsqldb:2.5.2
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.mockito:mockito-core:3.5.15
org.objenesis:objenesis:3.1
org.springframework.data:spring-data-releasetrain:Neumann-SR9
org.springframework:spring-aop:5.2.16.RELEASE
org.springframework:spring-beans:5.2.16.RELEASE
org.springframework:spring-context-support:5.2.16.RELEASE
org.springframework:spring-context:5.2.16.RELEASE
org.springframework:spring-core:5.2.16.RELEASE
org.springframework:spring-expression:5.2.16.RELEASE
org.springframework:spring-framework-bom:5.2.16.RELEASE
org.springframework:spring-jcl:5.2.16.RELEASE
org.springframework:spring-jdbc:5.2.16.RELEASE
org.springframework:spring-test:5.2.16.RELEASE
org.springframework:spring-tx:5.2.16.RELEASE
+10 -17
View File
@@ -1,25 +1,18 @@
apply plugin: 'io.spring.convention.spring-module'
dependencies {
management platform(project(":spring-security-dependencies"))
api project(':spring-security-core')
api 'org.springframework:spring-aop'
api 'org.springframework:spring-context'
api 'org.springframework:spring-core'
api 'org.springframework:spring-jdbc'
api 'org.springframework:spring-tx'
compile project(':spring-security-core')
compile 'org.springframework:spring-aop'
compile 'org.springframework:spring-context'
compile 'org.springframework:spring-core'
compile 'org.springframework:spring-jdbc'
compile 'org.springframework:spring-tx'
optional 'net.sf.ehcache:ehcache'
testImplementation "org.assertj:assertj-core"
testImplementation "org.junit.jupiter:junit-jupiter-api"
testImplementation "org.junit.jupiter:junit-jupiter-params"
testImplementation "org.junit.jupiter:junit-jupiter-engine"
testImplementation "org.mockito:mockito-core"
testImplementation "org.mockito:mockito-junit-jupiter"
testImplementation 'org.springframework:spring-beans'
testImplementation 'org.springframework:spring-context-support'
testImplementation "org.springframework:spring-test"
testCompile 'org.springframework:spring-beans'
testCompile 'org.springframework:spring-context-support'
testCompile 'org.springframework:spring-test'
testRuntimeOnly 'org.hsqldb:hsqldb'
testRuntime 'org.hsqldb:hsqldb'
}
@@ -93,17 +93,11 @@ public class AclAuthorizationStrategyImpl implements AclAuthorizationStrategy {
&& ((changeType == CHANGE_GENERAL) || (changeType == CHANGE_OWNERSHIP))) {
return;
}
// Iterate this principal's authorities to determine right
Set<String> authorities = AuthorityUtils.authorityListToSet(authentication.getAuthorities());
if (acl.getOwner() instanceof GrantedAuthoritySid
&& authorities.contains(((GrantedAuthoritySid) acl.getOwner()).getGrantedAuthority())) {
return;
}
// Not authorized by ACL ownership; try via adminstrative permissions
GrantedAuthority requiredAuthority = getRequiredAuthority(changeType);
// Iterate this principal's authorities to determine right
Set<String> authorities = AuthorityUtils.authorityListToSet(authentication.getAuthorities());
if (authorities.contains(requiredAuthority.getAuthority())) {
return;
}
@@ -37,9 +37,7 @@ import org.springframework.util.Assert;
* {@link PermissionGrantingStrategy} and {@link AclAuthorizationStrategy} instances.
*
* @author Ben Alex
* @deprecated since 5.6. In favor of JCache based implementations
*/
@Deprecated
public class EhCacheBasedAclCache implements AclCache {
private final Ehcache cache;
@@ -16,7 +16,7 @@
package org.springframework.security.acls;
import org.junit.jupiter.api.Test;
import org.junit.Test;
import org.springframework.security.acls.domain.AclFormattingUtils;
import org.springframework.security.acls.model.Permission;
@@ -20,7 +20,7 @@ import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import org.junit.jupiter.api.Test;
import org.junit.Test;
import org.springframework.security.acls.domain.ObjectIdentityImpl;
import org.springframework.security.acls.model.AclService;
@@ -18,7 +18,7 @@ package org.springframework.security.acls;
import java.util.Locale;
import org.junit.jupiter.api.Test;
import org.junit.Test;
import org.springframework.security.acls.model.Acl;
import org.springframework.security.acls.model.AclService;
@@ -21,7 +21,7 @@ import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import org.junit.jupiter.api.Test;
import org.junit.Test;
import org.springframework.security.access.ConfigAttribute;
import org.springframework.security.access.SecurityConfig;
@@ -20,7 +20,7 @@ import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import org.junit.jupiter.api.Test;
import org.junit.Test;
import org.springframework.security.access.AccessDeniedException;
import org.springframework.security.access.ConfigAttribute;
@@ -16,7 +16,7 @@
package org.springframework.security.acls.domain;
import org.junit.jupiter.api.Test;
import org.junit.Test;
import org.springframework.security.acls.model.AccessControlEntry;
import org.springframework.security.acls.model.Acl;
@@ -18,12 +18,12 @@ package org.springframework.security.acls.domain;
import java.util.Arrays;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.junit.jupiter.MockitoExtension;
import org.mockito.junit.MockitoJUnitRunner;
import org.springframework.security.acls.model.Acl;
import org.springframework.security.authentication.TestingAuthenticationToken;
@@ -31,13 +31,11 @@ import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.authority.SimpleGrantedAuthority;
import org.springframework.security.core.context.SecurityContextHolder;
import static org.mockito.BDDMockito.given;
/**
* @author Rob Winch
*
*/
@ExtendWith(MockitoExtension.class)
@RunWith(MockitoJUnitRunner.class)
public class AclAuthorizationStrategyImplTests {
@Mock
@@ -47,7 +45,7 @@ public class AclAuthorizationStrategyImplTests {
AclAuthorizationStrategyImpl strategy;
@BeforeEach
@Before
public void setup() {
this.authority = new SimpleGrantedAuthority("ROLE_AUTH");
TestingAuthenticationToken authentication = new TestingAuthenticationToken("foo", "bar",
@@ -56,7 +54,7 @@ public class AclAuthorizationStrategyImplTests {
SecurityContextHolder.getContext().setAuthentication(authentication);
}
@AfterEach
@After
public void cleanup() {
SecurityContextHolder.clearContext();
}
@@ -68,14 +66,6 @@ public class AclAuthorizationStrategyImplTests {
this.strategy.securityCheck(this.acl, AclAuthorizationStrategy.CHANGE_GENERAL);
}
// gh-9425
@Test
public void securityCheckWhenAclOwnedByGrantedAuthority() {
given(this.acl.getOwner()).willReturn(new GrantedAuthoritySid("ROLE_AUTH"));
this.strategy = new AclAuthorizationStrategyImpl(new SimpleGrantedAuthority("ROLE_SYSTEM_ADMIN"));
this.strategy.securityCheck(this.acl, AclAuthorizationStrategy.CHANGE_GENERAL);
}
@SuppressWarnings("serial")
class CustomAuthority implements GrantedAuthority {
@@ -22,9 +22,9 @@ import java.util.Arrays;
import java.util.List;
import java.util.Map;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.springframework.security.acls.model.AccessControlEntry;
import org.springframework.security.acls.model.Acl;
@@ -83,7 +83,7 @@ public class AclImplTests {
private DefaultPermissionFactory permissionFactory;
@BeforeEach
@Before
public void setUp() {
SecurityContextHolder.getContext().setAuthentication(this.auth);
this.authzStrategy = mock(AclAuthorizationStrategy.class);
@@ -93,7 +93,7 @@ public class AclImplTests {
this.permissionFactory = new DefaultPermissionFactory();
}
@AfterEach
@After
public void tearDown() {
SecurityContextHolder.clearContext();
}
@@ -16,9 +16,9 @@
package org.springframework.security.acls.domain;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.springframework.security.access.AccessDeniedException;
import org.springframework.security.acls.model.Acl;
@@ -43,12 +43,12 @@ public class AclImplementationSecurityCheckTests {
private static final String TARGET_CLASS = "org.springframework.security.acls.TargetObject";
@BeforeEach
@Before
public void setUp() {
SecurityContextHolder.clearContext();
}
@AfterEach
@After
public void tearDown() {
SecurityContextHolder.clearContext();
}
@@ -19,9 +19,9 @@ package org.springframework.security.acls.domain;
import java.io.ByteArrayOutputStream;
import java.io.PrintStream;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.springframework.security.acls.model.AccessControlEntry;
import org.springframework.security.acls.model.AuditableAccessControlEntry;
@@ -45,7 +45,7 @@ public class AuditLoggerTests {
private AuditableAccessControlEntry ace;
@BeforeEach
@Before
public void setUp() {
this.logger = new ConsoleAuditLogger();
this.ace = mock(AuditableAccessControlEntry.class);
@@ -53,7 +53,7 @@ public class AuditLoggerTests {
System.setOut(new PrintStream(this.bytes));
}
@AfterEach
@After
public void tearDown() {
System.setOut(this.console);
this.bytes.reset();
@@ -16,7 +16,7 @@
package org.springframework.security.acls.domain;
import org.junit.jupiter.api.Test;
import org.junit.Test;
import org.springframework.security.acls.model.ObjectIdentity;
@@ -16,7 +16,7 @@
package org.springframework.security.acls.domain;
import org.junit.jupiter.api.Test;
import org.junit.Test;
import org.springframework.security.acls.model.ObjectIdentity;
import org.springframework.security.acls.model.ObjectIdentityRetrievalStrategy;
@@ -16,8 +16,8 @@
package org.springframework.security.acls.domain;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.Before;
import org.junit.Test;
import org.springframework.security.acls.model.Permission;
@@ -32,7 +32,7 @@ public class PermissionTests {
private DefaultPermissionFactory permissionFactory;
@BeforeEach
@Before
public void createPermissionfactory() {
this.permissionFactory = new DefaultPermissionFactory();
}
@@ -26,11 +26,11 @@ import javax.sql.DataSource;
import net.sf.ehcache.Cache;
import net.sf.ehcache.CacheManager;
import net.sf.ehcache.Ehcache;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.security.acls.TargetObject;
@@ -81,19 +81,19 @@ public abstract class AbstractBasicLookupStrategyTests {
public abstract DataSource getDataSource();
@BeforeAll
@BeforeClass
public static void initCacheManaer() {
cacheManager = CacheManager.create();
cacheManager.addCache(new Cache("basiclookuptestcache", 500, false, false, 30, 30));
}
@AfterAll
@AfterClass
public static void shutdownCacheManager() {
cacheManager.removalAll();
cacheManager.shutdown();
}
@BeforeEach
@Before
public void populateDatabase() {
String query = "INSERT INTO acl_sid(ID,PRINCIPAL,SID) VALUES (1,1,'ben');"
+ "INSERT INTO acl_class(ID,CLASS) VALUES (2,'" + TARGET_CLASS + "');"
@@ -107,7 +107,7 @@ public abstract class AbstractBasicLookupStrategyTests {
getJdbcTemplate().execute(query);
}
@BeforeEach
@Before
public void initializeBeans() {
this.strategy = new BasicLookupStrategy(getDataSource(), aclCache(), aclAuthStrategy(),
new DefaultPermissionGrantingStrategy(new ConsoleAuditLogger()));
@@ -123,7 +123,7 @@ public abstract class AbstractBasicLookupStrategyTests {
new AclAuthorizationStrategyImpl(new SimpleGrantedAuthority("ROLE_USER")));
}
@AfterEach
@After
public void emptyDatabase() {
String query = "DELETE FROM acl_entry;" + "DELETE FROM acl_object_identity WHERE ID = 9;"
+ "DELETE FROM acl_object_identity WHERE ID = 8;" + "DELETE FROM acl_object_identity WHERE ID = 7;"
@@ -22,11 +22,11 @@ import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.UUID;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.junit.jupiter.MockitoExtension;
import org.mockito.junit.MockitoJUnitRunner;
import org.springframework.core.convert.ConversionService;
@@ -39,7 +39,7 @@ import static org.mockito.BDDMockito.given;
*
* @author paulwheeler
*/
@ExtendWith(MockitoExtension.class)
@RunWith(MockitoJUnitRunner.class)
public class AclClassIdUtilsTests {
private static final Long DEFAULT_IDENTIFIER = 999L;
@@ -56,7 +56,7 @@ public class AclClassIdUtilsTests {
private AclClassIdUtils aclClassIdUtils;
@BeforeEach
@Before
public void setUp() {
this.aclClassIdUtils = new AclClassIdUtils();
}
@@ -18,8 +18,8 @@ package org.springframework.security.acls.jdbc;
import javax.sql.DataSource;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.springframework.jdbc.core.JdbcTemplate;
@@ -33,12 +33,12 @@ public class BasicLookupStrategyTests extends AbstractBasicLookupStrategyTests {
private static final BasicLookupStrategyTestsDbHelper DATABASE_HELPER = new BasicLookupStrategyTestsDbHelper();
@BeforeAll
@BeforeClass
public static void createDatabase() throws Exception {
DATABASE_HELPER.createDatabase();
}
@AfterAll
@AfterClass
public static void dropDatabase() {
DATABASE_HELPER.getDataSource().destroy();
}
@@ -21,10 +21,11 @@ import java.util.Map;
import javax.sql.DataSource;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import junit.framework.Assert;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import org.springframework.core.convert.ConversionFailedException;
import org.springframework.core.convert.support.DefaultConversionService;
@@ -36,7 +37,6 @@ import org.springframework.security.acls.domain.ObjectIdentityImpl;
import org.springframework.security.acls.model.Acl;
import org.springframework.security.acls.model.ObjectIdentity;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
/**
@@ -60,18 +60,18 @@ public class BasicLookupStrategyWithAclClassTypeTests extends AbstractBasicLooku
return DATABASE_HELPER.getDataSource();
}
@BeforeAll
@BeforeClass
public static void createDatabase() throws Exception {
DATABASE_HELPER.createDatabase();
}
@AfterAll
@AfterClass
public static void dropDatabase() {
DATABASE_HELPER.getDataSource().destroy();
}
@Override
@BeforeEach
@Before
public void initializeBeans() {
super.initializeBeans();
this.uuidEnabledStrategy = new BasicLookupStrategy(getDataSource(), aclCache(), aclAuthStrategy(),
@@ -81,7 +81,7 @@ public class BasicLookupStrategyWithAclClassTypeTests extends AbstractBasicLooku
this.uuidEnabledStrategy.setConversionService(new DefaultConversionService());
}
@BeforeEach
@Before
public void populateDatabaseForAclClassTypeTests() {
String query = "INSERT INTO acl_class(ID,CLASS,CLASS_ID_TYPE) VALUES (3,'" + TARGET_CLASS_WITH_UUID
+ "', 'java.util.UUID');"
@@ -99,8 +99,8 @@ public class BasicLookupStrategyWithAclClassTypeTests extends AbstractBasicLooku
ObjectIdentity oid = new ObjectIdentityImpl(TARGET_CLASS_WITH_UUID, OBJECT_IDENTITY_UUID);
Map<ObjectIdentity, Acl> foundAcls = this.uuidEnabledStrategy.readAclsById(Arrays.asList(oid),
Arrays.asList(BEN_SID));
assertThat(foundAcls).hasSize(1);
assertThat(foundAcls.get(oid)).isNotNull();
Assert.assertEquals(1, foundAcls.size());
Assert.assertNotNull(foundAcls.get(oid));
}
@Test
@@ -108,8 +108,8 @@ public class BasicLookupStrategyWithAclClassTypeTests extends AbstractBasicLooku
ObjectIdentity oid = new ObjectIdentityImpl(TARGET_CLASS, 100L);
Map<ObjectIdentity, Acl> foundAcls = this.uuidEnabledStrategy.readAclsById(Arrays.asList(oid),
Arrays.asList(BEN_SID));
assertThat(foundAcls).hasSize(1);
assertThat(foundAcls.get(oid)).isNotNull();
Assert.assertEquals(1, foundAcls.size());
Assert.assertNotNull(foundAcls.get(oid));
}
@Test
@@ -26,14 +26,14 @@ import java.util.List;
import net.sf.ehcache.Ehcache;
import net.sf.ehcache.Element;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.ArgumentCaptor;
import org.mockito.Captor;
import org.mockito.Mock;
import org.mockito.junit.jupiter.MockitoExtension;
import org.mockito.junit.MockitoJUnitRunner;
import org.springframework.security.acls.domain.AclAuthorizationStrategy;
import org.springframework.security.acls.domain.AclAuthorizationStrategyImpl;
@@ -62,7 +62,7 @@ import static org.mockito.Mockito.verify;
*
* @author Andrei Stefan
*/
@ExtendWith(MockitoExtension.class)
@RunWith(MockitoJUnitRunner.class)
public class EhCacheBasedAclCacheTests {
private static final String TARGET_CLASS = "org.springframework.security.acls.TargetObject";
@@ -77,7 +77,7 @@ public class EhCacheBasedAclCacheTests {
private MutableAcl acl;
@BeforeEach
@Before
public void setup() {
this.myCache = new EhCacheBasedAclCache(this.cache,
new DefaultPermissionGrantingStrategy(new ConsoleAuditLogger()),
@@ -89,7 +89,7 @@ public class EhCacheBasedAclCacheTests {
this.acl = new AclImpl(identity, 1L, aclAuthorizationStrategy, new ConsoleAuditLogger());
}
@AfterEach
@After
public void cleanup() {
SecurityContextHolder.clearContext();
}
@@ -25,12 +25,12 @@ import java.util.UUID;
import javax.sql.DataSource;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.junit.jupiter.MockitoExtension;
import org.mockito.junit.MockitoJUnitRunner;
import org.springframework.jdbc.core.JdbcOperations;
import org.springframework.jdbc.core.RowMapper;
@@ -56,7 +56,7 @@ import static org.mockito.BDDMockito.given;
*
* @author Nena Raab
*/
@ExtendWith(MockitoExtension.class)
@RunWith(MockitoJUnitRunner.class)
public class JdbcAclServiceTests {
private EmbeddedDatabase embeddedDatabase;
@@ -74,20 +74,23 @@ public class JdbcAclServiceTests {
private JdbcAclService aclService;
@BeforeEach
@Before
public void setUp() {
this.aclService = new JdbcAclService(this.jdbcOperations, this.lookupStrategy);
this.aclServiceIntegration = new JdbcAclService(this.embeddedDatabase, this.lookupStrategy);
}
@Before
public void setUpEmbeddedDatabase() {
// @formatter:off
this.embeddedDatabase = new EmbeddedDatabaseBuilder()
.addScript("createAclSchemaWithAclClassIdType.sql")
.addScript("db/sql/test_data_hierarchy.sql")
.build();
// @formatter:on
this.aclService = new JdbcAclService(this.jdbcOperations, this.lookupStrategy);
this.aclServiceIntegration = new JdbcAclService(this.embeddedDatabase, this.lookupStrategy);
}
@AfterEach
@After
public void tearDownEmbeddedDatabase() {
this.embeddedDatabase.shutdown();
}
@@ -22,8 +22,7 @@ import java.util.Map;
import javax.sql.DataSource;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.io.ClassPathResource;
@@ -50,7 +49,7 @@ import org.springframework.security.authentication.TestingAuthenticationToken;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit.jupiter.SpringExtension;
import org.springframework.test.context.junit4.AbstractTransactionalJUnit4SpringContextTests;
import org.springframework.test.context.transaction.AfterTransaction;
import org.springframework.test.context.transaction.BeforeTransaction;
import org.springframework.transaction.annotation.Transactional;
@@ -67,10 +66,8 @@ import static org.mockito.Mockito.spy;
* @author Ben Alex
* @author Andrei Stefan
*/
@Transactional
@ExtendWith(SpringExtension.class)
@ContextConfiguration(locations = { "/jdbcMutableAclServiceTests-context.xml" })
public class JdbcMutableAclServiceTests {
public class JdbcMutableAclServiceTests extends AbstractTransactionalJUnit4SpringContextTests {
private static final String TARGET_CLASS = TargetObject.class.getName();
@@ -18,7 +18,7 @@ package org.springframework.security.acls.jdbc;
import java.util.UUID;
import org.junit.jupiter.api.Test;
import org.junit.Test;
import org.springframework.security.acls.TargetObjectWithUUID;
import org.springframework.security.acls.domain.ObjectIdentityImpl;
@@ -18,9 +18,9 @@ package org.springframework.security.acls.jdbc;
import java.util.Map;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import org.junit.After;
import org.junit.BeforeClass;
import org.junit.Test;
import org.springframework.cache.Cache;
import org.springframework.cache.CacheManager;
@@ -56,7 +56,7 @@ public class SpringCacheBasedAclCacheTests {
private static CacheManager cacheManager;
@BeforeAll
@BeforeClass
public static void initCacheManaer() {
cacheManager = new ConcurrentMapCacheManager();
// Use disk caching immediately (to test for serialization issue reported in
@@ -64,7 +64,7 @@ public class SpringCacheBasedAclCacheTests {
cacheManager.getCache("springcasebasedacltests");
}
@AfterEach
@After
public void clearContext() {
SecurityContextHolder.clearContext();
}
@@ -18,7 +18,7 @@ package org.springframework.security.acls.sid;
import java.util.List;
import org.junit.jupiter.api.Test;
import org.junit.Test;
import org.springframework.security.access.hierarchicalroles.RoleHierarchy;
import org.springframework.security.acls.domain.GrantedAuthoritySid;
@@ -19,7 +19,7 @@ package org.springframework.security.acls.sid;
import java.util.Collection;
import java.util.Collections;
import org.junit.jupiter.api.Test;
import org.junit.Test;
import org.springframework.security.acls.domain.GrantedAuthoritySid;
import org.springframework.security.acls.domain.PrincipalSid;
@@ -0,0 +1,7 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.
io.projectreactor:reactor-bom:Dysprosium-SR22
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.springframework.data:spring-data-releasetrain:Neumann-SR9
org.springframework:spring-framework-bom:5.2.16.RELEASE
@@ -0,0 +1,7 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.
io.projectreactor:reactor-bom:Dysprosium-SR22
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.springframework.data:spring-data-releasetrain:Neumann-SR9
org.springframework:spring-framework-bom:5.2.16.RELEASE
@@ -0,0 +1,7 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.
io.projectreactor:reactor-bom:Dysprosium-SR22
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.springframework.data:spring-data-releasetrain:Neumann-SR9
org.springframework:spring-framework-bom:5.2.16.RELEASE
@@ -0,0 +1,8 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.
io.projectreactor:reactor-bom:Dysprosium-SR22
org.aspectj:aspectjtools:1.9.6
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.springframework.data:spring-data-releasetrain:Neumann-SR9
org.springframework:spring-framework-bom:5.2.16.RELEASE
@@ -0,0 +1,26 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.
antlr:antlr:2.7.7
ch.qos.logback:logback-classic:1.2.5
ch.qos.logback:logback-core:1.2.5
com.google.code.findbugs:jsr305:3.0.2
com.google.errorprone:error_prone_annotations:2.3.4
com.google.guava:failureaccess:1.0.1
com.google.guava:guava:29.0-jre
com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava
com.google.j2objc:j2objc-annotations:1.3
com.puppycrawl.tools:checkstyle:8.32
commons-beanutils:commons-beanutils:1.9.4
commons-collections:commons-collections:3.2.2
info.picocli:picocli:4.2.0
io.projectreactor:reactor-bom:Dysprosium-SR22
io.spring.javaformat:spring-javaformat-checkstyle:0.0.25
io.spring.nohttp:nohttp-checkstyle:0.0.3.RELEASE
io.spring.nohttp:nohttp:0.0.3.RELEASE
net.sf.saxon:Saxon-HE:9.9.1-7
org.antlr:antlr4-runtime:4.8-1
org.checkerframework:checker-qual:2.11.1
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.springframework.data:spring-data-releasetrain:Neumann-SR9
org.springframework:spring-framework-bom:5.2.16.RELEASE
@@ -0,0 +1,14 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.
io.projectreactor:reactor-bom:Dysprosium-SR22
org.aspectj:aspectjrt:1.9.6
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.springframework.data:spring-data-releasetrain:Neumann-SR9
org.springframework:spring-aop:5.2.16.RELEASE
org.springframework:spring-beans:5.2.16.RELEASE
org.springframework:spring-context:5.2.16.RELEASE
org.springframework:spring-core:5.2.16.RELEASE
org.springframework:spring-expression:5.2.16.RELEASE
org.springframework:spring-framework-bom:5.2.16.RELEASE
org.springframework:spring-jcl:5.2.16.RELEASE
@@ -0,0 +1,14 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.
io.projectreactor:reactor-bom:Dysprosium-SR22
org.aspectj:aspectjrt:1.9.6
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.springframework.data:spring-data-releasetrain:Neumann-SR9
org.springframework:spring-aop:5.2.16.RELEASE
org.springframework:spring-beans:5.2.16.RELEASE
org.springframework:spring-context:5.2.16.RELEASE
org.springframework:spring-core:5.2.16.RELEASE
org.springframework:spring-expression:5.2.16.RELEASE
org.springframework:spring-framework-bom:5.2.16.RELEASE
org.springframework:spring-jcl:5.2.16.RELEASE
@@ -0,0 +1,7 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.
io.projectreactor:reactor-bom:Dysprosium-SR22
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.springframework.data:spring-data-releasetrain:Neumann-SR9
org.springframework:spring-framework-bom:5.2.16.RELEASE
@@ -0,0 +1,14 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.
io.projectreactor:reactor-bom:Dysprosium-SR22
org.aspectj:aspectjrt:1.9.6
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.springframework.data:spring-data-releasetrain:Neumann-SR9
org.springframework:spring-aop:5.2.16.RELEASE
org.springframework:spring-beans:5.2.16.RELEASE
org.springframework:spring-context:5.2.16.RELEASE
org.springframework:spring-core:5.2.16.RELEASE
org.springframework:spring-expression:5.2.16.RELEASE
org.springframework:spring-framework-bom:5.2.16.RELEASE
org.springframework:spring-jcl:5.2.16.RELEASE
@@ -0,0 +1,7 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.
io.projectreactor:reactor-bom:Dysprosium-SR22
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.springframework.data:spring-data-releasetrain:Neumann-SR9
org.springframework:spring-framework-bom:5.2.16.RELEASE
@@ -0,0 +1,8 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.
io.projectreactor:reactor-bom:Dysprosium-SR22
org.jacoco:org.jacoco.agent:0.8.2
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.springframework.data:spring-data-releasetrain:Neumann-SR9
org.springframework:spring-framework-bom:5.2.16.RELEASE
@@ -0,0 +1,15 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.
io.projectreactor:reactor-bom:Dysprosium-SR22
org.jacoco:org.jacoco.agent:0.8.2
org.jacoco:org.jacoco.ant:0.8.2
org.jacoco:org.jacoco.core:0.8.2
org.jacoco:org.jacoco.report:0.8.2
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.ow2.asm:asm-analysis:6.2.1
org.ow2.asm:asm-commons:6.2.1
org.ow2.asm:asm-tree:6.2.1
org.ow2.asm:asm:6.2.1
org.springframework.data:spring-data-releasetrain:Neumann-SR9
org.springframework:spring-framework-bom:5.2.16.RELEASE
@@ -0,0 +1,7 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.
io.projectreactor:reactor-bom:Dysprosium-SR22
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.springframework.data:spring-data-releasetrain:Neumann-SR9
org.springframework:spring-framework-bom:5.2.16.RELEASE
@@ -0,0 +1,7 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.
io.projectreactor:reactor-bom:Dysprosium-SR22
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.springframework.data:spring-data-releasetrain:Neumann-SR9
org.springframework:spring-framework-bom:5.2.16.RELEASE
@@ -0,0 +1,7 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.
io.projectreactor:reactor-bom:Dysprosium-SR22
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.springframework.data:spring-data-releasetrain:Neumann-SR9
org.springframework:spring-framework-bom:5.2.16.RELEASE
@@ -0,0 +1,14 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.
io.projectreactor:reactor-bom:Dysprosium-SR22
org.aspectj:aspectjrt:1.9.6
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.springframework.data:spring-data-releasetrain:Neumann-SR9
org.springframework:spring-aop:5.2.16.RELEASE
org.springframework:spring-beans:5.2.16.RELEASE
org.springframework:spring-context:5.2.16.RELEASE
org.springframework:spring-core:5.2.16.RELEASE
org.springframework:spring-expression:5.2.16.RELEASE
org.springframework:spring-framework-bom:5.2.16.RELEASE
org.springframework:spring-jcl:5.2.16.RELEASE
@@ -0,0 +1,14 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.
io.projectreactor:reactor-bom:Dysprosium-SR22
org.aspectj:aspectjrt:1.9.6
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.springframework.data:spring-data-releasetrain:Neumann-SR9
org.springframework:spring-aop:5.2.16.RELEASE
org.springframework:spring-beans:5.2.16.RELEASE
org.springframework:spring-context:5.2.16.RELEASE
org.springframework:spring-core:5.2.16.RELEASE
org.springframework:spring-expression:5.2.16.RELEASE
org.springframework:spring-framework-bom:5.2.16.RELEASE
org.springframework:spring-jcl:5.2.16.RELEASE
@@ -0,0 +1,7 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.
io.projectreactor:reactor-bom:Dysprosium-SR22
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.springframework.data:spring-data-releasetrain:Neumann-SR9
org.springframework:spring-framework-bom:5.2.16.RELEASE
@@ -0,0 +1,7 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.
io.projectreactor:reactor-bom:Dysprosium-SR22
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.springframework.data:spring-data-releasetrain:Neumann-SR9
org.springframework:spring-framework-bom:5.2.16.RELEASE
@@ -0,0 +1,7 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.
io.projectreactor:reactor-bom:Dysprosium-SR22
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.springframework.data:spring-data-releasetrain:Neumann-SR9
org.springframework:spring-framework-bom:5.2.16.RELEASE
@@ -0,0 +1,7 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.
io.projectreactor:reactor-bom:Dysprosium-SR22
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.springframework.data:spring-data-releasetrain:Neumann-SR9
org.springframework:spring-framework-bom:5.2.16.RELEASE
@@ -0,0 +1,22 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.
io.projectreactor:reactor-bom:Dysprosium-SR22
junit:junit:4.12
net.bytebuddy:byte-buddy-agent:1.10.15
net.bytebuddy:byte-buddy:1.10.15
org.aspectj:aspectjrt:1.9.6
org.assertj:assertj-core:3.17.2
org.hamcrest:hamcrest-core:1.3
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.mockito:mockito-core:3.5.15
org.objenesis:objenesis:3.1
org.springframework.data:spring-data-releasetrain:Neumann-SR9
org.springframework:spring-aop:5.2.16.RELEASE
org.springframework:spring-beans:5.2.16.RELEASE
org.springframework:spring-context:5.2.16.RELEASE
org.springframework:spring-core:5.2.16.RELEASE
org.springframework:spring-expression:5.2.16.RELEASE
org.springframework:spring-framework-bom:5.2.16.RELEASE
org.springframework:spring-jcl:5.2.16.RELEASE
org.springframework:spring-test:5.2.16.RELEASE
@@ -0,0 +1,22 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.
io.projectreactor:reactor-bom:Dysprosium-SR22
junit:junit:4.12
net.bytebuddy:byte-buddy-agent:1.10.15
net.bytebuddy:byte-buddy:1.10.15
org.aspectj:aspectjrt:1.9.6
org.assertj:assertj-core:3.17.2
org.hamcrest:hamcrest-core:1.3
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.mockito:mockito-core:3.5.15
org.objenesis:objenesis:3.1
org.springframework.data:spring-data-releasetrain:Neumann-SR9
org.springframework:spring-aop:5.2.16.RELEASE
org.springframework:spring-beans:5.2.16.RELEASE
org.springframework:spring-context:5.2.16.RELEASE
org.springframework:spring-core:5.2.16.RELEASE
org.springframework:spring-expression:5.2.16.RELEASE
org.springframework:spring-framework-bom:5.2.16.RELEASE
org.springframework:spring-jcl:5.2.16.RELEASE
org.springframework:spring-test:5.2.16.RELEASE
@@ -0,0 +1,7 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.
io.projectreactor:reactor-bom:Dysprosium-SR22
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.springframework.data:spring-data-releasetrain:Neumann-SR9
org.springframework:spring-framework-bom:5.2.16.RELEASE
@@ -0,0 +1,7 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.
io.projectreactor:reactor-bom:Dysprosium-SR22
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.springframework.data:spring-data-releasetrain:Neumann-SR9
org.springframework:spring-framework-bom:5.2.16.RELEASE
@@ -0,0 +1,22 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.
io.projectreactor:reactor-bom:Dysprosium-SR22
junit:junit:4.12
net.bytebuddy:byte-buddy-agent:1.10.15
net.bytebuddy:byte-buddy:1.10.15
org.aspectj:aspectjrt:1.9.6
org.assertj:assertj-core:3.17.2
org.hamcrest:hamcrest-core:1.3
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.mockito:mockito-core:3.5.15
org.objenesis:objenesis:3.1
org.springframework.data:spring-data-releasetrain:Neumann-SR9
org.springframework:spring-aop:5.2.16.RELEASE
org.springframework:spring-beans:5.2.16.RELEASE
org.springframework:spring-context:5.2.16.RELEASE
org.springframework:spring-core:5.2.16.RELEASE
org.springframework:spring-expression:5.2.16.RELEASE
org.springframework:spring-framework-bom:5.2.16.RELEASE
org.springframework:spring-jcl:5.2.16.RELEASE
org.springframework:spring-test:5.2.16.RELEASE
@@ -0,0 +1,22 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.
io.projectreactor:reactor-bom:Dysprosium-SR22
junit:junit:4.12
net.bytebuddy:byte-buddy-agent:1.10.15
net.bytebuddy:byte-buddy:1.10.15
org.aspectj:aspectjrt:1.9.6
org.assertj:assertj-core:3.17.2
org.hamcrest:hamcrest-core:1.3
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.mockito:mockito-core:3.5.15
org.objenesis:objenesis:3.1
org.springframework.data:spring-data-releasetrain:Neumann-SR9
org.springframework:spring-aop:5.2.16.RELEASE
org.springframework:spring-beans:5.2.16.RELEASE
org.springframework:spring-context:5.2.16.RELEASE
org.springframework:spring-core:5.2.16.RELEASE
org.springframework:spring-expression:5.2.16.RELEASE
org.springframework:spring-framework-bom:5.2.16.RELEASE
org.springframework:spring-jcl:5.2.16.RELEASE
org.springframework:spring-test:5.2.16.RELEASE
@@ -0,0 +1,22 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.
io.projectreactor:reactor-bom:Dysprosium-SR22
junit:junit:4.12
net.bytebuddy:byte-buddy-agent:1.10.15
net.bytebuddy:byte-buddy:1.10.15
org.aspectj:aspectjrt:1.9.6
org.assertj:assertj-core:3.17.2
org.hamcrest:hamcrest-core:1.3
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.mockito:mockito-core:3.5.15
org.objenesis:objenesis:3.1
org.springframework.data:spring-data-releasetrain:Neumann-SR9
org.springframework:spring-aop:5.2.16.RELEASE
org.springframework:spring-beans:5.2.16.RELEASE
org.springframework:spring-context:5.2.16.RELEASE
org.springframework:spring-core:5.2.16.RELEASE
org.springframework:spring-expression:5.2.16.RELEASE
org.springframework:spring-framework-bom:5.2.16.RELEASE
org.springframework:spring-jcl:5.2.16.RELEASE
org.springframework:spring-test:5.2.16.RELEASE
+6 -14
View File
@@ -2,21 +2,13 @@ apply plugin: 'io.spring.convention.spring-module'
apply plugin: 'io.freefair.aspectj'
dependencies {
management platform(project(":spring-security-dependencies"))
api "org.aspectj:aspectjrt"
api project(':spring-security-core')
api 'org.springframework:spring-beans'
api 'org.springframework:spring-context'
api 'org.springframework:spring-core'
compile "org.aspectj:aspectjrt"
compile project(':spring-security-core')
compile 'org.springframework:spring-beans'
compile 'org.springframework:spring-context'
compile 'org.springframework:spring-core'
testImplementation 'org.springframework:spring-aop'
testImplementation "org.assertj:assertj-core"
testImplementation "org.junit.jupiter:junit-jupiter-api"
testImplementation "org.junit.jupiter:junit-jupiter-params"
testImplementation "org.junit.jupiter:junit-jupiter-engine"
testImplementation "org.mockito:mockito-core"
testImplementation "org.mockito:mockito-junit-jupiter"
testImplementation "org.springframework:spring-test"
testCompile 'org.springframework:spring-aop'
testAspect sourceSets.main.output
}
@@ -20,9 +20,9 @@ import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
@@ -74,7 +74,7 @@ public class AnnotationSecurityAspectTests {
private PrePostSecured prePostSecured = new PrePostSecured();
@BeforeEach
@Before
public final void setUp() {
MockitoAnnotations.initMocks(this);
this.interceptor = new AspectJMethodSecurityInterceptor();
@@ -88,7 +88,7 @@ public class AnnotationSecurityAspectTests {
secAspect.setSecurityInterceptor(this.interceptor);
}
@AfterEach
@After
public void clearContext() {
SecurityContextHolder.clearContext();
}

Some files were not shown because too many files have changed in this diff Show More