SGF-559 - Remove support for security-client-authenticator and security-peer-authenticator Geode (System) Properties from the @EnableSecurity annotation.

Theses Geode (System) properties are 'deprecated'. To enable the old security framework features, users should annotate their Geode Cache application classes (e.g. CacheServerApplication) with @EnableAuth.
This commit is contained in:
John Blum
2016-11-01 16:52:26 -07:00
parent 54f3c297b9
commit 03a94283c2
2 changed files with 1 additions and 25 deletions

View File

@@ -25,7 +25,6 @@ import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import org.apache.geode.security.AuthInitialize;
import org.apache.geode.security.Authenticator;
import org.springframework.context.annotation.Import;
/**
@@ -36,7 +35,6 @@ import org.springframework.context.annotation.Import;
* @author John Blum
* @see GeodeIntegratedSecurityConfiguration
* @see org.apache.geode.security.AuthInitialize
* @see org.apache.geode.security.Authenticator
* @see org.apache.geode.security.SecurityManager
* @see org.apache.geode.security.PostProcessor
* @see org.springframework.context.annotation.Import
@@ -49,7 +47,7 @@ import org.springframework.context.annotation.Import;
@Inherited
@Documented
@Import({ ApacheShiroSecurityConfiguration.class, GeodeIntegratedSecurityConfiguration.class })
@SuppressWarnings({ "deprecation", "unused" })
@SuppressWarnings({ "unused" })
public @interface EnableSecurity {
/**
@@ -60,14 +58,6 @@ public @interface EnableSecurity {
*/
String clientAuthenticationInitializer() default "";
/**
* Used for authentication. Static creation method returning an {@link Authenticator} object,
* which is used by a server to verify the credentials of the connecting client.
*
* Defaults to unset.
*/
String clientAuthenticator() default "";
/**
* Used with authentication. Static creation method returning an {@link AuthInitialize} object, which obtains
* credentials for peers in a distributed system.
@@ -76,14 +66,6 @@ public @interface EnableSecurity {
*/
String peerAuthenticationInitializer() default "";
/**
* Used with authentication. Static creation method returning an {@link Authenticator} object, which is used
* by a peer to verify the credentials of the connecting peer.
*
* Defaults to unset.
*/
String peerAuthenticator() default "";
/**
* Specifies the application {@link Class} type implementing the Apache Geode
* {@link org.apache.geode.security.SecurityManager} interface to enable security in Apache Geode.

View File

@@ -35,10 +35,8 @@ import org.springframework.data.gemfire.util.PropertiesBuilder;
public class GeodeIntegratedSecurityConfiguration extends EmbeddedServiceConfigurationSupport {
protected static final String SECURITY_CLIENT_AUTH_INIT = "security-client-auth-init";
protected static final String SECURITY_CLIENT_AUTHENTICATOR = "security-client-authenticator";
protected static final String SECURITY_MANAGER = "security-manager";
protected static final String SECURITY_PEER_AUTH_INIT = "security-peer-auth-init";
protected static final String SECURITY_PEER_AUTHENTICATOR = "security-peer-authenticator";
protected static final String SECURITY_POST_PROCESSOR = "security-post-processor";
protected static final String SECURITY_SHIRO_INIT = "security-shiro-init";
@@ -77,8 +75,6 @@ public class GeodeIntegratedSecurityConfiguration extends EmbeddedServiceConfigu
gemfireProperties.setProperty(SECURITY_CLIENT_AUTH_INIT,
annotationAttributes.get("clientAuthenticationInitializer"));
gemfireProperties.setProperty(SECURITY_CLIENT_AUTHENTICATOR, annotationAttributes.get("clientAuthenticator"));
if (isShiroSecurityNotConfigured()) {
gemfireProperties.setPropertyIfNotDefault(SECURITY_MANAGER,
annotationAttributes.get("securityManagerClass"), Void.class);
@@ -91,8 +87,6 @@ public class GeodeIntegratedSecurityConfiguration extends EmbeddedServiceConfigu
gemfireProperties.setProperty(SECURITY_PEER_AUTH_INIT,
annotationAttributes.get("peerAuthenticationInitializer"));
gemfireProperties.setProperty(SECURITY_PEER_AUTHENTICATOR, annotationAttributes.get("peerAuthenticator"));
gemfireProperties.setPropertyIfNotDefault(SECURITY_POST_PROCESSOR,
annotationAttributes.get("securityPostProcessorClass"), Void.class);