use of org.apache.geode.internal.admin.SSLConfig in project geode by apache.
the class SSLConfigurationFactory method getSSLConfigForComponent.
@Deprecated
public static SSLConfig getSSLConfigForComponent(final boolean useSSL, final boolean needClientAuth, final String protocols, final String ciphers, final Properties gfsecurityProps, final String alias) {
SSLConfig sslConfig = new SSLConfig();
sslConfig.setAlias(alias);
sslConfig.setCiphers(ciphers);
sslConfig.setProtocols(protocols);
sslConfig.setRequireAuth(needClientAuth);
sslConfig.setEnabled(useSSL);
sslConfig = getInstance().configureSSLPropertiesFromSystemProperties(sslConfig, gfsecurityProps);
return sslConfig;
}
use of org.apache.geode.internal.admin.SSLConfig in project geode by apache.
the class SSLConfigurationFactory method createSSLConfig.
private SSLConfig createSSLConfig(final SecurableCommunicationChannel sslEnabledComponent) {
SSLConfig sslConfig = new SSLConfig();
sslConfig.setCiphers(getDistributionConfig().getSSLCiphers());
sslConfig.setEnabled(determineIfSSLEnabledForSSLComponent(sslEnabledComponent));
sslConfig.setKeystore(getDistributionConfig().getSSLKeyStore());
sslConfig.setKeystorePassword(getDistributionConfig().getSSLKeyStorePassword());
sslConfig.setKeystoreType(getDistributionConfig().getSSLKeyStoreType());
sslConfig.setTruststore(getDistributionConfig().getSSLTrustStore());
sslConfig.setTruststorePassword(getDistributionConfig().getSSLTrustStorePassword());
sslConfig.setProtocols(getDistributionConfig().getSSLProtocols());
sslConfig.setRequireAuth(getDistributionConfig().getSSLRequireAuthentication());
sslConfig.setAlias(getDistributionConfig().getSSLDefaultAlias());
return sslConfig;
}
use of org.apache.geode.internal.admin.SSLConfig in project geode by apache.
the class JmxManagerAdvisee method fillInProfile.
@Override
public void fillInProfile(Profile profile) {
assert profile instanceof JmxManagerProfile;
JmxManagerProfile jmxp = (JmxManagerProfile) profile;
DistributionConfig dc = getSystem().getConfig();
boolean jmxManager = dc.getJmxManager();
String host = "";
int port = 0;
boolean ssl = false;
boolean started = false;
SystemManagementService service = (SystemManagementService) ManagementService.getExistingManagementService(this.cache);
if (service != null) {
jmxManager = service.isManagerCreated();
started = service.isManager();
}
if (jmxManager) {
port = dc.getJmxManagerPort();
boolean usingJdkConfig = false;
if (port == 0) {
port = Integer.getInteger("com.sun.management.jmxremote.port", 0);
if (port != 0) {
usingJdkConfig = true;
// the jdk default
ssl = true;
if (System.getProperty("com.sun.management.jmxremote.ssl") != null) {
ssl = Boolean.getBoolean("com.sun.management.jmxremote.ssl");
}
}
}
if (port != 0) {
if (!usingJdkConfig) {
SSLConfig jmxSSL = SSLConfigurationFactory.getSSLConfigForComponent(SecurableCommunicationChannel.JMX);
ssl = jmxSSL.isEnabled();
host = dc.getJmxManagerHostnameForClients();
if (host == null || host.equals("")) {
host = dc.getJmxManagerBindAddress();
}
}
if (host == null || host.equals("")) {
try {
// fixes 46317
host = SocketCreator.getLocalHost().getHostAddress();
} catch (UnknownHostException ex) {
host = "127.0.0.1";
}
}
}
}
jmxp.setInfo(jmxManager, host, port, ssl, started);
this.myMostRecentProfile = jmxp;
}
Aggregations