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

Compare commits

...

92 Commits

Author SHA1 Message Date
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
Josh Cummings f87101ae22 Update RSocket Sample to RSocket 1.1.0-M2
Closes gh-9112
2020-10-07 16:01:19 -06:00
Josh Cummings 6cb41fb777 Update to Kotlin 1.4.10
Closes gh-9111
2020-10-07 16:01:14 -06:00
Josh Cummings 8382f458f0 Update to AspectJ 1.9.6
Closes gh-9110
2020-10-07 16:01:08 -06:00
Josh Cummings 5706c0f072 Update to Google App Engine 1.9.82
Closes gh-9109
2020-10-07 16:01:01 -06:00
Josh Cummings 9677bd83b1 Update to Spring JavaFormat 0.0.25
Closes gh-9108
2020-10-07 16:00:55 -06:00
Josh Cummings 0f5125724c Update to Spring Boot 2.4.0-M3
Closes gh-9107
2020-10-07 16:00:42 -06:00
Josh Cummings a2aeb95b59 Update What's New Link
Issue gh-9038
2020-10-06 09:05:18 -06:00
Eleftheria Stein 320567128a Add expression based Kotlin samples
Issue gh-8172
2020-10-01 17:58:25 +02:00
Eleftheria Stein 0286d368c3 Add authentication event Kotlin samples
Issue gh-8172
2020-10-01 17:58:25 +02:00
Eleftheria Stein 669587409f Add Controller Kotlin sample for form login
Issue gh-8172
2020-10-01 17:58:25 +02:00
Josh Cummings a6d19474c4 Add Header and Parameter Value Documentation
Closes gh-9038
2020-09-30 20:50:29 -06:00
Ellie Bahadori 7ef3f61924 Add build scans to PR builds 2020-09-30 10:20:12 -04:00
Malyshau Stanislau 6d14482378 Add try-with-resources to close stream
Closes gh-9041
2020-09-29 08:25:45 -06:00
Artem Grankin dc5f2444ae Replace expired msdn link with latest web archive copy
Initial link expired in March, 2016. Latest copy found in web archive is from February, 2016
2020-09-28 17:04:59 -06:00
Josh Cummings bdfd6f9f92 Remove Unused Code
Issue gh-8887
2020-09-28 13:07:48 -06:00
Josh Cummings c0378b9d35 Set LDAP Samples to Use Zero Port
Issue gh-8762
2020-09-26 15:17:52 -06:00
Josh Cummings bcfbd2dee5 Remove Unused Code
Issue gh-8877
2020-09-26 09:06:28 -06:00
Josh Cummings a36baffb3a Polish OpenSamlAuthenticationRequestFactory
- Refactored to use SAMLMetadataSignatureSigningParametersResolver

Issue gh-7758
2020-09-26 09:06:24 -06:00
Josh Cummings 2ee455b7bf Add EntitiesDescriptor Support
Closes gh-9051
2020-09-25 16:23:18 -06:00
ilee c2d8939cf7 Update ssl setup guide link in tomcat server 2020-09-24 13:51:27 -06:00
Geonu Jeon fd615535b3 fix comment of authenticationFailureHandler 2020-09-24 05:18:22 -04:00
Phillip Webb c502312719 Replace expected @Test attributes with AssertJ
Replace JUnit expected @Test attributes with AssertJ calls.
2020-09-22 16:13:51 -06:00
Phillip Webb 20baa7d409 Replace ExpectedException @Rules with AssertJ
Replace JUnit ExpectedException @Rules with AssertJ calls.
2020-09-22 16:13:51 -06:00
Phillip Webb 910b81928f Replace try/catch with AssertJ
Replace manual try/catch/fail blocks with AssertJ calls.
2020-09-22 16:13:51 -06:00
uy-rrodriguez d9276ed8f3 Quick javadoc fix for DelegatingPasswordEncoder
Quick fix for the javadoc of `UnmappedIdPasswordEncoder` in `DelegatingPasswordEncoder.java`, which appeared incomplete.
2020-09-21 08:05:05 -04:00
Josh Cummings b667cbbb86 Align Raw Types
Closes gh-9026
2020-09-18 16:21:53 -06:00
Eleftheria Stein 019c27b0a0 Add servlet HTTP exploit samples
Issue gh-8172
2020-09-18 14:44:33 +02:00
Eleftheria Stein f26387a4b7 Add reactive HTTP exploit samples
Issue gh-8172
2020-09-18 14:44:10 +02:00
Eleftheria Stein 72acc2959e Add servlet CSRF Kotlin samples
Issue gh-8172
2020-09-18 14:14:32 +02:00
Eleftheria Stein a5b97bb569 Prevent NullPointerException when session ID changes
The old session ID may not exist in the session registry if the user is not authenticated.

Closes gh-9011
2020-09-18 10:51:12 +02:00
Joe Grandja 6e6d382357 Adapt to WebClient's new exception wrapping
See https://github.com/spring-projects/spring-framework/issues/23842

Closes gh-9031
2020-09-17 12:21:51 -04:00
Tomoki Tsubaki 65f788532e Fix broken Mono chain
This commit restore broken Mono chain in WebSessionServerCsrfTokenRepository.generateToken(ServerWebExchange).

Closes gh-9017
2020-09-16 09:53:23 -06:00
Tomoki Tsubaki 2c297fbd63 Create the CSRF token on the bounded elactic scheduler
The CSRF token is generated by UUID.randomUUID() which is I/O blocking operation.
This commit changes the subscriber thread to the bounded elactic scheduler.

Closes gh-9018
2020-09-16 08:48:00 -06:00
Joe Grandja 57c5ec26e7 Next Development Version 2020-09-09 18:14:25 -04:00
Joe Grandja 7b1f574769 Revert "Lock Dependency Versions for 5.4.0"
This reverts commit 3d0e459182.
2020-09-09 18:14:12 -04:00
2842 changed files with 47152 additions and 43501 deletions
+1 -1
View File
@@ -19,4 +19,4 @@ jobs:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
- name: Build with Gradle
run: ./gradlew clean build --continue
run: ./gradlew clean build --continue --scan
+102 -47
View File
@@ -4,27 +4,27 @@ _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/master/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
Each Spring module is slightly different than another in terms of team size, number of issues, etc. Therefore each project is managed slightly different. You will notice that this document is very similar to the https://github.com/spring-projects/spring-framework/wiki/Contributor-guidelines[Spring Framework Contributor guidelines]. However, there are some subtle differences between the two documents, so please be sure to read this document thoroughly.
Each Spring module is slightly different from one another in terms of team size, number of issues, etc. Therefore, each project is managed slightly different. You will notice that this document is very similar to the https://github.com/spring-projects/spring-framework/wiki/Contributor-guidelines[Spring Framework Contributor guidelines]. However, there are some subtle differences between the two documents, so please be sure to read this document thoroughly.
= Importing into IDE
The following provides information on setting up a development environment that can run the sample in https://www.springsource.org/sts[Spring Tool Suite 3.6.0+]. Other IDE's should work using Gradle's IDE support, but have not been tested.
* IDE Setup
* Install Spring Tool Suite 3.6.0+
* You will need the following plugins installed (can be found on the Extensions Page)
* Gradle Eclipse
* Groovy Eclipse
** Install Spring Tool Suite 3.6.0+
** You will need the following plugins installed (can be found on the Extensions Page)
*** Gradle Eclipse
*** Groovy Eclipse
* Importing the project into Spring Tool Suite
* File->Import…->Gradle Project
** File -> Import… -> Gradle Project
As of new versions of Spring Tool Suite, you might need to install Groovy Eclipse pointing directly to the updates plugin location. To install Groovy Eclipse on Spring Tool Suite based on Eclipse Oxigen you must do the following steps:
As of new versions of Spring Tool Suite, you might need to install Groovy Eclipse pointing directly to the updated plugin location. To install Groovy Eclipse on Spring Tool Suite based on Eclipse Oxigen you must do the following steps:
Help->Install New Software…->Add the following URL into _Work with_ field:
Help -> Install New Software… -> Add the following URL into _Work with_ field:
https://dist.springsource.org/snapshot/GRECLIPSE/e4.7/[https://dist.springsource.org/snapshot/GRECLIPSE/e4.7/]
= Understand the basics
@@ -33,7 +33,7 @@ Not sure what a pull request is, or how to submit one? Take a look at GitHub's e
= Search GitHub issues; create an issue if necessary
Is there already an issue that addresses your concern? Do a bit of searching in our https://github.com/spring-projects/spring-security/issues[GitHub issues ] to see if you can find something similar. If not, please create a new issue before submitting a pull request unless the change is not a user facing issue.
Is there already an issue that addresses your concern? Do a bit of searching in our https://github.com/spring-projects/spring-security/issues[GitHub issues] to see if you can find something similar. If not, please create a new issue before submitting a pull request unless the change is not a user facing issue.
= Discuss non-trivial contribution ideas with committers
@@ -41,8 +41,7 @@ If you're considering anything more than correcting a typo or fixing a minor bug
= Sign the Contributor License Agreement
If you have not previously done so, please fill out and
submit the https://cla.pivotal.io/sign/spring[Contributor License Agreement].
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 master
@@ -50,7 +49,7 @@ Create your topic branch to be submitted as a pull request from master. The Spri
= Use short branch names
Branches used when submitting pull requests should preferably be named according to GitHub issues, e.g. 'gh-1234' or 'gh-1234-fix-npe'. Otherwise, use succinct, lower-case, dash (-) delimited names, such as 'fix-warnings', 'fix-typo', etc. This is important, because branch names show up in the merge commits that result from accepting pull requests, and should be as expressive and concise as possible.
Branches used when submitting pull requests should preferably be named according to GitHub issues, e.g. `gh-1234` or `gh-1234-fix-npe`. Otherwise, use succinct, lower-case, dash (`-`) delimited names, such as `fix-warnings` or `fix-typo`. This is important, because branch names show up in the merge commits that result from accepting pull requests, and should be as expressive and concise as possible.
= Keep commits focused
@@ -58,53 +57,77 @@ Remember each ticket should be focused on a single item of interest since the ti
= Mind the whitespace
Please carefully follow the whitespace and formatting conventions already present in the framework.
Please carefully follow the whitespace and formatting conventions already present in the framework.
. Tabs, not spaces
. Unix (LF), not dos (CRLF) line endings
. Eliminate all trailing whitespace
. Aim to wrap code at 120 characters, but favor readability over wrapping
. Preserve existing formatting; i.e. do not reformat code for its own sake
. Search the codebase using git grep and other tools to discover common naming conventions, etc.
. Search the codebase using `git grep` and other tools to discover common naming conventions, etc.
. UTF-8 encoding for Java sources and XML files
Whitespace management tips
. You can use the https://marketplace.eclipse.org/content/anyedit-tools[AnyEdit Eclipse plugin] to ensure spaces are used and to clean up trailing whitespaces.
. Use git's pre-commit.sample hook to prevent invalid whitespace from being pushed out. You can enable it by moving ~/spring-security/.git/hooks/pre-commit.sample to ~/spring-security/.git/hooks/pre-commit and ensuring it is executable. For more information on hooks refer to https://git-scm.com/book/cs/ch7-3.html[Pro Git's Pre-Commit Hook's section]
. Use Git's `pre-commit.sample` hook to prevent invalid whitespace from being pushed out. You can enable it by moving `.git/hooks/pre-commit.sample` to `.git/hooks/pre-commit` and ensuring it is executable. For more information on hooks refer to https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks[https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks].
= Add Apache license header to all new classes
----
/*
* Copyright 2002-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package ...;
----
= Update Apache license header to modified files as necessary
Always check the date range in the license header. For example, if you've modified a file in 2012 whose header still reads
<pre>
* Copyright 2002-2011 the original author or authors.
</pre>
then be sure to update it to 2012 appropriately
<pre>
Always check the date range in the license header. For example, if you've modified a file in 2020 whose header still reads
----
* Copyright 2002-2012 the original author or authors.
</pre>
----
then be sure to update it to the current year appropriately (e.g. 2020)
----
* Copyright 2002-2020 the original author or authors.
----
= Use @since tags for newly-added public API types and methods
e.g.
<pre>
Example:
----
/**
* …
*
* @author First Last
* @since 3.2
* @since 5.4
* @see …
*/
</pre>
----
= Submit JUnit test cases for all behavior changes
Search the codebase to find related unit tests and add additional `@Test` methods within.
Search the codebase to find related unit tests and add additional `@Test` methods within.
. Any new tests should end in the name Tests (note this is plural). For example, a valid name would be `FilterChainProxyTests`. An invalid name would be `FilterChainProxyTest`.
. New test methods should not start with test. This is an old JUnit3 convention and is not necessary since the method is annotated with @Test.
. Any new tests should end in the name `Tests` (note this is plural). For example, a valid name would be `FilterChainProxyTests`. An invalid name would be `FilterChainProxyTest`.
. New test methods should not start with test. This is an old JUnit3 convention and is not necessary since the method is annotated with `@Test`.
= Update spring-security-x.y.rnc for schema changes
@@ -114,44 +137,76 @@ Changes to the XML schema will be overwritten by the Gradle build task.
= Squash commits
Use git rebase interactive, git add patch and other tools to "squash" multiple commits into atomic changes. In addition to the man pages for git, there are many resources online to help you understand how these tools work. Here is one: https://book.git-scm.com/4_interactive_rebasing.html[https://book.git-scm.com/4_interactive_rebasing.html].
Use `git rebase --interactive`, `git add --patch` and other tools to "squash" multiple commits into atomic changes. In addition to the man pages for `git`, there are https://git-scm.com/book/en/v2/Git-Tools-Rewriting-History[many resources online] to help you understand how these tools work.
= Use real name in git commits
Please configure git to use your real first and last name for any commits you intend to submit as pull requests. For example, this is not acceptable:
Please configure Git to use your real first and last name for any commits you intend to submit as pull requests. Make sure the name is properly capitalized as submitted to the https://cla.pivotal.io[Pivotal Contributor License Agreement]:
Rather, please include your first and last name, properly capitalized, as submitted against the SpringSource contributor license agreement:
<pre>
Author: First Last &lt;link:mailto:&#x75;&#115;&#101;&#114;&#64;&#109;&#x61;&#x69;&#108;&#46;&#99;&#111;&#x6d;&#38;&#103;&#116;[&#x75;&#115;&#101;&#114;&#64;&#109;&#x61;&#x69;&#108;&#46;&#99;&#111;&#x6d;&#38;&#103;&#116;];
</pre>
This helps ensure traceability against the CLA, and also goes a long way to ensuring useful output from tools like git shortlog and others.
----
First Last <user@mail.com>
----
You can configure this globally via the account admin area GitHub (useful for fork-and-edit cases); globally with
This helps ensure traceability against the CLA, and also goes a long way to ensuring useful output from tools like Git shortlog and others.
or locally for the spring-security repository only by omitting the 'global' flag:
<pre>
cd spring-security
You can configure this globally:
----
git config --global user.name "First Last"
git config --global user.email user@example.com
----
or locally for the current repository by omitting the `--global` flag:
----
git config user.name "First Last"
git config user.email link:mailto:&#x75;&#115;&#101;&#x72;&#64;&#x6d;&#x61;&#x69;&#x6c;&#46;&#x63;&#111;&#109;[&#x75;&#115;&#101;&#x72;&#64;&#x6d;&#x61;&#x69;&#x6c;&#46;&#x63;&#111;&#109;]
</pre>
git config user.email user@example.com
----
= Format commit messages
. Keep the subject line to 50 characters or less if possible
. Do not end the subject line with a period
. In the body of the commit message, explain how things worked before this commit, what has changed, and how things work now
. Include Closes gh-<issue-number> at the end if this fixes a GitHub issue
. Include `Closes gh-<issue-number>` at the end if this fixes a GitHub issue
. Avoid markdown, including back-ticks identifying code
Example:
----
Short (50 chars or less) summary of changes
More detailed explanatory text, if necessary. Wrap it to about 72
characters or so. In some contexts, the first line is treated as the
subject of an email and the rest of the text as the body. The blank
line separating the summary from the body is critical (unless you omit
the body entirely); tools like rebase can get confused if you run the
two together.
Further paragraphs come after blank lines.
- Bullet points are okay, too
- Typically a hyphen or asterisk is used for the bullet, preceded by a
single space, with blank lines in between, but conventions vary here
Closes gh-123
----
= Run all tests prior to submission
----
./gradlew clean build integrationTest
----
= Submit your pull request
Subject line:
*Subject line:*
Follow the same conventions for pull request subject lines as mentioned above for commit message subject lines.
In the body:
*In the body:*
. Explain your use case. What led you to submit this change? Why were existing mechanisms in the framework insufficient? Make a case that this is a general-purpose problem and that yours is a general-purpose solution, etc
. Add any additional information and ask questions; start a conversation, or continue one from GitHub Issues
@@ -167,4 +222,4 @@ Add a comment to the associated GitHub issue(s) linking to your new pull request
The Spring team takes a very conservative approach to accepting contributions to the framework. This is to keep code quality and stability as high as possible, and to keep complexity at a minimum. Your changes, if accepted, may be heavily modified prior to merging. You will retain "Author:" attribution for your Git commits granted that the bulk of your changes remain intact. You may be asked to rework the submission for style (as explained above) and/or substance. Again, we strongly recommend discussing any serious submissions with the Spring Framework team prior to engaging in serious development work.
Note that you can always force push (git push -f) reworked / rebased commits against the branch used to submit your pull request. i.e. you do not need to issue a new pull request when asked to make changes.
Note that you can always force push (`git push -f`) reworked / rebased commits against the branch used to submit your pull request. i.e. you do not need to issue a new pull request when asked to make changes.
Vendored
+18 -13
View File
@@ -33,12 +33,13 @@ try {
sh "git clean -dfx"
try {
withCredentials([GRADLE_ENTERPRISE_CACHE_USER,
GRADLE_ENTERPRISE_SECRET_ACCESS_KEY]) {
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 --stacktrace"
sh "./gradlew check -PartifactoryUsername=$ARTIFACTORY_USERNAME -PartifactoryPassword=$ARTIFACTORY_PASSWORD --stacktrace"
}
}
} catch(Exception e) {
@@ -57,16 +58,17 @@ try {
sh "git clean -dfx"
withCredentials([SONAR_LOGIN_CREDENTIALS,
GRADLE_ENTERPRISE_CACHE_USER,
GRADLE_ENTERPRISE_SECRET_ACCESS_KEY]) {
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 -PexcludeProjects='**/samples/**' -Dsonar.host.url=$SPRING_SONAR_HOST_URL -Dsonar.login=$SONAR_LOGIN --stacktrace"
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 -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"
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) {
@@ -84,12 +86,13 @@ try {
sh "git clean -dfx"
try {
withCredentials([GRADLE_ENTERPRISE_CACHE_USER,
GRADLE_ENTERPRISE_SECRET_ACCESS_KEY]) {
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 --refresh-dependencies -PforceMavenRepositories=snapshot -PspringVersion='5.+' -PreactorVersion='20+' -PspringDataVersion='Lovelace-BUILD-SNAPSHOT' -PrsocketVersion=1.1.0-SNAPSHOT -PspringBootVersion=2.4.0-SNAPSHOT -PkotlinVersion=1.4.0 -PlocksDisabled --stacktrace"
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) {
@@ -107,12 +110,13 @@ try {
try {
withCredentials([GRADLE_ENTERPRISE_CACHE_USER,
GRADLE_ENTERPRISE_SECRET_ACCESS_KEY]) {
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 --stacktrace"
sh "./gradlew test -PartifactoryUsername=$ARTIFACTORY_USERNAME -PartifactoryPassword=$ARTIFACTORY_PASSWORD --stacktrace"
}
}
} catch(Exception e) {
@@ -129,12 +133,13 @@ try {
sh "git clean -dfx"
try {
withCredentials([GRADLE_ENTERPRISE_CACHE_USER,
GRADLE_ENTERPRISE_SECRET_ACCESS_KEY]) {
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 --stacktrace"
sh "./gradlew test -PartifactoryUsername=$ARTIFACTORY_USERNAME -PartifactoryPassword=$ARTIFACTORY_PASSWORD --stacktrace"
}
}
} catch(Exception e) {
@@ -183,7 +188,7 @@ try {
"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 -PdeployDocsSshKeyPath=$DEPLOY_SSH_KEY -PdeployDocsSshUsername=$SPRING_DOCS_USERNAME --stacktrace"
sh "./gradlew deployDocs -PartifactoryUsername=$ARTIFACTORY_USERNAME -PartifactoryPassword=$ARTIFACTORY_PASSWORD -PdeployDocsSshKeyPath=$DEPLOY_SSH_KEY -PdeployDocsSshUsername=$SPRING_DOCS_USERNAME --stacktrace"
}
}
}
@@ -204,7 +209,7 @@ try {
"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 -PdeployDocsSshKeyPath=$DEPLOY_SSH_KEY -PdeployDocsSshUsername=$SPRING_DOCS_USERNAME --stacktrace"
sh "./gradlew deploySchema -PartifactoryUsername=$ARTIFACTORY_USERNAME -PartifactoryPassword=$ARTIFACTORY_PASSWORD -PdeployDocsSshKeyPath=$DEPLOY_SSH_KEY -PdeployDocsSshUsername=$SPRING_DOCS_USERNAME --stacktrace"
}
}
}
@@ -1,7 +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-SR11
org.jetbrains.kotlin:kotlin-bom:1.3.72
org.springframework.data:spring-data-releasetrain:Neumann-SR3
org.springframework:spring-framework-bom:5.2.8.RELEASE
io.projectreactor:reactor-bom:Dysprosium-SR16
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.springframework.data:spring-data-releasetrain:Neumann-SR6
org.springframework:spring-framework-bom:5.2.12.RELEASE
@@ -1,7 +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-SR11
org.jetbrains.kotlin:kotlin-bom:1.3.72
org.springframework.data:spring-data-releasetrain:Neumann-SR3
org.springframework:spring-framework-bom:5.2.8.RELEASE
io.projectreactor:reactor-bom:Dysprosium-SR16
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.springframework.data:spring-data-releasetrain:Neumann-SR6
org.springframework:spring-framework-bom:5.2.12.RELEASE
@@ -14,13 +14,13 @@ 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-SR11
io.spring.javaformat:spring-javaformat-checkstyle:0.0.24
io.projectreactor:reactor-bom:Dysprosium-SR16
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.3.72
org.springframework.data:spring-data-releasetrain:Neumann-SR3
org.springframework:spring-framework-bom:5.2.8.RELEASE
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.springframework.data:spring-data-releasetrain:Neumann-SR6
org.springframework:spring-framework-bom:5.2.12.RELEASE
+12 -12
View File
@@ -1,15 +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-SR11
org.jetbrains.kotlin:kotlin-bom:1.3.72
org.springframework.data:spring-data-releasetrain:Neumann-SR3
org.springframework:spring-aop:5.2.8.RELEASE
org.springframework:spring-beans:5.2.8.RELEASE
org.springframework:spring-context:5.2.8.RELEASE
org.springframework:spring-core:5.2.8.RELEASE
org.springframework:spring-expression:5.2.8.RELEASE
org.springframework:spring-framework-bom:5.2.8.RELEASE
org.springframework:spring-jcl:5.2.8.RELEASE
org.springframework:spring-jdbc:5.2.8.RELEASE
org.springframework:spring-tx:5.2.8.RELEASE
io.projectreactor:reactor-bom:Dysprosium-SR16
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.springframework.data:spring-data-releasetrain:Neumann-SR6
org.springframework:spring-aop:5.2.12.RELEASE
org.springframework:spring-beans:5.2.12.RELEASE
org.springframework:spring-context:5.2.12.RELEASE
org.springframework:spring-core:5.2.12.RELEASE
org.springframework:spring-expression:5.2.12.RELEASE
org.springframework:spring-framework-bom:5.2.12.RELEASE
org.springframework:spring-jcl:5.2.12.RELEASE
org.springframework:spring-jdbc:5.2.12.RELEASE
org.springframework:spring-tx:5.2.12.RELEASE
@@ -1,15 +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-SR11
org.jetbrains.kotlin:kotlin-bom:1.3.72
org.springframework.data:spring-data-releasetrain:Neumann-SR3
org.springframework:spring-aop:5.2.8.RELEASE
org.springframework:spring-beans:5.2.8.RELEASE
org.springframework:spring-context:5.2.8.RELEASE
org.springframework:spring-core:5.2.8.RELEASE
org.springframework:spring-expression:5.2.8.RELEASE
org.springframework:spring-framework-bom:5.2.8.RELEASE
org.springframework:spring-jcl:5.2.8.RELEASE
org.springframework:spring-jdbc:5.2.8.RELEASE
org.springframework:spring-tx:5.2.8.RELEASE
io.projectreactor:reactor-bom:Dysprosium-SR16
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.springframework.data:spring-data-releasetrain:Neumann-SR6
org.springframework:spring-aop:5.2.12.RELEASE
org.springframework:spring-beans:5.2.12.RELEASE
org.springframework:spring-context:5.2.12.RELEASE
org.springframework:spring-core:5.2.12.RELEASE
org.springframework:spring-expression:5.2.12.RELEASE
org.springframework:spring-framework-bom:5.2.12.RELEASE
org.springframework:spring-jcl:5.2.12.RELEASE
org.springframework:spring-jdbc:5.2.12.RELEASE
org.springframework:spring-tx:5.2.12.RELEASE
@@ -1,7 +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-SR11
org.jetbrains.kotlin:kotlin-bom:1.3.72
org.springframework.data:spring-data-releasetrain:Neumann-SR3
org.springframework:spring-framework-bom:5.2.8.RELEASE
io.projectreactor:reactor-bom:Dysprosium-SR16
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.springframework.data:spring-data-releasetrain:Neumann-SR6
org.springframework:spring-framework-bom:5.2.12.RELEASE
+12 -12
View File
@@ -1,15 +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-SR11
org.jetbrains.kotlin:kotlin-bom:1.3.72
org.springframework.data:spring-data-releasetrain:Neumann-SR3
org.springframework:spring-aop:5.2.8.RELEASE
org.springframework:spring-beans:5.2.8.RELEASE
org.springframework:spring-context:5.2.8.RELEASE
org.springframework:spring-core:5.2.8.RELEASE
org.springframework:spring-expression:5.2.8.RELEASE
org.springframework:spring-framework-bom:5.2.8.RELEASE
org.springframework:spring-jcl:5.2.8.RELEASE
org.springframework:spring-jdbc:5.2.8.RELEASE
org.springframework:spring-tx:5.2.8.RELEASE
io.projectreactor:reactor-bom:Dysprosium-SR16
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.springframework.data:spring-data-releasetrain:Neumann-SR6
org.springframework:spring-aop:5.2.12.RELEASE
org.springframework:spring-beans:5.2.12.RELEASE
org.springframework:spring-context:5.2.12.RELEASE
org.springframework:spring-core:5.2.12.RELEASE
org.springframework:spring-expression:5.2.12.RELEASE
org.springframework:spring-framework-bom:5.2.12.RELEASE
org.springframework:spring-jcl:5.2.12.RELEASE
org.springframework:spring-jdbc:5.2.12.RELEASE
org.springframework:spring-tx:5.2.12.RELEASE
@@ -1,8 +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-SR11
io.projectreactor:reactor-bom:Dysprosium-SR16
org.jacoco:org.jacoco.agent:0.8.2
org.jetbrains.kotlin:kotlin-bom:1.3.72
org.springframework.data:spring-data-releasetrain:Neumann-SR3
org.springframework:spring-framework-bom:5.2.8.RELEASE
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.springframework.data:spring-data-releasetrain:Neumann-SR6
org.springframework:spring-framework-bom:5.2.12.RELEASE
@@ -1,15 +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-SR11
io.projectreactor:reactor-bom:Dysprosium-SR16
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.3.72
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-SR3
org.springframework:spring-framework-bom:5.2.8.RELEASE
org.springframework.data:spring-data-releasetrain:Neumann-SR6
org.springframework:spring-framework-bom:5.2.12.RELEASE
+4 -4
View File
@@ -1,7 +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-SR11
org.jetbrains.kotlin:kotlin-bom:1.3.72
org.springframework.data:spring-data-releasetrain:Neumann-SR3
org.springframework:spring-framework-bom:5.2.8.RELEASE
io.projectreactor:reactor-bom:Dysprosium-SR16
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.springframework.data:spring-data-releasetrain:Neumann-SR6
org.springframework:spring-framework-bom:5.2.12.RELEASE
@@ -1,9 +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-SR11
io.projectreactor:reactor-bom:Dysprosium-SR16
net.sf.ehcache:ehcache:2.10.6
org.jetbrains.kotlin:kotlin-bom:1.3.72
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.slf4j:slf4j-api:1.7.30
org.springframework.data:spring-data-releasetrain:Neumann-SR3
org.springframework:spring-framework-bom:5.2.8.RELEASE
org.springframework.data:spring-data-releasetrain:Neumann-SR6
org.springframework:spring-framework-bom:5.2.12.RELEASE
@@ -1,7 +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-SR11
org.jetbrains.kotlin:kotlin-bom:1.3.72
org.springframework.data:spring-data-releasetrain:Neumann-SR3
org.springframework:spring-framework-bom:5.2.8.RELEASE
io.projectreactor:reactor-bom:Dysprosium-SR16
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.springframework.data:spring-data-releasetrain:Neumann-SR6
org.springframework:spring-framework-bom:5.2.12.RELEASE
+12 -12
View File
@@ -1,15 +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-SR11
org.jetbrains.kotlin:kotlin-bom:1.3.72
org.springframework.data:spring-data-releasetrain:Neumann-SR3
org.springframework:spring-aop:5.2.8.RELEASE
org.springframework:spring-beans:5.2.8.RELEASE
org.springframework:spring-context:5.2.8.RELEASE
org.springframework:spring-core:5.2.8.RELEASE
org.springframework:spring-expression:5.2.8.RELEASE
org.springframework:spring-framework-bom:5.2.8.RELEASE
org.springframework:spring-jcl:5.2.8.RELEASE
org.springframework:spring-jdbc:5.2.8.RELEASE
org.springframework:spring-tx:5.2.8.RELEASE
io.projectreactor:reactor-bom:Dysprosium-SR16
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.springframework.data:spring-data-releasetrain:Neumann-SR6
org.springframework:spring-aop:5.2.12.RELEASE
org.springframework:spring-beans:5.2.12.RELEASE
org.springframework:spring-context:5.2.12.RELEASE
org.springframework:spring-core:5.2.12.RELEASE
org.springframework:spring-expression:5.2.12.RELEASE
org.springframework:spring-framework-bom:5.2.12.RELEASE
org.springframework:spring-jcl:5.2.12.RELEASE
org.springframework:spring-jdbc:5.2.12.RELEASE
org.springframework:spring-tx:5.2.12.RELEASE
@@ -1,15 +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-SR11
org.jetbrains.kotlin:kotlin-bom:1.3.72
org.springframework.data:spring-data-releasetrain:Neumann-SR3
org.springframework:spring-aop:5.2.8.RELEASE
org.springframework:spring-beans:5.2.8.RELEASE
org.springframework:spring-context:5.2.8.RELEASE
org.springframework:spring-core:5.2.8.RELEASE
org.springframework:spring-expression:5.2.8.RELEASE
org.springframework:spring-framework-bom:5.2.8.RELEASE
org.springframework:spring-jcl:5.2.8.RELEASE
org.springframework:spring-jdbc:5.2.8.RELEASE
org.springframework:spring-tx:5.2.8.RELEASE
io.projectreactor:reactor-bom:Dysprosium-SR16
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.springframework.data:spring-data-releasetrain:Neumann-SR6
org.springframework:spring-aop:5.2.12.RELEASE
org.springframework:spring-beans:5.2.12.RELEASE
org.springframework:spring-context:5.2.12.RELEASE
org.springframework:spring-core:5.2.12.RELEASE
org.springframework:spring-expression:5.2.12.RELEASE
org.springframework:spring-framework-bom:5.2.12.RELEASE
org.springframework:spring-jcl:5.2.12.RELEASE
org.springframework:spring-jdbc:5.2.12.RELEASE
org.springframework:spring-tx:5.2.12.RELEASE
@@ -1,7 +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-SR11
org.jetbrains.kotlin:kotlin-bom:1.3.72
org.springframework.data:spring-data-releasetrain:Neumann-SR3
org.springframework:spring-framework-bom:5.2.8.RELEASE
io.projectreactor:reactor-bom:Dysprosium-SR16
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.springframework.data:spring-data-releasetrain:Neumann-SR6
org.springframework:spring-framework-bom:5.2.12.RELEASE
@@ -1,7 +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-SR11
org.jetbrains.kotlin:kotlin-bom:1.3.72
org.springframework.data:spring-data-releasetrain:Neumann-SR3
org.springframework:spring-framework-bom:5.2.8.RELEASE
io.projectreactor:reactor-bom:Dysprosium-SR16
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.springframework.data:spring-data-releasetrain:Neumann-SR6
org.springframework:spring-framework-bom:5.2.12.RELEASE
@@ -1,7 +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-SR11
org.jetbrains.kotlin:kotlin-bom:1.3.72
org.springframework.data:spring-data-releasetrain:Neumann-SR3
org.springframework:spring-framework-bom:5.2.8.RELEASE
io.projectreactor:reactor-bom:Dysprosium-SR16
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.springframework.data:spring-data-releasetrain:Neumann-SR6
org.springframework:spring-framework-bom:5.2.12.RELEASE
@@ -1,24 +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-SR11
io.projectreactor:reactor-bom:Dysprosium-SR16
junit:junit:4.12
net.bytebuddy:byte-buddy-agent:1.10.5
net.bytebuddy:byte-buddy:1.10.5
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.3.72
org.mockito:mockito-core:3.3.3
org.objenesis:objenesis:2.6
org.springframework.data:spring-data-releasetrain:Neumann-SR3
org.springframework:spring-aop:5.2.8.RELEASE
org.springframework:spring-beans:5.2.8.RELEASE
org.springframework:spring-context-support:5.2.8.RELEASE
org.springframework:spring-context:5.2.8.RELEASE
org.springframework:spring-core:5.2.8.RELEASE
org.springframework:spring-expression:5.2.8.RELEASE
org.springframework:spring-framework-bom:5.2.8.RELEASE
org.springframework:spring-jcl:5.2.8.RELEASE
org.springframework:spring-jdbc:5.2.8.RELEASE
org.springframework:spring-test:5.2.8.RELEASE
org.springframework:spring-tx:5.2.8.RELEASE
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-SR6
org.springframework:spring-aop:5.2.12.RELEASE
org.springframework:spring-beans:5.2.12.RELEASE
org.springframework:spring-context-support:5.2.12.RELEASE
org.springframework:spring-context:5.2.12.RELEASE
org.springframework:spring-core:5.2.12.RELEASE
org.springframework:spring-expression:5.2.12.RELEASE
org.springframework:spring-framework-bom:5.2.12.RELEASE
org.springframework:spring-jcl:5.2.12.RELEASE
org.springframework:spring-jdbc:5.2.12.RELEASE
org.springframework:spring-test:5.2.12.RELEASE
org.springframework:spring-tx:5.2.12.RELEASE
@@ -1,24 +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-SR11
io.projectreactor:reactor-bom:Dysprosium-SR16
junit:junit:4.12
net.bytebuddy:byte-buddy-agent:1.10.5
net.bytebuddy:byte-buddy:1.10.5
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.3.72
org.mockito:mockito-core:3.3.3
org.objenesis:objenesis:2.6
org.springframework.data:spring-data-releasetrain:Neumann-SR3
org.springframework:spring-aop:5.2.8.RELEASE
org.springframework:spring-beans:5.2.8.RELEASE
org.springframework:spring-context-support:5.2.8.RELEASE
org.springframework:spring-context:5.2.8.RELEASE
org.springframework:spring-core:5.2.8.RELEASE
org.springframework:spring-expression:5.2.8.RELEASE
org.springframework:spring-framework-bom:5.2.8.RELEASE
org.springframework:spring-jcl:5.2.8.RELEASE
org.springframework:spring-jdbc:5.2.8.RELEASE
org.springframework:spring-test:5.2.8.RELEASE
org.springframework:spring-tx:5.2.8.RELEASE
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-SR6
org.springframework:spring-aop:5.2.12.RELEASE
org.springframework:spring-beans:5.2.12.RELEASE
org.springframework:spring-context-support:5.2.12.RELEASE
org.springframework:spring-context:5.2.12.RELEASE
org.springframework:spring-core:5.2.12.RELEASE
org.springframework:spring-expression:5.2.12.RELEASE
org.springframework:spring-framework-bom:5.2.12.RELEASE
org.springframework:spring-jcl:5.2.12.RELEASE
org.springframework:spring-jdbc:5.2.12.RELEASE
org.springframework:spring-test:5.2.12.RELEASE
org.springframework:spring-tx:5.2.12.RELEASE
@@ -1,7 +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-SR11
org.jetbrains.kotlin:kotlin-bom:1.3.72
org.springframework.data:spring-data-releasetrain:Neumann-SR3
org.springframework:spring-framework-bom:5.2.8.RELEASE
io.projectreactor:reactor-bom:Dysprosium-SR16
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.springframework.data:spring-data-releasetrain:Neumann-SR6
org.springframework:spring-framework-bom:5.2.12.RELEASE
@@ -1,25 +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-SR11
io.projectreactor:reactor-bom:Dysprosium-SR16
junit:junit:4.12
net.bytebuddy:byte-buddy-agent:1.10.5
net.bytebuddy:byte-buddy:1.10.5
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.1
org.jetbrains.kotlin:kotlin-bom:1.3.72
org.mockito:mockito-core:3.3.3
org.objenesis:objenesis:2.6
org.springframework.data:spring-data-releasetrain:Neumann-SR3
org.springframework:spring-aop:5.2.8.RELEASE
org.springframework:spring-beans:5.2.8.RELEASE
org.springframework:spring-context-support:5.2.8.RELEASE
org.springframework:spring-context:5.2.8.RELEASE
org.springframework:spring-core:5.2.8.RELEASE
org.springframework:spring-expression:5.2.8.RELEASE
org.springframework:spring-framework-bom:5.2.8.RELEASE
org.springframework:spring-jcl:5.2.8.RELEASE
org.springframework:spring-jdbc:5.2.8.RELEASE
org.springframework:spring-test:5.2.8.RELEASE
org.springframework:spring-tx:5.2.8.RELEASE
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-SR6
org.springframework:spring-aop:5.2.12.RELEASE
org.springframework:spring-beans:5.2.12.RELEASE
org.springframework:spring-context-support:5.2.12.RELEASE
org.springframework:spring-context:5.2.12.RELEASE
org.springframework:spring-core:5.2.12.RELEASE
org.springframework:spring-expression:5.2.12.RELEASE
org.springframework:spring-framework-bom:5.2.12.RELEASE
org.springframework:spring-jcl:5.2.12.RELEASE
org.springframework:spring-jdbc:5.2.12.RELEASE
org.springframework:spring-test:5.2.12.RELEASE
org.springframework:spring-tx:5.2.12.RELEASE
@@ -1,25 +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-SR11
io.projectreactor:reactor-bom:Dysprosium-SR16
junit:junit:4.12
net.bytebuddy:byte-buddy-agent:1.10.5
net.bytebuddy:byte-buddy:1.10.5
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.1
org.jetbrains.kotlin:kotlin-bom:1.3.72
org.mockito:mockito-core:3.3.3
org.objenesis:objenesis:2.6
org.springframework.data:spring-data-releasetrain:Neumann-SR3
org.springframework:spring-aop:5.2.8.RELEASE
org.springframework:spring-beans:5.2.8.RELEASE
org.springframework:spring-context-support:5.2.8.RELEASE
org.springframework:spring-context:5.2.8.RELEASE
org.springframework:spring-core:5.2.8.RELEASE
org.springframework:spring-expression:5.2.8.RELEASE
org.springframework:spring-framework-bom:5.2.8.RELEASE
org.springframework:spring-jcl:5.2.8.RELEASE
org.springframework:spring-jdbc:5.2.8.RELEASE
org.springframework:spring-test:5.2.8.RELEASE
org.springframework:spring-tx:5.2.8.RELEASE
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-SR6
org.springframework:spring-aop:5.2.12.RELEASE
org.springframework:spring-beans:5.2.12.RELEASE
org.springframework:spring-context-support:5.2.12.RELEASE
org.springframework:spring-context:5.2.12.RELEASE
org.springframework:spring-core:5.2.12.RELEASE
org.springframework:spring-expression:5.2.12.RELEASE
org.springframework:spring-framework-bom:5.2.12.RELEASE
org.springframework:spring-jcl:5.2.12.RELEASE
org.springframework:spring-jdbc:5.2.12.RELEASE
org.springframework:spring-test:5.2.12.RELEASE
org.springframework:spring-tx:5.2.12.RELEASE
+18 -18
View File
@@ -1,25 +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-SR11
io.projectreactor:reactor-bom:Dysprosium-SR16
junit:junit:4.12
net.bytebuddy:byte-buddy-agent:1.10.5
net.bytebuddy:byte-buddy:1.10.5
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.1
org.jetbrains.kotlin:kotlin-bom:1.3.72
org.mockito:mockito-core:3.3.3
org.objenesis:objenesis:2.6
org.springframework.data:spring-data-releasetrain:Neumann-SR3
org.springframework:spring-aop:5.2.8.RELEASE
org.springframework:spring-beans:5.2.8.RELEASE
org.springframework:spring-context-support:5.2.8.RELEASE
org.springframework:spring-context:5.2.8.RELEASE
org.springframework:spring-core:5.2.8.RELEASE
org.springframework:spring-expression:5.2.8.RELEASE
org.springframework:spring-framework-bom:5.2.8.RELEASE
org.springframework:spring-jcl:5.2.8.RELEASE
org.springframework:spring-jdbc:5.2.8.RELEASE
org.springframework:spring-test:5.2.8.RELEASE
org.springframework:spring-tx:5.2.8.RELEASE
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-SR6
org.springframework:spring-aop:5.2.12.RELEASE
org.springframework:spring-beans:5.2.12.RELEASE
org.springframework:spring-context-support:5.2.12.RELEASE
org.springframework:spring-context:5.2.12.RELEASE
org.springframework:spring-core:5.2.12.RELEASE
org.springframework:spring-expression:5.2.12.RELEASE
org.springframework:spring-framework-bom:5.2.12.RELEASE
org.springframework:spring-jcl:5.2.12.RELEASE
org.springframework:spring-jdbc:5.2.12.RELEASE
org.springframework:spring-test:5.2.12.RELEASE
org.springframework:spring-tx:5.2.12.RELEASE
@@ -22,7 +22,8 @@ import org.springframework.security.acls.domain.AclFormattingUtils;
import org.springframework.security.acls.model.Permission;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.fail;
import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException;
import static org.assertj.core.api.Assertions.assertThatNoException;
/**
* Tests for {@link AclFormattingUtils}.
@@ -33,30 +34,11 @@ public class AclFormattingUtilsTests {
@Test
public final void testDemergePatternsParametersConstraints() {
try {
AclFormattingUtils.demergePatterns(null, "SOME STRING");
fail("It should have thrown IllegalArgumentException");
}
catch (IllegalArgumentException expected) {
}
try {
AclFormattingUtils.demergePatterns("SOME STRING", null);
fail("It should have thrown IllegalArgumentException");
}
catch (IllegalArgumentException expected) {
}
try {
AclFormattingUtils.demergePatterns("SOME STRING", "LONGER SOME STRING");
fail("It should have thrown IllegalArgumentException");
}
catch (IllegalArgumentException expected) {
}
try {
AclFormattingUtils.demergePatterns("SOME STRING", "SAME LENGTH");
}
catch (IllegalArgumentException notExpected) {
fail("It shouldn't have thrown IllegalArgumentException");
}
assertThatIllegalArgumentException().isThrownBy(() -> AclFormattingUtils.demergePatterns(null, "SOME STRING"));
assertThatIllegalArgumentException().isThrownBy(() -> AclFormattingUtils.demergePatterns("SOME STRING", null));
assertThatIllegalArgumentException()
.isThrownBy(() -> AclFormattingUtils.demergePatterns("SOME STRING", "LONGER SOME STRING"));
assertThatNoException().isThrownBy(() -> AclFormattingUtils.demergePatterns("SOME STRING", "SAME LENGTH"));
}
@Test
@@ -71,29 +53,11 @@ public class AclFormattingUtilsTests {
@Test
public final void testMergePatternsParametersConstraints() {
try {
AclFormattingUtils.mergePatterns(null, "SOME STRING");
fail("It should have thrown IllegalArgumentException");
}
catch (IllegalArgumentException expected) {
}
try {
AclFormattingUtils.mergePatterns("SOME STRING", null);
fail("It should have thrown IllegalArgumentException");
}
catch (IllegalArgumentException expected) {
}
try {
AclFormattingUtils.mergePatterns("SOME STRING", "LONGER SOME STRING");
fail("It should have thrown IllegalArgumentException");
}
catch (IllegalArgumentException expected) {
}
try {
AclFormattingUtils.mergePatterns("SOME STRING", "SAME LENGTH");
}
catch (IllegalArgumentException notExpected) {
}
assertThatIllegalArgumentException().isThrownBy(() -> AclFormattingUtils.mergePatterns(null, "SOME STRING"));
assertThatIllegalArgumentException().isThrownBy(() -> AclFormattingUtils.mergePatterns("SOME STRING", null));
assertThatIllegalArgumentException()
.isThrownBy(() -> AclFormattingUtils.mergePatterns("SOME STRING", "LONGER SOME STRING"));
assertThatNoException().isThrownBy(() -> AclFormattingUtils.mergePatterns("SOME STRING", "SAME LENGTH"));
}
@Test
@@ -108,18 +72,10 @@ public class AclFormattingUtilsTests {
@Test
public final void testBinaryPrints() {
assertThat(AclFormattingUtils.printBinary(15)).isEqualTo("............................****");
try {
AclFormattingUtils.printBinary(15, Permission.RESERVED_ON);
fail("It should have thrown IllegalArgumentException");
}
catch (IllegalArgumentException notExpected) {
}
try {
AclFormattingUtils.printBinary(15, Permission.RESERVED_OFF);
fail("It should have thrown IllegalArgumentException");
}
catch (IllegalArgumentException notExpected) {
}
assertThatIllegalArgumentException()
.isThrownBy(() -> AclFormattingUtils.printBinary(15, Permission.RESERVED_ON));
assertThatIllegalArgumentException()
.isThrownBy(() -> AclFormattingUtils.printBinary(15, Permission.RESERVED_OFF));
assertThat(AclFormattingUtils.printBinary(15, 'x')).isEqualTo("............................xxxx");
}
@@ -36,7 +36,8 @@ import org.springframework.security.core.Authentication;
import org.springframework.security.core.SpringSecurityMessageSource;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.fail;
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyBoolean;
import static org.mockito.BDDMockito.given;
@@ -50,15 +51,12 @@ import static org.mockito.Mockito.verify;
@SuppressWarnings({ "unchecked" })
public class AclEntryAfterInvocationProviderTests {
@Test(expected = IllegalArgumentException.class)
@Test
public void rejectsMissingPermissions() {
try {
new AclEntryAfterInvocationProvider(mock(AclService.class), null);
fail("Exception expected");
}
catch (IllegalArgumentException expected) {
}
new AclEntryAfterInvocationProvider(mock(AclService.class), Collections.<Permission>emptyList());
assertThatIllegalArgumentException()
.isThrownBy(() -> new AclEntryAfterInvocationProvider(mock(AclService.class), null));
assertThatIllegalArgumentException().isThrownBy(
() -> new AclEntryAfterInvocationProvider(mock(AclService.class), Collections.<Permission>emptyList()));
}
@Test
@@ -98,7 +96,7 @@ public class AclEntryAfterInvocationProviderTests {
SecurityConfig.createList("AFTER_ACL_READ"), returned));
}
@Test(expected = AccessDeniedException.class)
@Test
public void accessIsDeniedIfPermissionIsNotGranted() {
AclService service = mock(AclService.class);
Acl acl = mock(Acl.class);
@@ -113,16 +111,13 @@ public class AclEntryAfterInvocationProviderTests {
provider.setObjectIdentityRetrievalStrategy(mock(ObjectIdentityRetrievalStrategy.class));
provider.setProcessDomainObjectClass(Object.class);
provider.setSidRetrievalStrategy(mock(SidRetrievalStrategy.class));
try {
provider.decide(mock(Authentication.class), new Object(),
SecurityConfig.createList("UNSUPPORTED", "MY_ATTRIBUTE"), new Object());
fail("Expected Exception");
}
catch (AccessDeniedException expected) {
}
assertThatExceptionOfType(AccessDeniedException.class)
.isThrownBy(() -> provider.decide(mock(Authentication.class), new Object(),
SecurityConfig.createList("UNSUPPORTED", "MY_ATTRIBUTE"), new Object()));
// Second scenario with no acls found
provider.decide(mock(Authentication.class), new Object(),
SecurityConfig.createList("UNSUPPORTED", "MY_ATTRIBUTE"), new Object());
assertThatExceptionOfType(AccessDeniedException.class)
.isThrownBy(() -> provider.decide(mock(Authentication.class), new Object(),
SecurityConfig.createList("UNSUPPORTED", "MY_ATTRIBUTE"), new Object()));
}
@Test
@@ -25,7 +25,7 @@ import org.springframework.security.acls.model.ObjectIdentity;
import org.springframework.security.acls.model.Sid;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.fail;
import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException;
import static org.mockito.BDDMockito.given;
import static org.mockito.Mockito.mock;
@@ -39,27 +39,14 @@ public class AccessControlImplEntryTests {
@Test
public void testConstructorRequiredFields() {
// Check Acl field is present
try {
new AccessControlEntryImpl(null, null, new PrincipalSid("johndoe"), BasePermission.ADMINISTRATION, true,
true, true);
fail("It should have thrown IllegalArgumentException");
}
catch (IllegalArgumentException expected) {
}
assertThatIllegalArgumentException().isThrownBy(() -> new AccessControlEntryImpl(null, null,
new PrincipalSid("johndoe"), BasePermission.ADMINISTRATION, true, true, true));
// Check Sid field is present
try {
new AccessControlEntryImpl(null, mock(Acl.class), null, BasePermission.ADMINISTRATION, true, true, true);
fail("It should have thrown IllegalArgumentException");
}
catch (IllegalArgumentException expected) {
}
assertThatIllegalArgumentException().isThrownBy(() -> new AccessControlEntryImpl(null, mock(Acl.class), null,
BasePermission.ADMINISTRATION, true, true, true));
// Check Permission field is present
try {
new AccessControlEntryImpl(null, mock(Acl.class), new PrincipalSid("johndoe"), null, true, true, true);
fail("It should have thrown IllegalArgumentException");
}
catch (IllegalArgumentException expected) {
}
assertThatIllegalArgumentException().isThrownBy(() -> new AccessControlEntryImpl(null, mock(Acl.class),
new PrincipalSid("johndoe"), null, true, true, true));
}
@Test
@@ -46,7 +46,8 @@ import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.security.util.FieldUtils;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.fail;
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException;
import static org.mockito.Mockito.mock;
/**
@@ -97,58 +98,38 @@ public class AclImplTests {
SecurityContextHolder.clearContext();
}
@Test(expected = IllegalArgumentException.class)
@Test
public void constructorsRejectNullObjectIdentity() {
try {
new AclImpl(null, 1, this.authzStrategy, this.pgs, null, null, true, new PrincipalSid("joe"));
fail("Should have thrown IllegalArgumentException");
}
catch (IllegalArgumentException expected) {
}
new AclImpl(null, 1, this.authzStrategy, this.mockAuditLogger);
assertThatIllegalArgumentException().isThrownBy(
() -> new AclImpl(null, 1, this.authzStrategy, this.pgs, null, null, true, new PrincipalSid("joe")));
assertThatIllegalArgumentException()
.isThrownBy(() -> new AclImpl(null, 1, this.authzStrategy, this.mockAuditLogger));
}
@Test(expected = IllegalArgumentException.class)
@Test
public void constructorsRejectNullId() {
try {
new AclImpl(this.objectIdentity, null, this.authzStrategy, this.pgs, null, null, true,
new PrincipalSid("joe"));
fail("Should have thrown IllegalArgumentException");
}
catch (IllegalArgumentException expected) {
}
new AclImpl(this.objectIdentity, null, this.authzStrategy, this.mockAuditLogger);
assertThatIllegalArgumentException().isThrownBy(() -> new AclImpl(this.objectIdentity, null, this.authzStrategy,
this.pgs, null, null, true, new PrincipalSid("joe")));
assertThatIllegalArgumentException()
.isThrownBy(() -> new AclImpl(this.objectIdentity, null, this.authzStrategy, this.mockAuditLogger));
}
@SuppressWarnings("deprecation")
@Test(expected = IllegalArgumentException.class)
@Test
public void constructorsRejectNullAclAuthzStrategy() {
try {
new AclImpl(this.objectIdentity, 1, null, new DefaultPermissionGrantingStrategy(this.mockAuditLogger), null,
null, true, new PrincipalSid("joe"));
fail("It should have thrown IllegalArgumentException");
}
catch (IllegalArgumentException expected) {
}
new AclImpl(this.objectIdentity, 1, null, this.mockAuditLogger);
assertThatIllegalArgumentException().isThrownBy(() -> new AclImpl(this.objectIdentity, 1, null,
new DefaultPermissionGrantingStrategy(this.mockAuditLogger), null, null, true,
new PrincipalSid("joe")));
assertThatIllegalArgumentException()
.isThrownBy(() -> new AclImpl(this.objectIdentity, 1, null, this.mockAuditLogger));
}
@Test
public void insertAceRejectsNullParameters() {
MutableAcl acl = new AclImpl(this.objectIdentity, 1, this.authzStrategy, this.pgs, null, null, true,
new PrincipalSid("joe"));
try {
acl.insertAce(0, null, new GrantedAuthoritySid("ROLE_IGNORED"), true);
fail("It should have thrown IllegalArgumentException");
}
catch (IllegalArgumentException expected) {
}
try {
acl.insertAce(0, BasePermission.READ, null, true);
fail("It should have thrown IllegalArgumentException");
}
catch (IllegalArgumentException expected) {
}
assertThatIllegalArgumentException()
.isThrownBy(() -> acl.insertAce(0, null, new GrantedAuthoritySid("ROLE_IGNORED"), true));
assertThatIllegalArgumentException().isThrownBy(() -> acl.insertAce(0, BasePermission.READ, null, true));
}
@Test
@@ -185,7 +166,7 @@ public class AclImplTests {
assertThat(acl.getEntries().get(2).getSid()).isEqualTo(new GrantedAuthoritySid("ROLE_TEST2"));
}
@Test(expected = NotFoundException.class)
@Test
public void insertAceFailsForNonExistentElement() {
MutableAcl acl = new AclImpl(this.objectIdentity, 1, this.authzStrategy, this.pgs, null, null, true,
new PrincipalSid("joe"));
@@ -193,7 +174,8 @@ public class AclImplTests {
// Insert one permission
acl.insertAce(0, BasePermission.READ, new GrantedAuthoritySid("ROLE_TEST1"), true);
service.updateAcl(acl);
acl.insertAce(55, BasePermission.READ, new GrantedAuthoritySid("ROLE_TEST2"), true);
assertThatExceptionOfType(NotFoundException.class)
.isThrownBy(() -> acl.insertAce(55, BasePermission.READ, new GrantedAuthoritySid("ROLE_TEST2"), true));
}
@Test
@@ -232,12 +214,7 @@ public class AclImplTests {
new SimpleGrantedAuthority("ROLE_GENERAL"));
MutableAcl acl = new AclImpl(this.objectIdentity, (1), strategy, this.pgs, null, null, true,
new PrincipalSid("joe"));
try {
acl.deleteAce(99);
fail("It should have thrown NotFoundException");
}
catch (NotFoundException expected) {
}
assertThatExceptionOfType(NotFoundException.class).isThrownBy(() -> acl.deleteAce(99));
}
@Test
@@ -245,18 +222,9 @@ public class AclImplTests {
MutableAcl acl = new AclImpl(this.objectIdentity, 1, this.authzStrategy, this.pgs, null, null, true,
new PrincipalSid("joe"));
Sid ben = new PrincipalSid("ben");
try {
acl.isGranted(new ArrayList<>(0), Arrays.asList(ben), false);
fail("It should have thrown IllegalArgumentException");
}
catch (IllegalArgumentException expected) {
}
try {
acl.isGranted(READ, new ArrayList<>(0), false);
fail("It should have thrown IllegalArgumentException");
}
catch (IllegalArgumentException expected) {
}
assertThatIllegalArgumentException()
.isThrownBy(() -> acl.isGranted(new ArrayList<>(0), Arrays.asList(ben), false));
assertThatIllegalArgumentException().isThrownBy(() -> acl.isGranted(READ, new ArrayList<>(0), false));
}
@Test
@@ -277,25 +245,16 @@ public class AclImplTests {
List<Permission> permissions = Arrays.asList(BasePermission.READ, BasePermission.CREATE);
List<Sid> sids = Arrays.asList(new PrincipalSid("ben"), new GrantedAuthoritySid("ROLE_GUEST"));
assertThat(rootAcl.isGranted(permissions, sids, false)).isFalse();
try {
rootAcl.isGranted(permissions, SCOTT, false);
fail("It should have thrown NotFoundException");
}
catch (NotFoundException expected) {
}
assertThatExceptionOfType(NotFoundException.class)
.isThrownBy(() -> rootAcl.isGranted(permissions, SCOTT, false));
assertThat(rootAcl.isGranted(WRITE, SCOTT, false)).isTrue();
assertThat(rootAcl.isGranted(WRITE,
Arrays.asList(new PrincipalSid("rod"), new GrantedAuthoritySid("WRITE_ACCESS_ROLE")), false)).isFalse();
assertThat(rootAcl.isGranted(WRITE,
Arrays.asList(new GrantedAuthoritySid("WRITE_ACCESS_ROLE"), new PrincipalSid("rod")), false)).isTrue();
try {
// Change the type of the Sid and check the granting process
rootAcl.isGranted(WRITE,
Arrays.asList(new GrantedAuthoritySid("rod"), new PrincipalSid("WRITE_ACCESS_ROLE")), false);
fail("It should have thrown NotFoundException");
}
catch (NotFoundException expected) {
}
// Change the type of the Sid and check the granting process
assertThatExceptionOfType(NotFoundException.class).isThrownBy(() -> rootAcl.isGranted(WRITE,
Arrays.asList(new GrantedAuthoritySid("rod"), new PrincipalSid("WRITE_ACCESS_ROLE")), false));
}
@Test
@@ -348,18 +307,9 @@ public class AclImplTests {
assertThat(childAcl1.isGranted(DELETE, BEN, false)).isFalse();
// Check granting process for child2 (doesn't inherit the permissions from its
// parent)
try {
assertThat(childAcl2.isGranted(CREATE, SCOTT, false)).isTrue();
fail("It should have thrown NotFoundException");
}
catch (NotFoundException expected) {
}
try {
childAcl2.isGranted(CREATE, Arrays.asList((Sid) new PrincipalSid("joe")), false);
fail("It should have thrown NotFoundException");
}
catch (NotFoundException expected) {
}
assertThatExceptionOfType(NotFoundException.class).isThrownBy(() -> childAcl2.isGranted(CREATE, SCOTT, false));
assertThatExceptionOfType(NotFoundException.class)
.isThrownBy(() -> childAcl2.isGranted(CREATE, Arrays.asList((Sid) new PrincipalSid("joe")), false));
}
@Test
@@ -462,38 +412,40 @@ public class AclImplTests {
.isFalse();
}
@Test(expected = NotFoundException.class)
@Test
public void insertAceRaisesNotFoundExceptionForIndexLessThanZero() {
AclImpl acl = new AclImpl(this.objectIdentity, 1, this.authzStrategy, this.pgs, null, null, true,
new PrincipalSid("joe"));
acl.insertAce(-1, mock(Permission.class), mock(Sid.class), true);
assertThatExceptionOfType(NotFoundException.class)
.isThrownBy(() -> acl.insertAce(-1, mock(Permission.class), mock(Sid.class), true));
}
@Test(expected = NotFoundException.class)
@Test
public void deleteAceRaisesNotFoundExceptionForIndexLessThanZero() {
AclImpl acl = new AclImpl(this.objectIdentity, 1, this.authzStrategy, this.pgs, null, null, true,
new PrincipalSid("joe"));
acl.deleteAce(-1);
assertThatExceptionOfType(NotFoundException.class).isThrownBy(() -> acl.deleteAce(-1));
}
@Test(expected = NotFoundException.class)
@Test
public void insertAceRaisesNotFoundExceptionForIndexGreaterThanSize() {
AclImpl acl = new AclImpl(this.objectIdentity, 1, this.authzStrategy, this.pgs, null, null, true,
new PrincipalSid("joe"));
// Insert at zero, OK.
acl.insertAce(0, mock(Permission.class), mock(Sid.class), true);
// Size is now 1
acl.insertAce(2, mock(Permission.class), mock(Sid.class), true);
assertThatExceptionOfType(NotFoundException.class)
.isThrownBy(() -> acl.insertAce(2, mock(Permission.class), mock(Sid.class), true));
}
// SEC-1151
@Test(expected = NotFoundException.class)
@Test
public void deleteAceRaisesNotFoundExceptionForIndexEqualToSize() {
AclImpl acl = new AclImpl(this.objectIdentity, 1, this.authzStrategy, this.pgs, null, null, true,
new PrincipalSid("joe"));
acl.insertAce(0, mock(Permission.class), mock(Sid.class), true);
// Size is now 1
acl.deleteAce(1);
assertThatExceptionOfType(NotFoundException.class).isThrownBy(() -> acl.deleteAce(1));
}
// SEC-1795
@@ -30,7 +30,8 @@ import org.springframework.security.core.Authentication;
import org.springframework.security.core.authority.SimpleGrantedAuthority;
import org.springframework.security.core.context.SecurityContextHolder;
import static org.assertj.core.api.Assertions.fail;
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
import static org.assertj.core.api.Assertions.assertThatNoException;
/**
* Test class for {@link AclAuthorizationStrategyImpl} and {@link AclImpl} security
@@ -72,24 +73,12 @@ public class AclImplementationSecurityCheckTests {
new SimpleGrantedAuthority("ROLE_THREE"));
Acl acl2 = new AclImpl(identity, 1L, aclAuthorizationStrategy2, new ConsoleAuditLogger());
// Check access in case the principal has no authorization rights
try {
aclAuthorizationStrategy2.securityCheck(acl2, AclAuthorizationStrategy.CHANGE_GENERAL);
fail("It should have thrown NotFoundException");
}
catch (NotFoundException expected) {
}
try {
aclAuthorizationStrategy2.securityCheck(acl2, AclAuthorizationStrategy.CHANGE_AUDITING);
fail("It should have thrown NotFoundException");
}
catch (NotFoundException expected) {
}
try {
aclAuthorizationStrategy2.securityCheck(acl2, AclAuthorizationStrategy.CHANGE_OWNERSHIP);
fail("It should have thrown NotFoundException");
}
catch (NotFoundException expected) {
}
assertThatExceptionOfType(NotFoundException.class).isThrownBy(
() -> aclAuthorizationStrategy2.securityCheck(acl2, AclAuthorizationStrategy.CHANGE_GENERAL));
assertThatExceptionOfType(NotFoundException.class).isThrownBy(
() -> aclAuthorizationStrategy2.securityCheck(acl2, AclAuthorizationStrategy.CHANGE_AUDITING));
assertThatExceptionOfType(NotFoundException.class).isThrownBy(
() -> aclAuthorizationStrategy2.securityCheck(acl2, AclAuthorizationStrategy.CHANGE_OWNERSHIP));
}
@Test
@@ -112,28 +101,16 @@ public class AclImplementationSecurityCheckTests {
// The CHANGE_AUDITING and CHANGE_OWNERSHIP should fail since the
// principal doesn't have these authorities,
// nor granting access
try {
aclAuthorizationStrategy.securityCheck(aclFirstDeny, AclAuthorizationStrategy.CHANGE_AUDITING);
fail("It should have thrown AccessDeniedException");
}
catch (AccessDeniedException expected) {
}
try {
aclAuthorizationStrategy.securityCheck(aclFirstDeny, AclAuthorizationStrategy.CHANGE_OWNERSHIP);
fail("It should have thrown AccessDeniedException");
}
catch (AccessDeniedException expected) {
}
assertThatExceptionOfType(AccessDeniedException.class).isThrownBy(
() -> aclAuthorizationStrategy.securityCheck(aclFirstDeny, AclAuthorizationStrategy.CHANGE_AUDITING));
assertThatExceptionOfType(AccessDeniedException.class).isThrownBy(
() -> aclAuthorizationStrategy.securityCheck(aclFirstDeny, AclAuthorizationStrategy.CHANGE_OWNERSHIP));
// Add granting access to this principal
aclFirstDeny.insertAce(1, BasePermission.ADMINISTRATION, new PrincipalSid(auth), true);
// and try again for CHANGE_AUDITING - the first ACE's granting flag
// (false) will deny this access
try {
aclAuthorizationStrategy.securityCheck(aclFirstDeny, AclAuthorizationStrategy.CHANGE_AUDITING);
fail("It should have thrown AccessDeniedException");
}
catch (AccessDeniedException expected) {
}
assertThatExceptionOfType(AccessDeniedException.class).isThrownBy(
() -> aclAuthorizationStrategy.securityCheck(aclFirstDeny, AclAuthorizationStrategy.CHANGE_AUDITING));
// Create another ACL and give the principal the ADMINISTRATION
// permission, with granting access
MutableAcl aclFirstAllow = new AclImpl(identity, 1L, aclAuthorizationStrategy, new ConsoleAuditLogger());
@@ -143,27 +120,15 @@ public class AclImplementationSecurityCheckTests {
aclAuthorizationStrategy.securityCheck(aclFirstAllow, AclAuthorizationStrategy.CHANGE_AUDITING);
// Add a deny ACE and test again for CHANGE_AUDITING
aclFirstAllow.insertAce(1, BasePermission.ADMINISTRATION, new PrincipalSid(auth), false);
try {
aclAuthorizationStrategy.securityCheck(aclFirstAllow, AclAuthorizationStrategy.CHANGE_AUDITING);
}
catch (AccessDeniedException notExpected) {
fail("It shouldn't have thrown AccessDeniedException");
}
assertThatNoException().isThrownBy(
() -> aclAuthorizationStrategy.securityCheck(aclFirstAllow, AclAuthorizationStrategy.CHANGE_AUDITING));
// Create an ACL with no ACE
MutableAcl aclNoACE = new AclImpl(identity, 1L, aclAuthorizationStrategy, new ConsoleAuditLogger());
try {
aclAuthorizationStrategy.securityCheck(aclNoACE, AclAuthorizationStrategy.CHANGE_AUDITING);
fail("It should have thrown NotFoundException");
}
catch (NotFoundException expected) {
}
assertThatExceptionOfType(NotFoundException.class).isThrownBy(
() -> aclAuthorizationStrategy.securityCheck(aclNoACE, AclAuthorizationStrategy.CHANGE_AUDITING));
// and still grant access for CHANGE_GENERAL
try {
aclAuthorizationStrategy.securityCheck(aclNoACE, AclAuthorizationStrategy.CHANGE_GENERAL);
}
catch (NotFoundException expected) {
fail("It shouldn't have thrown NotFoundException");
}
assertThatNoException().isThrownBy(
() -> aclAuthorizationStrategy.securityCheck(aclNoACE, AclAuthorizationStrategy.CHANGE_GENERAL));
}
@Test
@@ -184,22 +149,14 @@ public class AclImplementationSecurityCheckTests {
MutableAcl childAcl = new AclImpl(identity, 2, aclAuthorizationStrategy, new ConsoleAuditLogger());
// Check against the 'child' acl, which doesn't offer any authorization
// rights on CHANGE_OWNERSHIP
try {
aclAuthorizationStrategy.securityCheck(childAcl, AclAuthorizationStrategy.CHANGE_OWNERSHIP);
fail("It should have thrown NotFoundException");
}
catch (NotFoundException expected) {
}
assertThatExceptionOfType(NotFoundException.class).isThrownBy(
() -> aclAuthorizationStrategy.securityCheck(childAcl, AclAuthorizationStrategy.CHANGE_OWNERSHIP));
// Link the child with its parent and test again against the
// CHANGE_OWNERSHIP right
childAcl.setParent(parentAcl);
childAcl.setEntriesInheriting(true);
try {
aclAuthorizationStrategy.securityCheck(childAcl, AclAuthorizationStrategy.CHANGE_OWNERSHIP);
}
catch (NotFoundException expected) {
fail("It shouldn't have thrown NotFoundException");
}
assertThatNoException().isThrownBy(
() -> aclAuthorizationStrategy.securityCheck(childAcl, AclAuthorizationStrategy.CHANGE_OWNERSHIP));
// Create a root parent and link it to the middle parent
MutableAcl rootParentAcl = new AclImpl(identity, 1, aclAuthorizationStrategy, new ConsoleAuditLogger());
parentAcl = new AclImpl(identity, 1, aclAuthorizationStrategy, new ConsoleAuditLogger());
@@ -207,12 +164,8 @@ public class AclImplementationSecurityCheckTests {
parentAcl.setEntriesInheriting(true);
parentAcl.setParent(rootParentAcl);
childAcl.setParent(parentAcl);
try {
aclAuthorizationStrategy.securityCheck(childAcl, AclAuthorizationStrategy.CHANGE_OWNERSHIP);
}
catch (NotFoundException expected) {
fail("It shouldn't have thrown NotFoundException");
}
assertThatNoException().isThrownBy(
() -> aclAuthorizationStrategy.securityCheck(childAcl, AclAuthorizationStrategy.CHANGE_OWNERSHIP));
}
@Test
@@ -227,24 +180,12 @@ public class AclImplementationSecurityCheckTests {
Acl acl = new AclImpl(identity, 1, aclAuthorizationStrategy,
new DefaultPermissionGrantingStrategy(new ConsoleAuditLogger()), null, null, false,
new PrincipalSid(auth));
try {
aclAuthorizationStrategy.securityCheck(acl, AclAuthorizationStrategy.CHANGE_GENERAL);
}
catch (AccessDeniedException notExpected) {
fail("It shouldn't have thrown AccessDeniedException");
}
try {
aclAuthorizationStrategy.securityCheck(acl, AclAuthorizationStrategy.CHANGE_AUDITING);
fail("It shouldn't have thrown AccessDeniedException");
}
catch (NotFoundException expected) {
}
try {
aclAuthorizationStrategy.securityCheck(acl, AclAuthorizationStrategy.CHANGE_OWNERSHIP);
}
catch (AccessDeniedException notExpected) {
fail("It shouldn't have thrown AccessDeniedException");
}
assertThatNoException()
.isThrownBy(() -> aclAuthorizationStrategy.securityCheck(acl, AclAuthorizationStrategy.CHANGE_GENERAL));
assertThatExceptionOfType(NotFoundException.class).isThrownBy(
() -> aclAuthorizationStrategy.securityCheck(acl, AclAuthorizationStrategy.CHANGE_AUDITING));
assertThatNoException().isThrownBy(
() -> aclAuthorizationStrategy.securityCheck(acl, AclAuthorizationStrategy.CHANGE_OWNERSHIP));
}
}
@@ -21,7 +21,9 @@ import org.junit.Test;
import org.springframework.security.acls.model.ObjectIdentity;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.fail;
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException;
import static org.assertj.core.api.Assertions.assertThatNoException;
/**
* Tests for {@link ObjectIdentityImpl}.
@@ -36,40 +38,15 @@ public class ObjectIdentityImplTests {
@Test
public void constructorsRespectRequiredFields() {
// Check one-argument constructor required field
try {
new ObjectIdentityImpl(null);
fail("It should have thrown IllegalArgumentException");
}
catch (IllegalArgumentException expected) {
}
assertThatIllegalArgumentException().isThrownBy(() -> new ObjectIdentityImpl(null));
// Check String-Serializable constructor required field
try {
new ObjectIdentityImpl("", 1L);
fail("It should have thrown IllegalArgumentException");
}
catch (IllegalArgumentException expected) {
}
assertThatIllegalArgumentException().isThrownBy(() -> new ObjectIdentityImpl("", 1L));
// Check Serializable parameter is not null
try {
new ObjectIdentityImpl(DOMAIN_CLASS, null);
fail("It should have thrown IllegalArgumentException");
}
catch (IllegalArgumentException expected) {
}
assertThatIllegalArgumentException().isThrownBy(() -> new ObjectIdentityImpl(DOMAIN_CLASS, null));
// The correct way of using String-Serializable constructor
try {
new ObjectIdentityImpl(DOMAIN_CLASS, 1L);
}
catch (IllegalArgumentException notExpected) {
fail("It shouldn't have thrown IllegalArgumentException");
}
assertThatNoException().isThrownBy(() -> new ObjectIdentityImpl(DOMAIN_CLASS, 1L));
// Check the Class-Serializable constructor
try {
new ObjectIdentityImpl(MockIdDomainObject.class, null);
fail("It should have thrown IllegalArgumentException");
}
catch (IllegalArgumentException expected) {
}
assertThatIllegalArgumentException().isThrownBy(() -> new ObjectIdentityImpl(MockIdDomainObject.class, null));
}
@Test
@@ -82,40 +59,22 @@ public class ObjectIdentityImplTests {
@Test
public void testGetIdMethodConstraints() {
// Check the getId() method is present
try {
new ObjectIdentityImpl("A_STRING_OBJECT");
fail("It should have thrown IdentityUnavailableException");
}
catch (IdentityUnavailableException expected) {
}
assertThatExceptionOfType(IdentityUnavailableException.class)
.isThrownBy(() -> new ObjectIdentityImpl("A_STRING_OBJECT"));
// getId() should return a non-null value
MockIdDomainObject mockId = new MockIdDomainObject();
try {
new ObjectIdentityImpl(mockId);
fail("It should have thrown IllegalArgumentException");
}
catch (IllegalArgumentException expected) {
}
assertThatIllegalArgumentException().isThrownBy(() -> new ObjectIdentityImpl(mockId));
// getId() should return a Serializable object
mockId.setId(new MockIdDomainObject());
try {
new ObjectIdentityImpl(mockId);
fail("It should have thrown IllegalArgumentException");
}
catch (IllegalArgumentException expected) {
}
assertThatIllegalArgumentException().isThrownBy(() -> new ObjectIdentityImpl(mockId));
// getId() should return a Serializable object
mockId.setId(100L);
try {
new ObjectIdentityImpl(mockId);
}
catch (IllegalArgumentException expected) {
}
assertThatNoException().isThrownBy(() -> new ObjectIdentityImpl(mockId));
}
@Test(expected = IllegalArgumentException.class)
@Test
public void constructorRejectsInvalidTypeParameter() {
new ObjectIdentityImpl("", 1L);
assertThatIllegalArgumentException().isThrownBy(() -> new ObjectIdentityImpl("", 1L));
}
@Test
@@ -48,14 +48,13 @@ import org.springframework.security.acls.domain.PrincipalSid;
import org.springframework.security.acls.model.Acl;
import org.springframework.security.acls.model.AuditableAccessControlEntry;
import org.springframework.security.acls.model.MutableAcl;
import org.springframework.security.acls.model.NotFoundException;
import org.springframework.security.acls.model.ObjectIdentity;
import org.springframework.security.acls.model.Permission;
import org.springframework.security.acls.model.Sid;
import org.springframework.security.core.authority.SimpleGrantedAuthority;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.fail;
import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException;
/**
* Tests {@link BasicLookupStrategy}
@@ -290,23 +289,19 @@ public abstract class AbstractBasicLookupStrategyTests {
// is already in cache and the element before it must not be stored in
// cache
List<ObjectIdentity> allOids = Arrays.asList(grandParentOid, parent1Oid, parent2Oid, childOid);
try {
foundAcls = this.strategy.readAclsById(allOids, sids);
}
catch (NotFoundException notExpected) {
fail("It shouldn't have thrown NotFoundException");
}
foundAcls = this.strategy.readAclsById(allOids, sids);
Acl foundParent2Acl = foundAcls.get(parent2Oid);
assertThat(foundParent2Acl).isNotNull();
assertThat(foundParent2Acl.isGranted(checkPermission, sids, false)).isTrue();
}
@Test(expected = IllegalArgumentException.class)
@Test
public void nullOwnerIsNotSupported() {
String query = "INSERT INTO acl_object_identity(ID,OBJECT_ID_CLASS,OBJECT_ID_IDENTITY,PARENT_OBJECT,OWNER_SID,ENTRIES_INHERITING) VALUES (6,2,104,null,null,1);";
getJdbcTemplate().execute(query);
ObjectIdentity oid = new ObjectIdentityImpl(TARGET_CLASS, 104L);
this.strategy.readAclsById(Arrays.asList(oid), Arrays.asList(BEN_SID));
assertThatIllegalArgumentException()
.isThrownBy(() -> this.strategy.readAclsById(Arrays.asList(oid), Arrays.asList(BEN_SID)));
}
@Test
@@ -31,6 +31,7 @@ import org.mockito.junit.MockitoJUnitRunner;
import org.springframework.core.convert.ConversionService;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException;
import static org.mockito.BDDMockito.given;
/**
@@ -125,14 +126,14 @@ public class AclClassIdUtilsTests {
assertThat(newIdentifier).isEqualTo(identifier);
}
@Test(expected = IllegalArgumentException.class)
@Test
public void shouldNotAcceptNullConversionServiceInConstruction() {
new AclClassIdUtils(null);
assertThatIllegalArgumentException().isThrownBy(() -> new AclClassIdUtils(null));
}
@Test(expected = IllegalArgumentException.class)
@Test
public void shouldNotAcceptNullConversionServiceInSetter() {
this.aclClassIdUtils.setConversionService(null);
assertThatIllegalArgumentException().isThrownBy(() -> this.aclClassIdUtils.setConversionService(null));
}
}
@@ -37,6 +37,8 @@ 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.assertThatExceptionOfType;
/**
* Tests {@link BasicLookupStrategy} with Acl Class type id set to UUID.
*
@@ -110,10 +112,11 @@ public class BasicLookupStrategyWithAclClassTypeTests extends AbstractBasicLooku
Assert.assertNotNull(foundAcls.get(oid));
}
@Test(expected = ConversionFailedException.class)
@Test
public void testReadObjectIdentityUsingNonUuidInDatabase() {
ObjectIdentity oid = new ObjectIdentityImpl(TARGET_CLASS_WITH_UUID, OBJECT_IDENTITY_LONG_AS_UUID);
this.uuidEnabledStrategy.readAclsById(Arrays.asList(oid), Arrays.asList(BEN_SID));
assertThatExceptionOfType(ConversionFailedException.class)
.isThrownBy(() -> this.uuidEnabledStrategy.readAclsById(Arrays.asList(oid), Arrays.asList(BEN_SID)));
}
}
@@ -52,7 +52,7 @@ import org.springframework.security.util.FieldUtils;
import org.springframework.test.util.ReflectionTestUtils;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.fail;
import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException;
import static org.mockito.BDDMockito.given;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
@@ -94,49 +94,20 @@ public class EhCacheBasedAclCacheTests {
SecurityContextHolder.clearContext();
}
@Test(expected = IllegalArgumentException.class)
@Test
public void constructorRejectsNullParameters() {
new EhCacheBasedAclCache(null, new DefaultPermissionGrantingStrategy(new ConsoleAuditLogger()),
new AclAuthorizationStrategyImpl(new SimpleGrantedAuthority("ROLE_USER")));
assertThatIllegalArgumentException().isThrownBy(
() -> new EhCacheBasedAclCache(null, new DefaultPermissionGrantingStrategy(new ConsoleAuditLogger()),
new AclAuthorizationStrategyImpl(new SimpleGrantedAuthority("ROLE_USER"))));
}
@Test
public void methodsRejectNullParameters() {
try {
Serializable id = null;
this.myCache.evictFromCache(id);
fail("It should have thrown IllegalArgumentException");
}
catch (IllegalArgumentException expected) {
}
try {
ObjectIdentity obj = null;
this.myCache.evictFromCache(obj);
fail("It should have thrown IllegalArgumentException");
}
catch (IllegalArgumentException expected) {
}
try {
Serializable id = null;
this.myCache.getFromCache(id);
fail("It should have thrown IllegalArgumentException");
}
catch (IllegalArgumentException expected) {
}
try {
ObjectIdentity obj = null;
this.myCache.getFromCache(obj);
fail("It should have thrown IllegalArgumentException");
}
catch (IllegalArgumentException expected) {
}
try {
MutableAcl acl = null;
this.myCache.putInCache(acl);
fail("It should have thrown IllegalArgumentException");
}
catch (IllegalArgumentException expected) {
}
assertThatIllegalArgumentException().isThrownBy(() -> this.myCache.evictFromCache((Serializable) null));
assertThatIllegalArgumentException().isThrownBy(() -> this.myCache.evictFromCache((ObjectIdentity) null));
assertThatIllegalArgumentException().isThrownBy(() -> this.myCache.getFromCache((Serializable) null));
assertThatIllegalArgumentException().isThrownBy(() -> this.myCache.getFromCache((ObjectIdentity) null));
assertThatIllegalArgumentException().isThrownBy(() -> this.myCache.putInCache(null));
}
// SEC-527
@@ -44,6 +44,7 @@ import org.springframework.security.acls.model.ObjectIdentity;
import org.springframework.security.acls.model.Sid;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyList;
import static org.mockito.ArgumentMatchers.anyString;
@@ -95,13 +96,14 @@ public class JdbcAclServiceTests {
}
// SEC-1898
@Test(expected = NotFoundException.class)
@Test
public void readAclByIdMissingAcl() {
Map<ObjectIdentity, Acl> result = new HashMap<>();
given(this.lookupStrategy.readAclsById(anyList(), anyList())).willReturn(result);
ObjectIdentity objectIdentity = new ObjectIdentityImpl(Object.class, 1);
List<Sid> sids = Arrays.<Sid>asList(new PrincipalSid("user"));
this.aclService.readAclById(objectIdentity, sids);
assertThatExceptionOfType(NotFoundException.class)
.isThrownBy(() -> this.aclService.readAclById(objectIdentity, sids));
}
@Test
@@ -55,7 +55,8 @@ import org.springframework.test.context.transaction.BeforeTransaction;
import org.springframework.transaction.annotation.Transactional;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.fail;
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException;
import static org.mockito.BDDMockito.given;
import static org.mockito.Mockito.spy;
@@ -161,91 +162,80 @@ public class JdbcMutableAclServiceTests extends AbstractTransactionalJUnit4Sprin
Map<ObjectIdentity, Acl> map = this.jdbcMutableAclService
.readAclsById(Arrays.asList(getTopParentOid(), getMiddleParentOid(), getChildOid()));
assertThat(map).hasSize(3);
// Replace our current objects with their retrieved versions
topParent = (MutableAcl) map.get(getTopParentOid());
middleParent = (MutableAcl) map.get(getMiddleParentOid());
child = (MutableAcl) map.get(getChildOid());
// Get the retrieved versions
MutableAcl retrievedTopParent = (MutableAcl) map.get(getTopParentOid());
MutableAcl retrievedMiddleParent = (MutableAcl) map.get(getMiddleParentOid());
MutableAcl retrievedChild = (MutableAcl) map.get(getChildOid());
// Check the retrieved versions has IDs
assertThat(topParent.getId()).isNotNull();
assertThat(middleParent.getId()).isNotNull();
assertThat(child.getId()).isNotNull();
assertThat(retrievedTopParent.getId()).isNotNull();
assertThat(retrievedMiddleParent.getId()).isNotNull();
assertThat(retrievedChild.getId()).isNotNull();
// Check their parents were correctly persisted
assertThat(topParent.getParentAcl()).isNull();
assertThat(middleParent.getParentAcl().getObjectIdentity()).isEqualTo(getTopParentOid());
assertThat(child.getParentAcl().getObjectIdentity()).isEqualTo(getMiddleParentOid());
assertThat(retrievedTopParent.getParentAcl()).isNull();
assertThat(retrievedMiddleParent.getParentAcl().getObjectIdentity()).isEqualTo(getTopParentOid());
assertThat(retrievedChild.getParentAcl().getObjectIdentity()).isEqualTo(getMiddleParentOid());
// Check their ACEs were correctly persisted
assertThat(topParent.getEntries()).hasSize(2);
assertThat(middleParent.getEntries()).hasSize(1);
assertThat(child.getEntries()).hasSize(1);
assertThat(retrievedTopParent.getEntries()).hasSize(2);
assertThat(retrievedMiddleParent.getEntries()).hasSize(1);
assertThat(retrievedChild.getEntries()).hasSize(1);
// Check the retrieved rights are correct
List<Permission> read = Arrays.asList(BasePermission.READ);
List<Permission> write = Arrays.asList(BasePermission.WRITE);
List<Permission> delete = Arrays.asList(BasePermission.DELETE);
List<Sid> pSid = Arrays.asList((Sid) new PrincipalSid(this.auth));
assertThat(topParent.isGranted(read, pSid, false)).isTrue();
assertThat(topParent.isGranted(write, pSid, false)).isFalse();
assertThat(middleParent.isGranted(delete, pSid, false)).isTrue();
assertThat(child.isGranted(delete, pSid, false)).isFalse();
try {
child.isGranted(Arrays.asList(BasePermission.ADMINISTRATION), pSid, false);
fail("Should have thrown NotFoundException");
}
catch (NotFoundException expected) {
}
assertThat(retrievedTopParent.isGranted(read, pSid, false)).isTrue();
assertThat(retrievedTopParent.isGranted(write, pSid, false)).isFalse();
assertThat(retrievedMiddleParent.isGranted(delete, pSid, false)).isTrue();
assertThat(retrievedChild.isGranted(delete, pSid, false)).isFalse();
assertThatExceptionOfType(NotFoundException.class)
.isThrownBy(() -> retrievedChild.isGranted(Arrays.asList(BasePermission.ADMINISTRATION), pSid, false));
// Now check the inherited rights (when not explicitly overridden) also look OK
assertThat(child.isGranted(read, pSid, false)).isTrue();
assertThat(child.isGranted(write, pSid, false)).isFalse();
assertThat(child.isGranted(delete, pSid, false)).isFalse();
assertThat(retrievedChild.isGranted(read, pSid, false)).isTrue();
assertThat(retrievedChild.isGranted(write, pSid, false)).isFalse();
assertThat(retrievedChild.isGranted(delete, pSid, false)).isFalse();
// Next change the child so it doesn't inherit permissions from above
child.setEntriesInheriting(false);
this.jdbcMutableAclService.updateAcl(child);
child = (MutableAcl) this.jdbcMutableAclService.readAclById(getChildOid());
assertThat(child.isEntriesInheriting()).isFalse();
retrievedChild.setEntriesInheriting(false);
this.jdbcMutableAclService.updateAcl(retrievedChild);
MutableAcl nonInheritingChild = (MutableAcl) this.jdbcMutableAclService.readAclById(getChildOid());
assertThat(nonInheritingChild.isEntriesInheriting()).isFalse();
// Check the child permissions no longer inherit
assertThat(child.isGranted(delete, pSid, true)).isFalse();
try {
child.isGranted(read, pSid, true);
fail("Should have thrown NotFoundException");
}
catch (NotFoundException expected) {
}
try {
child.isGranted(write, pSid, true);
fail("Should have thrown NotFoundException");
}
catch (NotFoundException expected) {
}
assertThat(nonInheritingChild.isGranted(delete, pSid, true)).isFalse();
assertThatExceptionOfType(NotFoundException.class)
.isThrownBy(() -> nonInheritingChild.isGranted(read, pSid, true));
assertThatExceptionOfType(NotFoundException.class)
.isThrownBy(() -> nonInheritingChild.isGranted(write, pSid, true));
// Let's add an identical permission to the child, but it'll appear AFTER the
// current permission, so has no impact
child.insertAce(1, BasePermission.DELETE, new PrincipalSid(this.auth), true);
nonInheritingChild.insertAce(1, BasePermission.DELETE, new PrincipalSid(this.auth), true);
// Let's also add another permission to the child
child.insertAce(2, BasePermission.CREATE, new PrincipalSid(this.auth), true);
nonInheritingChild.insertAce(2, BasePermission.CREATE, new PrincipalSid(this.auth), true);
// Save the changed child
this.jdbcMutableAclService.updateAcl(child);
child = (MutableAcl) this.jdbcMutableAclService.readAclById(getChildOid());
assertThat(child.getEntries()).hasSize(3);
this.jdbcMutableAclService.updateAcl(nonInheritingChild);
MutableAcl retrievedNonInheritingChild = (MutableAcl) this.jdbcMutableAclService.readAclById(getChildOid());
assertThat(retrievedNonInheritingChild.getEntries()).hasSize(3);
// Output permissions
for (int i = 0; i < child.getEntries().size(); i++) {
System.out.println(child.getEntries().get(i));
for (int i = 0; i < retrievedNonInheritingChild.getEntries().size(); i++) {
System.out.println(retrievedNonInheritingChild.getEntries().get(i));
}
// Check the permissions are as they should be
assertThat(child.isGranted(delete, pSid, true)).isFalse(); // as earlier
// permission
assertThat(retrievedNonInheritingChild.isGranted(delete, pSid, true)).isFalse(); // as
// earlier
// permission
// overrode
assertThat(child.isGranted(Arrays.asList(BasePermission.CREATE), pSid, true)).isTrue();
assertThat(retrievedNonInheritingChild.isGranted(Arrays.asList(BasePermission.CREATE), pSid, true)).isTrue();
// Now check the first ACE (index 0) really is DELETE for our Sid and is
// non-granting
AccessControlEntry entry = child.getEntries().get(0);
AccessControlEntry entry = retrievedNonInheritingChild.getEntries().get(0);
assertThat(entry.getPermission().getMask()).isEqualTo(BasePermission.DELETE.getMask());
assertThat(entry.getSid()).isEqualTo(new PrincipalSid(this.auth));
assertThat(entry.isGranting()).isFalse();
assertThat(entry.getId()).isNotNull();
// Now delete that first ACE
child.deleteAce(0);
retrievedNonInheritingChild.deleteAce(0);
// Save and check it worked
child = this.jdbcMutableAclService.updateAcl(child);
assertThat(child.getEntries()).hasSize(2);
assertThat(child.isGranted(delete, pSid, false)).isTrue();
MutableAcl savedChild = this.jdbcMutableAclService.updateAcl(retrievedNonInheritingChild);
assertThat(savedChild.getEntries()).hasSize(2);
assertThat(savedChild.isGranted(delete, pSid, false)).isTrue();
SecurityContextHolder.clearContext();
}
@@ -267,18 +257,10 @@ public class JdbcMutableAclServiceTests extends AbstractTransactionalJUnit4Sprin
assertThat(childAcl.getParentAcl().getObjectIdentity()).isEqualTo(getMiddleParentOid());
// Delete the mid-parent and test if the child was deleted, as well
this.jdbcMutableAclService.deleteAcl(getMiddleParentOid(), true);
try {
this.jdbcMutableAclService.readAclById(getMiddleParentOid());
fail("It should have thrown NotFoundException");
}
catch (NotFoundException expected) {
}
try {
this.jdbcMutableAclService.readAclById(getChildOid());
fail("It should have thrown NotFoundException");
}
catch (NotFoundException expected) {
}
assertThatExceptionOfType(NotFoundException.class)
.isThrownBy(() -> this.jdbcMutableAclService.readAclById(getMiddleParentOid()));
assertThatExceptionOfType(NotFoundException.class)
.isThrownBy(() -> this.jdbcMutableAclService.readAclById(getChildOid()));
Acl acl = this.jdbcMutableAclService.readAclById(getTopParentOid());
assertThat(acl).isNotNull();
assertThat(getTopParentOid()).isEqualTo(acl.getObjectIdentity());
@@ -286,34 +268,17 @@ public class JdbcMutableAclServiceTests extends AbstractTransactionalJUnit4Sprin
@Test
public void constructorRejectsNullParameters() {
try {
new JdbcMutableAclService(null, this.lookupStrategy, this.aclCache);
fail("It should have thrown IllegalArgumentException");
}
catch (IllegalArgumentException expected) {
}
try {
new JdbcMutableAclService(this.dataSource, null, this.aclCache);
fail("It should have thrown IllegalArgumentException");
}
catch (IllegalArgumentException expected) {
}
try {
new JdbcMutableAclService(this.dataSource, this.lookupStrategy, null);
fail("It should have thrown IllegalArgumentException");
}
catch (IllegalArgumentException expected) {
}
assertThatIllegalArgumentException()
.isThrownBy(() -> new JdbcMutableAclService(null, this.lookupStrategy, this.aclCache));
assertThatIllegalArgumentException()
.isThrownBy(() -> new JdbcMutableAclService(this.dataSource, null, this.aclCache));
assertThatIllegalArgumentException()
.isThrownBy(() -> new JdbcMutableAclService(this.dataSource, this.lookupStrategy, null));
}
@Test
public void createAclRejectsNullParameter() {
try {
this.jdbcMutableAclService.createAcl(null);
fail("It should have thrown IllegalArgumentException");
}
catch (IllegalArgumentException expected) {
}
assertThatIllegalArgumentException().isThrownBy(() -> this.jdbcMutableAclService.createAcl(null));
}
@Test
@@ -323,23 +288,14 @@ public class JdbcMutableAclServiceTests extends AbstractTransactionalJUnit4Sprin
ObjectIdentity duplicateOid = new ObjectIdentityImpl(TARGET_CLASS, 100L);
this.jdbcMutableAclService.createAcl(duplicateOid);
// Try to add the same object second time
try {
this.jdbcMutableAclService.createAcl(duplicateOid);
fail("It should have thrown AlreadyExistsException");
}
catch (AlreadyExistsException expected) {
}
assertThatExceptionOfType(AlreadyExistsException.class)
.isThrownBy(() -> this.jdbcMutableAclService.createAcl(duplicateOid));
}
@Test
@Transactional
public void deleteAclRejectsNullParameters() {
try {
this.jdbcMutableAclService.deleteAcl(null, true);
fail("It should have thrown IllegalArgumentException");
}
catch (IllegalArgumentException expected) {
}
assertThatIllegalArgumentException().isThrownBy(() -> this.jdbcMutableAclService.deleteAcl(null, true));
}
@Test
@@ -351,18 +307,16 @@ public class JdbcMutableAclServiceTests extends AbstractTransactionalJUnit4Sprin
// Specify the inheritance hierarchy
child.setParent(parent);
this.jdbcMutableAclService.updateAcl(child);
// switch on FK
this.jdbcMutableAclService.setForeignKeysInDatabase(false);
try {
this.jdbcMutableAclService.setForeignKeysInDatabase(false); // switch on FK
// checking in the
// class, not database
this.jdbcMutableAclService.deleteAcl(getTopParentOid(), false);
fail("It should have thrown ChildrenExistException");
}
catch (ChildrenExistException expected) {
// checking in the class, not database
assertThatExceptionOfType(ChildrenExistException.class)
.isThrownBy(() -> this.jdbcMutableAclService.deleteAcl(getTopParentOid(), false));
}
finally {
this.jdbcMutableAclService.setForeignKeysInDatabase(true); // restore to the
// default
// restore to the default
this.jdbcMutableAclService.setForeignKeysInDatabase(true);
}
}
@@ -43,6 +43,7 @@ import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.security.util.FieldUtils;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException;
/**
* Tests {@link org.springframework.security.acls.domain.SpringCacheBasedAclCache}
@@ -74,9 +75,9 @@ public class SpringCacheBasedAclCacheTests {
return cache;
}
@Test(expected = IllegalArgumentException.class)
@Test
public void constructorRejectsNullParameters() {
new SpringCacheBasedAclCache(null, null, null);
assertThatIllegalArgumentException().isThrownBy(() -> new SpringCacheBasedAclCache(null, null, null));
}
@SuppressWarnings("rawtypes")
@@ -32,92 +32,36 @@ import org.springframework.security.core.authority.SimpleGrantedAuthority;
import org.springframework.security.core.userdetails.User;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.fail;
import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException;
import static org.assertj.core.api.Assertions.assertThatNoException;
public class SidTests {
@Test
public void testPrincipalSidConstructorsRequiredFields() {
// Check one String-argument constructor
try {
String string = null;
new PrincipalSid(string);
fail("It should have thrown IllegalArgumentException");
}
catch (IllegalArgumentException expected) {
}
try {
new PrincipalSid("");
fail("It should have thrown IllegalArgumentException");
}
catch (IllegalArgumentException expected) {
}
new PrincipalSid("johndoe");
// throws no exception
assertThatIllegalArgumentException().isThrownBy(() -> new PrincipalSid((String) null));
assertThatIllegalArgumentException().isThrownBy(() -> new PrincipalSid(""));
assertThatNoException().isThrownBy(() -> new PrincipalSid("johndoe"));
// Check one Authentication-argument constructor
try {
Authentication authentication = null;
new PrincipalSid(authentication);
fail("It should have thrown IllegalArgumentException");
}
catch (IllegalArgumentException expected) {
}
try {
Authentication authentication = new TestingAuthenticationToken(null, "password");
new PrincipalSid(authentication);
fail("It should have thrown IllegalArgumentException");
}
catch (IllegalArgumentException expected) {
}
Authentication authentication = new TestingAuthenticationToken("johndoe", "password");
new PrincipalSid(authentication);
// throws no exception
assertThatIllegalArgumentException().isThrownBy(() -> new PrincipalSid((Authentication) null));
assertThatIllegalArgumentException()
.isThrownBy(() -> new PrincipalSid(new TestingAuthenticationToken(null, "password")));
assertThatNoException()
.isThrownBy(() -> new PrincipalSid(new TestingAuthenticationToken("johndoe", "password")));
}
@Test
public void testGrantedAuthoritySidConstructorsRequiredFields() {
// Check one String-argument constructor
try {
String string = null;
new GrantedAuthoritySid(string);
fail("It should have thrown IllegalArgumentException");
}
catch (IllegalArgumentException expected) {
}
try {
new GrantedAuthoritySid("");
fail("It should have thrown IllegalArgumentException");
}
catch (IllegalArgumentException expected) {
}
try {
new GrantedAuthoritySid("ROLE_TEST");
}
catch (IllegalArgumentException notExpected) {
fail("It shouldn't have thrown IllegalArgumentException");
}
assertThatIllegalArgumentException().isThrownBy(() -> new GrantedAuthoritySid((String) null));
assertThatIllegalArgumentException().isThrownBy(() -> new GrantedAuthoritySid(""));
assertThatNoException().isThrownBy(() -> new GrantedAuthoritySid("ROLE_TEST"));
// Check one GrantedAuthority-argument constructor
try {
GrantedAuthority ga = null;
new GrantedAuthoritySid(ga);
fail("It should have thrown IllegalArgumentException");
}
catch (IllegalArgumentException expected) {
}
try {
GrantedAuthority ga = new SimpleGrantedAuthority(null);
new GrantedAuthoritySid(ga);
fail("It should have thrown IllegalArgumentException");
}
catch (IllegalArgumentException expected) {
}
try {
GrantedAuthority ga = new SimpleGrantedAuthority("ROLE_TEST");
new GrantedAuthoritySid(ga);
}
catch (IllegalArgumentException notExpected) {
fail("It shouldn't have thrown IllegalArgumentException");
}
assertThatIllegalArgumentException().isThrownBy(() -> new GrantedAuthoritySid((GrantedAuthority) null));
assertThatIllegalArgumentException()
.isThrownBy(() -> new GrantedAuthoritySid(new SimpleGrantedAuthority(null)));
assertThatNoException().isThrownBy(() -> new GrantedAuthoritySid(new SimpleGrantedAuthority("ROLE_TEST")));
}
@Test
@@ -1,7 +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-SR11
org.jetbrains.kotlin:kotlin-bom:1.3.72
org.springframework.data:spring-data-releasetrain:Neumann-SR3
org.springframework:spring-framework-bom:5.2.8.RELEASE
io.projectreactor:reactor-bom:Dysprosium-SR16
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.springframework.data:spring-data-releasetrain:Neumann-SR6
org.springframework:spring-framework-bom:5.2.12.RELEASE
@@ -1,7 +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-SR11
org.jetbrains.kotlin:kotlin-bom:1.3.72
org.springframework.data:spring-data-releasetrain:Neumann-SR3
org.springframework:spring-framework-bom:5.2.8.RELEASE
io.projectreactor:reactor-bom:Dysprosium-SR16
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.springframework.data:spring-data-releasetrain:Neumann-SR6
org.springframework:spring-framework-bom:5.2.12.RELEASE
@@ -1,7 +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-SR11
org.jetbrains.kotlin:kotlin-bom:1.3.72
org.springframework.data:spring-data-releasetrain:Neumann-SR3
org.springframework:spring-framework-bom:5.2.8.RELEASE
io.projectreactor:reactor-bom:Dysprosium-SR16
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.springframework.data:spring-data-releasetrain:Neumann-SR6
org.springframework:spring-framework-bom:5.2.12.RELEASE
@@ -1,8 +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-SR11
org.aspectj:aspectjtools:1.9.3
org.jetbrains.kotlin:kotlin-bom:1.3.72
org.springframework.data:spring-data-releasetrain:Neumann-SR3
org.springframework:spring-framework-bom:5.2.8.RELEASE
io.projectreactor:reactor-bom:Dysprosium-SR16
org.aspectj:aspectjtools:1.9.6
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.springframework.data:spring-data-releasetrain:Neumann-SR6
org.springframework:spring-framework-bom:5.2.12.RELEASE
@@ -14,13 +14,13 @@ 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-SR11
io.spring.javaformat:spring-javaformat-checkstyle:0.0.24
io.projectreactor:reactor-bom:Dysprosium-SR16
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.3.72
org.springframework.data:spring-data-releasetrain:Neumann-SR3
org.springframework:spring-framework-bom:5.2.8.RELEASE
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.springframework.data:spring-data-releasetrain:Neumann-SR6
org.springframework:spring-framework-bom:5.2.12.RELEASE
@@ -1,14 +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-SR11
org.aspectj:aspectjrt:1.9.3
org.jetbrains.kotlin:kotlin-bom:1.3.72
org.springframework.data:spring-data-releasetrain:Neumann-SR3
org.springframework:spring-aop:5.2.8.RELEASE
org.springframework:spring-beans:5.2.8.RELEASE
org.springframework:spring-context:5.2.8.RELEASE
org.springframework:spring-core:5.2.8.RELEASE
org.springframework:spring-expression:5.2.8.RELEASE
org.springframework:spring-framework-bom:5.2.8.RELEASE
org.springframework:spring-jcl:5.2.8.RELEASE
io.projectreactor:reactor-bom:Dysprosium-SR16
org.aspectj:aspectjrt:1.9.6
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.springframework.data:spring-data-releasetrain:Neumann-SR6
org.springframework:spring-aop:5.2.12.RELEASE
org.springframework:spring-beans:5.2.12.RELEASE
org.springframework:spring-context:5.2.12.RELEASE
org.springframework:spring-core:5.2.12.RELEASE
org.springframework:spring-expression:5.2.12.RELEASE
org.springframework:spring-framework-bom:5.2.12.RELEASE
org.springframework:spring-jcl:5.2.12.RELEASE
@@ -1,14 +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-SR11
org.aspectj:aspectjrt:1.9.3
org.jetbrains.kotlin:kotlin-bom:1.3.72
org.springframework.data:spring-data-releasetrain:Neumann-SR3
org.springframework:spring-aop:5.2.8.RELEASE
org.springframework:spring-beans:5.2.8.RELEASE
org.springframework:spring-context:5.2.8.RELEASE
org.springframework:spring-core:5.2.8.RELEASE
org.springframework:spring-expression:5.2.8.RELEASE
org.springframework:spring-framework-bom:5.2.8.RELEASE
org.springframework:spring-jcl:5.2.8.RELEASE
io.projectreactor:reactor-bom:Dysprosium-SR16
org.aspectj:aspectjrt:1.9.6
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.springframework.data:spring-data-releasetrain:Neumann-SR6
org.springframework:spring-aop:5.2.12.RELEASE
org.springframework:spring-beans:5.2.12.RELEASE
org.springframework:spring-context:5.2.12.RELEASE
org.springframework:spring-core:5.2.12.RELEASE
org.springframework:spring-expression:5.2.12.RELEASE
org.springframework:spring-framework-bom:5.2.12.RELEASE
org.springframework:spring-jcl:5.2.12.RELEASE
@@ -1,7 +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-SR11
org.jetbrains.kotlin:kotlin-bom:1.3.72
org.springframework.data:spring-data-releasetrain:Neumann-SR3
org.springframework:spring-framework-bom:5.2.8.RELEASE
io.projectreactor:reactor-bom:Dysprosium-SR16
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.springframework.data:spring-data-releasetrain:Neumann-SR6
org.springframework:spring-framework-bom:5.2.12.RELEASE
@@ -1,14 +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-SR11
org.aspectj:aspectjrt:1.9.3
org.jetbrains.kotlin:kotlin-bom:1.3.72
org.springframework.data:spring-data-releasetrain:Neumann-SR3
org.springframework:spring-aop:5.2.8.RELEASE
org.springframework:spring-beans:5.2.8.RELEASE
org.springframework:spring-context:5.2.8.RELEASE
org.springframework:spring-core:5.2.8.RELEASE
org.springframework:spring-expression:5.2.8.RELEASE
org.springframework:spring-framework-bom:5.2.8.RELEASE
org.springframework:spring-jcl:5.2.8.RELEASE
io.projectreactor:reactor-bom:Dysprosium-SR16
org.aspectj:aspectjrt:1.9.6
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.springframework.data:spring-data-releasetrain:Neumann-SR6
org.springframework:spring-aop:5.2.12.RELEASE
org.springframework:spring-beans:5.2.12.RELEASE
org.springframework:spring-context:5.2.12.RELEASE
org.springframework:spring-core:5.2.12.RELEASE
org.springframework:spring-expression:5.2.12.RELEASE
org.springframework:spring-framework-bom:5.2.12.RELEASE
org.springframework:spring-jcl:5.2.12.RELEASE
@@ -1,7 +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-SR11
org.jetbrains.kotlin:kotlin-bom:1.3.72
org.springframework.data:spring-data-releasetrain:Neumann-SR3
org.springframework:spring-framework-bom:5.2.8.RELEASE
io.projectreactor:reactor-bom:Dysprosium-SR16
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.springframework.data:spring-data-releasetrain:Neumann-SR6
org.springframework:spring-framework-bom:5.2.12.RELEASE
@@ -1,8 +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-SR11
io.projectreactor:reactor-bom:Dysprosium-SR16
org.jacoco:org.jacoco.agent:0.8.2
org.jetbrains.kotlin:kotlin-bom:1.3.72
org.springframework.data:spring-data-releasetrain:Neumann-SR3
org.springframework:spring-framework-bom:5.2.8.RELEASE
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.springframework.data:spring-data-releasetrain:Neumann-SR6
org.springframework:spring-framework-bom:5.2.12.RELEASE
@@ -1,15 +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-SR11
io.projectreactor:reactor-bom:Dysprosium-SR16
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.3.72
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-SR3
org.springframework:spring-framework-bom:5.2.8.RELEASE
org.springframework.data:spring-data-releasetrain:Neumann-SR6
org.springframework:spring-framework-bom:5.2.12.RELEASE
@@ -1,7 +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-SR11
org.jetbrains.kotlin:kotlin-bom:1.3.72
org.springframework.data:spring-data-releasetrain:Neumann-SR3
org.springframework:spring-framework-bom:5.2.8.RELEASE
io.projectreactor:reactor-bom:Dysprosium-SR16
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.springframework.data:spring-data-releasetrain:Neumann-SR6
org.springframework:spring-framework-bom:5.2.12.RELEASE
@@ -1,7 +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-SR11
org.jetbrains.kotlin:kotlin-bom:1.3.72
org.springframework.data:spring-data-releasetrain:Neumann-SR3
org.springframework:spring-framework-bom:5.2.8.RELEASE
io.projectreactor:reactor-bom:Dysprosium-SR16
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.springframework.data:spring-data-releasetrain:Neumann-SR6
org.springframework:spring-framework-bom:5.2.12.RELEASE
@@ -1,7 +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-SR11
org.jetbrains.kotlin:kotlin-bom:1.3.72
org.springframework.data:spring-data-releasetrain:Neumann-SR3
org.springframework:spring-framework-bom:5.2.8.RELEASE
io.projectreactor:reactor-bom:Dysprosium-SR16
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.springframework.data:spring-data-releasetrain:Neumann-SR6
org.springframework:spring-framework-bom:5.2.12.RELEASE
@@ -1,14 +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-SR11
org.aspectj:aspectjrt:1.9.3
org.jetbrains.kotlin:kotlin-bom:1.3.72
org.springframework.data:spring-data-releasetrain:Neumann-SR3
org.springframework:spring-aop:5.2.8.RELEASE
org.springframework:spring-beans:5.2.8.RELEASE
org.springframework:spring-context:5.2.8.RELEASE
org.springframework:spring-core:5.2.8.RELEASE
org.springframework:spring-expression:5.2.8.RELEASE
org.springframework:spring-framework-bom:5.2.8.RELEASE
org.springframework:spring-jcl:5.2.8.RELEASE
io.projectreactor:reactor-bom:Dysprosium-SR16
org.aspectj:aspectjrt:1.9.6
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.springframework.data:spring-data-releasetrain:Neumann-SR6
org.springframework:spring-aop:5.2.12.RELEASE
org.springframework:spring-beans:5.2.12.RELEASE
org.springframework:spring-context:5.2.12.RELEASE
org.springframework:spring-core:5.2.12.RELEASE
org.springframework:spring-expression:5.2.12.RELEASE
org.springframework:spring-framework-bom:5.2.12.RELEASE
org.springframework:spring-jcl:5.2.12.RELEASE
@@ -1,14 +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-SR11
org.aspectj:aspectjrt:1.9.3
org.jetbrains.kotlin:kotlin-bom:1.3.72
org.springframework.data:spring-data-releasetrain:Neumann-SR3
org.springframework:spring-aop:5.2.8.RELEASE
org.springframework:spring-beans:5.2.8.RELEASE
org.springframework:spring-context:5.2.8.RELEASE
org.springframework:spring-core:5.2.8.RELEASE
org.springframework:spring-expression:5.2.8.RELEASE
org.springframework:spring-framework-bom:5.2.8.RELEASE
org.springframework:spring-jcl:5.2.8.RELEASE
io.projectreactor:reactor-bom:Dysprosium-SR16
org.aspectj:aspectjrt:1.9.6
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.springframework.data:spring-data-releasetrain:Neumann-SR6
org.springframework:spring-aop:5.2.12.RELEASE
org.springframework:spring-beans:5.2.12.RELEASE
org.springframework:spring-context:5.2.12.RELEASE
org.springframework:spring-core:5.2.12.RELEASE
org.springframework:spring-expression:5.2.12.RELEASE
org.springframework:spring-framework-bom:5.2.12.RELEASE
org.springframework:spring-jcl:5.2.12.RELEASE
@@ -1,7 +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-SR11
org.jetbrains.kotlin:kotlin-bom:1.3.72
org.springframework.data:spring-data-releasetrain:Neumann-SR3
org.springframework:spring-framework-bom:5.2.8.RELEASE
io.projectreactor:reactor-bom:Dysprosium-SR16
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.springframework.data:spring-data-releasetrain:Neumann-SR6
org.springframework:spring-framework-bom:5.2.12.RELEASE
@@ -1,7 +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-SR11
org.jetbrains.kotlin:kotlin-bom:1.3.72
org.springframework.data:spring-data-releasetrain:Neumann-SR3
org.springframework:spring-framework-bom:5.2.8.RELEASE
io.projectreactor:reactor-bom:Dysprosium-SR16
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.springframework.data:spring-data-releasetrain:Neumann-SR6
org.springframework:spring-framework-bom:5.2.12.RELEASE
@@ -1,7 +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-SR11
org.jetbrains.kotlin:kotlin-bom:1.3.72
org.springframework.data:spring-data-releasetrain:Neumann-SR3
org.springframework:spring-framework-bom:5.2.8.RELEASE
io.projectreactor:reactor-bom:Dysprosium-SR16
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.springframework.data:spring-data-releasetrain:Neumann-SR6
org.springframework:spring-framework-bom:5.2.12.RELEASE
@@ -1,7 +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-SR11
org.jetbrains.kotlin:kotlin-bom:1.3.72
org.springframework.data:spring-data-releasetrain:Neumann-SR3
org.springframework:spring-framework-bom:5.2.8.RELEASE
io.projectreactor:reactor-bom:Dysprosium-SR16
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.springframework.data:spring-data-releasetrain:Neumann-SR6
org.springframework:spring-framework-bom:5.2.12.RELEASE
@@ -1,22 +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-SR11
io.projectreactor:reactor-bom:Dysprosium-SR16
junit:junit:4.12
net.bytebuddy:byte-buddy-agent:1.10.5
net.bytebuddy:byte-buddy:1.10.5
org.aspectj:aspectjrt:1.9.3
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.3.72
org.mockito:mockito-core:3.3.3
org.objenesis:objenesis:2.6
org.springframework.data:spring-data-releasetrain:Neumann-SR3
org.springframework:spring-aop:5.2.8.RELEASE
org.springframework:spring-beans:5.2.8.RELEASE
org.springframework:spring-context:5.2.8.RELEASE
org.springframework:spring-core:5.2.8.RELEASE
org.springframework:spring-expression:5.2.8.RELEASE
org.springframework:spring-framework-bom:5.2.8.RELEASE
org.springframework:spring-jcl:5.2.8.RELEASE
org.springframework:spring-test:5.2.8.RELEASE
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-SR6
org.springframework:spring-aop:5.2.12.RELEASE
org.springframework:spring-beans:5.2.12.RELEASE
org.springframework:spring-context:5.2.12.RELEASE
org.springframework:spring-core:5.2.12.RELEASE
org.springframework:spring-expression:5.2.12.RELEASE
org.springframework:spring-framework-bom:5.2.12.RELEASE
org.springframework:spring-jcl:5.2.12.RELEASE
org.springframework:spring-test:5.2.12.RELEASE
@@ -1,22 +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-SR11
io.projectreactor:reactor-bom:Dysprosium-SR16
junit:junit:4.12
net.bytebuddy:byte-buddy-agent:1.10.5
net.bytebuddy:byte-buddy:1.10.5
org.aspectj:aspectjrt:1.9.3
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.3.72
org.mockito:mockito-core:3.3.3
org.objenesis:objenesis:2.6
org.springframework.data:spring-data-releasetrain:Neumann-SR3
org.springframework:spring-aop:5.2.8.RELEASE
org.springframework:spring-beans:5.2.8.RELEASE
org.springframework:spring-context:5.2.8.RELEASE
org.springframework:spring-core:5.2.8.RELEASE
org.springframework:spring-expression:5.2.8.RELEASE
org.springframework:spring-framework-bom:5.2.8.RELEASE
org.springframework:spring-jcl:5.2.8.RELEASE
org.springframework:spring-test:5.2.8.RELEASE
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-SR6
org.springframework:spring-aop:5.2.12.RELEASE
org.springframework:spring-beans:5.2.12.RELEASE
org.springframework:spring-context:5.2.12.RELEASE
org.springframework:spring-core:5.2.12.RELEASE
org.springframework:spring-expression:5.2.12.RELEASE
org.springframework:spring-framework-bom:5.2.12.RELEASE
org.springframework:spring-jcl:5.2.12.RELEASE
org.springframework:spring-test:5.2.12.RELEASE
@@ -1,7 +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-SR11
org.jetbrains.kotlin:kotlin-bom:1.3.72
org.springframework.data:spring-data-releasetrain:Neumann-SR3
org.springframework:spring-framework-bom:5.2.8.RELEASE
io.projectreactor:reactor-bom:Dysprosium-SR16
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.springframework.data:spring-data-releasetrain:Neumann-SR6
org.springframework:spring-framework-bom:5.2.12.RELEASE
@@ -1,7 +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-SR11
org.jetbrains.kotlin:kotlin-bom:1.3.72
org.springframework.data:spring-data-releasetrain:Neumann-SR3
org.springframework:spring-framework-bom:5.2.8.RELEASE
io.projectreactor:reactor-bom:Dysprosium-SR16
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.springframework.data:spring-data-releasetrain:Neumann-SR6
org.springframework:spring-framework-bom:5.2.12.RELEASE
@@ -1,22 +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-SR11
io.projectreactor:reactor-bom:Dysprosium-SR16
junit:junit:4.12
net.bytebuddy:byte-buddy-agent:1.10.5
net.bytebuddy:byte-buddy:1.10.5
org.aspectj:aspectjrt:1.9.3
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.3.72
org.mockito:mockito-core:3.3.3
org.objenesis:objenesis:2.6
org.springframework.data:spring-data-releasetrain:Neumann-SR3
org.springframework:spring-aop:5.2.8.RELEASE
org.springframework:spring-beans:5.2.8.RELEASE
org.springframework:spring-context:5.2.8.RELEASE
org.springframework:spring-core:5.2.8.RELEASE
org.springframework:spring-expression:5.2.8.RELEASE
org.springframework:spring-framework-bom:5.2.8.RELEASE
org.springframework:spring-jcl:5.2.8.RELEASE
org.springframework:spring-test:5.2.8.RELEASE
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-SR6
org.springframework:spring-aop:5.2.12.RELEASE
org.springframework:spring-beans:5.2.12.RELEASE
org.springframework:spring-context:5.2.12.RELEASE
org.springframework:spring-core:5.2.12.RELEASE
org.springframework:spring-expression:5.2.12.RELEASE
org.springframework:spring-framework-bom:5.2.12.RELEASE
org.springframework:spring-jcl:5.2.12.RELEASE
org.springframework:spring-test:5.2.12.RELEASE
@@ -1,22 +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-SR11
io.projectreactor:reactor-bom:Dysprosium-SR16
junit:junit:4.12
net.bytebuddy:byte-buddy-agent:1.10.5
net.bytebuddy:byte-buddy:1.10.5
org.aspectj:aspectjrt:1.9.3
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.3.72
org.mockito:mockito-core:3.3.3
org.objenesis:objenesis:2.6
org.springframework.data:spring-data-releasetrain:Neumann-SR3
org.springframework:spring-aop:5.2.8.RELEASE
org.springframework:spring-beans:5.2.8.RELEASE
org.springframework:spring-context:5.2.8.RELEASE
org.springframework:spring-core:5.2.8.RELEASE
org.springframework:spring-expression:5.2.8.RELEASE
org.springframework:spring-framework-bom:5.2.8.RELEASE
org.springframework:spring-jcl:5.2.8.RELEASE
org.springframework:spring-test:5.2.8.RELEASE
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-SR6
org.springframework:spring-aop:5.2.12.RELEASE
org.springframework:spring-beans:5.2.12.RELEASE
org.springframework:spring-context:5.2.12.RELEASE
org.springframework:spring-core:5.2.12.RELEASE
org.springframework:spring-expression:5.2.12.RELEASE
org.springframework:spring-framework-bom:5.2.12.RELEASE
org.springframework:spring-jcl:5.2.12.RELEASE
org.springframework:spring-test:5.2.12.RELEASE
+16 -16
View File
@@ -1,22 +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-SR11
io.projectreactor:reactor-bom:Dysprosium-SR16
junit:junit:4.12
net.bytebuddy:byte-buddy-agent:1.10.5
net.bytebuddy:byte-buddy:1.10.5
org.aspectj:aspectjrt:1.9.3
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.3.72
org.mockito:mockito-core:3.3.3
org.objenesis:objenesis:2.6
org.springframework.data:spring-data-releasetrain:Neumann-SR3
org.springframework:spring-aop:5.2.8.RELEASE
org.springframework:spring-beans:5.2.8.RELEASE
org.springframework:spring-context:5.2.8.RELEASE
org.springframework:spring-core:5.2.8.RELEASE
org.springframework:spring-expression:5.2.8.RELEASE
org.springframework:spring-framework-bom:5.2.8.RELEASE
org.springframework:spring-jcl:5.2.8.RELEASE
org.springframework:spring-test:5.2.8.RELEASE
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-SR6
org.springframework:spring-aop:5.2.12.RELEASE
org.springframework:spring-beans:5.2.12.RELEASE
org.springframework:spring-context:5.2.12.RELEASE
org.springframework:spring-core:5.2.12.RELEASE
org.springframework:spring-expression:5.2.12.RELEASE
org.springframework:spring-framework-bom:5.2.12.RELEASE
org.springframework:spring-jcl:5.2.12.RELEASE
org.springframework:spring-test:5.2.12.RELEASE
@@ -49,7 +49,7 @@ import org.springframework.security.authentication.TestingAuthenticationToken;
import org.springframework.security.core.context.SecurityContextHolder;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.fail;
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
/**
* @author Luke Taylor
@@ -98,9 +98,10 @@ public class AnnotationSecurityAspectTests {
this.secured.securedMethod();
}
@Test(expected = AuthenticationCredentialsNotFoundException.class)
@Test
public void securedClassMethodDeniesUnauthenticatedAccess() {
this.secured.securedClassMethod();
assertThatExceptionOfType(AuthenticationCredentialsNotFoundException.class)
.isThrownBy(() -> this.secured.securedClassMethod());
}
@Test
@@ -109,22 +110,17 @@ public class AnnotationSecurityAspectTests {
this.secured.securedClassMethod();
}
@Test(expected = AccessDeniedException.class)
@Test
public void internalPrivateCallIsIntercepted() {
SecurityContextHolder.getContext().setAuthentication(this.anne);
try {
this.secured.publicCallsPrivate();
fail("Expected AccessDeniedException");
}
catch (AccessDeniedException expected) {
}
this.securedSub.publicCallsPrivate();
assertThatExceptionOfType(AccessDeniedException.class).isThrownBy(() -> this.secured.publicCallsPrivate());
assertThatExceptionOfType(AccessDeniedException.class).isThrownBy(() -> this.securedSub.publicCallsPrivate());
}
@Test(expected = AccessDeniedException.class)
@Test
public void protectedMethodIsIntercepted() {
SecurityContextHolder.getContext().setAuthentication(this.anne);
this.secured.protectedMethod();
assertThatExceptionOfType(AccessDeniedException.class).isThrownBy(() -> this.secured.protectedMethod());
}
@Test
@@ -134,11 +130,11 @@ public class AnnotationSecurityAspectTests {
}
// SEC-1262
@Test(expected = AccessDeniedException.class)
@Test
public void denyAllPreAuthorizeDeniesAccess() {
configureForElAnnotations();
SecurityContextHolder.getContext().setAuthentication(this.anne);
this.prePostSecured.denyAllMethod();
assertThatExceptionOfType(AccessDeniedException.class).isThrownBy(this.prePostSecured::denyAllMethod);
}
@Test
+17 -2
View File
@@ -1,6 +1,6 @@
buildscript {
dependencies {
classpath 'io.spring.gradle:spring-build-conventions:0.0.33.RELEASE'
classpath 'io.spring.gradle:spring-build-conventions:0.0.37'
classpath "io.spring.javaformat:spring-javaformat-gradle-plugin:$springJavaformatVersion"
classpath "org.springframework.boot:spring-boot-gradle-plugin:$springBootVersion"
classpath 'io.spring.nohttp:nohttp-gradle:0.0.5.RELEASE'
@@ -8,7 +8,15 @@ buildscript {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
}
repositories {
maven { url 'https://repo.spring.io/plugins-snapshot' }
maven {
url = 'https://repo.spring.io/plugins-snapshot'
if (project.hasProperty('artifactoryUsername')) {
credentials {
username "$artifactoryUsername"
password "$artifactoryPassword"
}
}
}
maven { url 'https://plugins.gradle.org/m2/' }
}
}
@@ -66,6 +74,13 @@ allprojects {
}
}
if (hasProperty('buildScan')) {
buildScan {
termsOfServiceUrl = 'https://gradle.com/terms-of-service'
termsOfServiceAgree = 'yes'
}
}
nohttp {
allowlistFile = project.file("etc/nohttp/allowlist.lines")
}
@@ -1,7 +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-SR11
org.jetbrains.kotlin:kotlin-bom:1.3.72
org.springframework.data:spring-data-releasetrain:Neumann-SR3
org.springframework:spring-framework-bom:5.2.8.RELEASE
io.projectreactor:reactor-bom:Dysprosium-SR16
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.springframework.data:spring-data-releasetrain:Neumann-SR6
org.springframework:spring-framework-bom:5.2.12.RELEASE
@@ -1,7 +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-SR11
org.jetbrains.kotlin:kotlin-bom:1.3.72
org.springframework.data:spring-data-releasetrain:Neumann-SR3
org.springframework:spring-framework-bom:5.2.8.RELEASE
io.projectreactor:reactor-bom:Dysprosium-SR16
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.springframework.data:spring-data-releasetrain:Neumann-SR6
org.springframework:spring-framework-bom:5.2.12.RELEASE
@@ -14,13 +14,13 @@ 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-SR11
io.spring.javaformat:spring-javaformat-checkstyle:0.0.24
io.projectreactor:reactor-bom:Dysprosium-SR16
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.3.72
org.springframework.data:spring-data-releasetrain:Neumann-SR3
org.springframework:spring-framework-bom:5.2.8.RELEASE
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.springframework.data:spring-data-releasetrain:Neumann-SR6
org.springframework:spring-framework-bom:5.2.12.RELEASE
+16 -16
View File
@@ -1,22 +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.
com.fasterxml.jackson.core:jackson-annotations:2.11.2
com.fasterxml.jackson.core:jackson-core:2.11.2
com.fasterxml.jackson.core:jackson-databind:2.11.2
commons-codec:commons-codec:1.14
io.projectreactor:reactor-bom:Dysprosium-SR11
com.fasterxml.jackson.core:jackson-annotations:2.11.4
com.fasterxml.jackson.core:jackson-core:2.11.4
com.fasterxml.jackson.core:jackson-databind:2.11.4
commons-codec:commons-codec:1.15
io.projectreactor:reactor-bom:Dysprosium-SR16
org.bouncycastle:bcpkix-jdk15on:1.66
org.bouncycastle:bcprov-jdk15on:1.66
org.jasig.cas.client:cas-client-core:3.6.1
org.jetbrains.kotlin:kotlin-bom:1.3.72
org.jasig.cas.client:cas-client-core:3.6.2
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.slf4j:slf4j-api:1.7.30
org.springframework.data:spring-data-releasetrain:Neumann-SR3
org.springframework:spring-aop:5.2.8.RELEASE
org.springframework:spring-beans:5.2.8.RELEASE
org.springframework:spring-context:5.2.8.RELEASE
org.springframework:spring-core:5.2.8.RELEASE
org.springframework:spring-expression:5.2.8.RELEASE
org.springframework:spring-framework-bom:5.2.8.RELEASE
org.springframework:spring-jcl:5.2.8.RELEASE
org.springframework:spring-web:5.2.8.RELEASE
org.springframework.data:spring-data-releasetrain:Neumann-SR6
org.springframework:spring-aop:5.2.12.RELEASE
org.springframework:spring-beans:5.2.12.RELEASE
org.springframework:spring-context:5.2.12.RELEASE
org.springframework:spring-core:5.2.12.RELEASE
org.springframework:spring-expression:5.2.12.RELEASE
org.springframework:spring-framework-bom:5.2.12.RELEASE
org.springframework:spring-jcl:5.2.12.RELEASE
org.springframework:spring-web:5.2.12.RELEASE
@@ -1,22 +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.
com.fasterxml.jackson.core:jackson-annotations:2.11.2
com.fasterxml.jackson.core:jackson-core:2.11.2
com.fasterxml.jackson.core:jackson-databind:2.11.2
commons-codec:commons-codec:1.14
io.projectreactor:reactor-bom:Dysprosium-SR11
com.fasterxml.jackson.core:jackson-annotations:2.11.4
com.fasterxml.jackson.core:jackson-core:2.11.4
com.fasterxml.jackson.core:jackson-databind:2.11.4
commons-codec:commons-codec:1.15
io.projectreactor:reactor-bom:Dysprosium-SR16
org.bouncycastle:bcpkix-jdk15on:1.66
org.bouncycastle:bcprov-jdk15on:1.66
org.jasig.cas.client:cas-client-core:3.6.1
org.jetbrains.kotlin:kotlin-bom:1.3.72
org.jasig.cas.client:cas-client-core:3.6.2
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.slf4j:slf4j-api:1.7.30
org.springframework.data:spring-data-releasetrain:Neumann-SR3
org.springframework:spring-aop:5.2.8.RELEASE
org.springframework:spring-beans:5.2.8.RELEASE
org.springframework:spring-context:5.2.8.RELEASE
org.springframework:spring-core:5.2.8.RELEASE
org.springframework:spring-expression:5.2.8.RELEASE
org.springframework:spring-framework-bom:5.2.8.RELEASE
org.springframework:spring-jcl:5.2.8.RELEASE
org.springframework:spring-web:5.2.8.RELEASE
org.springframework.data:spring-data-releasetrain:Neumann-SR6
org.springframework:spring-aop:5.2.12.RELEASE
org.springframework:spring-beans:5.2.12.RELEASE
org.springframework:spring-context:5.2.12.RELEASE
org.springframework:spring-core:5.2.12.RELEASE
org.springframework:spring-expression:5.2.12.RELEASE
org.springframework:spring-framework-bom:5.2.12.RELEASE
org.springframework:spring-jcl:5.2.12.RELEASE
org.springframework:spring-web:5.2.12.RELEASE
@@ -1,7 +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-SR11
org.jetbrains.kotlin:kotlin-bom:1.3.72
org.springframework.data:spring-data-releasetrain:Neumann-SR3
org.springframework:spring-framework-bom:5.2.8.RELEASE
io.projectreactor:reactor-bom:Dysprosium-SR16
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.springframework.data:spring-data-releasetrain:Neumann-SR6
org.springframework:spring-framework-bom:5.2.12.RELEASE
+16 -16
View File
@@ -1,22 +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.
com.fasterxml.jackson.core:jackson-annotations:2.11.2
com.fasterxml.jackson.core:jackson-core:2.11.2
com.fasterxml.jackson.core:jackson-databind:2.11.2
commons-codec:commons-codec:1.14
io.projectreactor:reactor-bom:Dysprosium-SR11
com.fasterxml.jackson.core:jackson-annotations:2.11.4
com.fasterxml.jackson.core:jackson-core:2.11.4
com.fasterxml.jackson.core:jackson-databind:2.11.4
commons-codec:commons-codec:1.15
io.projectreactor:reactor-bom:Dysprosium-SR16
org.bouncycastle:bcpkix-jdk15on:1.66
org.bouncycastle:bcprov-jdk15on:1.66
org.jasig.cas.client:cas-client-core:3.6.1
org.jetbrains.kotlin:kotlin-bom:1.3.72
org.jasig.cas.client:cas-client-core:3.6.2
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.slf4j:slf4j-api:1.7.30
org.springframework.data:spring-data-releasetrain:Neumann-SR3
org.springframework:spring-aop:5.2.8.RELEASE
org.springframework:spring-beans:5.2.8.RELEASE
org.springframework:spring-context:5.2.8.RELEASE
org.springframework:spring-core:5.2.8.RELEASE
org.springframework:spring-expression:5.2.8.RELEASE
org.springframework:spring-framework-bom:5.2.8.RELEASE
org.springframework:spring-jcl:5.2.8.RELEASE
org.springframework:spring-web:5.2.8.RELEASE
org.springframework.data:spring-data-releasetrain:Neumann-SR6
org.springframework:spring-aop:5.2.12.RELEASE
org.springframework:spring-beans:5.2.12.RELEASE
org.springframework:spring-context:5.2.12.RELEASE
org.springframework:spring-core:5.2.12.RELEASE
org.springframework:spring-expression:5.2.12.RELEASE
org.springframework:spring-framework-bom:5.2.12.RELEASE
org.springframework:spring-jcl:5.2.12.RELEASE
org.springframework:spring-web:5.2.12.RELEASE
@@ -1,8 +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-SR11
io.projectreactor:reactor-bom:Dysprosium-SR16
org.jacoco:org.jacoco.agent:0.8.2
org.jetbrains.kotlin:kotlin-bom:1.3.72
org.springframework.data:spring-data-releasetrain:Neumann-SR3
org.springframework:spring-framework-bom:5.2.8.RELEASE
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.springframework.data:spring-data-releasetrain:Neumann-SR6
org.springframework:spring-framework-bom:5.2.12.RELEASE
@@ -1,15 +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-SR11
io.projectreactor:reactor-bom:Dysprosium-SR16
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.3.72
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-SR3
org.springframework:spring-framework-bom:5.2.8.RELEASE
org.springframework.data:spring-data-releasetrain:Neumann-SR6
org.springframework:spring-framework-bom:5.2.12.RELEASE
+4 -4
View File
@@ -1,7 +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-SR11
org.jetbrains.kotlin:kotlin-bom:1.3.72
org.springframework.data:spring-data-releasetrain:Neumann-SR3
org.springframework:spring-framework-bom:5.2.8.RELEASE
io.projectreactor:reactor-bom:Dysprosium-SR16
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.springframework.data:spring-data-releasetrain:Neumann-SR6
org.springframework:spring-framework-bom:5.2.12.RELEASE
@@ -1,12 +1,12 @@
# 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.
com.fasterxml.jackson.core:jackson-annotations:2.11.2
com.fasterxml.jackson.core:jackson-core:2.11.2
com.fasterxml.jackson.core:jackson-databind:2.11.2
io.projectreactor:reactor-bom:Dysprosium-SR11
com.fasterxml.jackson.core:jackson-annotations:2.11.4
com.fasterxml.jackson.core:jackson-core:2.11.4
com.fasterxml.jackson.core:jackson-databind:2.11.4
io.projectreactor:reactor-bom:Dysprosium-SR16
net.sf.ehcache:ehcache:2.10.6
org.jetbrains.kotlin:kotlin-bom:1.3.72
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.slf4j:slf4j-api:1.7.30
org.springframework.data:spring-data-releasetrain:Neumann-SR3
org.springframework:spring-framework-bom:5.2.8.RELEASE
org.springframework.data:spring-data-releasetrain:Neumann-SR6
org.springframework:spring-framework-bom:5.2.12.RELEASE
@@ -1,8 +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-SR11
io.projectreactor:reactor-bom:Dysprosium-SR16
javax.servlet:javax.servlet-api:4.0.1
org.jetbrains.kotlin:kotlin-bom:1.3.72
org.springframework.data:spring-data-releasetrain:Neumann-SR3
org.springframework:spring-framework-bom:5.2.8.RELEASE
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.springframework.data:spring-data-releasetrain:Neumann-SR6
org.springframework:spring-framework-bom:5.2.12.RELEASE
+16 -16
View File
@@ -1,22 +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.
com.fasterxml.jackson.core:jackson-annotations:2.11.2
com.fasterxml.jackson.core:jackson-core:2.11.2
com.fasterxml.jackson.core:jackson-databind:2.11.2
commons-codec:commons-codec:1.14
io.projectreactor:reactor-bom:Dysprosium-SR11
com.fasterxml.jackson.core:jackson-annotations:2.11.4
com.fasterxml.jackson.core:jackson-core:2.11.4
com.fasterxml.jackson.core:jackson-databind:2.11.4
commons-codec:commons-codec:1.15
io.projectreactor:reactor-bom:Dysprosium-SR16
org.bouncycastle:bcpkix-jdk15on:1.66
org.bouncycastle:bcprov-jdk15on:1.66
org.jasig.cas.client:cas-client-core:3.6.1
org.jetbrains.kotlin:kotlin-bom:1.3.72
org.jasig.cas.client:cas-client-core:3.6.2
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.slf4j:slf4j-api:1.7.30
org.springframework.data:spring-data-releasetrain:Neumann-SR3
org.springframework:spring-aop:5.2.8.RELEASE
org.springframework:spring-beans:5.2.8.RELEASE
org.springframework:spring-context:5.2.8.RELEASE
org.springframework:spring-core:5.2.8.RELEASE
org.springframework:spring-expression:5.2.8.RELEASE
org.springframework:spring-framework-bom:5.2.8.RELEASE
org.springframework:spring-jcl:5.2.8.RELEASE
org.springframework:spring-web:5.2.8.RELEASE
org.springframework.data:spring-data-releasetrain:Neumann-SR6
org.springframework:spring-aop:5.2.12.RELEASE
org.springframework:spring-beans:5.2.12.RELEASE
org.springframework:spring-context:5.2.12.RELEASE
org.springframework:spring-core:5.2.12.RELEASE
org.springframework:spring-expression:5.2.12.RELEASE
org.springframework:spring-framework-bom:5.2.12.RELEASE
org.springframework:spring-jcl:5.2.12.RELEASE
org.springframework:spring-web:5.2.12.RELEASE
@@ -1,22 +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.
com.fasterxml.jackson.core:jackson-annotations:2.11.2
com.fasterxml.jackson.core:jackson-core:2.11.2
com.fasterxml.jackson.core:jackson-databind:2.11.2
commons-codec:commons-codec:1.14
io.projectreactor:reactor-bom:Dysprosium-SR11
com.fasterxml.jackson.core:jackson-annotations:2.11.4
com.fasterxml.jackson.core:jackson-core:2.11.4
com.fasterxml.jackson.core:jackson-databind:2.11.4
commons-codec:commons-codec:1.15
io.projectreactor:reactor-bom:Dysprosium-SR16
org.bouncycastle:bcpkix-jdk15on:1.66
org.bouncycastle:bcprov-jdk15on:1.66
org.jasig.cas.client:cas-client-core:3.6.1
org.jetbrains.kotlin:kotlin-bom:1.3.72
org.jasig.cas.client:cas-client-core:3.6.2
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.slf4j:slf4j-api:1.7.30
org.springframework.data:spring-data-releasetrain:Neumann-SR3
org.springframework:spring-aop:5.2.8.RELEASE
org.springframework:spring-beans:5.2.8.RELEASE
org.springframework:spring-context:5.2.8.RELEASE
org.springframework:spring-core:5.2.8.RELEASE
org.springframework:spring-expression:5.2.8.RELEASE
org.springframework:spring-framework-bom:5.2.8.RELEASE
org.springframework:spring-jcl:5.2.8.RELEASE
org.springframework:spring-web:5.2.8.RELEASE
org.springframework.data:spring-data-releasetrain:Neumann-SR6
org.springframework:spring-aop:5.2.12.RELEASE
org.springframework:spring-beans:5.2.12.RELEASE
org.springframework:spring-context:5.2.12.RELEASE
org.springframework:spring-core:5.2.12.RELEASE
org.springframework:spring-expression:5.2.12.RELEASE
org.springframework:spring-framework-bom:5.2.12.RELEASE
org.springframework:spring-jcl:5.2.12.RELEASE
org.springframework:spring-web:5.2.12.RELEASE
@@ -1,7 +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-SR11
org.jetbrains.kotlin:kotlin-bom:1.3.72
org.springframework.data:spring-data-releasetrain:Neumann-SR3
org.springframework:spring-framework-bom:5.2.8.RELEASE
io.projectreactor:reactor-bom:Dysprosium-SR16
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.springframework.data:spring-data-releasetrain:Neumann-SR6
org.springframework:spring-framework-bom:5.2.12.RELEASE
@@ -1,7 +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-SR11
org.jetbrains.kotlin:kotlin-bom:1.3.72
org.springframework.data:spring-data-releasetrain:Neumann-SR3
org.springframework:spring-framework-bom:5.2.8.RELEASE
io.projectreactor:reactor-bom:Dysprosium-SR16
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.springframework.data:spring-data-releasetrain:Neumann-SR6
org.springframework:spring-framework-bom:5.2.12.RELEASE
@@ -1,7 +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-SR11
org.jetbrains.kotlin:kotlin-bom:1.3.72
org.springframework.data:spring-data-releasetrain:Neumann-SR3
org.springframework:spring-framework-bom:5.2.8.RELEASE
io.projectreactor:reactor-bom:Dysprosium-SR16
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.springframework.data:spring-data-releasetrain:Neumann-SR6
org.springframework:spring-framework-bom:5.2.12.RELEASE
@@ -1,32 +1,32 @@
# 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.
com.fasterxml.jackson.core:jackson-annotations:2.11.2
com.fasterxml.jackson.core:jackson-core:2.11.2
com.fasterxml.jackson.core:jackson-databind:2.11.2
com.fasterxml.jackson.core:jackson-annotations:2.11.4
com.fasterxml.jackson.core:jackson-core:2.11.4
com.fasterxml.jackson.core:jackson-databind:2.11.4
com.vaadin.external.google:android-json:0.0.20131108.vaadin1
commons-codec:commons-codec:1.14
io.projectreactor:reactor-bom:Dysprosium-SR11
commons-codec:commons-codec:1.15
io.projectreactor:reactor-bom:Dysprosium-SR16
junit:junit:4.12
net.bytebuddy:byte-buddy-agent:1.10.5
net.bytebuddy:byte-buddy:1.10.5
net.bytebuddy:byte-buddy-agent:1.10.15
net.bytebuddy:byte-buddy:1.10.15
org.assertj:assertj-core:3.17.2
org.bouncycastle:bcpkix-jdk15on:1.66
org.bouncycastle:bcprov-jdk15on:1.66
org.hamcrest:hamcrest-core:1.3
org.jasig.cas.client:cas-client-core:3.6.1
org.jetbrains.kotlin:kotlin-bom:1.3.72
org.mockito:mockito-core:3.3.3
org.objenesis:objenesis:2.6
org.jasig.cas.client:cas-client-core:3.6.2
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.mockito:mockito-core:3.5.15
org.objenesis:objenesis:3.1
org.skyscreamer:jsonassert:1.5.0
org.slf4j:slf4j-api:1.7.30
org.springframework.data:spring-data-releasetrain:Neumann-SR3
org.springframework:spring-aop:5.2.8.RELEASE
org.springframework:spring-beans:5.2.8.RELEASE
org.springframework:spring-context:5.2.8.RELEASE
org.springframework:spring-core:5.2.8.RELEASE
org.springframework:spring-expression:5.2.8.RELEASE
org.springframework:spring-framework-bom:5.2.8.RELEASE
org.springframework:spring-jcl:5.2.8.RELEASE
org.springframework:spring-test:5.2.8.RELEASE
org.springframework:spring-web:5.2.8.RELEASE
org.springframework.data:spring-data-releasetrain:Neumann-SR6
org.springframework:spring-aop:5.2.12.RELEASE
org.springframework:spring-beans:5.2.12.RELEASE
org.springframework:spring-context:5.2.12.RELEASE
org.springframework:spring-core:5.2.12.RELEASE
org.springframework:spring-expression:5.2.12.RELEASE
org.springframework:spring-framework-bom:5.2.12.RELEASE
org.springframework:spring-jcl:5.2.12.RELEASE
org.springframework:spring-test:5.2.12.RELEASE
org.springframework:spring-web:5.2.12.RELEASE
@@ -1,32 +1,32 @@
# 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.
com.fasterxml.jackson.core:jackson-annotations:2.11.2
com.fasterxml.jackson.core:jackson-core:2.11.2
com.fasterxml.jackson.core:jackson-databind:2.11.2
com.fasterxml.jackson.core:jackson-annotations:2.11.4
com.fasterxml.jackson.core:jackson-core:2.11.4
com.fasterxml.jackson.core:jackson-databind:2.11.4
com.vaadin.external.google:android-json:0.0.20131108.vaadin1
commons-codec:commons-codec:1.14
io.projectreactor:reactor-bom:Dysprosium-SR11
commons-codec:commons-codec:1.15
io.projectreactor:reactor-bom:Dysprosium-SR16
junit:junit:4.12
net.bytebuddy:byte-buddy-agent:1.10.5
net.bytebuddy:byte-buddy:1.10.5
net.bytebuddy:byte-buddy-agent:1.10.15
net.bytebuddy:byte-buddy:1.10.15
org.assertj:assertj-core:3.17.2
org.bouncycastle:bcpkix-jdk15on:1.66
org.bouncycastle:bcprov-jdk15on:1.66
org.hamcrest:hamcrest-core:1.3
org.jasig.cas.client:cas-client-core:3.6.1
org.jetbrains.kotlin:kotlin-bom:1.3.72
org.mockito:mockito-core:3.3.3
org.objenesis:objenesis:2.6
org.jasig.cas.client:cas-client-core:3.6.2
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.mockito:mockito-core:3.5.15
org.objenesis:objenesis:3.1
org.skyscreamer:jsonassert:1.5.0
org.slf4j:slf4j-api:1.7.30
org.springframework.data:spring-data-releasetrain:Neumann-SR3
org.springframework:spring-aop:5.2.8.RELEASE
org.springframework:spring-beans:5.2.8.RELEASE
org.springframework:spring-context:5.2.8.RELEASE
org.springframework:spring-core:5.2.8.RELEASE
org.springframework:spring-expression:5.2.8.RELEASE
org.springframework:spring-framework-bom:5.2.8.RELEASE
org.springframework:spring-jcl:5.2.8.RELEASE
org.springframework:spring-test:5.2.8.RELEASE
org.springframework:spring-web:5.2.8.RELEASE
org.springframework.data:spring-data-releasetrain:Neumann-SR6
org.springframework:spring-aop:5.2.12.RELEASE
org.springframework:spring-beans:5.2.12.RELEASE
org.springframework:spring-context:5.2.12.RELEASE
org.springframework:spring-core:5.2.12.RELEASE
org.springframework:spring-expression:5.2.12.RELEASE
org.springframework:spring-framework-bom:5.2.12.RELEASE
org.springframework:spring-jcl:5.2.12.RELEASE
org.springframework:spring-test:5.2.12.RELEASE
org.springframework:spring-web:5.2.12.RELEASE
@@ -1,7 +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-SR11
org.jetbrains.kotlin:kotlin-bom:1.3.72
org.springframework.data:spring-data-releasetrain:Neumann-SR3
org.springframework:spring-framework-bom:5.2.8.RELEASE
io.projectreactor:reactor-bom:Dysprosium-SR16
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.springframework.data:spring-data-releasetrain:Neumann-SR6
org.springframework:spring-framework-bom:5.2.12.RELEASE
@@ -1,32 +1,32 @@
# 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.
com.fasterxml.jackson.core:jackson-annotations:2.11.2
com.fasterxml.jackson.core:jackson-core:2.11.2
com.fasterxml.jackson.core:jackson-databind:2.11.2
com.fasterxml.jackson.core:jackson-annotations:2.11.4
com.fasterxml.jackson.core:jackson-core:2.11.4
com.fasterxml.jackson.core:jackson-databind:2.11.4
com.vaadin.external.google:android-json:0.0.20131108.vaadin1
commons-codec:commons-codec:1.14
io.projectreactor:reactor-bom:Dysprosium-SR11
commons-codec:commons-codec:1.15
io.projectreactor:reactor-bom:Dysprosium-SR16
junit:junit:4.12
net.bytebuddy:byte-buddy-agent:1.10.5
net.bytebuddy:byte-buddy:1.10.5
net.bytebuddy:byte-buddy-agent:1.10.15
net.bytebuddy:byte-buddy:1.10.15
org.assertj:assertj-core:3.17.2
org.bouncycastle:bcpkix-jdk15on:1.66
org.bouncycastle:bcprov-jdk15on:1.66
org.hamcrest:hamcrest-core:1.3
org.jasig.cas.client:cas-client-core:3.6.1
org.jetbrains.kotlin:kotlin-bom:1.3.72
org.mockito:mockito-core:3.3.3
org.objenesis:objenesis:2.6
org.jasig.cas.client:cas-client-core:3.6.2
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.mockito:mockito-core:3.5.15
org.objenesis:objenesis:3.1
org.skyscreamer:jsonassert:1.5.0
org.slf4j:slf4j-api:1.7.30
org.springframework.data:spring-data-releasetrain:Neumann-SR3
org.springframework:spring-aop:5.2.8.RELEASE
org.springframework:spring-beans:5.2.8.RELEASE
org.springframework:spring-context:5.2.8.RELEASE
org.springframework:spring-core:5.2.8.RELEASE
org.springframework:spring-expression:5.2.8.RELEASE
org.springframework:spring-framework-bom:5.2.8.RELEASE
org.springframework:spring-jcl:5.2.8.RELEASE
org.springframework:spring-test:5.2.8.RELEASE
org.springframework:spring-web:5.2.8.RELEASE
org.springframework.data:spring-data-releasetrain:Neumann-SR6
org.springframework:spring-aop:5.2.12.RELEASE
org.springframework:spring-beans:5.2.12.RELEASE
org.springframework:spring-context:5.2.12.RELEASE
org.springframework:spring-core:5.2.12.RELEASE
org.springframework:spring-expression:5.2.12.RELEASE
org.springframework:spring-framework-bom:5.2.12.RELEASE
org.springframework:spring-jcl:5.2.12.RELEASE
org.springframework:spring-test:5.2.12.RELEASE
org.springframework:spring-web:5.2.12.RELEASE
@@ -1,32 +1,32 @@
# 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.
com.fasterxml.jackson.core:jackson-annotations:2.11.2
com.fasterxml.jackson.core:jackson-core:2.11.2
com.fasterxml.jackson.core:jackson-databind:2.11.2
com.fasterxml.jackson.core:jackson-annotations:2.11.4
com.fasterxml.jackson.core:jackson-core:2.11.4
com.fasterxml.jackson.core:jackson-databind:2.11.4
com.vaadin.external.google:android-json:0.0.20131108.vaadin1
commons-codec:commons-codec:1.14
io.projectreactor:reactor-bom:Dysprosium-SR11
commons-codec:commons-codec:1.15
io.projectreactor:reactor-bom:Dysprosium-SR16
junit:junit:4.12
net.bytebuddy:byte-buddy-agent:1.10.5
net.bytebuddy:byte-buddy:1.10.5
net.bytebuddy:byte-buddy-agent:1.10.15
net.bytebuddy:byte-buddy:1.10.15
org.assertj:assertj-core:3.17.2
org.bouncycastle:bcpkix-jdk15on:1.66
org.bouncycastle:bcprov-jdk15on:1.66
org.hamcrest:hamcrest-core:1.3
org.jasig.cas.client:cas-client-core:3.6.1
org.jetbrains.kotlin:kotlin-bom:1.3.72
org.mockito:mockito-core:3.3.3
org.objenesis:objenesis:2.6
org.jasig.cas.client:cas-client-core:3.6.2
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.mockito:mockito-core:3.5.15
org.objenesis:objenesis:3.1
org.skyscreamer:jsonassert:1.5.0
org.slf4j:slf4j-api:1.7.30
org.springframework.data:spring-data-releasetrain:Neumann-SR3
org.springframework:spring-aop:5.2.8.RELEASE
org.springframework:spring-beans:5.2.8.RELEASE
org.springframework:spring-context:5.2.8.RELEASE
org.springframework:spring-core:5.2.8.RELEASE
org.springframework:spring-expression:5.2.8.RELEASE
org.springframework:spring-framework-bom:5.2.8.RELEASE
org.springframework:spring-jcl:5.2.8.RELEASE
org.springframework:spring-test:5.2.8.RELEASE
org.springframework:spring-web:5.2.8.RELEASE
org.springframework.data:spring-data-releasetrain:Neumann-SR6
org.springframework:spring-aop:5.2.12.RELEASE
org.springframework:spring-beans:5.2.12.RELEASE
org.springframework:spring-context:5.2.12.RELEASE
org.springframework:spring-core:5.2.12.RELEASE
org.springframework:spring-expression:5.2.12.RELEASE
org.springframework:spring-framework-bom:5.2.12.RELEASE
org.springframework:spring-jcl:5.2.12.RELEASE
org.springframework:spring-test:5.2.12.RELEASE
org.springframework:spring-web:5.2.12.RELEASE
+21 -21
View File
@@ -1,32 +1,32 @@
# 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.
com.fasterxml.jackson.core:jackson-annotations:2.11.2
com.fasterxml.jackson.core:jackson-core:2.11.2
com.fasterxml.jackson.core:jackson-databind:2.11.2
com.fasterxml.jackson.core:jackson-annotations:2.11.4
com.fasterxml.jackson.core:jackson-core:2.11.4
com.fasterxml.jackson.core:jackson-databind:2.11.4
com.vaadin.external.google:android-json:0.0.20131108.vaadin1
commons-codec:commons-codec:1.14
io.projectreactor:reactor-bom:Dysprosium-SR11
commons-codec:commons-codec:1.15
io.projectreactor:reactor-bom:Dysprosium-SR16
junit:junit:4.12
net.bytebuddy:byte-buddy-agent:1.10.5
net.bytebuddy:byte-buddy:1.10.5
net.bytebuddy:byte-buddy-agent:1.10.15
net.bytebuddy:byte-buddy:1.10.15
org.assertj:assertj-core:3.17.2
org.bouncycastle:bcpkix-jdk15on:1.66
org.bouncycastle:bcprov-jdk15on:1.66
org.hamcrest:hamcrest-core:1.3
org.jasig.cas.client:cas-client-core:3.6.1
org.jetbrains.kotlin:kotlin-bom:1.3.72
org.mockito:mockito-core:3.3.3
org.objenesis:objenesis:2.6
org.jasig.cas.client:cas-client-core:3.6.2
org.jetbrains.kotlin:kotlin-bom:1.4.30
org.mockito:mockito-core:3.5.15
org.objenesis:objenesis:3.1
org.skyscreamer:jsonassert:1.5.0
org.slf4j:slf4j-api:1.7.30
org.springframework.data:spring-data-releasetrain:Neumann-SR3
org.springframework:spring-aop:5.2.8.RELEASE
org.springframework:spring-beans:5.2.8.RELEASE
org.springframework:spring-context:5.2.8.RELEASE
org.springframework:spring-core:5.2.8.RELEASE
org.springframework:spring-expression:5.2.8.RELEASE
org.springframework:spring-framework-bom:5.2.8.RELEASE
org.springframework:spring-jcl:5.2.8.RELEASE
org.springframework:spring-test:5.2.8.RELEASE
org.springframework:spring-web:5.2.8.RELEASE
org.springframework.data:spring-data-releasetrain:Neumann-SR6
org.springframework:spring-aop:5.2.12.RELEASE
org.springframework:spring-beans:5.2.12.RELEASE
org.springframework:spring-context:5.2.12.RELEASE
org.springframework:spring-core:5.2.12.RELEASE
org.springframework:spring-expression:5.2.12.RELEASE
org.springframework:spring-framework-bom:5.2.12.RELEASE
org.springframework:spring-jcl:5.2.12.RELEASE
org.springframework:spring-test:5.2.12.RELEASE
org.springframework:spring-web:5.2.12.RELEASE
@@ -41,6 +41,9 @@ import org.springframework.security.core.userdetails.UsernameNotFoundException;
import org.springframework.security.web.authentication.WebAuthenticationDetails;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException;
import static org.assertj.core.api.Assertions.assertThatIllegalStateException;
import static org.assertj.core.api.Assertions.fail;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.BDDMockito.given;
@@ -192,23 +195,13 @@ public class CasAuthenticationProviderTests {
result = cap.authenticate(token);
verify(validator, times(2)).validate(ticket, serviceUrl);
token.setDetails(new WebAuthenticationDetails(new MockHttpServletRequest()));
try {
cap.authenticate(token);
fail("Expected Exception");
}
catch (IllegalStateException success) {
}
assertThatIllegalStateException().isThrownBy(() -> cap.authenticate(token));
cap.setServiceProperties(null);
cap.afterPropertiesSet();
try {
cap.authenticate(token);
fail("Expected Exception");
}
catch (IllegalStateException success) {
}
assertThatIllegalStateException().isThrownBy(() -> cap.authenticate(token));
}
@Test(expected = BadCredentialsException.class)
@Test
public void missingTicketIdIsDetected() throws Exception {
CasAuthenticationProvider cap = new CasAuthenticationProvider();
cap.setAuthenticationUserDetailsService(new MockAuthoritiesPopulator());
@@ -220,10 +213,10 @@ public class CasAuthenticationProviderTests {
cap.afterPropertiesSet();
UsernamePasswordAuthenticationToken token = new UsernamePasswordAuthenticationToken(
CasAuthenticationFilter.CAS_STATEFUL_IDENTIFIER, "");
cap.authenticate(token);
assertThatExceptionOfType(BadCredentialsException.class).isThrownBy(() -> cap.authenticate(token));
}
@Test(expected = BadCredentialsException.class)
@Test
public void invalidKeyIsDetected() throws Exception {
final Assertion assertion = new AssertionImpl("test");
CasAuthenticationProvider cap = new CasAuthenticationProvider();
@@ -236,30 +229,30 @@ public class CasAuthenticationProviderTests {
cap.afterPropertiesSet();
CasAuthenticationToken token = new CasAuthenticationToken("WRONG_KEY", makeUserDetails(), "credentials",
AuthorityUtils.createAuthorityList("XX"), makeUserDetails(), assertion);
cap.authenticate(token);
assertThatExceptionOfType(BadCredentialsException.class).isThrownBy(() -> cap.authenticate(token));
}
@Test(expected = IllegalArgumentException.class)
@Test
public void detectsMissingAuthoritiesPopulator() throws Exception {
CasAuthenticationProvider cap = new CasAuthenticationProvider();
cap.setKey("qwerty");
cap.setStatelessTicketCache(new MockStatelessTicketCache());
cap.setTicketValidator(new MockTicketValidator(true));
cap.setServiceProperties(makeServiceProperties());
cap.afterPropertiesSet();
assertThatIllegalArgumentException().isThrownBy(() -> cap.afterPropertiesSet());
}
@Test(expected = IllegalArgumentException.class)
@Test
public void detectsMissingKey() throws Exception {
CasAuthenticationProvider cap = new CasAuthenticationProvider();
cap.setAuthenticationUserDetailsService(new MockAuthoritiesPopulator());
cap.setStatelessTicketCache(new MockStatelessTicketCache());
cap.setTicketValidator(new MockTicketValidator(true));
cap.setServiceProperties(makeServiceProperties());
cap.afterPropertiesSet();
assertThatIllegalArgumentException().isThrownBy(() -> cap.afterPropertiesSet());
}
@Test(expected = IllegalArgumentException.class)
@Test
public void detectsMissingStatelessTicketCache() throws Exception {
CasAuthenticationProvider cap = new CasAuthenticationProvider();
// set this explicitly to null to test failure
@@ -268,17 +261,17 @@ public class CasAuthenticationProviderTests {
cap.setKey("qwerty");
cap.setTicketValidator(new MockTicketValidator(true));
cap.setServiceProperties(makeServiceProperties());
cap.afterPropertiesSet();
assertThatIllegalArgumentException().isThrownBy(() -> cap.afterPropertiesSet());
}
@Test(expected = IllegalArgumentException.class)
@Test
public void detectsMissingTicketValidator() throws Exception {
CasAuthenticationProvider cap = new CasAuthenticationProvider();
cap.setAuthenticationUserDetailsService(new MockAuthoritiesPopulator());
cap.setKey("qwerty");
cap.setStatelessTicketCache(new MockStatelessTicketCache());
cap.setServiceProperties(makeServiceProperties());
cap.afterPropertiesSet();
assertThatIllegalArgumentException().isThrownBy(() -> cap.afterPropertiesSet());
}
@Test
@@ -31,7 +31,8 @@ import org.springframework.security.core.userdetails.User;
import org.springframework.security.core.userdetails.UserDetails;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.fail;
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException;
/**
* Tests {@link CasAuthenticationToken}.
@@ -52,50 +53,26 @@ public class CasAuthenticationTokenTests {
@Test
public void testConstructorRejectsNulls() {
final Assertion assertion = new AssertionImpl("test");
try {
new CasAuthenticationToken(null, makeUserDetails(), "Password", this.ROLES, makeUserDetails(), assertion);
fail("Should have thrown IllegalArgumentException");
}
catch (IllegalArgumentException expected) {
}
try {
new CasAuthenticationToken("key", null, "Password", this.ROLES, makeUserDetails(), assertion);
fail("Should have thrown IllegalArgumentException");
}
catch (IllegalArgumentException expected) {
}
try {
new CasAuthenticationToken("key", makeUserDetails(), null, this.ROLES, makeUserDetails(), assertion);
fail("Should have thrown IllegalArgumentException");
}
catch (IllegalArgumentException expected) {
}
try {
new CasAuthenticationToken("key", makeUserDetails(), "Password", this.ROLES, makeUserDetails(), null);
fail("Should have thrown IllegalArgumentException");
}
catch (IllegalArgumentException expected) {
}
try {
new CasAuthenticationToken("key", makeUserDetails(), "Password", this.ROLES, null, assertion);
fail("Should have thrown IllegalArgumentException");
}
catch (IllegalArgumentException expected) {
}
try {
new CasAuthenticationToken("key", makeUserDetails(), "Password",
AuthorityUtils.createAuthorityList("ROLE_1", null), makeUserDetails(), assertion);
fail("Should have thrown IllegalArgumentException");
}
catch (IllegalArgumentException expected) {
}
Assertion assertion = new AssertionImpl("test");
assertThatIllegalArgumentException().isThrownBy(() -> new CasAuthenticationToken(null, makeUserDetails(),
"Password", this.ROLES, makeUserDetails(), assertion));
assertThatIllegalArgumentException().isThrownBy(
() -> new CasAuthenticationToken("key", null, "Password", this.ROLES, makeUserDetails(), assertion));
assertThatIllegalArgumentException().isThrownBy(() -> new CasAuthenticationToken("key", makeUserDetails(), null,
this.ROLES, makeUserDetails(), assertion));
assertThatIllegalArgumentException().isThrownBy(() -> new CasAuthenticationToken("key", makeUserDetails(),
"Password", this.ROLES, makeUserDetails(), null));
assertThatIllegalArgumentException().isThrownBy(
() -> new CasAuthenticationToken("key", makeUserDetails(), "Password", this.ROLES, null, assertion));
assertThatIllegalArgumentException().isThrownBy(() -> new CasAuthenticationToken("key", makeUserDetails(),
"Password", AuthorityUtils.createAuthorityList("ROLE_1", null), makeUserDetails(), assertion));
}
@Test(expected = IllegalArgumentException.class)
@Test
public void constructorWhenEmptyKeyThenThrowsException() {
new CasAuthenticationToken("", "user", "password", Collections.<GrantedAuthority>emptyList(),
new User("user", "password", Collections.<GrantedAuthority>emptyList()), null);
assertThatIllegalArgumentException().isThrownBy(
() -> new CasAuthenticationToken("", "user", "password", Collections.<GrantedAuthority>emptyList(),
new User("user", "password", Collections.<GrantedAuthority>emptyList()), null));
}
@Test
@@ -125,12 +102,8 @@ public class CasAuthenticationTokenTests {
@Test
public void testNoArgConstructorDoesntExist() {
try {
CasAuthenticationToken.class.getDeclaredConstructor((Class[]) null);
fail("Should have thrown NoSuchMethodException");
}
catch (NoSuchMethodException expected) {
}
assertThatExceptionOfType(NoSuchMethodException.class)
.isThrownBy(() -> CasAuthenticationToken.class.getDeclaredConstructor((Class[]) null));
}
@Test
@@ -24,7 +24,7 @@ import org.junit.BeforeClass;
import org.junit.Test;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.fail;
import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException;
/**
* Tests {@link EhCacheBasedTicketCache}.
@@ -67,12 +67,7 @@ public class EhCacheBasedTicketCacheTests extends AbstractStatelessTicketCacheTe
@Test
public void testStartupDetectsMissingCache() throws Exception {
EhCacheBasedTicketCache cache = new EhCacheBasedTicketCache();
try {
cache.afterPropertiesSet();
fail("Should have thrown IllegalArgumentException");
}
catch (IllegalArgumentException expected) {
}
assertThatIllegalArgumentException().isThrownBy(cache::afterPropertiesSet);
Ehcache myCache = cacheManager.getCache("castickets");
cache.setCache(myCache);
assertThat(cache.getCache()).isEqualTo(myCache);
@@ -23,6 +23,7 @@ import org.springframework.cache.CacheManager;
import org.springframework.cache.concurrent.ConcurrentMapCacheManager;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException;
/**
* Tests
@@ -56,9 +57,9 @@ public class SpringCacheBasedTicketCacheTests extends AbstractStatelessTicketCac
assertThat(cache.getByTicketId("UNKNOWN_SERVICE_TICKET")).isNull();
}
@Test(expected = IllegalArgumentException.class)
@Test
public void testStartupDetectsMissingCache() throws Exception {
new SpringCacheBasedTicketCache(null);
assertThatIllegalArgumentException().isThrownBy(() -> new SpringCacheBasedTicketCache(null));
}
}
@@ -25,7 +25,7 @@ import org.springframework.mock.web.MockHttpServletResponse;
import org.springframework.security.cas.ServiceProperties;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.fail;
import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException;
/**
* Tests {@link CasAuthenticationEntryPoint}.
@@ -38,26 +38,16 @@ public class CasAuthenticationEntryPointTests {
public void testDetectsMissingLoginFormUrl() throws Exception {
CasAuthenticationEntryPoint ep = new CasAuthenticationEntryPoint();
ep.setServiceProperties(new ServiceProperties());
try {
ep.afterPropertiesSet();
fail("Should have thrown IllegalArgumentException");
}
catch (IllegalArgumentException expected) {
assertThat(expected.getMessage()).isEqualTo("loginUrl must be specified");
}
assertThatIllegalArgumentException().isThrownBy(ep::afterPropertiesSet)
.withMessage("loginUrl must be specified");
}
@Test
public void testDetectsMissingServiceProperties() throws Exception {
CasAuthenticationEntryPoint ep = new CasAuthenticationEntryPoint();
ep.setLoginUrl("https://cas/login");
try {
ep.afterPropertiesSet();
fail("Should have thrown IllegalArgumentException");
}
catch (IllegalArgumentException expected) {
assertThat(expected.getMessage()).isEqualTo("serviceProperties must be specified");
}
assertThatIllegalArgumentException().isThrownBy(ep::afterPropertiesSet)
.withMessage("serviceProperties must be specified");
}
@Test
@@ -36,6 +36,7 @@ import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.security.web.authentication.AuthenticationSuccessHandler;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.BDDMockito.given;
import static org.mockito.Mockito.mock;
@@ -76,13 +77,14 @@ public class CasAuthenticationFilterTests {
assertThat(result != null).isTrue();
}
@Test(expected = AuthenticationException.class)
@Test
public void testNullServiceTicketHandledGracefully() throws Exception {
CasAuthenticationFilter filter = new CasAuthenticationFilter();
filter.setAuthenticationManager((a) -> {
throw new BadCredentialsException("Rejected");
});
filter.attemptAuthentication(new MockHttpServletRequest(), new MockHttpServletResponse());
assertThatExceptionOfType(AuthenticationException.class).isThrownBy(
() -> filter.attemptAuthentication(new MockHttpServletRequest(), new MockHttpServletResponse()));
}
@Test
@@ -22,7 +22,7 @@ import org.springframework.security.cas.SamlServiceProperties;
import org.springframework.security.cas.ServiceProperties;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.fail;
import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException;
/**
* Tests {@link ServiceProperties}.
@@ -31,29 +31,19 @@ import static org.assertj.core.api.Assertions.fail;
*/
public class ServicePropertiesTests {
@Test(expected = IllegalArgumentException.class)
@Test
public void detectsMissingService() throws Exception {
ServiceProperties sp = new ServiceProperties();
sp.afterPropertiesSet();
assertThatIllegalArgumentException().isThrownBy(sp::afterPropertiesSet);
}
@Test
public void nullServiceWhenAuthenticateAllTokens() throws Exception {
ServiceProperties sp = new ServiceProperties();
sp.setAuthenticateAllArtifacts(true);
try {
sp.afterPropertiesSet();
fail("Expected Exception");
}
catch (IllegalArgumentException success) {
}
assertThatIllegalArgumentException().isThrownBy(sp::afterPropertiesSet);
sp.setAuthenticateAllArtifacts(false);
try {
sp.afterPropertiesSet();
fail("Expected Exception");
}
catch (IllegalArgumentException success) {
}
assertThatIllegalArgumentException().isThrownBy(sp::afterPropertiesSet);
}
@Test

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