You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
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
3 years ago
..
spring-boot-smoke-test-activemq Add junit-platform-launcher dependency by convention 4 years ago
spring-boot-smoke-test-actuator Update copyright year of changed files 3 years ago
spring-boot-smoke-test-actuator-custom-security Allow previously authorized users to access the error page 3 years ago
spring-boot-smoke-test-actuator-log4j2 Add junit-platform-launcher dependency by convention 4 years ago
spring-boot-smoke-test-actuator-noweb Add junit-platform-launcher dependency by convention 4 years ago
spring-boot-smoke-test-actuator-ui Add junit-platform-launcher dependency by convention 4 years ago
spring-boot-smoke-test-amqp Add junit-platform-launcher dependency by convention 4 years ago
spring-boot-smoke-test-animated-banner Add junit-platform-launcher dependency by convention 4 years ago
spring-boot-smoke-test-ant Add junit-platform-launcher dependency by convention 4 years ago
spring-boot-smoke-test-aop Remove unnecessary throws declaration in tests 4 years ago
spring-boot-smoke-test-atmosphere Merge branch '2.3.x' into 2.4.x 4 years ago
spring-boot-smoke-test-batch Add junit-platform-launcher dependency by convention 4 years ago
spring-boot-smoke-test-bootstrap-registry Deprecate Bootstrapper 4 years ago
spring-boot-smoke-test-cache Add junit-platform-launcher dependency by convention 4 years ago
spring-boot-smoke-test-data-couchbase Upgrade to Couchbase Client 3.1.5 4 years ago
spring-boot-smoke-test-data-elasticsearch Fix Spring Data Elasticsearch deprecations 4 years ago
spring-boot-smoke-test-data-jdbc Merge branch '2.3.x' into 2.4.x 4 years ago
spring-boot-smoke-test-data-jpa Merge branch '2.4.x' into 2.5.x 3 years ago
spring-boot-smoke-test-data-ldap Add junit-platform-launcher dependency by convention 4 years ago
spring-boot-smoke-test-data-mongodb Merge branch '2.5.x' 3 years ago
spring-boot-smoke-test-data-neo4j Work around compile warnings from Data Neo4j's use of API Guardian 3 years ago
spring-boot-smoke-test-data-r2dbc Auto-configure script-based R2DBC database initialization 4 years ago
spring-boot-smoke-test-data-r2dbc-flyway Merge branch '2.3.x' into 2.4.x 4 years ago
spring-boot-smoke-test-data-r2dbc-liquibase Prohibit unwanted dependencies in all modules not just starters 3 years ago
spring-boot-smoke-test-data-redis Add junit-platform-launcher dependency by convention 4 years ago
spring-boot-smoke-test-data-rest Add junit-platform-launcher dependency by convention 4 years ago
spring-boot-smoke-test-devtools Remove use of Thymeleaf from smoke tests 3 years ago
spring-boot-smoke-test-flyway Merge branch '2.4.x' 3 years ago
spring-boot-smoke-test-hateoas Simplify code that makes hal the default json media type 4 years ago
spring-boot-smoke-test-hazelcast3 Merge branch '2.3.x' into 2.4.x 4 years ago
spring-boot-smoke-test-hibernate52 Reinstate support for Hibernate < 5.5 3 years ago
spring-boot-smoke-test-integration Remove unnecessary throws declaration in tests 4 years ago
spring-boot-smoke-test-jersey Polish "Polish access modifiers for test classes" 3 years ago
spring-boot-smoke-test-jetty Add junit-platform-launcher dependency by convention 4 years ago
spring-boot-smoke-test-jetty-jsp Prohibit unwanted dependencies in all modules not just starters 3 years ago
spring-boot-smoke-test-jetty-ssl Prohibit unwanted dependencies in all modules not just starters 3 years ago
spring-boot-smoke-test-jetty10 Polish 3 years ago
spring-boot-smoke-test-jpa Prohibit unwanted dependencies in all modules not just starters 3 years ago
spring-boot-smoke-test-jta-atomikos Merge branch '2.4.x' into 2.5.x 3 years ago
spring-boot-smoke-test-junit-vintage Merge branch '2.3.x' into 2.4.x 4 years ago
spring-boot-smoke-test-kafka Disable on Windows tests that use embedded Kafka 3 years ago
spring-boot-smoke-test-liquibase Merge branch '2.4.x' into 2.5.x 3 years ago
spring-boot-smoke-test-logback Remove unnecessary throws declaration in tests 4 years ago
spring-boot-smoke-test-oauth2-client Prohibit unwanted dependencies in all modules not just starters 3 years ago
spring-boot-smoke-test-oauth2-resource-server Merge branch '2.3.x' into 2.4.x 4 years ago
spring-boot-smoke-test-parent-context Remove unnecessary throws declaration in tests 4 years ago
spring-boot-smoke-test-profile Convert environment used by SpringBootTestContextLoader 3 years ago
spring-boot-smoke-test-property-validation Add junit-platform-launcher dependency by convention 4 years ago
spring-boot-smoke-test-quartz Merge branch '2.4.x' into 2.5.x 3 years ago
spring-boot-smoke-test-reactive-oauth2-client Prohibit unwanted dependencies in all modules not just starters 3 years ago
spring-boot-smoke-test-reactive-oauth2-resource-server Add junit-platform-launcher dependency by convention 4 years ago
spring-boot-smoke-test-rsocket Polish "Polish access modifiers for test classes" 3 years ago
spring-boot-smoke-test-saml2-service-provider Merge branch '2.3.x' into 2.4.x 4 years ago
spring-boot-smoke-test-secure Add junit-platform-launcher dependency by convention 4 years ago
spring-boot-smoke-test-secure-jersey Merge branch '2.4.x' 4 years ago
spring-boot-smoke-test-secure-webflux Polish 3 years ago
spring-boot-smoke-test-servlet Add junit-platform-launcher dependency by convention 4 years ago
spring-boot-smoke-test-session-hazelcast Merge branch '2.5.x' 3 years ago
spring-boot-smoke-test-session-jdbc Update copyright year of changed files 3 years ago
spring-boot-smoke-test-session-mongo Remove parameterization of session smoke tests 3 years ago
spring-boot-smoke-test-session-redis Remove parameterization of session smoke tests 3 years ago
spring-boot-smoke-test-session-webflux Remove default spring.mongodb.embedded.version 3 years ago
spring-boot-smoke-test-simple Merge branch '2.3.x' into 2.4.x 4 years ago
spring-boot-smoke-test-test Merge branch '2.4.x' into 2.5.x 3 years ago
spring-boot-smoke-test-test-nomockito Remove unnecessary throws declaration in tests 4 years ago
spring-boot-smoke-test-testng Add junit-platform-launcher dependency by convention 4 years ago
spring-boot-smoke-test-tomcat Remove unnecessary throws declaration in tests 4 years ago
spring-boot-smoke-test-tomcat-jsp Prohibit unwanted dependencies in all modules not just starters 3 years ago
spring-boot-smoke-test-tomcat-multi-connectors Prohibit unwanted dependencies in all modules not just starters 3 years ago
spring-boot-smoke-test-tomcat-ssl Prohibit unwanted dependencies in all modules not just starters 3 years ago
spring-boot-smoke-test-traditional Update web.xml xsd references to for 3.1 version 3 years ago
spring-boot-smoke-test-undertow Add junit-platform-launcher dependency by convention 4 years ago
spring-boot-smoke-test-undertow-ssl Prohibit unwanted dependencies in all modules not just starters 3 years ago
spring-boot-smoke-test-war Add junit-platform-launcher dependency by convention 4 years ago
spring-boot-smoke-test-web-freemarker Add junit-platform-launcher dependency by convention 4 years ago
spring-boot-smoke-test-web-groovy-templates Add junit-platform-launcher dependency by convention 4 years ago
spring-boot-smoke-test-web-jsp Merge branch '2.4.x' into 2.5.x 3 years ago
spring-boot-smoke-test-web-method-security Remove use of Thymeleaf from smoke tests 3 years ago
spring-boot-smoke-test-web-mustache Add junit-platform-launcher dependency by convention 4 years ago
spring-boot-smoke-test-web-secure Allow previously authorized users to access the error page 3 years ago
spring-boot-smoke-test-web-secure-custom Remove use of Thymeleaf from smoke tests 3 years ago
spring-boot-smoke-test-web-secure-jdbc Remove use of Thymeleaf from smoke tests 3 years ago
spring-boot-smoke-test-web-static Add junit-platform-launcher dependency by convention 4 years ago
spring-boot-smoke-test-web-thymeleaf Remove use of Thymeleaf from smoke tests 3 years ago
spring-boot-smoke-test-webflux Add junit-platform-launcher dependency by convention 4 years ago
spring-boot-smoke-test-webflux-coroutines Add junit-platform-launcher dependency by convention 4 years ago
spring-boot-smoke-test-webservices Polish "Add @WebServiceServerTest slice test support" 3 years ago
spring-boot-smoke-test-websocket-jetty Merge branch '2.3.x' into 2.4.x 4 years ago
spring-boot-smoke-test-websocket-jetty10 Polish 3 years ago
spring-boot-smoke-test-websocket-tomcat Merge branch '2.3.x' into 2.4.x 4 years ago
spring-boot-smoke-test-websocket-undertow Merge branch '2.3.x' into 2.4.x 4 years ago
spring-boot-smoke-test-xml Remove unnecessary throws declaration in tests 4 years ago