Search in sources :

Example 1 with SecurityServiceConfig

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());
}
Also used : AdminServiceConfig(com.sun.appserv.management.config.AdminServiceConfig) ConfigConfig(com.sun.appserv.management.config.ConfigConfig) SecurityServiceConfig(com.sun.appserv.management.config.SecurityServiceConfig) DomainConfig(com.sun.appserv.management.config.DomainConfig)

Example 2 with SecurityServiceConfig

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;
}
Also used : AuthRealmConfig(com.sun.appserv.management.config.AuthRealmConfig) SecurityServiceConfig(com.sun.appserv.management.config.SecurityServiceConfig) JMXConnectorConfig(com.sun.appserv.management.config.JMXConnectorConfig)

Example 3 with SecurityServiceConfig

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;
}
Also used : ConfigConfig(com.sun.appserv.management.config.ConfigConfig) SecurityServiceConfig(com.sun.appserv.management.config.SecurityServiceConfig)

Example 4 with SecurityServiceConfig

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);
}
Also used : SecurityServiceConfig(com.sun.appserv.management.config.SecurityServiceConfig) MessageSecurityConfig(com.sun.appserv.management.config.MessageSecurityConfig)

Example 5 with SecurityServiceConfig

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;
}
Also used : HashMap(java.util.HashMap) SecurityServiceConfig(com.sun.appserv.management.config.SecurityServiceConfig) MessageSecurityConfig(com.sun.appserv.management.config.MessageSecurityConfig)

Aggregations

SecurityServiceConfig (com.sun.appserv.management.config.SecurityServiceConfig)5 ConfigConfig (com.sun.appserv.management.config.ConfigConfig)2 MessageSecurityConfig (com.sun.appserv.management.config.MessageSecurityConfig)2 AdminServiceConfig (com.sun.appserv.management.config.AdminServiceConfig)1 AuthRealmConfig (com.sun.appserv.management.config.AuthRealmConfig)1 DomainConfig (com.sun.appserv.management.config.DomainConfig)1 JMXConnectorConfig (com.sun.appserv.management.config.JMXConnectorConfig)1 HashMap (java.util.HashMap)1