Commit Graph

10327 Commits

Author SHA1 Message Date
Rob Winch 89f8310d6c Add Explicit SessionAuthenticationStrategy Option
SessionAuthenticationFilter requires accessing the HttpSession to do its
job. Previously, there was no way to just disable the
SessionAuthenticationFilter despite the fact that
SessionAuthenticationStrategy is invoked by the authentication filters
directly.

This commit adds an option to disable SessionManagmentFilter in favor of
requiring explicit SessionAuthenticationStrategy invocation already
performed by the authentication filters.

Closes gh-11455
2022-08-18 17:00:47 -05:00
Steve Riesenberg 51dc672625
Refresh remote JWK when unknown KID error occurs
Closes gh-11621
2022-08-18 16:48:42 -05:00
tinolazreg d1c742d7aa
Add tests for unknown KID error
Issue gh-11621
2022-08-18 16:48:41 -05:00
Evgeniy Cheban ba50c50b4b
Add remaining methods from ExpressionUrlAuthorizationConfigurer to MessageMatcherDelegatingAuthorizationManager
- Added fullyAuthenticated
- Added rememberMe
- Added anonymous

Closes gh-11509
2022-08-16 15:14:08 -06:00
Marcus Da Coregio 7359bd5949 Move SAML Post inline javascript to script tag
To avoid relying on HTML event handlers and adding unsafe-* rules to CSP, the javascript is moved to a <script> tag. This also allows a better browser compatibility

Closes gh-11676
2022-08-16 15:06:10 -06:00
jujunChen e3d85881e9
Modify words
- <dependencyManagement> to dependencyManagement
- pom.xml to build.gradle
2022-08-16 14:48:14 -06:00
Rob Winch c1a6cea60a Defer CsrfFilter Session Access
Closes gh-11456
2022-08-16 11:31:27 -05:00
Rob Winch 5b64526ba9 Add CsrfFilter.csrfRequestAttributeName
Previously the CsrfToken was set on the request attribute with the name
equal to CsrfToken.getParameterName(). This didn't really make a lot of
sense because the CsrfToken.getParameterName() is intended to be used as
the HTTP parameter that the CSRF token was provided. What's more is it
meant that the CsrfToken needed to be read for every request to place it
as an HttpServletRequestAttribute. This causes unnecessary HttpSession
access which can decrease performance for applications.

This commit allows setting CsrfFilter.csrfReqeustAttributeName to
remove the dual purposing of CsrfToken.parameterName and to allow deferal
of reading the CsrfToken to prevent unnecessary HttpSession access.

Issue gh-11699
2022-08-15 17:07:02 -05:00
Rob Winch 666f175225 LazyCsrfTokenRepository#loadToken Supports Deferring Delegation
Previously LazyCsrfTokenRepository supported lazily saving the CsrfToken
which allowed for lazily saving the CsrfToken. However, it did not
support lazily reading the CsrfToken. This meant every request required
reading the CsrfToken (often the HttpSession).

This commit allows for lazily reading the CsrfToken and thus prevents
unnecessary reads to the HttpSession.

Closes gh-11700
2022-08-15 17:07:02 -05:00
Rob Winch 002a770f13 NamespaceLdapAuthenticationProviderTests use Dynamic Port
Closes gh-11710
2022-08-15 15:26:12 -05:00
Rob Winch 4473c3f7d0 GitHubMilestoneApiTests due_on Uses LocalDate
`GitHubMilestoneApiTests` uses `Instant.now()` for `due_on`. Since
`Instant.now()` is UTC time based,
`isMilestoneDueTodayWhenDueTodayThenTrue` fails when the computer that runs
the test is not the same day as it is in UTC time.

To fix it, `due_on` should be set to an `Instant` based upon the timezone
of the current computer.

Closes gh-11706
2022-08-15 13:01:58 -05:00
github-actions[bot] 1510460a1a Next development version 2022-08-15 16:14:19 +00:00
github-actions[bot] 063e56ce8b Release 5.8.0-M2 2022-08-15 15:24:27 +00:00
Marcus Da Coregio 1c4d6ed098 Consistently handle RequestRejectedException if it is wrapped
Closes gh-11645
2022-08-09 08:30:15 -03:00
Igor Bolic efaee4e56b Allow customization of redirect strategy
The default redirect strategy will provide authorization redirect
URI within HTTP 302 response Location header.
Allowing the configuration of custom redirect strategy will provide
an option for the clients to obtain the authorization URI from e.g.
HTTP response body as JSON payload, without a need to handle
automatic redirection initiated by the HTTP Location header.

Closes gh-11373
2022-08-08 15:35:49 -05:00
Rob Winch c9f8d2b111 RequestAttributeSecurityContextRepository never null SecurityContext
Previously loadContext(HttpServletRequest) could return a Supplier that
returned a null SecurityContext

This commit ensures that null is never returned by the Supplier by
returning SecurityContextHolder.createEmptyContext() instead.

Closes gh-11606
2022-08-08 13:52:12 -05:00
Josh Cummings c2d79fcbd6
Add Conditions to Generating AuthnRequest
Closes gh-11657
2022-08-03 17:34:31 -06:00
Josh Cummings aa225943d2
Polish Tests
Issue gh-11657
2022-08-03 17:34:26 -06:00
Steve Riesenberg 07ea139ebf Polish HttpSecurity 2022-07-29 17:42:39 -05:00
Steve Riesenberg 67544f36f9 Remove references to WebSecurityConfigurerAdapter
* AbstractAuthenticationFilterConfigurer
* DefaultLoginPageConfigurer
* EnableGlobalAuthentication
* FormLoginConfigurer
* HeadersConfigurer
* HttpSecurity
* OpenIDLoginConfigurer
* RememberMeConfigurer
* WebSecurity
* WebSecurityConfiguration
* WebSecurityConfigurer
* X509Configurer

Closes gh-11288
2022-07-29 17:42:39 -05:00
Steve Riesenberg 05725af4d8 Remove references to WebSecurityConfigurerAdapter in EnableWebSecurity
Closes gh-11277
2022-07-29 17:42:39 -05:00
Steve Riesenberg 4fbbfd2c8b
Skip workflows on forks of spring-security 2022-07-28 15:07:02 -05:00
Steve Riesenberg 66da4301fc
Use cache and user.name system property on Windows 2022-07-28 15:07:02 -05:00
Steve Riesenberg 8929bd5abc
Only run prerequisites job if on upstream repo 2022-07-28 15:07:02 -05:00
Steve Riesenberg e3d1405f67
Simplify dependency graph 2022-07-28 15:07:02 -05:00
Steve Riesenberg e756a1df19
Use Spring Gradle Build Action
Closes gh-11630
2022-07-28 15:07:02 -05:00
Steve Riesenberg 81fae2db2c
Polish gh-11367 2022-07-28 15:07:01 -05:00
naveen 054a3f0bc0
Set permissions for GitHub actions
Restrict the GitHub token permissions only to the required ones; this
way, even if the attackers will succeed in compromising your workflow,
they won’t be able to do much.

- Included permissions for the action.

https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions

https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions

https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs

Keeping your GitHub Actions and workflows secure Part 1: Preventing pwn requests
https://securitylab.github.com/research/github-actions-preventing-pwn-requests/

Signed-off-by: naveen <172697+naveensrinivasan@users.noreply.github.com>

Closes gh-11367
2022-07-28 15:07:00 -05:00
Ulrich Grave 409998a3fe Add hash-based Content-Security-Policy for SAML pages
Closes gh-11631
2022-07-27 17:59:42 -06:00
Marcus Da Coregio e5ae35ab71 Add Deprecated annotation to WebSecurity#securityInterceptor
Closes gh-11634
2022-07-27 14:39:33 -03:00
Rob Winch 0d74da4f97 Fix Snapshot Sources/Javadoc
This commit merges a workaround to an issue in JFrog's Gradle plugin
which causes SNAPSHOT javadoc and sources to become out of sync and thus
prevents users from being able to download either.

Closes gh-10602
2022-07-26 16:24:54 -05:00
Desmond Silveira 2a336d4f49 "Well-Know" should be "Well-Known" 2022-07-26 15:41:05 -05:00
Yuriy Savchenko 5322352427 Add Kotlin example for WebTestClient setup docs
Closes gh-9998
2022-07-22 13:49:21 -03:00
Josh Cummings 561f65b34d
Merge Same-named Attribute Elements
Closes gh-11042
2022-07-20 18:40:20 -06:00
Steve Riesenberg 631076e4dd
Build only on branches
Issue gh-11480
2022-07-18 11:45:39 -05:00
github-actions[bot] 8d147100ee Next development version 2022-07-18 16:00:47 +00:00
github-actions[bot] 8d3586f949 Release 5.8.0-M1 2022-07-18 15:25:10 +00:00
Joe Grandja 95155ddb0c Deprecate Resource Owner Password Credentials grant
Closes gh-11590
2022-07-15 16:28:47 -04:00
Steve Riesenberg 1be9be97a1
Exclude JavadocPackageCheck from Spring Checks
Issue gh-11422
2022-07-15 13:03:45 -05:00
Steve Riesenberg 33e4b07cc8
Update spring-ldap-core to 2.4.1
Closes gh-11563
2022-07-15 12:42:57 -05:00
Steve Riesenberg 5ddc1011a7
Update org.springframework.data to 2021.2.2
Closes gh-11562
2022-07-15 12:42:51 -05:00
Steve Riesenberg 58a9733b4c
Update org.springframework to 5.3.22
Closes gh-11561
2022-07-15 12:40:47 -05:00
Steve Riesenberg 2625388a87
Update jsonassert to 1.5.1
Closes gh-11560
2022-07-15 12:40:43 -05:00
Steve Riesenberg 3d0d8bdbe0
Update htmlunit-driver to 2.63.0
Closes gh-11559
2022-07-15 12:40:41 -05:00
Steve Riesenberg 0d2b71ed86
Update junit-bom to 5.9.0-RC1
Closes gh-11557
2022-07-15 12:40:36 -05:00
Steve Riesenberg d20d6f5247
Update org.jetbrains.kotlinx to 1.6.4
Closes gh-11556
2022-07-15 12:40:33 -05:00
Steve Riesenberg f69102f1a6
Update org.jetbrains.kotlin to 1.7.10
Closes gh-11555
2022-07-15 12:40:31 -05:00
Steve Riesenberg e112e24efb
Update hibernate-entitymanager to 5.6.10.Final
Closes gh-11554
2022-07-15 12:40:28 -05:00
Steve Riesenberg 1f0a317923
Update org.eclipse.jetty to 9.4.48.v20220622
Closes gh-11553
2022-07-15 12:40:26 -05:00
Steve Riesenberg 0b18ebbd61
Update assertj-core to 3.23.1
Closes gh-11552
2022-07-15 12:40:23 -05:00