Commit Graph

140 Commits

Author SHA1 Message Date
John Blum
044ee8a853 Add Integration Tests asserting the configuration of PDX in the context of Spring Boot.
Adds 3 test cases covering:

* Auto-configuration of SDG's MappingPdxSerializer.
* Configuration of a custom, user-defined PdxSerializer applied by auto-configuration.
* Overriding PDX auto-configuration with a manually specified PDX configuration.
2020-05-19 02:48:54 -07:00
John Blum
e2187a3f1f Fix SSL auto-configuration when TLS is enabled to properly configure the SSL default context.
Resolves gh-77.
2020-03-20 09:46:13 -07:00
John Blum
6650afd0f2 Optimize imports. 2020-01-24 19:07:17 -08:00
John Blum
df7f10c7da Upgrade to Lombok Gradle Plugin 4.1.6. 2020-01-22 13:16:12 -08:00
John Blum
899d71f9fd Configures the Pool used by the Spring Session bits and starter to use the 'DEFAULT' Pool.
Resolves gh-68.
2019-12-03 14:39:41 -08:00
John Blum
71d4587061 Add Integration Test for local HTTP Session state caching using the EnableClusterAware annotation to appropriately recognize and configure a local Apache Geode cache topology.
Resolves gh-66.
2019-11-15 19:18:48 -08:00
John Blum
91e0fa4371 Add additional assertions and optimize imports. 2019-11-15 18:41:45 -08:00
John Blum
91b3ab747e Cleanup unncessary SuppressWarnings and optimize imports. 2019-11-15 18:40:00 -08:00
John Blum
1a091a5209 Switch to a MOCK WebEnvironment.
Add additional assertions.
2019-11-15 18:39:15 -08:00
John Blum
2c7ee8fda8 Formate source code.
Optimize imports.
2019-11-15 18:36:02 -08:00
John Blum
d2a1a07553 Cleanup deprecations.
Optimize imports.
2019-11-15 18:34:43 -08:00
John Blum
65ef316401 Remove default configuration for the 'spring.session.data.gemfire.cache.client.region.shortcut' property. 2019-11-15 18:32:33 -08:00
John Blum
b2aa3d7d02 Add additional assertions and a ClientHttpRequestInterceptor bean to test the avoidance of possible interference caused by the Interceptor during the client to server cluster configuration metadata push provided in SDG.
See https://jira.spring.io/browse/DATAGEODE-243 for more details.
2019-10-31 13:35:49 -07:00
John Blum
caa8a2cb42 Add assertions asserting that mock Apache Geode Objects are being used. 2019-10-31 12:27:23 -07:00
John Blum
893989d81b Add additional Unit Test for the auto-configuration of Apache Geode as a caching provider in Spring's Cache Abstraction using Mock Apache Geode Objects. 2019-10-30 16:29:22 -07:00
John Blum
23f6aee57b Rename geode-web-1.9.1.war to geode-web-1.9.2.war for the SDG upgrade to Apache Geode 1.9.2. 2019-10-29 08:05:43 -07:00
John Blum
25960adc4d Add auto-configuration support for TLS using SSL when deploying Spring Boot ClientCache applications to PCF using PCC that requires secure Sockets.
The TLS/SSL auto-configuration enables and configures the use of the SSL default context provided by the JRE, which the ClientCache instance uses to obtain the required CERT necessary when creating SSL Sockets between the client and PCC servers.

Resolves gh-61.
2019-10-17 15:50:26 -07:00
John Blum
afbbfe9991 Upgrade to FreeFair Lombok Gradle Plugin 4.1.2. 2019-10-17 15:46:10 -07:00
John Blum
d8871d1eb0 Rename geode-web-1.9.0.war to geode-web-1.9.1.war to match the Apache Geode version 1.9.1 pulled in by SDG Moore-BUILD-SNAPSHOT. 2019-09-24 01:51:11 -07:00
John Blum
4eff04c517 Refactor Cluster-aware Conditions to be CloudFoundry Environment-aware.
Resolves gh-56.
2019-09-24 00:34:36 -07:00
John Blum
6185541bad Avoid test interference by using Spring Profiles. 2019-09-20 14:36:30 -07:00
John Blum
7d80bfec9f Improve intelligence around @EnableClusterAware to be Environment-aware.
One example is when running your Spring Boot app in Pivotal Platfom using Pivotal Cloud Cache (PCC), which is secure by default and requires HTTPS in addition to Auth.

Resolves gh-56.
2019-09-20 13:26:57 -07:00
John Blum
af35414d07 Improves auto-confiuguration of GemfireTemplates for cache Regions to minimize issues when auto-wiring templates into application components.
Resolves gh-55.
2019-09-20 01:44:18 -07:00
John Blum
432bd479d2 Optimize imports. 2019-09-12 17:45:09 -07:00
John Blum
9766fad249 Move HttpBasicAuthenticationSecurityConfiguration class to org.springframework.geode.boot.autoconfigure.support. 2019-09-12 17:44:17 -07:00
John Blum
bf9bcb866e Fix CI build test failures related to a dirty ApplicationContext and Condition state when assessing the availibility of a cluster in a required client/server topology. 2019-09-12 17:17:47 -07:00
John Blum
03225d81ca Enable GemFire Mock Objects. 2019-09-12 17:04:28 -07:00
John Blum
1a5d4d079a Edit Javadoc; Optimize imports; Fix failing tests in CI environment. 2019-09-12 17:03:45 -07:00
John Blum
9374bf4803 Import EnableSubscriptionConfiguration Spring @Configuration class. 2019-09-12 16:56:09 -07:00
John Blum
edb12fc523 Add shared Spring @Configuration class for enabling (client/Pool) subscriptions.
This class will be used by both the ContinuousQueryAutoConfiguration class and the SpringSessionAutoConfiguration class.
2019-09-12 16:54:55 -07:00
John Blum
8e30b4ddd2 Improve CQ Auto-configuration by assessing the availability of a server or cluster first before enabling and auto-configuring CQ functionality.
This added capabilities relies on the new ClusterAwareConditions.

Resolves gh-53.
2019-09-12 14:28:59 -07:00
John Blum
31c918ffbc Improve Client Security Auto-configuration to allow users to configure the runtime user of their Spring Boot applications running in Pivotal CloudFoundray (PCF) when using Pivotal Cloud Cache (PCC).
Note: configuring the runtime user of a Spring Boot app outside of CloudFoundry is already supported.  Simply set the 'spring.data.gemfire.security.username' and 'spring.data.gemfire.security.password' properties.

Resolves gh-44.
2019-09-10 20:36:36 -07:00
John Blum
3c0a0daa32 Remove unnecessary exclude on ContinuousQueryAutoConfiguration class. 2019-09-10 01:30:03 -07:00
John Blum
3e417a9ce8 Refactor EnableSecurityCondition to extend AllNestedConditions.
Wrap existing Security conditions (e.g. Cloud Platform, spring.data.gemfire.security properties) in a SecurityTriggersCondition class extending AnyNestedCondition.

Declare nested Condition on the 'spring.boot.data.gemfire.security.auth.environment.post-processor.enabled' property fixing bug with the non-guarded application of the @EnableSecurity annotation.

Edit Javadoc.

Optimize imports.
2019-09-10 01:01:36 -07:00
John Blum
f3bdbedfd7 Refactor EnableSslCondition to extend AllNestedConditions.
Wrap existing SSL conditions (e.g. trusted.keystore, spring.data.gemfire.security.ssl properties) in a SslTriggersCondition class extending AnyNestedCondition.

Declare nested Condition on the 'spring.boot.data.gemfire.security.ssl.environment.post-processor.enabled.property' fixing bug with the non-guarded application of the @EnableSsl annotation.

Change order of trusted.keystore scan in TrustedKeyStoreIsPresentCondition to be classpath, working directory then home directory, reflecting the documentation.

Remove System.err.printf statements.

Remove non-qualified 'ssl-keystore' and 'ssl-trustore' properties.

Edit Javadoc.

Optimize imports.
2019-09-10 00:59:36 -07:00
John Blum
366e5d634b Add Integration Tests asserting the proper behavior of the complex conditional configuration support provided by Spring Boot using @Conditional annotations.
This test configuration is not unlike the SslAutoConfiguration.
2019-09-09 23:30:31 -07:00
John Blum
5c5032e4a2 Exclude the 'javax.servlet:javax.servlet-api' transitive dependency from 'geode-core'.
Exclude the 'javax.servlet:javax.servlet-api' transitive dependency except from in the 'spring-geode-starter-session' and 'spring-gemfire-starter-session' modules.

Remove unnecessary 'javax.servlet:javax.servlet-api' provided dependency in 'spring-geode-autoconfigure'.

Remove unnecessary 'org.springframework.boot:spring-boot-starter-tomcat' runtime dependency from 'spring-geode-samples-caching-httpsession'.

Remove unnecessary 'javax.cache:cache-api' and 'org.springframework.shell:spring-shell' runtime dependencies from 'spring-geode-samples-caching-inline'.

Remove unnecessary 'javax.cache:cache-api' and 'org.springframework.shell:spring-shell' runtime dependencies from 'spring-geode-samples-caching-lookaside'.

Remove unnecessary 'javax.cache:cache-api' runtime dependency from 'spring-geode-samples-caching-near'.

Resolves gh-47.
2019-08-22 22:46:26 -07:00
John Blum
c218795e8d Refactor logging dependencies in SBDG Module Gradle build files.
Remove the exclude for 'org.apache.logging.log4j:log4j-to-slf4j'.

Add an exclude for 'org.apache.logging.log4j:log4j-core'.

Resolves gh-42.
2019-08-21 11:56:32 -07:00
John Blum
cda528db60 Upgrade to Apache Geode Management REST API (WAR) 1.9.0. 2019-08-21 11:56:31 -07:00
John Blum
6558e0ee97 Remove all improper uses of the Apache Shiro API and replace with the appropriate core Spring Framework API.
For example, usages of org.apache.shiro.util.Assert and org.apache.shiro.util.StringUtils should be replaced with org.springframework.util.Assert and org.springframework.util.StringUtils, respectively.
2019-08-20 15:00:36 -07:00
John Blum
66327392c7 Add Gradle build file to configure the generated Maven POMs for SBDG modules.
Resolves gh-43.
2019-07-26 00:31:37 -07:00
John Blum
f7ec5b02ee Cleanup Java System properties. 2019-06-28 20:10:08 -07:00
John Blum
e0417f1e0f Edit Javadoc. 2019-06-28 19:51:40 -07:00
John Blum
fc36dbbaec Simplify test GemFireClientConfiguration.
Remove unnecessary @Import on the ClientServerIntegrationTestsConfiguration class.
2019-06-28 19:48:12 -07:00
John Blum
92463f8527 Add Integration Tests for multiple CloudCache Service Instances.
The test cases specifically tests the use case where a user has provisioned mutliple instances of the CloudCache Service in PCF and bound each of them to her deployed Spring Boot, ClientCache app.

Resolves gh-33.
2019-06-28 19:02:37 -07:00
John Blum
4165009501 Add Integration Tests for hybrid cloud configuration.
The test cases specifically tests the use case where a user deployed a Spring Boot, ClientCache app to PCF connected to an external, standalone Apache Geode or Pivotal GemFire cluster.

Resolves gh-33.
2019-06-28 19:02:11 -07:00
John Blum
296d7844f7 Register the o.s.d.g.tests.logging.slf4j.logback.TestAppender.
Declare the o.s.geode.boot.autoconfigure.ClientSecurityAutoConfiguration Logger.  Set log level to 'WARN'.  Write to the TestAppender.

Resolves gh-33.
2019-06-28 19:00:59 -07:00
John Blum
f4feb248ea Add functionality to target the configuration of a specific CloudCache Service Instance in PCF.
Introduces the new 'spring.boot.data.gemfire.cloud.cloudfoundry.service.cloudcache.name' property enabling users to target a specific CloudCache Service Instance in PCF.

Fails fast and throws an IllegalStateException if the target CloudCache Service Instance cannot be found.

Logs warning when no CloudCache Service Instance is found.  However, client security auto-configuration will no longer require a CloudCache Service Instance when deploying Spring Boot, GemFire ClientCache app to PCF.  This enables users to deploy Spring Boot, ClientCache apps to PCF and connect them to external Apache Geode or Pivotal GemFire clusters.

Resolves gh-33.
2019-06-28 19:00:47 -07:00
John Blum
6bc09afff5 Extend o.s.d.g.tests.integration.IntegrationTestsSupport.
Resolves gh-40.
2019-06-24 15:21:03 -07:00
John Blum
c8fe79997b Optimize imports. 2019-06-24 13:51:07 -07:00