spring-boot/spring-boot-tests/spring-boot-smoke-tests
Madhura Bhave d9d161cd6b Allow previously authorized users to access the error page
Prior to this commit, the `ErrorPageSecurityFilter` verified if
access to the error page was allowed by invoking the
`WebInvocationPrivilegeEvaluator` with the Authentication from the
`SecurityContextHolder`.
This meant that access to the error page was denied for a `null` Authentication
 or `AnonymousAuthenticationToken` in cases where the error page required
authenticated access. This prevented authorized users from accessing the
error page in case the Authentication wasn't retrievable for the error dispatch,
which is the case for `@Transient` authentication or stateless session policy.

This commit updates the `ErrorPageSecurityFilter` to check access to the error page
only if the error is an authn or authz error in cases where an authentication object
is not found in the SecurityContextHolder. This makes the error response consistent
when bad credentials or no credentials are used while also allowing access to previously
authorized users.

Fixes gh-28953
2021-12-17 16:58:58 -08:00
..
spring-boot-smoke-test-activemq Add junit-platform-launcher dependency by convention 2021-02-02 13:03:21 +00:00
spring-boot-smoke-test-actuator Update copyright year of changed files 2021-11-24 10:23:32 -08:00
spring-boot-smoke-test-actuator-custom-security Allow previously authorized users to access the error page 2021-12-17 16:58:58 -08:00
spring-boot-smoke-test-actuator-log4j2 Add junit-platform-launcher dependency by convention 2021-02-02 13:03:21 +00:00
spring-boot-smoke-test-actuator-noweb Add junit-platform-launcher dependency by convention 2021-02-02 13:03:21 +00:00
spring-boot-smoke-test-actuator-ui Add junit-platform-launcher dependency by convention 2021-02-02 13:03:21 +00:00
spring-boot-smoke-test-amqp Add junit-platform-launcher dependency by convention 2021-02-02 13:03:21 +00:00
spring-boot-smoke-test-animated-banner Add junit-platform-launcher dependency by convention 2021-02-02 13:03:21 +00:00
spring-boot-smoke-test-ant Add junit-platform-launcher dependency by convention 2021-02-02 13:03:21 +00:00
spring-boot-smoke-test-aop Remove unnecessary throws declaration in tests 2021-05-17 09:31:51 +02:00
spring-boot-smoke-test-atmosphere Merge branch '2.3.x' into 2.4.x 2021-02-02 15:12:27 +00:00
spring-boot-smoke-test-batch Add junit-platform-launcher dependency by convention 2021-02-02 13:03:21 +00:00
spring-boot-smoke-test-bootstrap-registry Deprecate Bootstrapper 2021-03-24 14:10:12 -07:00
spring-boot-smoke-test-cache Add junit-platform-launcher dependency by convention 2021-02-02 13:03:21 +00:00
spring-boot-smoke-test-data-couchbase Upgrade to Couchbase Client 3.1.5 2021-05-17 13:39:53 +01:00
spring-boot-smoke-test-data-elasticsearch Fix Spring Data Elasticsearch deprecations 2021-04-13 20:05:48 +01:00
spring-boot-smoke-test-data-jdbc Merge branch '2.3.x' into 2.4.x 2021-02-02 15:12:27 +00:00
spring-boot-smoke-test-data-jpa Merge branch '2.4.x' into 2.5.x 2021-08-18 17:56:32 +01:00
spring-boot-smoke-test-data-ldap Add junit-platform-launcher dependency by convention 2021-02-02 13:03:21 +00:00
spring-boot-smoke-test-data-mongodb Merge branch '2.5.x' 2021-08-12 18:09:04 +01:00
spring-boot-smoke-test-data-neo4j Work around compile warnings from Data Neo4j's use of API Guardian 2021-07-14 18:28:24 +01:00
spring-boot-smoke-test-data-r2dbc Auto-configure script-based R2DBC database initialization 2021-03-29 12:01:19 +01:00
spring-boot-smoke-test-data-r2dbc-flyway Merge branch '2.3.x' into 2.4.x 2021-02-02 15:12:27 +00:00
spring-boot-smoke-test-data-r2dbc-liquibase Prohibit unwanted dependencies in all modules not just starters 2021-11-12 20:04:35 +00:00
spring-boot-smoke-test-data-redis Add junit-platform-launcher dependency by convention 2021-02-02 13:03:21 +00:00
spring-boot-smoke-test-data-rest Add junit-platform-launcher dependency by convention 2021-02-02 13:03:21 +00:00
spring-boot-smoke-test-devtools Remove use of Thymeleaf from smoke tests 2021-11-23 12:13:05 -06:00
spring-boot-smoke-test-flyway Merge branch '2.4.x' 2021-06-08 18:05:50 -07:00
spring-boot-smoke-test-hateoas Simplify code that makes hal the default json media type 2021-03-10 12:14:54 +00:00
spring-boot-smoke-test-hazelcast3 Merge branch '2.3.x' into 2.4.x 2021-02-02 15:12:27 +00:00
spring-boot-smoke-test-hibernate52 Reinstate support for Hibernate < 5.5 2021-07-19 13:52:40 +01:00
spring-boot-smoke-test-integration Remove unnecessary throws declaration in tests 2021-05-17 09:31:51 +02:00
spring-boot-smoke-test-jersey Polish "Polish access modifiers for test classes" 2021-08-18 17:52:42 +01:00
spring-boot-smoke-test-jetty Add junit-platform-launcher dependency by convention 2021-02-02 13:03:21 +00:00
spring-boot-smoke-test-jetty10 Polish 2021-07-21 11:55:38 +01:00
spring-boot-smoke-test-jetty-jsp Prohibit unwanted dependencies in all modules not just starters 2021-11-12 20:04:35 +00:00
spring-boot-smoke-test-jetty-ssl Prohibit unwanted dependencies in all modules not just starters 2021-11-12 20:04:35 +00:00
spring-boot-smoke-test-jpa Prohibit unwanted dependencies in all modules not just starters 2021-11-12 20:04:35 +00:00
spring-boot-smoke-test-jta-atomikos Merge branch '2.4.x' into 2.5.x 2021-11-12 20:31:25 +00:00
spring-boot-smoke-test-junit-vintage Merge branch '2.3.x' into 2.4.x 2021-02-02 15:12:27 +00:00
spring-boot-smoke-test-kafka Disable on Windows tests that use embedded Kafka 2021-10-21 10:46:50 +01:00
spring-boot-smoke-test-liquibase Merge branch '2.4.x' into 2.5.x 2021-11-12 20:31:25 +00:00
spring-boot-smoke-test-logback Remove unnecessary throws declaration in tests 2021-05-17 09:31:51 +02:00
spring-boot-smoke-test-oauth2-client Prohibit unwanted dependencies in all modules not just starters 2021-11-12 20:04:35 +00:00
spring-boot-smoke-test-oauth2-resource-server Merge branch '2.3.x' into 2.4.x 2021-02-02 15:12:27 +00:00
spring-boot-smoke-test-parent-context Remove unnecessary throws declaration in tests 2021-05-17 09:31:51 +02:00
spring-boot-smoke-test-profile Convert environment used by SpringBootTestContextLoader 2021-11-17 16:40:53 -08:00
spring-boot-smoke-test-property-validation Add junit-platform-launcher dependency by convention 2021-02-02 13:03:21 +00:00
spring-boot-smoke-test-quartz Merge branch '2.4.x' into 2.5.x 2021-08-18 17:56:32 +01:00
spring-boot-smoke-test-reactive-oauth2-client Prohibit unwanted dependencies in all modules not just starters 2021-11-12 20:04:35 +00:00
spring-boot-smoke-test-reactive-oauth2-resource-server Add junit-platform-launcher dependency by convention 2021-02-02 13:03:21 +00:00
spring-boot-smoke-test-rsocket Polish "Polish access modifiers for test classes" 2021-08-18 17:52:42 +01:00
spring-boot-smoke-test-saml2-service-provider Merge branch '2.3.x' into 2.4.x 2021-02-02 15:12:27 +00:00
spring-boot-smoke-test-secure Add junit-platform-launcher dependency by convention 2021-02-02 13:03:21 +00:00
spring-boot-smoke-test-secure-jersey Merge branch '2.4.x' 2021-02-02 15:14:18 +00:00
spring-boot-smoke-test-secure-webflux Polish 2021-07-21 11:53:10 +01:00
spring-boot-smoke-test-servlet Add junit-platform-launcher dependency by convention 2021-02-02 13:03:21 +00:00
spring-boot-smoke-test-session-hazelcast Merge branch '2.5.x' 2021-11-12 23:40:35 +00:00
spring-boot-smoke-test-session-jdbc Update copyright year of changed files 2021-11-24 10:23:32 -08:00
spring-boot-smoke-test-session-mongo Remove parameterization of session smoke tests 2021-10-19 16:47:53 -07:00
spring-boot-smoke-test-session-redis Remove parameterization of session smoke tests 2021-10-19 16:47:53 -07:00
spring-boot-smoke-test-session-webflux Remove default spring.mongodb.embedded.version 2021-07-13 10:13:54 +01:00
spring-boot-smoke-test-simple Merge branch '2.3.x' into 2.4.x 2021-02-02 15:12:27 +00:00
spring-boot-smoke-test-test Merge branch '2.4.x' into 2.5.x 2021-11-12 20:31:25 +00:00
spring-boot-smoke-test-test-nomockito Remove unnecessary throws declaration in tests 2021-05-17 09:31:51 +02:00
spring-boot-smoke-test-testng Add junit-platform-launcher dependency by convention 2021-02-02 13:03:21 +00:00
spring-boot-smoke-test-tomcat Remove unnecessary throws declaration in tests 2021-05-17 09:31:51 +02:00
spring-boot-smoke-test-tomcat-jsp Prohibit unwanted dependencies in all modules not just starters 2021-11-12 20:04:35 +00:00
spring-boot-smoke-test-tomcat-multi-connectors Prohibit unwanted dependencies in all modules not just starters 2021-11-12 20:04:35 +00:00
spring-boot-smoke-test-tomcat-ssl Prohibit unwanted dependencies in all modules not just starters 2021-11-12 20:04:35 +00:00
spring-boot-smoke-test-traditional Update web.xml xsd references to for 3.1 version 2021-12-16 13:45:12 -08:00
spring-boot-smoke-test-undertow Add junit-platform-launcher dependency by convention 2021-02-02 13:03:21 +00:00
spring-boot-smoke-test-undertow-ssl Prohibit unwanted dependencies in all modules not just starters 2021-11-12 20:04:35 +00:00
spring-boot-smoke-test-war Add junit-platform-launcher dependency by convention 2021-02-02 13:03:21 +00:00
spring-boot-smoke-test-web-freemarker Add junit-platform-launcher dependency by convention 2021-02-02 13:03:21 +00:00
spring-boot-smoke-test-web-groovy-templates Add junit-platform-launcher dependency by convention 2021-02-02 13:03:21 +00:00
spring-boot-smoke-test-web-jsp Merge branch '2.4.x' into 2.5.x 2021-11-12 20:31:25 +00:00
spring-boot-smoke-test-web-method-security Remove use of Thymeleaf from smoke tests 2021-11-23 12:13:05 -06:00
spring-boot-smoke-test-web-mustache Add junit-platform-launcher dependency by convention 2021-02-02 13:03:21 +00:00
spring-boot-smoke-test-web-secure Allow previously authorized users to access the error page 2021-12-17 16:58:58 -08:00
spring-boot-smoke-test-web-secure-custom Remove use of Thymeleaf from smoke tests 2021-11-23 12:13:05 -06:00
spring-boot-smoke-test-web-secure-jdbc Remove use of Thymeleaf from smoke tests 2021-11-23 12:13:05 -06:00
spring-boot-smoke-test-web-static Add junit-platform-launcher dependency by convention 2021-02-02 13:03:21 +00:00
spring-boot-smoke-test-web-thymeleaf Remove use of Thymeleaf from smoke tests 2021-11-23 12:13:05 -06:00
spring-boot-smoke-test-webflux Add junit-platform-launcher dependency by convention 2021-02-02 13:03:21 +00:00
spring-boot-smoke-test-webflux-coroutines Add junit-platform-launcher dependency by convention 2021-02-02 13:03:21 +00:00
spring-boot-smoke-test-webservices Polish "Add @WebServiceServerTest slice test support" 2021-07-16 11:28:39 +01:00
spring-boot-smoke-test-websocket-jetty Merge branch '2.3.x' into 2.4.x 2021-02-02 15:12:27 +00:00
spring-boot-smoke-test-websocket-jetty10 Polish 2021-07-13 09:56:45 +02:00
spring-boot-smoke-test-websocket-tomcat Merge branch '2.3.x' into 2.4.x 2021-02-02 15:12:27 +00:00
spring-boot-smoke-test-websocket-undertow Merge branch '2.3.x' into 2.4.x 2021-02-02 15:12:27 +00:00
spring-boot-smoke-test-xml Remove unnecessary throws declaration in tests 2021-05-17 09:31:51 +02:00