-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
@LocatorApplication does not work with @EnableSecurity #118
Comments
i found workarround. Instead of @EnableSecurity i used Bean LocatorConfigurer
but Locator app has problem to connect to other locator using security: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'locatorApplication' defined in org.springframework.data.gemfire.config.annotation.LocatorApplicationConfiguration: Invocation of init method failed; nested exception is org.apache.geode.security.AuthenticationRequiredException: Failed to find credentials from [....] |
@janmaslik - I was able to reproduce your issue.
FYI, the bits for bootstrapping an Apache Geode (or alternatively, VMware Tanzu GemFire) Locator and enabling Apache Geode Security (Auth) technically resides in Spring Data for Apache Geode (SDG), upon which Spring Boot for Apache Geode (SBDG), this project, is based. SBDG does offer a few extensions, but the primary logic is in SDG. In any case, I will provide a bit of feedback here, but will be addressing this issue in the SDG project (here) across versions Based on the configuration you shared above, it would appear that you are only trying to configure and use a custom Apache Geode The error you are encountering is caused by the presence of Apache Shiro on your Spring Boot / Spring Data Geode application classpath. The If you are not using the Apache Shiro Security integration with Apache Geode, then you can do 1 of the following:
# Spring Boot application.properties.
spring.data.gemfire.security.shiro.enabled=false You can only use 1 security provider (e.g. either Apache Shiro, or an implementation of Apache Goede's It appears you are using a custom Additionally, and though possible, you should never have to set the You can simply declare: @UseLocators
@SpringBootApplication
@LocatorApplication(name = "Locator")
@EnableSecurity(securityManagerClassName = "com.shirtplatform.cloud.locator.AppSecurityManager")
public class GeodeLocatorApplication {
// ...
} Or, better yet: @UseLocators
@SpringBootApplication
@LocatorApplication(name = "Locator")
@EnableSecurity(securityManagerClass = com.shirtplatform.cloud.locator.AppSecurityManager.class)
public class GeodeLocatorApplication {
// ...
} See here. This should allow you to workaround this issue. The cause of this issue stems from the fact that SDG's The connection to other secure Locators seems to be a configuration problem. But, it is hard to say for sure without knowing more about your configuration. All "secure" Locators need to be enabled with security and share the credentials required to connect to each other. This is a function of your |
Sorry for the delay. A few updates:
This turned out to be a rather involved set of changes. However, after careful analysis and testing, I believe this problem has been adequately addressed. Of course, are free to try the changes in your test environment now. Simply override the SDG dependency (using Maven or Gradle) pulled in by SBDG (e.g. if you are using the starter) to include the If you have other questions, let me know. If you encounter other issues, please file a new ticket in SDG, here. |
Hi jxblum , |
You are welcome. Sounds good and if you have any more problems, please respond here or open a new ticket. Also, just a friendly reminder, the fix for this will be available in SBDG Cheers! |
using
Error:
A component required a bean named 'gemfireCache' that could not be found.
The text was updated successfully, but these errors were encountered: