use of com.sun.appserv.management.config.SecurityServiceConfig in project Payara by payara.
the class ConfigRunMeFirstTest method setupConfig.
private void setupConfig() {
final DomainConfig dc = getDomainConfig();
final ConfigConfig cc = getConfigConfig();
final SecurityServiceConfig ss = cc.getSecurityServiceConfig();
final AdminServiceConfig as = cc.getAdminServiceConfig();
AuditModuleConfigTest.ensureDefaultInstance(ss);
AuthRealmConfigTest.ensureDefaultInstance(ss);
ConnectorConnectionPoolConfigTest.ensureDefaultInstance(dc);
JMXConnectorConfigTest.ensureDefaultInstance(as);
ResourceAdapterConfigTest.ensureDefaultInstance(dc);
AdminObjectResourceConfigTest.ensureDefaultInstance(dc);
JDBCConnectionPoolConfigTest.ensureDefaultInstance(dc);
JDBCResourceConfigTest.ensureDefaultInstance(dc);
JNDIResourceConfigTest.ensureDefaultInstance(dc);
ConnectorResourceConfigTest.ensureDefaultInstance(dc);
CustomMBeanConfigTest.ensureDefaultInstance(dc);
JACCProviderConfigTest.ensureDefaultInstance(ss);
MailResourceConfigTest.ensureDefaultInstance(dc);
ThreadPoolConfigTest.ensureDefaultInstance(cc);
PersistenceManagerFactoryResourceConfigTest.ensureDefaultInstance(dc);
CustomResourceConfigTest.ensureDefaultInstance(dc);
ProfilerConfigTest.ensureDefaultInstance(cc.getJavaConfig());
}
use of com.sun.appserv.management.config.SecurityServiceConfig in project Payara by payara.
the class JMXConnectorConfigTest method ensureDefaultInstance.
public static JMXConnectorConfig ensureDefaultInstance(final AdminServiceConfig adminServiceConfig) {
JMXConnectorConfig result = adminServiceConfig.getJMXConnectorConfigMap().get(getDefaultInstanceName());
if (result == null) {
final SecurityServiceConfig securityServiceConfig = getConfigConfig(adminServiceConfig).getSecurityServiceConfig();
final AuthRealmConfig defaultAuthRealm = AuthRealmConfigTest.ensureDefaultInstance(securityServiceConfig);
result = createInstance(getDefaultInstanceName(), ADDRESS, DEFAULT_PORT, defaultAuthRealm, OPTIONAL);
}
return result;
}
use of com.sun.appserv.management.config.SecurityServiceConfig in project Payara by payara.
the class MessageSecurityConfigTest method getDefaultSecurityServiceConfig.
private static SecurityServiceConfig getDefaultSecurityServiceConfig(final DomainRoot domainRoot) {
final ConfigConfig config = ConfigConfigTest.ensureDefaultInstance(domainRoot);
final SecurityServiceConfig ss = config.getSecurityServiceConfig();
assert (ss != null);
return ss;
}
use of com.sun.appserv.management.config.SecurityServiceConfig in project Payara by payara.
the class MessageSecurityConfigTest method testCreateRemove.
/**
* Note: this can't be tested except by making a new one, and the names are predefined, so
* if it already exists, it must be deleted first.
*/
public void testCreateRemove() {
final SecurityServiceConfig ss = getDefaultSecurityServiceConfig(getDomainRoot());
final Map<String, MessageSecurityConfig> messageSecurityConfigs = ss.getMessageSecurityConfigMap();
MessageSecurityConfig msc = messageSecurityConfigs.get(AUTH_TYPE);
if (msc != null) {
ss.removeMessageSecurityConfig(AUTH_TYPE);
msc = null;
}
msc = create(getDomainRoot(), AUTH_TYPE);
ss.removeMessageSecurityConfig(AUTH_TYPE);
}
use of com.sun.appserv.management.config.SecurityServiceConfig in project Payara by payara.
the class MessageSecurityConfigTest method create.
private static MessageSecurityConfig create(final DomainRoot domainRoot, final String authLayer) {
final SecurityServiceConfig ss = getDefaultSecurityServiceConfig(domainRoot);
final Map<String, String> optional = new HashMap<String, String>();
final MessageSecurityConfig msc = ss.createMessageSecurityConfig(authLayer, "ClientProvider", ProviderConfig.PROVIDER_TYPE_CLIENT, "com.sun.xml.wss.provider.ClientSecurityAuthModul", optional);
msc.createProviderConfig("ServerProvider", ProviderConfig.PROVIDER_TYPE_SERVER, "com.sun.xml.wss.provider.ServerSecurityAuthModule", optional);
msc.createProviderConfig("DummyProvider1", ProviderConfig.PROVIDER_TYPE_SERVER, "AMX.TEST.DummySecurityAuthModule", optional);
msc.createProviderConfig("DummyProvider2", ProviderConfig.PROVIDER_TYPE_SERVER, "AMX.TEST.DummySecurityAuthModule", optional);
msc.removeProviderConfig("DummyProvider1");
msc.removeProviderConfig("DummyProvider2");
return msc;
}
Aggregations