Search in sources :

Example 1 with GemFireProperties

use of org.apache.geode.management.GemFireProperties in project geode by apache.

the class BeanUtilFuncs method initGemfireProperties.

public static GemFireProperties initGemfireProperties(DistributionConfig config) {
    String memberGroups = "";
    String configFile = null;
    String includeFile = null;
    GemFireProperties gemFirePropertyData = new GemFireProperties();
    gemFirePropertyData.setMemberName(config.getName());
    gemFirePropertyData.setMemberGroups(memberGroups);
    gemFirePropertyData.setMcastPort(config.getMcastPort());
    gemFirePropertyData.setMcastAddress(config.getMcastAddress().getHostAddress());
    gemFirePropertyData.setBindAddress(config.getBindAddress());
    gemFirePropertyData.setTcpPort(config.getTcpPort());
    gemFirePropertyData.setCacheXMLFile(config.getCacheXmlFile().getAbsolutePath());
    gemFirePropertyData.setConfigFile(configFile);
    gemFirePropertyData.setMcastTTL(config.getMcastTtl());
    gemFirePropertyData.setServerBindAddress(config.getServerBindAddress());
    gemFirePropertyData.setLocators(config.getLocators());
    gemFirePropertyData.setStartLocator(config.getStartLocator());
    gemFirePropertyData.setLogFile(config.getLogFile().getAbsolutePath());
    gemFirePropertyData.setLogLevel(config.getLogLevel());
    gemFirePropertyData.setStatisticSamplingEnabled(config.getStatisticSamplingEnabled());
    gemFirePropertyData.setStatisticArchiveFile(config.getStatisticArchiveFile().getAbsolutePath());
    gemFirePropertyData.setIncludeFile(includeFile);
    gemFirePropertyData.setAckWaitThreshold(config.getAckWaitThreshold());
    gemFirePropertyData.setAckSevereAlertThreshold(config.getAckSevereAlertThreshold());
    gemFirePropertyData.setArchiveFileSizeLimit(config.getArchiveFileSizeLimit());
    gemFirePropertyData.setArchiveDiskSpaceLimit(config.getArchiveDiskSpaceLimit());
    gemFirePropertyData.setLogFileSizeLimit(config.getLogFileSizeLimit());
    gemFirePropertyData.setLogDiskSpaceLimit(config.getLogDiskSpaceLimit());
    gemFirePropertyData.setClusterSSLEnabled(config.getClusterSSLEnabled());
    gemFirePropertyData.setClusterSSLCiphers(config.getClusterSSLCiphers());
    gemFirePropertyData.setClusterSSLProtocols(config.getClusterSSLProtocols());
    gemFirePropertyData.setClusterSSLRequireAuthentication(config.getClusterSSLRequireAuthentication());
    gemFirePropertyData.setClusterSSLKeyStore(config.getClusterSSLKeyStore());
    gemFirePropertyData.setClusterSSLKeyStoreType(config.getClusterSSLKeyStoreType());
    gemFirePropertyData.setClusterSSLKeyStorePassword(config.getClusterSSLKeyStorePassword());
    gemFirePropertyData.setClusterSSLTrustStore(config.getClusterSSLTrustStore());
    gemFirePropertyData.setClusterSSLTrustStorePassword(config.getClusterSSLTrustStorePassword());
    gemFirePropertyData.setServerSSLEnabled(config.getServerSSLEnabled());
    gemFirePropertyData.setServerSSLCiphers(config.getServerSSLCiphers());
    gemFirePropertyData.setServerSSLProtocols(config.getServerSSLProtocols());
    gemFirePropertyData.setServerSSLRequireAuthentication(config.getServerSSLRequireAuthentication());
    gemFirePropertyData.setServerSSLKeyStore(config.getServerSSLKeyStore());
    gemFirePropertyData.setServerSSLKeyStoreType(config.getServerSSLKeyStoreType());
    gemFirePropertyData.setServerSSLKeyStorePassword(config.getServerSSLKeyStorePassword());
    gemFirePropertyData.setServerSSLTrustStore(config.getServerSSLTrustStore());
    gemFirePropertyData.setServerSSLTrustStorePassword(config.getServerSSLTrustStorePassword());
    gemFirePropertyData.setGatewaySSLEnabled(config.getGatewaySSLEnabled());
    gemFirePropertyData.setGatewaySSLCiphers(config.getGatewaySSLCiphers());
    gemFirePropertyData.setGatewaySSLProtocols(config.getGatewaySSLProtocols());
    gemFirePropertyData.setGatewaySSLRequireAuthentication(config.getGatewaySSLRequireAuthentication());
    gemFirePropertyData.setGatewaySSLKeyStore(config.getGatewaySSLKeyStore());
    gemFirePropertyData.setGatewaySSLKeyStoreType(config.getGatewaySSLKeyStoreType());
    gemFirePropertyData.setGatewaySSLKeyStorePassword(config.getGatewaySSLKeyStorePassword());
    gemFirePropertyData.setGatewaySSLTrustStore(config.getGatewaySSLTrustStore());
    gemFirePropertyData.setGatewaySSLTrustStorePassword(config.getGatewaySSLTrustStorePassword());
    gemFirePropertyData.setJmxManagerSSLEnabled(config.getJmxManagerSSLEnabled());
    gemFirePropertyData.setJmxManagerSSLCiphers(config.getJmxManagerSSLCiphers());
    gemFirePropertyData.setJmxManagerSSLProtocols(config.getJmxManagerSSLProtocols());
    gemFirePropertyData.setJmxManagerSSLRequireAuthentication(config.getJmxManagerSSLRequireAuthentication());
    gemFirePropertyData.setJmxManagerSSLKeyStore(config.getJmxManagerSSLKeyStore());
    gemFirePropertyData.setJmxManagerSSLKeyStoreType(config.getJmxManagerSSLKeyStoreType());
    gemFirePropertyData.setJmxManagerSSLKeyStorePassword(config.getJmxManagerSSLKeyStorePassword());
    gemFirePropertyData.setJmxManagerSSLTrustStore(config.getJmxManagerSSLTrustStore());
    gemFirePropertyData.setJmxManagerSSLTrustStorePassword(config.getJmxManagerSSLTrustStorePassword());
    gemFirePropertyData.setHttpServiceSSLEnabled(config.getHttpServiceSSLEnabled());
    gemFirePropertyData.setHttpServiceSSLCiphers(config.getHttpServiceSSLCiphers());
    gemFirePropertyData.setHttpServiceSSLProtocols(config.getHttpServiceSSLProtocols());
    gemFirePropertyData.setHttpServiceSSLRequireAuthentication(config.getHttpServiceSSLRequireAuthentication());
    gemFirePropertyData.setHttpServiceSSLKeyStore(config.getHttpServiceSSLKeyStore());
    gemFirePropertyData.setHttpServiceSSLKeyStoreType(config.getHttpServiceSSLKeyStoreType());
    gemFirePropertyData.setHttpServiceSSLKeyStorePassword(config.getHttpServiceSSLKeyStorePassword());
    gemFirePropertyData.setHttpServiceSSLTrustStore(config.getHttpServiceSSLTrustStore());
    gemFirePropertyData.setHttpServiceSSLTrustStorePassword(config.getHttpServiceSSLTrustStorePassword());
    gemFirePropertyData.setSocketLeaseTime(config.getSocketLeaseTime());
    gemFirePropertyData.setSocketBufferSize(config.getSocketBufferSize());
    gemFirePropertyData.setMcastSendBufferSize(config.getMcastSendBufferSize());
    gemFirePropertyData.setMcastRecvBufferSize(config.getMcastRecvBufferSize());
    gemFirePropertyData.setMcastByteAllowance(config.getMcastFlowControl().getByteAllowance());
    gemFirePropertyData.setMcastRechargeThreshold(config.getMcastFlowControl().getRechargeThreshold());
    gemFirePropertyData.setMcastRechargeBlockMs(config.getMcastFlowControl().getRechargeBlockMs());
    gemFirePropertyData.setUdpFragmentSize(config.getUdpFragmentSize());
    gemFirePropertyData.setUdpRecvBufferSize(config.getUdpRecvBufferSize());
    gemFirePropertyData.setDisableTcp(config.getDisableTcp());
    gemFirePropertyData.setEnableTimeStatistics(config.getEnableTimeStatistics());
    gemFirePropertyData.setEnableNetworkPartitionDetection(config.getEnableNetworkPartitionDetection());
    gemFirePropertyData.setMemberTimeout(config.getMemberTimeout());
    gemFirePropertyData.setMembershipPortRange(config.getMembershipPortRange());
    gemFirePropertyData.setConserveSockets(config.getConserveSockets());
    gemFirePropertyData.setRoles(config.getRoles());
    gemFirePropertyData.setMaxWaitTimeForReconnect(config.getMaxWaitTimeForReconnect());
    gemFirePropertyData.setMaxNumReconnectTries(config.getMaxNumReconnectTries());
    gemFirePropertyData.setAsyncDistributionTimeout(config.getAsyncDistributionTimeout());
    gemFirePropertyData.setAsyncQueueTimeout(config.getAsyncQueueTimeout());
    gemFirePropertyData.setAsyncMaxQueueSize(config.getAsyncMaxQueueSize());
    gemFirePropertyData.setClientConflation(config.getClientConflation());
    gemFirePropertyData.setDurableClientId(config.getDurableClientId());
    gemFirePropertyData.setDurableClientTimeout(config.getDurableClientTimeout());
    gemFirePropertyData.setSecurityClientAuthInit(config.getSecurityClientAuthInit());
    gemFirePropertyData.setSecurityClientAuthenticator(config.getSecurityClientAuthenticator());
    gemFirePropertyData.setSecurityClientDHAlgo(config.getSecurityClientDHAlgo());
    gemFirePropertyData.setSecurityPeerAuthInit(config.getSecurityPeerAuthInit());
    gemFirePropertyData.setSecurityPeerAuthenticator(config.getSecurityPeerAuthenticator());
    gemFirePropertyData.setSecurityClientAccessor(config.getSecurityClientAccessor());
    gemFirePropertyData.setSecurityClientAccessorPP(config.getSecurityClientAccessorPP());
    gemFirePropertyData.setSecurityLogLevel(config.getSecurityLogLevel());
    gemFirePropertyData.setSecurityLogFile(config.getSecurityLogFile().getAbsolutePath());
    gemFirePropertyData.setSecurityPeerMembershipTimeout(config.getSecurityPeerMembershipTimeout());
    gemFirePropertyData.setRemoveUnresponsiveClient(config.getRemoveUnresponsiveClient());
    gemFirePropertyData.setDeltaPropagation(config.getDeltaPropagation());
    gemFirePropertyData.setRedundancyZone(config.getRedundancyZone());
    gemFirePropertyData.setEnforceUniqueHost(config.getEnforceUniqueHost());
    gemFirePropertyData.setStatisticSampleRate(config.getStatisticSampleRate());
    gemFirePropertyData.setUdpSendBufferSize(config.getUdpSendBufferSize());
    gemFirePropertyData.setJmxManager(config.getJmxManager());
    gemFirePropertyData.setJmxManagerStart(config.getJmxManagerStart());
    gemFirePropertyData.setJmxManagerPort(config.getJmxManagerPort());
    gemFirePropertyData.setJmxManagerBindAddress(config.getJmxManagerBindAddress());
    gemFirePropertyData.setJmxManagerHostnameForClients(config.getJmxManagerHostnameForClients());
    gemFirePropertyData.setJmxManagerPasswordFile(config.getJmxManagerPasswordFile());
    gemFirePropertyData.setJmxManagerAccessFile(config.getJmxManagerAccessFile());
    gemFirePropertyData.setJmxManagerHttpPort(config.getJmxManagerHttpPort());
    gemFirePropertyData.setJmxManagerUpdateRate(config.getJmxManagerUpdateRate());
    gemFirePropertyData.setHttpServicePort(config.getHttpServicePort());
    gemFirePropertyData.setHttpServiceBindAddress(config.getHttpServiceBindAddress());
    gemFirePropertyData.setStartDevRestApi(config.getStartDevRestApi());
    gemFirePropertyData.setSSLCiphers(config.getSSLCiphers());
    gemFirePropertyData.setSecurableCommunicationChannel(config.getSecurableCommunicationChannels());
    gemFirePropertyData.setSSLWebServiceRequireAuthentication(config.getSSLWebRequireAuthentication());
    gemFirePropertyData.setSSLKeyStore(config.getSSLKeyStore());
    gemFirePropertyData.setSSLKeyStoreType(config.getSSLKeyStoreType());
    gemFirePropertyData.setSSLKeyStorePassword(config.getSSLKeyStorePassword());
    gemFirePropertyData.setSSLTrustStore(config.getSSLTrustStore());
    gemFirePropertyData.setSSLTrustStorePassword(config.getSSLTrustStorePassword());
    gemFirePropertyData.setClusterSSLAlias(config.getClusterSSLAlias());
    gemFirePropertyData.setServerSSLAlias(config.getServerSSLAlias());
    gemFirePropertyData.setJmxSSLAlias(config.getJMXSSLAlias());
    gemFirePropertyData.setGatewaySSLAlias(config.getGatewaySSLAlias());
    gemFirePropertyData.setLocatorSSLAlias(config.getLocatorSSLAlias());
    gemFirePropertyData.setHttpServiceSSLAlias(config.getHTTPServiceSSLAlias());
    gemFirePropertyData.setSSLDefaultAlias(config.getSSLDefaultAlias());
    return gemFirePropertyData;
}
Also used : GemFireProperties(org.apache.geode.management.GemFireProperties)

Example 2 with GemFireProperties

use of org.apache.geode.management.GemFireProperties in project geode by apache.

the class SSLConfigIntegrationJUnitTest method testIsClusterSSLRequireAuthentication.

@Test
public void testIsClusterSSLRequireAuthentication() {
    Cache mCache = new CacheFactory().set(MCAST_PORT, "0").set(JMX_MANAGER, "true").create();
    ManagementService mService = ManagementService.getManagementService(mCache);
    MemberMXBean mMemberBean = mService.getMemberMXBean();
    GemFireProperties mGemFireProperties = mMemberBean.listGemFireProperties();
    assertTrue(mGemFireProperties.isServerSSLRequireAuthentication());
    assertTrue(mGemFireProperties.isClusterSSLRequireAuthentication());
    assertTrue(mGemFireProperties.isGatewaySSLRequireAuthentication());
    assertTrue(mGemFireProperties.isJmxManagerSSLRequireAuthentication());
    mCache.close();
}
Also used : ManagementService(org.apache.geode.management.ManagementService) GemFireProperties(org.apache.geode.management.GemFireProperties) CacheFactory(org.apache.geode.cache.CacheFactory) Cache(org.apache.geode.cache.Cache) MemberMXBean(org.apache.geode.management.MemberMXBean) Test(org.junit.Test) IntegrationTest(org.apache.geode.test.junit.categories.IntegrationTest)

Aggregations

GemFireProperties (org.apache.geode.management.GemFireProperties)2 Cache (org.apache.geode.cache.Cache)1 CacheFactory (org.apache.geode.cache.CacheFactory)1 ManagementService (org.apache.geode.management.ManagementService)1 MemberMXBean (org.apache.geode.management.MemberMXBean)1 IntegrationTest (org.apache.geode.test.junit.categories.IntegrationTest)1 Test (org.junit.Test)1