Package org.wso2.carbon.security.config

Examples of org.wso2.carbon.security.config.SecurityConfigAdmin


        admin.disableSecurityOnService(serviceName);
    }

    public void applySecurity(String serviceName, String policyId, String policyPath, String[] trustedStores,
        String privateStore, String[] userGroupNames) throws SecurityConfigException {
        SecurityConfigAdmin admin = new SecurityConfigAdmin(getUserRealm(), getConfigSystemRegistry(), getAxisConfig());
        admin.applySecurity(serviceName, policyId, policyPath, trustedStores, privateStore, userGroupNames);
    }
View Full Code Here


        if (servicePrincipalPassword == null || servicePrincipalPassword.trim().equals("")) {
            throw new SecurityConfigException("Please specify a valid service principal password. " +
                    "Service principal password should not be null");
        }

        SecurityConfigAdmin admin = new SecurityConfigAdmin(getUserRealm(), getConfigSystemRegistry(), getAxisConfig());

        KerberosConfigData kerberosConfigurations = new KerberosConfigData();
        kerberosConfigurations.setServicePrincipleName(servicePrincipalName);
        kerberosConfigurations.setServicePrinciplePassword(servicePrincipalPassword);

        admin.applySecurity(serviceName, policyId, kerberosConfigurations);

    }
View Full Code Here

        return scenarioDataWrapper;
    }

    private SecurityScenarioData getCurrentScenario(String serviceName)
            throws SecurityConfigException {
        SecurityConfigAdmin admin = new SecurityConfigAdmin(getUserRealm(), getConfigSystemRegistry(), getAxisConfig());
        return admin.getCurrentScenario(serviceName);
    }
View Full Code Here

        SecurityConfigAdmin admin = new SecurityConfigAdmin(getUserRealm(), getConfigSystemRegistry(), getAxisConfig());
        return admin.getCurrentScenario(serviceName);
    }

    public SecurityScenarioData getSecurityScenario(String sceneId) throws SecurityConfigException {
        SecurityConfigAdmin admin = new SecurityConfigAdmin(getUserRealm(), getConfigSystemRegistry(), getAxisConfig());
        return admin.getSecurityScenario(sceneId);
    }
View Full Code Here

        return admin.getSecurityScenario(sceneId);
    }

    public SecurityConfigData getSecurityConfigData(String serviceName, String scenarioId, String policyPath)
            throws SecurityConfigException {
        SecurityConfigAdmin admin = new SecurityConfigAdmin(getUserRealm(), getConfigSystemRegistry(), getAxisConfig());
        return admin.getSecurityConfigData(serviceName, scenarioId, policyPath);
    }
View Full Code Here

    private boolean isRequiredForSecurityScenario(String serviceName, String moduleId) throws ModuleMgtException {

        String[] requiredModules;
        try {
            SecurityConfigAdmin secConfAdmin = new SecurityConfigAdmin(getUserRealm(), getConfigSystemRegistry()
                    ,axisConfig);
            requiredModules = secConfAdmin.getRequiredModules(serviceName, moduleId);
        } catch (Exception e) {
            String msg = "Error occured while getting the security scenarions for the service";
            log.error(msg);
            throw new ModuleMgtException(e, ModuleMgtException.ERROR, ModuleMgtMessageKeys.SEC_SCENARIO_ERROR);
        }
View Full Code Here

        return serviceMetaData;
    }

    private SecurityScenarioData getSecurityScenario(String serviceName) throws AxisFault {
        try {
            return new SecurityConfigAdmin(getUserRealm(),
                                           getConfigSystemRegistry(),
                                           getAxisConfig()).getCurrentScenario(serviceName);
        } catch (SecurityConfigException e) {
            throw new AxisFault("Cannot retrieve security scenario for service", e);
        }
View Full Code Here

        }

        public void run() {
            try {
                MessageContext msgCtx = ((Axis2MessageContext) synCtx).getAxis2MessageContext();
                Event<MessageContext> event = new Event(msgCtx);
                subscriptions = subscriptionManager.getMatchingSubscriptions(event);
            } catch (EventException e) {
                handleException("Matching subscriptions fetching error", e);
            }
View Full Code Here

     * @throws EventException event
     */
    private void processGetStatusRequest(MessageContext mc,
                                         ResponseMessageBuilder messageBuilder)
            throws AxisFault, EventException {
        Subscription subscription =
                SubscriptionMessageBuilder.createGetStatusMessage(mc);
        if (log.isDebugEnabled()) {
            log.debug("GetStatus request recived for SynapseSubscription ID : " +
                    subscription.getId());
        }
        subscription = subscriptionManager.getSubscription(subscription.getId());
        if (subscription != null) {
            if (log.isDebugEnabled()) {
                log.debug("Sending GetStatus responce for SynapseSubscription ID : " +
                        subscription.getId());
            }
            //send the responce
            SOAPEnvelope soapEnvelope = messageBuilder.genGetStatusResponse(subscription);
            dispatchResponse(soapEnvelope, EventingConstants.WSE_GET_STATUS_RESPONSE,
                    mc, false);
View Full Code Here


    public SynapseSubscription() {
        this.setId(UIDGenerator.generateURNString());
        this.setDeliveryMode(EventingConstants.WSE_DEFAULT_DELIVERY_MODE);
        SubscriptionData subscriptionData = new SubscriptionData();
        subscriptionData.setProperty(SynapseEventingConstants.STATIC_ENTRY, "false");
        this.setSubscriptionData(subscriptionData);
    }
View Full Code Here

TOP

Related Classes of org.wso2.carbon.security.config.SecurityConfigAdmin

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.