Skip to content

Add remaining methods from ExpressionUrlAuthorizationConfigurer to AuthorizeHttpRequestsConfigurer #11442

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 368 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
368 commits
Select commit Hold shift + click to select a range
4ea57f3
Support multiple RequestRejectedHandler beans
Dec 11, 2021
75f25bf
Polish multiple RequestRejectedHandlers support
jzheaux Jan 14, 2022
7435da6
Add serialVersionUID to DefaultSavedRequest and SavedCookie
jakspok Jan 4, 2022
d341328
Bump up Gradle plugin dependencies
jprinet Jan 17, 2022
096a340
Add embedded LDAP container interface
eleftherias Oct 4, 2021
a537b63
Add LDAP factory beans
eleftherias Oct 4, 2021
73dda2e
Fix Antora for Milestone & RC
rwinch Jan 18, 2022
c8713b1
CheckAntoraVersionTask has optional properties
rwinch Jan 18, 2022
d146bcb
Add CheckClasspathForProhibitedDependencies
rwinch Jan 14, 2022
72dd4e7
Add CheckProhibitedDependenciesLifecyclePlugin
rwinch Jan 18, 2022
3c641de
Remove commons-logging
rwinch Jan 14, 2022
f8e1468
Remove jcl-over-slf4j
rwinch Jan 14, 2022
d8b406a
Remove javax.inject
rwinch Jan 14, 2022
8f64bb6
javax.servlet:javax.servlet-api -> jakarta.servlet:jakarta.servlet-api
rwinch Jan 18, 2022
0e8c034
javax.xml.bind:jaxb-api -> jakarta.xml.bind:jakarta.xml.bind-api
rwinch Jan 18, 2022
a64b72b
Exclude javax from cas-client-core
rwinch Jan 18, 2022
3d80419
javax.servlet.jsp.jstl-api -> jakarta.servlet.jsp.jstl-api
rwinch Jan 19, 2022
6e145b4
javax.servlet.jsp-api -> jakarta.servlet.jsp-api
rwinch Jan 19, 2022
678c386
jsr250-api -> jakarta.annotation-api
rwinch Jan 19, 2022
29e6241
dependencies jakarta.transaction-api
rwinch Jan 19, 2022
9d4ecc9
Additional removal of javax.inject
rwinch Jan 19, 2022
27e1a2c
Remove javax.transaction
rwinch Jan 19, 2022
ba922dc
Exclude javax from hibernate dependency
rwinch Jan 19, 2022
cca35bd
Make Saml2AuthenticationRequests serializable
marcusdacoregio Dec 13, 2021
d538423
Add Saml2AuthenticationRequestResolver
jzheaux Dec 9, 2020
620081e
Deprecate Saml2 AuthnRequest Classes
jzheaux Jan 24, 2022
9baf113
Add Request-based AuthenticationManagerResolvers
jzheaux Sep 5, 2019
d582452
Use LDAP AuthenticationManager factory in reference docs
eleftherias Jan 28, 2022
e280061
Polish LDAP reference docs
eleftherias Jan 28, 2022
b1a905b
Add Session Index Support
jzheaux Jan 26, 2022
1c10c10
RequestMatcherDelegatingWebInvocationPrivilegeEvaluator doesn't provi…
marcusdacoregio Jan 31, 2022
4095d89
Add EntitiesDescriptor Support
jzheaux Jan 27, 2022
f465403
Fix typo in getting started docs
eleftherias Feb 2, 2022
70fa8b1
Add Support for @Transient SecurityContext
rwinch Feb 2, 2022
e5def29
Fix broken link to SAML2 login example
kdombeck Feb 2, 2022
c1dfe40
Document Authorize HTTP Requests for Reactive Security
rwinch Feb 3, 2022
7c9de7d
Use lambda DSL in logout header docs
eleftherias Feb 3, 2022
27ecae2
Fix typo in role hierarchy docs
giger85 Feb 3, 2022
3cc7f38
Add OpenSaml custom types to Saml2AuthenticatedPrincipal
Feb 4, 2022
70bb588
Polish Testing for Custom Attributes Values
jzheaux Feb 4, 2022
5c4178b
Fix Checkstyle Error
jzheaux Feb 5, 2022
4a3654a
Replace StringUtils class completely
giger85 Feb 3, 2022
541a1e4
Add OpenSamlAssertingPartyDetails
jzheaux Jan 31, 2022
01ed617
Print ignore message DefaultSecurityFilterChain
Mar 29, 2021
cbd87fa
Polish ignoring() log messaging
jzheaux Feb 7, 2022
4492e5b
Replace WebSecurityConfigurerAdapter with SecurityFilterChain in docs
eleftherias Feb 8, 2022
c2635ba
Apply configurers from spring.factories to HttpSecurity bean
eleftherias Feb 8, 2022
0150367
Add Kotlin example for logout configuration of reactive authentication
talerngpong Feb 10, 2022
77ba94e
Update docs to use multi-tenancy
ysavchen Feb 12, 2022
c6b1854
Add DEFAULT_USER_SCHEMA_DDL_LOCATION constant
eleftherias Feb 15, 2022
0fb6840
Make WebAuthenticationDetails constructor public
ysavchen Feb 12, 2022
3713895
Update JavaDoc
jzheaux Feb 15, 2022
836335d
Collect All Validation Errors
jzheaux Feb 16, 2022
399562b
Correct Test
jzheaux Feb 16, 2022
97c1847
Add Skipping Decryption Error Message
jzheaux Feb 16, 2022
e97c643
Deprecate WebSecurityConfigurerAdapter
eleftherias Feb 17, 2022
8a56e4f
add Kotlin examples for Spring Data Integration of servlet application
talerngpong Feb 14, 2022
3d87854
Remove WantAssertionsSigned
jzheaux Feb 18, 2022
225e4fd
Add .sdkmanrc
rwinch Feb 18, 2022
876a3e9
Update com.nimbusds to 9.27
marcusdacoregio Feb 21, 2022
1f028c0
Update aspectj-plugin to 6.4.1
marcusdacoregio Feb 21, 2022
c4f3cd2
Update io.projectreactor to 2020.0.16
marcusdacoregio Feb 21, 2022
bebd615
Update io.r2dbc to 0.9.1.RELEASE
marcusdacoregio Feb 21, 2022
5d1d9c7
Update io.spring.javaformat to 0.0.31
marcusdacoregio Feb 21, 2022
2d328fa
Update htmlunit to 2.58.0
marcusdacoregio Feb 21, 2022
d30a4c1
Update org.aspectj to 1.9.8
marcusdacoregio Feb 21, 2022
2e32a63
Update org.eclipse.jetty to 9.4.45.v20220203
marcusdacoregio Feb 21, 2022
44bcfd8
Update hibernate-entitymanager to 5.6.5.Final
marcusdacoregio Feb 21, 2022
6e386e5
Update org.jetbrains.kotlin to 1.6.20-M1
marcusdacoregio Feb 21, 2022
970beaa
Update htmlunit-driver to 2.58.0
marcusdacoregio Feb 21, 2022
efbd48c
Update org.slf4j to 1.7.36
marcusdacoregio Feb 21, 2022
31d7d29
Update org.springframework to 5.3.16
marcusdacoregio Feb 21, 2022
2426989
Release 5.7.0-M2
marcusdacoregio Feb 21, 2022
344ab18
Next development version
marcusdacoregio Feb 21, 2022
efd5fc7
Invert Log Messages
jzheaux Feb 28, 2022
70b52a0
Change HashSet to LinkedHashSet
fhanik Feb 25, 2022
3aa7a65
OAuth2AuthorizedClientArgumentResolver resolves ReactiveOAuth2Authori…
Feb 22, 2022
ff15bec
update PasswordEncoder declaration
talerngpong Mar 1, 2022
df84826
Add Jackson Support for Saml2 Module
ugrave Feb 24, 2022
6c3d183
Polish Saml2 Jackson Support
jzheaux Mar 1, 2022
931fb6a
Move UnmodifiableMapDeserializer
jzheaux Mar 1, 2022
238616d
Use RFC2045 Encoding for SAML 2.0 Logout
jzheaux Mar 1, 2022
7a02bd1
Replace Apache Commons Base64 Decoding
jzheaux Mar 1, 2022
14d0663
Preserve order of RelyingPartRegistration credentials
svschouw-bb Feb 11, 2022
923c61e
Polish Formatting
jzheaux Mar 2, 2022
d225205
Add method to customize EntityDescriptor
ugrave Mar 2, 2022
ff87cfc
Polish EntityDescriptor Customizer
jzheaux Mar 4, 2022
b9f7954
Add RequestAttributeSecurityContextRepository
rwinch Mar 1, 2022
73f8393
Add SAML 2.0 Login XML Support
marcusdacoregio Nov 8, 2021
93d4fd3
Add SAML 2.0 Single Logout XML Support
marcusdacoregio Feb 17, 2022
bc2bb8c
Add Kotlin example for SecuritySocketAcceptorInterceptor of RSocket
Mar 5, 2022
65ec265
HttpSessionSecurityContextRepository saves with original response
rwinch Feb 18, 2022
980e046
AuthorizationManagerWebInvocationPrivilegeEvaluator grant access when…
marcusdacoregio Mar 9, 2022
f11cb98
AbstractAuthenticationProcessingFilter.securityContextRepository
rwinch Feb 18, 2022
014c471
AuthenticationFilter.securityContextRepository
rwinch Feb 18, 2022
120f2a3
RememberMeAuthenticationFilter.securityContextRepository
rwinch Feb 18, 2022
9b0cd5a
BasicAuthenticationFilter.setSecurityContextRepository
rwinch Feb 25, 2022
e6b6104
DigestAuthenticationFilter.securityContextRepository
rwinch Feb 25, 2022
636f3e1
AbstractPreAuthenticatedProcessingFilter.securityContextRepository
rwinch Feb 25, 2022
2e9b04e
CasAuthenticationFilter.securityContextRepository
rwinch Feb 25, 2022
9db79aa
BearerTokenAuthenticationFilter.securityContextRepository
rwinch Feb 25, 2022
d2f24ae
Add SecurityContextRepository to all Authentication Filters
rwinch Mar 9, 2022
ac9c29b
Add UsernamePasswordAuthenticationToken factory methods
nor-ek Mar 8, 2022
9967078
Antora 3.0.0
rwinch Mar 11, 2022
b71b2f8
Add Persistence to documentation
rwinch Mar 11, 2022
e4f1826
Remove "Hi ... there" From Docs
rwinch Mar 11, 2022
dbcb500
Extract createSecurityContextRepository()
rwinch Mar 11, 2022
87ed31a
Add SecurityContextHolderFilter
rwinch Feb 18, 2022
fabeabd
Fix docs SecurityContextHolder Diagram
rwinch Mar 12, 2022
73003d5
OAuth 2.0 logout handler resolves uri placeholders
Enkosz Mar 5, 2022
836f203
Refactored OpenSaml4AuthenticationProviderTests
fast-reflexes Mar 10, 2022
3c87854
Add support for validation of InResponseTo
fast-reflexes Mar 10, 2022
cf29bf9
Polish InResponseTo support
jzheaux Mar 15, 2022
7955e5a
Polish UsernamePasswordAuthenticationFilter method
shin-mallang Mar 15, 2022
a2ffc88
Allow configuring PKCE for confidential clients
jgrandja Mar 15, 2022
50d315d
Remove unused code
jgrandja Mar 17, 2022
4a8219d
Update whats-new.adoc with gh-9812
jgrandja Mar 17, 2022
f0168c6
Add support for customizing claims in JWT Client Assertion
Mar 15, 2022
c38c722
Update What's New for 5.7
Mar 17, 2022
1b29c43
Use configurable charset in ServerHttpBasicAuthenticationConverter
frozenice Feb 25, 2022
987ee2e
Polish gh-10911
Mar 17, 2022
28dd7da
Update What's New for 5.7
Mar 17, 2022
84717e0
Update logback-classic to 1.2.11
marcusdacoregio Mar 21, 2022
661848e
Update jackson-bom to 2.13.2
marcusdacoregio Mar 21, 2022
106d77a
Update com.nimbusds to 9.31
marcusdacoregio Mar 21, 2022
44aee20
Update mockk to 1.12.3
marcusdacoregio Mar 21, 2022
dae500f
Update io.projectreactor to 2020.0.17
marcusdacoregio Mar 21, 2022
393f182
Update htmlunit to 2.60.0
marcusdacoregio Mar 21, 2022
01c2694
Update hibernate-entitymanager to 5.6.7.Final
marcusdacoregio Mar 21, 2022
fe5cfa9
Update org.jetbrains.kotlin to 1.6.20-RC
marcusdacoregio Mar 21, 2022
e128e8d
Update htmlunit-driver to 2.60.0
marcusdacoregio Mar 21, 2022
0c9e738
Update org.springframework to 5.3.17
marcusdacoregio Mar 21, 2022
94adc64
Update spring-data-bom to 2021.2.0-M4
marcusdacoregio Mar 21, 2022
ed0a323
Release 5.7.0-M3
marcusdacoregio Mar 21, 2022
7deaab8
Next development version
marcusdacoregio Mar 21, 2022
3016ed0
Fix typos in Kotlin DSL docs
ysavchen Mar 11, 2022
446ab50
Add authorizeHttpRequests to Kotlin DSL
ysavchen Mar 13, 2022
d4d6ddb
Fix formatting in reference docs
eleftherias Mar 24, 2022
8940719
HttpSessionSecurityContextRepository support null HttpServletResponse
rwinch Mar 25, 2022
67fd46b
Add SecurityContextRepository.loadContext(HttpServletRequest)
rwinch Mar 25, 2022
6c52c52
Use ServletContext in AuthorizationManagerWebInvocationPrivilegeEvalu…
marcusdacoregio Mar 25, 2022
c73bd47
Change samplesBranch property to point to correct branch
marcusdacoregio Mar 28, 2022
a43677d
Simplify PrePostMethodSecurityConfiguration
jzheaux Mar 29, 2022
bd94348
Add authorization events
parikshitdutta Mar 29, 2021
061f69e
Polish Authorization Event Support
jzheaux Mar 29, 2022
04c4833
Document Authorization Events
jzheaux Mar 29, 2022
c175118
Use RequestMatcherEntry
jzheaux Mar 30, 2022
d4931ec
use okta as registration id
grafjo Mar 26, 2022
ea37364
Update saganCreateRelease property referenceDocUrl
Enkosz Mar 25, 2022
725a57f
Remove blocking call from ExceptionTranslationWebFilter
eleftherias Apr 5, 2022
af7f943
Prevent instantiation of DelegatingPasswordEncoder if idPrefix contai…
ghoonch4 Mar 29, 2022
47c8676
Polish Saml2LoginConfigurerTests
jzheaux Mar 16, 2022
66213e5
Add Default Test to HttpBasicConfigurerTests
jzheaux Mar 18, 2022
0be2a03
Polish SecurityContextChannelInterceptorTests
jzheaux Mar 24, 2022
057f4a8
Add default strategy constructor
jzheaux Mar 24, 2022
b71d9bf
Fix typo
natrem Apr 5, 2022
77a6e01
Add AuthorizationManager to Messaging
jzheaux Apr 7, 2022
b39f213
Revert "Add AuthorizationManager to Messaging"
jzheaux Apr 7, 2022
bb0c336
Deprecate Saml2AuthenticationRequestFactory
marcusdacoregio Apr 8, 2022
32b83aa
Pick up AuthorizationManager Bean
jzheaux Apr 8, 2022
39b0620
Add DisableUrlRewritingFilter
rwinch Apr 6, 2022
147ab42
Revert "Pick up AuthorizationManager Bean"
jzheaux Apr 12, 2022
3a9b080
Deprecate loadContext(RequestResponseHolder)
rwinch Apr 5, 2022
86c3ce7
Update What's New
marcusdacoregio Apr 13, 2022
6e6d472
Add test support for SecurityContextHolderFilter
rwinch Apr 13, 2022
7fea639
Add Option to Filter All Dispatcher Types
marcusdacoregio Apr 11, 2022
aaf7833
ForceEagerSessionCreationFilter
rwinch Apr 15, 2022
5606fd5
Password for plugins
rwinch Apr 18, 2022
8d866f0
Update com.nimbusds to 9.34
rwinch Apr 18, 2022
70aa33b
Update aspectj-plugin to 6.4.2
rwinch Apr 18, 2022
0989652
Update io.projectreactor to 2020.0.18
rwinch Apr 18, 2022
694ceb3
Update io.rsocket to 1.1.2
rwinch Apr 18, 2022
a62bdd1
Update org.aspectj to 1.9.9.1
rwinch Apr 18, 2022
359137d
Update org.eclipse.jetty to 9.4.46.v20220331
rwinch Apr 18, 2022
0803a9e
Update hibernate-entitymanager to 5.6.8.Final
rwinch Apr 18, 2022
6e5b2f2
Update org.jetbrains.kotlin to 1.6.20
rwinch Apr 18, 2022
e223d23
Update org.jetbrains.kotlinx to 1.6.1
rwinch Apr 18, 2022
f52bf98
Update org.springframework to 5.3.19
rwinch Apr 18, 2022
2b858f9
Use gradlePluginPortal()
rwinch Apr 18, 2022
8a54cea
Revert to aspectj-plugin-6.4.1
rwinch Apr 18, 2022
e80b3cc
Release 5.7.0-RC1
rwinch Apr 18, 2022
6c8f64d
Next Development Version
rwinch Apr 18, 2022
97acbcc
Exclude duplicate issues from changelog
marcusdacoregio Apr 19, 2022
23594b3
Fix setServletContext not being called for AuthorizationManagerWebInv…
marcusdacoregio Apr 25, 2022
a3e7e54
Security Context Dsl
nor-ek Apr 26, 2022
8e34ced
Detect UserDetailsService bean in remember me
eleftherias Apr 28, 2022
e94aded
Add shouldFilterAllDispatcherTypes to Kotlin DSL
marcusdacoregio Apr 25, 2022
d40c15e
Update remember me Javadocs
eleftherias Apr 28, 2022
5ac5edc
Detect UserDetailsService bean in X509 configuration
eleftherias Apr 28, 2022
0e9228d
Prepare for Spring Security 5.8
jzheaux May 2, 2022
3cbb607
Add Jackson Support for Saml2AuthenticationException
ugrave Apr 29, 2022
66bbfc7
@EnableMethodSecurity doesn't resolve Method Security annotations on …
evgeniycheban Apr 29, 2022
6420cf2
Multiple <authentication-manager> Do Not Duplicate Alias
rwinch May 3, 2022
dbe7e37
WebSessionReactiveSecurityRepository Supports Cache
rwinch May 3, 2022
768267c
Fix WebSessionReactiveSecurityRepository Supports Cache
rwinch May 4, 2022
4dfc349
Allow custom relay state
Apr 7, 2022
13795cd
Polish Relay State Resolver
jzheaux May 5, 2022
57ceded
Add DelegatingServerHttpHeadersWriter
Dav1dde Apr 14, 2022
ce86f4e
Polish ServerWebExchangeDelegatingServerHttpHeadersWriter
marcusdacoregio May 6, 2022
18345fe
Fix mvcMatchers overriding previous paths
marcusdacoregio Mar 22, 2022
18c220c
Update copyright headers
marcusdacoregio May 6, 2022
9f669c5
Consider replacing an inner loop with Set of authority strings in Aut…
evgeniycheban May 9, 2022
723648a
Add initScripts and projectProperties to IncludeCheckRemotePlugin
marcusdacoregio Jan 21, 2022
b544159
Use properties in the checkSamples job
marcusdacoregio Jan 21, 2022
032fdce
Point to samples branch 5.8.x
marcusdacoregio May 12, 2022
3f861f7
Polish gh-11188
evgeniycheban May 10, 2022
07b0be3
Add AuthorizationManager that uses ExpressionHandler
evgeniycheban Apr 27, 2022
ffaf5b4
Polish WebExpressionAuthorizationManager
jzheaux May 13, 2022
04ca7ef
Extract rejectNonPrintableAsciiCharactersInFieldName
rwinch May 12, 2022
538252c
AntRegexRequestMatcher Optimization
rwinch May 13, 2022
9b874bc
Add relyingPartyRegistrationId to AbstractSaml2AuthenticationRequest
ugrave May 16, 2022
7d97839
StrictHttpFirewall allows CJKV characters
rwinch May 17, 2022
362f155
createEvaluationContext should defer lookup of Authentication
evgeniycheban May 7, 2022
5adb6e2
Correctly encode query parameters
jzheaux May 20, 2022
b51c71c
Use original query string to verify signature
jzheaux May 20, 2022
53e509f
Remove duplicate check
jzheaux May 23, 2022
16664dc
Use Base64 encoder with no CRLF in output for SAML 2.0 messages
junytse May 21, 2022
495028e
Some Security Expressions cause NPE when used within Query annotation
evgeniycheban May 17, 2022
8a03d1f
Add AuthorizationManager to Messaging
jzheaux Apr 7, 2022
23cc1eb
Update JUnit 5 annotations in documentation
nor-ek Mar 22, 2022
2363dbb
Polish ExtendWith Docs
jzheaux May 27, 2022
dda026b
Improve ContextConfiguration Docs
jzheaux May 27, 2022
0abc54c
Correct access(String) reference
jzheaux May 27, 2022
7c0ba58
Fix rnc typo
jzheaux May 27, 2022
9dbd1f3
Use AuthorizationManager in <http>
jzheaux May 31, 2022
d994ddc
Polish InterceptUrlConfigTests
jzheaux May 31, 2022
38d481e
Make Internal Class Package-Private
jzheaux May 31, 2022
b1004af
Use 'md:' prefix in EntityDescriptor XML
ClaudioConsolmagno May 29, 2022
24701b5
Update opaque-token.adoc
andrelugomes May 31, 2022
d557d2d
Add RoleHierarchy to AuthorityAuthorizationManager
evgeniycheban May 31, 2022
953b54f
Fix title render issue of Digest Authentication document
skaifun May 27, 2022
4c2401a
Revert "Make source code compatible with JDK 8"
marcusdacoregio Feb 2, 2022
ccb1f68
Fix member variable using Java 9+ feature
marcusdacoregio Feb 2, 2022
4631375
Use Java 8 Toolchain for modules
marcusdacoregio Feb 2, 2022
e20323e
Use Java 11 Toolchain for OpenSaml4 compile
marcusdacoregio Feb 2, 2022
23903b5
Use Reflection to instantiate OpenSAML4 classes
marcusdacoregio Feb 3, 2022
3dd54bc
Run SAML 2.0 tests in an exclusive task
marcusdacoregio Feb 3, 2022
4d65d96
Fix saml2Tests always running after a single test
marcusdacoregio Jun 3, 2022
759d799
Change phoneNumberVerified with type Boolean
ziponia Jun 1, 2022
fc653bb
make SAML authentication request uri configurable
houssemba Jun 5, 2022
742d753
Fix typo in BasicLookupStrategy Javadoc
1chz Jun 5, 2022
66592c1
Enable BackportBot on 5.8.x
rwinch Jun 6, 2022
f359051
Fix typo in BasicLookupStrategy Javadoc
rwinch Jun 6, 2022
cf69cdf
Reverse content type check
ZhivkoDelchev May 12, 2022
29ba67b
Remove dependency on commons-codec by using java.util.Base64
j3graham Jun 1, 2022
3ca4b06
Support multiple SingleLogoutService bindings.
emopti-jrufer May 26, 2022
bb9c7d1
Add OpenSamlSigningUtilsTests
jzheaux Jun 9, 2022
812bb0e
Add missing KeyInfo
jzheaux Jun 9, 2022
79c2b87
Allow form login when single OAuth2 Provider is configured
May 27, 2021
98ca4e4
Creation of static methods in AuthenticatedAuthorizationManager
andresbermeoq Jun 25, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
20 changes: 20 additions & 0 deletions .github/actions/algolia-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"index_name": "security-docs",
"start_urls": [
"https://docs.spring.io/spring-security/reference/"
],
"selectors": {
"lvl0": {
"selector": "//nav[@class='crumbs']//li[@class='crumb'][last()-1]",
"type": "xpath",
"global": true,
"default_value": "Home"
},
"lvl1": ".doc h1",
"lvl2": ".doc h2",
"lvl3": ".doc h3",
"lvl4": ".doc h4",
"text": ".doc p, .doc td.content, .doc th.tableblock"
}
}

20 changes: 20 additions & 0 deletions .github/actions/algolia-deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash

HOST="$1"
HOST_PATH="$2"
SSH_PRIVATE_KEY="$3"
SSH_KNOWN_HOST="$4"


if [ "$#" -ne 4 ]; then
echo -e "not enough arguments USAGE:\n\n$0 \$HOST \$HOST_PATH \$SSH_PRIVATE_KEY \$SSH_KNOWN_HOSTS \n\n" >&2
exit 1
fi

# Use a non-default path to avoid overriding when testing locally
SSH_PRIVATE_KEY_PATH=~/.ssh/github-actions-docs
install -m 600 -D /dev/null "$SSH_PRIVATE_KEY_PATH"
echo "$SSH_PRIVATE_KEY" > "$SSH_PRIVATE_KEY_PATH"
echo "$SSH_KNOWN_HOST" > ~/.ssh/known_hosts
rsync --delete -avze "ssh -i $SSH_PRIVATE_KEY_PATH" docs/build/site/ "$HOST:$HOST_PATH"
rm -f "$SSH_PRIVATE_KEY_PATH"
21 changes: 21 additions & 0 deletions .github/actions/algolia-docsearch-scraper.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash

###
# Docs
# config.json https://docsearch.algolia.com/docs/config-file
# Run the crawler https://docsearch.algolia.com/docs/run-your-own/#run-the-crawl-from-the-docker-image

### USAGE
if [ "$#" -ne 3 ]; then
echo -e "not enough arguments USAGE:\n\n$0 \$ALGOLIA_APPLICATION_ID \$ALGOLIA_API_KEY \$CONFIG_FILE\n\n" >&2
exit 1
fi

# Script Parameters
APPLICATION_ID=$1
API_KEY=$2
CONFIG_FILE=$3

#### Script
script_dir=$(dirname $0)
docker run -e "APPLICATION_ID=$APPLICATION_ID" -e "API_KEY=$API_KEY" -e "CONFIG=$(cat $CONFIG_FILE | jq -r tostring)" algolia/docsearch-scraper
4 changes: 2 additions & 2 deletions .github/actions/dispatch.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
REPOSITORY_REF="$1"
TOKEN="$2"

curl -H "Accept: application/vnd.github.everest-preview+json" -H "Authorization: token ${TOKEN}" --request POST --data '{"event_type": "request-build"}' https://api.github.com/repos/${REPOSITORY_REF}/dispatches
echo "Requested Build for $REPOSITORY_REF"
curl -H "Accept: application/vnd.github.everest-preview+json" -H "Authorization: token ${TOKEN}" --request POST --data '{"event_type": "request-build-reference"}' https://api.github.com/repos/${REPOSITORY_REF}/dispatches
echo "Requested Build for $REPOSITORY_REF"
16 changes: 16 additions & 0 deletions .github/workflows/algolia-index.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Update Algolia Index

on:
schedule:
- cron: '0 10 * * *' # Once per day at 10am UTC
workflow_dispatch: # Manual trigger

jobs:
update:
name: Update Algolia Index
runs-on: ubuntu-latest
steps:
- name: Checkout Source
uses: actions/checkout@v2
- name: Update Index
run: ${GITHUB_WORKSPACE}/.github/actions/algolia-docsearch-scraper.sh "${{ secrets.ALGOLIA_APPLICATION_ID }}" "${{ secrets.ALGOLIA_WRITE_API_KEY }}" "${GITHUB_WORKSPACE}/.github/actions/algolia-config.json"
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
name: reference
name: Generate Antora Files and Request Build

on:
workflow_dispatch:
push:
branches-ignore:
- 'gh-pages'
tags: '**'

env:
GH_ACTIONS_REPO_TOKEN: ${{ secrets.GH_ACTIONS_REPO_TOKEN }}
Expand All @@ -27,4 +29,4 @@ jobs:
repository-name: "spring-io/spring-generated-docs"
token: ${{ secrets.GH_ACTIONS_REPO_TOKEN }}
- name: Dispatch Build Request
run: ${GITHUB_WORKSPACE}/.github/actions/dispatch.sh 'spring-io/spring-reference' "$GH_ACTIONS_REPO_TOKEN"
run: ${GITHUB_WORKSPACE}/.github/actions/dispatch.sh 'spring-projects/spring-security' "$GH_ACTIONS_REPO_TOKEN"
26 changes: 26 additions & 0 deletions .github/workflows/backport-bot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Backport Bot

on:
issues:
types: [labeled]
pull_request:
types: [labeled]
push:
branches:
- '*.x'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
- name: Download BackportBot
run: wget https://github.com/spring-io/backport-bot/releases/download/latest/backport-bot-0.0.1-SNAPSHOT.jar
- name: Backport
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_EVENT: ${{ toJSON(github.event) }}
run: java -jar backport-bot-0.0.1-SNAPSHOT.jar --github.accessToken="$GITHUB_TOKEN" --github.event_name "$GITHUB_EVENT_NAME" --github.event "$GITHUB_EVENT"
6 changes: 5 additions & 1 deletion .github/workflows/continuous-integration-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,15 @@ jobs:
mkdir -p ~/.gradle
echo 'systemProp.user.name=spring-builds+github' >> ~/.gradle/gradle.properties
- name: Check samples project
env:
LOCAL_REPOSITORY_PATH: ${{ github.workspace }}/build/publications/repos
SAMPLES_INIT_SCRIPT: ${{ github.workspace }}/build/includeRepo/spring-security-ci.gradle
run: |
export GRADLE_ENTERPRISE_CACHE_USERNAME="$GRADLE_ENTERPRISE_CACHE_USER"
export GRADLE_ENTERPRISE_CACHE_PASSWORD="$GRADLE_ENTERPRISE_CACHE_PASSWORD"
export GRADLE_ENTERPRISE_ACCESS_KEY="$GRADLE_ENTERPRISE_SECRET_ACCESS_KEY"
./gradlew checkSamples --stacktrace
./gradlew publishMavenJavaPublicationToLocalRepository
./gradlew checkSamples -PsamplesInitScript="$SAMPLES_INIT_SCRIPT" -PlocalRepositoryPath="$LOCAL_REPOSITORY_PATH" --stacktrace
check_tangles:
name: Check for Package Tangles
needs: [ prerequisites ]
Expand Down
33 changes: 33 additions & 0 deletions .github/workflows/deploy-reference.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Build & Deploy Reference

on:
repository_dispatch:
types: request-build-reference
schedule:
- cron: '0 10 * * *' # Once per day at 10am UTC
workflow_dispatch: # Manual trigger

jobs:
deploy:
name: deploy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'adopt'
cache: gradle
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@e6e38bacfdf1a337459f332974bb2327a31aaf4b
- name: Build with Gradle
run: ./gradlew :spring-security-docs:antora --stacktrace
- name: Cleanup Gradle Cache
# Remove some files from the Gradle cache, so they aren't cached by GitHub Actions.
# Restoring these files from a GitHub Actions cache might cause problems for future builds.
run: |
rm -f ~/.gradle/caches/modules-2/modules-2.lock
rm -f ~/.gradle/caches/modules-2/gc.properties
- name: Deploy
run: ${GITHUB_WORKSPACE}/.github/actions/algolia-deploy.sh "${{ secrets.DOCS_USERNAME }}@${{ secrets.DOCS_HOST }}" "/opt/www/domains/spring.io/docs/htdocs/spring-security/reference/" "${{ secrets.DOCS_SSH_KEY }}" "${{ secrets.DOCS_SSH_HOST_KEY }}"
6 changes: 6 additions & 0 deletions .sdkmanrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Use sdkman to run "sdk env" to initialize with correct JDK version
# Enable auto-env through the sdkman_auto_env config
# See https://sdkman.io/usage#config
# A summary is to add the following to ~/.sdkman/etc/config
# sdkman_auto_env=true
java=11.0.14-tem
12 changes: 11 additions & 1 deletion RELEASE.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,16 @@ Alternatively, you can manually check using https://github.com/spring-projects/s

Update the version number in `gradle.properties` for the release, for example `5.5.0-M1`, `5.5.0-RC1`, `5.5.0`

= Update Antora Version

You will need to update the antora.yml version.
If you are unsure of what the values should be, the following task will instruct you what the expected values are:

[source,bash]
----
./gradlew :spring-security-docs:antoraCheckVersion
----

= Build Locally

Run the build using
Expand Down Expand Up @@ -119,7 +129,7 @@ git push origin 5.4.0-RC1

== 7. Update to Next Development Version

* Update `gradle.properties` version to next `+SNAPSHOT+` version and then push
* Update `gradle.properties` version to next `+SNAPSHOT+` version, update antora.yml, and then push

== 8. Update version on project page

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
import org.springframework.security.acls.domain.DefaultPermissionFactory;
import org.springframework.security.acls.domain.DefaultPermissionGrantingStrategy;
import org.springframework.security.acls.domain.GrantedAuthoritySid;
import org.springframework.security.acls.domain.ObjectIdentityImpl;
import org.springframework.security.acls.domain.ObjectIdentityRetrievalStrategyImpl;
import org.springframework.security.acls.domain.PermissionFactory;
import org.springframework.security.acls.domain.PrincipalSid;
import org.springframework.security.acls.model.AccessControlEntry;
Expand All @@ -51,6 +51,7 @@
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.ObjectIdentityGenerator;
import org.springframework.security.acls.model.Permission;
import org.springframework.security.acls.model.PermissionGrantingStrategy;
import org.springframework.security.acls.model.Sid;
Expand All @@ -73,8 +74,8 @@
* one in <tt>lookupObjectIdentities</tt>. These are built from the same select and "order
* by" clause, using a different where clause in each case. In order to use custom schema
* or column names, each of these SQL clauses can be customized, but they must be
* consistent with each other and with the expected result set generated by the the
* default values.
* consistent with each other and with the expected result set generated by the default
* values.
*
* @author Ben Alex
*/
Expand Down Expand Up @@ -109,6 +110,8 @@ public class BasicLookupStrategy implements LookupStrategy {

private final AclAuthorizationStrategy aclAuthorizationStrategy;

private ObjectIdentityGenerator objectIdentityGenerator;

private PermissionFactory permissionFactory = new DefaultPermissionFactory();

private final AclCache aclCache;
Expand Down Expand Up @@ -162,6 +165,7 @@ public BasicLookupStrategy(DataSource dataSource, AclCache aclCache,
this.aclCache = aclCache;
this.aclAuthorizationStrategy = aclAuthorizationStrategy;
this.grantingStrategy = grantingStrategy;
this.objectIdentityGenerator = new ObjectIdentityRetrievalStrategyImpl();
this.aclClassIdUtils = new AclClassIdUtils();
this.fieldAces.setAccessible(true);
this.fieldAcl.setAccessible(true);
Expand Down Expand Up @@ -488,6 +492,11 @@ public final void setAclClassIdSupported(boolean aclClassIdSupported) {
}
}

public final void setObjectIdentityGenerator(ObjectIdentityGenerator objectIdentityGenerator) {
Assert.notNull(objectIdentityGenerator, "objectIdentityGenerator cannot be null");
this.objectIdentityGenerator = objectIdentityGenerator;
}

public final void setConversionService(ConversionService conversionService) {
this.aclClassIdUtils = new AclClassIdUtils(conversionService);
}
Expand Down Expand Up @@ -569,7 +578,8 @@ private void convertCurrentResultIntoObject(Map<Serializable, Acl> acls, ResultS
// target id type, e.g. UUID.
Serializable identifier = (Serializable) rs.getObject("object_id_identity");
identifier = BasicLookupStrategy.this.aclClassIdUtils.identifierFrom(identifier, rs);
ObjectIdentity objectIdentity = new ObjectIdentityImpl(rs.getString("class"), identifier);
ObjectIdentity objectIdentity = BasicLookupStrategy.this.objectIdentityGenerator
.createObjectIdentity(identifier, rs.getString("class"));

Acl parentAcl = null;
long parentAclId = rs.getLong("parent_object");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,12 @@
import org.springframework.core.convert.ConversionService;
import org.springframework.jdbc.core.JdbcOperations;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.security.acls.domain.ObjectIdentityImpl;
import org.springframework.security.acls.domain.ObjectIdentityRetrievalStrategyImpl;
import org.springframework.security.acls.model.Acl;
import org.springframework.security.acls.model.AclService;
import org.springframework.security.acls.model.NotFoundException;
import org.springframework.security.acls.model.ObjectIdentity;
import org.springframework.security.acls.model.ObjectIdentityGenerator;
import org.springframework.security.acls.model.Sid;
import org.springframework.util.Assert;

Expand Down Expand Up @@ -81,6 +82,8 @@ public class JdbcAclService implements AclService {

private AclClassIdUtils aclClassIdUtils;

private ObjectIdentityGenerator objectIdentityGenerator;

public JdbcAclService(DataSource dataSource, LookupStrategy lookupStrategy) {
this(new JdbcTemplate(dataSource), lookupStrategy);
}
Expand All @@ -91,6 +94,7 @@ public JdbcAclService(JdbcOperations jdbcOperations, LookupStrategy lookupStrate
this.jdbcOperations = jdbcOperations;
this.lookupStrategy = lookupStrategy;
this.aclClassIdUtils = new AclClassIdUtils();
this.objectIdentityGenerator = new ObjectIdentityRetrievalStrategyImpl();
}

@Override
Expand All @@ -105,7 +109,7 @@ private ObjectIdentity mapObjectIdentityRow(ResultSet rs) throws SQLException {
String javaType = rs.getString("class");
Serializable identifier = (Serializable) rs.getObject("obj_id");
identifier = this.aclClassIdUtils.identifierFrom(identifier, rs);
return new ObjectIdentityImpl(javaType, identifier);
return this.objectIdentityGenerator.createObjectIdentity(identifier, javaType);
}

@Override
Expand Down Expand Up @@ -165,6 +169,11 @@ public void setConversionService(ConversionService conversionService) {
this.aclClassIdUtils = new AclClassIdUtils(conversionService);
}

public void setObjectIdentityGenerator(ObjectIdentityGenerator objectIdentityGenerator) {
Assert.notNull(objectIdentityGenerator, "objectIdentityGenerator cannot be null");
this.objectIdentityGenerator = objectIdentityGenerator;
}

protected boolean isAclClassIdSupported() {
return this.aclClassIdSupported;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -318,4 +318,13 @@ public void testCreateGrantedAuthority() {
assertThat(((GrantedAuthoritySid) result).getGrantedAuthority()).isEqualTo("sid");
}

@Test
public void setObjectIdentityGeneratorWhenNullThenThrowsIllegalArgumentException() {
// @formatter:off
assertThatIllegalArgumentException()
.isThrownBy(() -> this.strategy.setObjectIdentityGenerator(null))
.withMessage("objectIdentityGenerator cannot be null");
// @formatter:on
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@

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.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyList;
import static org.mockito.ArgumentMatchers.anyString;
Expand Down Expand Up @@ -170,6 +171,26 @@ public void findChildrenOfIdTypeUUID() {
.isEqualTo(UUID.fromString("25d93b3f-c3aa-4814-9d5e-c7c96ced7762"));
}

@Test
public void setObjectIdentityGeneratorWhenNullThenThrowsIllegalArgumentException() {
assertThatIllegalArgumentException()
.isThrownBy(() -> this.aclServiceIntegration.setObjectIdentityGenerator(null))
.withMessage("objectIdentityGenerator cannot be null");
}

@Test
public void findChildrenWhenObjectIdentityGeneratorSetThenUsed() {
this.aclServiceIntegration
.setObjectIdentityGenerator((id, type) -> new ObjectIdentityImpl(type, "prefix:" + id));

ObjectIdentity objectIdentity = new ObjectIdentityImpl("location", "US");
this.aclServiceIntegration.setAclClassIdSupported(true);
List<ObjectIdentity> objectIdentities = this.aclServiceIntegration.findChildren(objectIdentity);
assertThat(objectIdentities.size()).isEqualTo(1);
assertThat(objectIdentities.get(0).getType()).isEqualTo("location");
assertThat(objectIdentities.get(0).getIdentifier()).isEqualTo("prefix:US-PAL");
}

class MockLongIdDomainObject {

private Object id;
Expand Down
4 changes: 0 additions & 4 deletions aspects/spring-security-aspects.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,3 @@ sourceSets.test.aspectj.srcDir "src/test/java"
sourceSets.test.java.srcDirs = files()

compileAspectj.ajcOptions.outxmlfile = "META-INF/aop.xml"

aspectj {
version = aspectjVersion
}
Loading