Commit Graph

109 Commits

Author SHA1 Message Date
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
John Blum
611d5fa5d7 Adds auto-configuration for Apache Geode & Pivotal GemFire logging.
Resolves gh-40.
2019-06-24 13:39:29 -07:00
John Blum
d86c4be339 Format source code.
Optimize imports.
2019-06-21 17:54:56 -07:00
John Blum
39d57d62ca Complete ServerDefinedRegionTemplateAutoConfigurationIntegrationTests. 2019-06-10 19:24:13 -07:00
John Blum
104a430b1a Optimize imports. 2019-06-10 19:10:45 -07:00
John Blum
aac1e8a6e6 Move the Books application into example.app.books.
Move the LibraryService into example.app.library.
2019-06-10 18:54:49 -07:00
John Blum
099a030028 Polish source code. 2019-06-10 18:30:11 -07:00
John Blum
3d5b4beffd Disable HTTPS (HTTP over SSL). 2019-06-10 10:19:42 -07:00
John Blum
71397e958d Deprecate HttpBasicAuthenticationSecurityConfiguration. 2019-06-10 10:18:52 -07:00
John Blum
567b231954 Optimize imports.
Format source code.
2019-06-09 18:07:40 -07:00
John Blum
db5f623ba0 Switch from @SpringBootApplication to @Configuration and @EnableAutoConfiguration with test configuration classes.
This will help avoid inadvertently including additional @Configuration classes in the classpath that are not required by, or applicable to, this test class.
2019-05-24 18:00:14 -07:00
John Blum
df0f318647 Add Integration Tests testing the custom configuration of the DEFAULT Pool and a named Pool when using Spring Boot auto-configuration. 2019-05-24 17:46:22 -07:00
John Blum
9ed0413956 Add support for Spring configured and bootstrapped Locator-based applications.
Resolves gh-37.
2019-05-15 15:54:25 -07:00
John Blum
0445d5f159 Polish Security auto-configuration tests for enforcing Auth in a cloud context. 2019-05-14 19:35:40 -07:00
John Blum
dd98cf7a6b Polish Security auto-configuration tests for enforcing Auth in a local context. 2019-05-14 19:35:40 -07:00
John Blum
3d62ac4acc Update the Apache Geode Management REST API Web Application (WAR) to 1.6.0. 2019-05-06 16:48:23 -07:00
John Blum
9a4442fe42 Switch to the 'DEFAULT' Pool.
Create Spring beans for the 'gemfirePool', 'MockPool' and 'TestPool' Pools.
2019-05-06 16:48:23 -07:00
John Blum
27b52f0e1d Refactor Apache Geode/Pivotal GemFire (PCC) peer Security (Auth) auto-configuration.
Switch from using the GemfireBeanFactoryLocator with the security-manager property set to the SecurityManagerProxy to using the @EnableSecurityManager Annotation with the CacheFactory API.
2019-05-06 16:48:23 -07:00
John Blum
2a77937700 Allow bean definition overrides in Unit and Integration Tests. 2019-05-06 16:48:23 -07:00
John Blum
4beb39c336 Add 'org.springframework.boot:spring-boot-autoconfigure-processor' as an optional dependency. 2019-04-29 20:32:05 -07:00
John Blum
f0e8b7964c Remove exclusions on 'org.springframework.boot:spring-boot-starter-logging'.
Add exclusion on 'org.apache.logging.log4j:log4j-to-slf4j'.
2019-04-29 19:49:36 -07:00
John Blum
473e31af30 Remove unnecessary use of java.util.Optional. 2019-04-29 19:37:14 -07:00
John Blum
da20d74044 Add Unit Tests for HttpBasicAuthenticationSecurityConfiguration. 2019-04-29 16:14:29 -07:00
John Blum
717832d053 Remove unnecessary filter(..) and map(..) invocations on the Optional used inside the BeanPostProcessor.postProcessAfterInitialization(..).
Improve invokeMethod(..) to allow arguments, handle class (static) methods, find the Method based on matching arguments to parameter types, and delegate accessibility to ObjectUtils.

Change access modifier on registerInterceptor(..) to protected.

Change access modifier on the schemaObjectInitializerPostProcessor(..) bean definition to public.

Move the HttpRequest.getHeaders() call inside the conditional on isAuthenticationEnabled().
2019-04-29 16:14:29 -07:00
John Blum
60c65548ee Remove unecessary ExceptionThrowingOperation @FunctionalInterface.
Remove the private doOperationSafely(:ExceptionThrowingOperation):T method.  Both the ExceptionThrowingOperation interface and doOperationSafely(..) method can be replaced by o.s.geode.core.util.ObjectUtils.

Refactor the existing invokeMethod(..) method; change access modifier to package-private.
2019-04-29 16:11:46 -07:00
John Blum
6419a5bd4d Upgrade to Gradle 5.4.1.
Declare the FreeFair Lombok Gradle Plugin in the spring-geode-autoconfigure and spring-geode-samples-boot-configuration modules.
2019-04-28 18:12:36 -07:00
John Blum
a293b97113 Implement HTTP client authentication on cluster configuration push when sending configuration meta-data from client to server (cluster Manager).
Resolves gh-16.
2019-04-24 00:27:30 -07:00
John Blum
786deaeef9 Optimize imports. 2019-04-23 23:40:25 -07:00
John Blum
3251ffe166 Configure logging for Apache Geode, Spring and other libraries. 2019-04-15 15:51:16 -07:00
John Blum
4abc75b1d3 Extend o.s.d.g.tests.integration.IntegrationTestsSupport.
Resolves gh-31.
2019-04-12 17:41:19 -07:00
John Blum
cf4df83333 Add additional integration tests testing the auto-configuration of GemfireTemplate beans for Regions with existing named and Region-based GemfireTemplates.
Resolves gh-31.
2019-04-12 17:08:34 -07:00
John Blum
b9922f8c1b Add auto-configuration support for creating Templates per Cache Region.
Resolves gh-31.
2019-04-12 16:23:35 -07:00