Search in sources :

Example 6 with MessageSecurityConfig

use of com.sun.enterprise.config.serverbeans.MessageSecurityConfig in project Payara by payara.

the class MessageSecurityConfigEventListenerImpl method handleUpdate.

/**
 * @param event - Event to be processed.
 * @throws AdminEventListenerException when the listener is unable to process the event.
 */
public <T extends ConfigBeanProxy> NotProcessed handleUpdate(T instance) {
    NotProcessed notProcessed = null;
    logger.fine("MessageSecurityConfigEventListenerImpl - handleUpdate called");
    // Handle only the MessageSecurityConfig.
    if (instance instanceof MessageSecurityConfig) {
        GFServerConfigProvider.loadConfigContext(service);
    } else {
        notProcessed = new NotProcessed("unimplemented: unknown instance: " + instance.getClass().getName());
    }
    return notProcessed;
}
Also used : NotProcessed(org.jvnet.hk2.config.NotProcessed) MessageSecurityConfig(com.sun.enterprise.config.serverbeans.MessageSecurityConfig)

Example 7 with MessageSecurityConfig

use of com.sun.enterprise.config.serverbeans.MessageSecurityConfig in project Payara by payara.

the class ConfigDomainParser method processServerConfig.

private void processServerConfig(SecurityService service, Map<String, GFServerConfigProvider.InterceptEntry> newConfig) throws IOException {
    List<MessageSecurityConfig> configList = service.getMessageSecurityConfig();
    if (configList != null) {
        Iterator<MessageSecurityConfig> cit = configList.iterator();
        while (cit.hasNext()) {
            MessageSecurityConfig next = cit.next();
            // single message-security-config for each auth-layer
            // auth-layer is synonymous with intercept
            String intercept = parseInterceptEntry(next, newConfig);
            List<ProviderConfig> provList = next.getProviderConfig();
            if (provList != null) {
                Iterator<ProviderConfig> pit = provList.iterator();
                while (pit.hasNext()) {
                    ProviderConfig provider = pit.next();
                    parseIDEntry(provider, newConfig, intercept);
                }
            }
        }
    }
}
Also used : ProviderConfig(com.sun.enterprise.config.serverbeans.ProviderConfig) MessageSecurityConfig(com.sun.enterprise.config.serverbeans.MessageSecurityConfig)

Example 8 with MessageSecurityConfig

use of com.sun.enterprise.config.serverbeans.MessageSecurityConfig in project Payara by payara.

the class ListMessageSecurityProvider method execute.

/**
 * Executes the command with the command parameters passed as Properties
 * where the keys are the paramter names and the values the parameter values
 *
 * @param context information
 */
@Override
public void execute(AdminCommandContext context) {
    final ActionReport report = context.getActionReport();
    secService.getMessageSecurityConfig();
    report.getTopMessagePart().setMessage(localStrings.getLocalString("list.message.security.provider.success", "list-message-security-providers successful"));
    report.getTopMessagePart().setChildrenType("");
    for (MessageSecurityConfig msc : secService.getMessageSecurityConfig()) {
        if (authLayer == null) {
            for (ProviderConfig pc : msc.getProviderConfig()) {
                ActionReport.MessagePart part = report.getTopMessagePart().addChild();
                part.setMessage(pc.getProviderId());
            }
        } else {
            if (msc.getAuthLayer().equals(authLayer)) {
                for (ProviderConfig pc : msc.getProviderConfig()) {
                    ActionReport.MessagePart part = report.getTopMessagePart().addChild();
                    part.setMessage(pc.getProviderId());
                }
            }
        }
    }
}
Also used : ProviderConfig(com.sun.enterprise.config.serverbeans.ProviderConfig) MessageSecurityConfig(com.sun.enterprise.config.serverbeans.MessageSecurityConfig) ActionReport(org.glassfish.api.ActionReport)

Aggregations

MessageSecurityConfig (com.sun.enterprise.config.serverbeans.MessageSecurityConfig)8 ProviderConfig (com.sun.enterprise.config.serverbeans.ProviderConfig)5 ActionReport (org.glassfish.api.ActionReport)3 NotProcessed (org.jvnet.hk2.config.NotProcessed)3 PropertyVetoException (java.beans.PropertyVetoException)2 TransactionFailure (org.jvnet.hk2.config.TransactionFailure)2 SecurityService (com.sun.enterprise.config.serverbeans.SecurityService)1