Package org.apache.geronimo.corba.security.config.tss

Examples of org.apache.geronimo.corba.security.config.tss.TSSConfig


        ConfigAdapter configAdapter = new org.apache.geronimo.yoko.ORBConfigAdapter();
        CORBABean corbaBean = new CORBABean(testName, configAdapter, "localhost", 8050, classLoader, null, null);
        XmlObject xmlObject = getXmlObject(TEST_XML4);
        TSSConfigEditor editor = new TSSConfigEditor();
        Object o = editor.getValue(xmlObject, null, classLoader);
        TSSConfig tss = (TSSConfig) o;

        corbaBean.setTssConfig(tss);

        try {
            corbaBean.doStart();
View Full Code Here


    public TSSConfig getTssConfig() {
        return tssConfig;
    }

    public void setTssConfig(TSSConfig tssConfig) {
        if (tssConfig == null) tssConfig = new TSSConfig();
        this.tssConfig = tssConfig;
    }
View Full Code Here

    private TSSConfig createCSIv2Config() {
        if (tssConfig == null) return null;
        if (tssConfig.isInherit()) return server.getTssConfig();

        TSSConfig config = new TSSConfig();

        if (server.getTssConfig() != null) {
            config.setTransport_mech(server.getTssConfig().getTransport_mech());
        } else {
            config.setTransport_mech(new TSSNULLTransportConfig());
        }

        config.getMechListConfig().setStateful(tssConfig.getMechListConfig().isStateful());
        for (int i = 0; i < tssConfig.getMechListConfig().size(); i++) {
            config.getMechListConfig().add(tssConfig.getMechListConfig().mechAt(i));
        }

        return config;
    }
View Full Code Here

        ORB orb = createORB(server.getURI(), server, translateToArgs(server), translateToProps(server));

        // check the tss config for a transport mech definition.  If we have one, then
        // the port information will be passed in that config, and the port in the IIOP profile
        // needs to be zero.
        TSSConfig config = server.getTssConfig();
        TSSTransportMechConfig transportMech = config.getTransport_mech();
        if (transportMech != null) {
            if (transportMech instanceof TSSSSLTransportConfig) {
                Any any = orb.create_any();
                any.insert_boolean(true);
View Full Code Here

        result.put("yoko.orb.id", server.getURI());

        // check the tss config for a transport mech definition.  If we have one, then
        // the port information will be passed in that config, and the port in the IIOP profile
        // needs to be zero.
        TSSConfig config = server.getTssConfig();
        TSSTransportMechConfig transportMech = config.getTransport_mech();
        if (transportMech != null) {
            if (transportMech instanceof TSSSSLTransportConfig) {
                result.put("yoko.orb.policy.zero_port", "true");
            }
        }
View Full Code Here

        ClassLoader savedCL = Thread.currentThread().getContextClassLoader();
        try {
            ServerPolicy serverPolicy = (ServerPolicy) ri.get_server_policy(ServerPolicyFactory.POLICY_TYPE);
            if (serverPolicy == null) return;

            TSSConfig tssPolicy = serverPolicy.getConfig();
            if (tssPolicy == null) return;

            if (serverPolicy.getClassloader() != null) Thread.currentThread().setContextClassLoader(serverPolicy.getClassloader());

            if (log.isDebugEnabled()) log.debug("Found server policy");

            ServiceContext serviceContext = ri.get_request_service_context(SecurityAttributeService.value);
            if (serviceContext == null) return;

            if (log.isDebugEnabled()) log.debug("Found service context");

            Any any = Util.getCodec().decode_value(serviceContext.context_data, SASContextBodyHelper.type());
            SASContextBody contextBody = SASContextBodyHelper.extract(any);

            short msgType = contextBody.discriminator();
            switch (msgType) {
                case MTEstablishContext.value:
                    if (log.isDebugEnabled()) log.debug("   EstablishContext");

                    contextId = contextBody.establish_msg().client_context_id;

                    identity = tssPolicy.check(SSLSessionManager.getSSLSession(ri.request_id()), contextBody.establish_msg());
                    if (identity != null) {
                        ContextManager.registerSubject(identity);
                    }

                    SASReplyManager.setSASReply(ri.request_id(), generateContextEstablished(identity, contextId, false));
View Full Code Here

    public void establish_components(IORInfo info) {

        try {
            ServerPolicy policy = (ServerPolicy) info.get_effective_policy(ServerPolicyFactory.POLICY_TYPE);
            // try to get a config from the policy, and fall back on the default
            TSSConfig config;
            if (policy == null) {
                config = defaultConfig;
            }
            else {
                config = policy.getConfig();
                if (config == null) {
                    config = defaultConfig;
                }
            }
            // nothing to work with, just return
            if (config == null) {
                return;
            }

            info.add_ior_component_to_profile(config.generateIOR(Util.getORB(), Util.getCodec()), TAG_INTERNET_IOP.value);
        } catch (INV_POLICY e) {
            // do nothing
        } catch (Exception e) {
            log.error("Generating IOR", e);
        }
View Full Code Here

        this.cssConfig = config;
    }

    public TSSConfig getTssConfig() {
        // just return a default no security one.
        return new TSSConfig();
    }
View Full Code Here

        if (config == null) {
            throw new RuntimeException("Unable to resolve ORB configuration " + configName);
        }
        // get the configuration from the hosting bean and decode what needs to be implemented.
        sslConfig = config.getSslConfig();
        TSSConfig tssConfig = config.getTssConfig();

        TSSTransportMechConfig transportMech = tssConfig.getTransport_mech();
        // if we have a transport mech defined, this is the configuration for any listeners we end up
        // creating.
        if (transportMech != null) {
            if (transportMech instanceof TSSSSLTransportConfig) {
                TSSSSLTransportConfig transportConfig = (TSSSSLTransportConfig) transportMech;
View Full Code Here

     */
    public TSSConfig getTssConfig() {
        // if nothing has been explicitly set, ensure we return
        // a default one.
        if (tssConfig == null) {
            tssConfig = new TSSConfig();
        }
        return tssConfig;
    }
View Full Code Here

TOP

Related Classes of org.apache.geronimo.corba.security.config.tss.TSSConfig

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.