Examples of ConfigAdapter


Examples of org.apache.geronimo.corba.security.config.ConfigAdapter

    public void testCORBABean() throws Exception {
        ClassLoader classLoader = getClass().getClassLoader();
        Naming naming = new Jsr77Naming();
        AbstractName testName = naming.createRootName(new Artifact("test", "stuff", "", "ear"), "gbean", NameFactory.CORBA_SERVICE) ;
        ConfigAdapter configAdapter = new org.apache.geronimo.yoko.ORBConfigAdapter();
        CORBABean corbaBean = new CORBABean(testName, configAdapter, "localhost", 8050, classLoader, null, null, null);
        XmlObject xmlObject = getXmlObject(TEST_XML4);
        TSSConfigEditor editor = new TSSConfigEditor();
        Object o = editor.getValue(xmlObject, null, classLoader);
        TSSConfig tss = (TSSConfig) o;
View Full Code Here

Examples of org.apache.geronimo.corba.security.config.ConfigAdapter

    public void testCORBABean() throws Exception {
        ClassLoader classLoader = getClass().getClassLoader();
        Naming naming = new Jsr77Naming();
        AbstractName testName = naming.createRootName(new Artifact("test", "stuff", "", "ear"), "gbean", NameFactory.CORBA_SERVICE) ;
        ConfigAdapter configAdapter = new org.apache.geronimo.yoko.ORBConfigAdapter();
        CORBABean corbaBean = new CORBABean(testName, configAdapter, "localhost", 8050, classLoader, null, null, null);
        XmlObject xmlObject = getXmlObject(TEST_XML4);
        TSSConfigEditor editor = new TSSConfigEditor();
        Object o = editor.getValue(xmlObject, null, classLoader);
        TSSConfig tss = (TSSConfig) o;
View Full Code Here

Examples of org.apache.geronimo.corba.security.config.ConfigAdapter

    public void testCORBABean() throws Exception {
        ClassLoader classLoader = getClass().getClassLoader();
        Naming naming = new Jsr77Naming();
        AbstractName testName = naming.createRootName(new Artifact("test", "stuff", "", "ear"), "gbean", NameFactory.CORBA_SERVICE) ;
        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;
View Full Code Here

Examples of org.apache.geronimo.corba.security.config.ConfigAdapter

    public void testCORBABean() throws Exception {
        Bundle bundle = new MockBundleContext(getClass().getClassLoader(), "", null, null).getBundle();
        Naming naming = new Jsr77Naming();
        AbstractName testName = naming.createRootName(new Artifact("test", "stuff", "", "ear"), "gbean", NameFactory.CORBA_SERVICE);
        ConfigAdapter configAdapter = new org.apache.geronimo.yoko.ORBConfigAdapter(bundle);
        CORBABean corbaBean = new CORBABean(testName, configAdapter, "localhost", 8050, getClass().getClassLoader(), null, null);
        XmlObject xmlObject = getXmlObject(TEST_XML4);
        TSSConfigEditor editor = new TSSConfigEditor();
        Object o = editor.getValue(xmlObject, null, null, bundle);
        TSSConfig tss = (TSSConfig) o;
View Full Code Here

Examples of org.apache.geronimo.corba.security.config.ConfigAdapter

    public void testCORBABean() throws Exception {
        ClassLoader classLoader = getClass().getClassLoader();
        Naming naming = new Jsr77Naming();
        AbstractName testName = naming.createRootName(new Artifact("test", "stuff", "", "ear"), "gbean", NameFactory.CORBA_SERVICE) ;
        ConfigAdapter configAdapter = new org.apache.geronimo.yoko.ORBConfigAdapter();
        CORBABean corbaBean = new CORBABean(testName, configAdapter, "localhost", 8050, classLoader, null, null, null);
        XmlObject xmlObject = getXmlObject(TEST_XML4);
        TSSConfigEditor editor = new TSSConfigEditor();
        Object o = editor.getValue(xmlObject, null, classLoader);
        TSSConfig tss = (TSSConfig) o;
View Full Code Here

Examples of org.apache.geronimo.corba.security.config.ConfigAdapter

    public void testCORBABean() throws Exception {
        ClassLoader classLoader = getClass().getClassLoader();
        Naming naming = new Jsr77Naming();
        AbstractName testName = naming.createRootName(new Artifact("test", "stuff", "", "ear"), "gbean", NameFactory.CORBA_SERVICE) ;
        ConfigAdapter configAdapter = new org.apache.geronimo.yoko.ORBConfigAdapter();
        CORBABean corbaBean = new CORBABean(testName, configAdapter, "localhost", 8050, classLoader, null, null, null);
        XmlObject xmlObject = getXmlObject(TEST_XML4);
        TSSConfigEditor editor = new TSSConfigEditor();
        Object o = editor.getValue(xmlObject, null, classLoader);
        TSSConfig tss = (TSSConfig) o;
View Full Code Here

Examples of org.apache.geronimo.corba.security.config.ConfigAdapter

    public void testCORBABean() throws Exception {
        Bundle bundle = new MockBundleContext(getClass().getClassLoader(), "", null, null).getBundle();
        Naming naming = new Jsr77Naming();
        AbstractName testName = naming.createRootName(new Artifact("test", "stuff", "", "ear"), "gbean", NameFactory.CORBA_SERVICE);
        ConfigAdapter configAdapter = new org.apache.geronimo.yoko.ORBConfigAdapter(bundle);
        CORBABean corbaBean = new CORBABean(testName, configAdapter, "localhost", 8050, getClass().getClassLoader(), null, null);
        XmlObject xmlObject = getXmlObject(TEST_XML4);
        TSSConfigEditor editor = new TSSConfigEditor();
        Object o = editor.getValue(xmlObject, null, bundle);
        TSSConfig tss = (TSSConfig) o;
View Full Code Here

Examples of org.apache.geronimo.corba.security.config.ConfigAdapter

    public void testCORBABean() throws Exception {
        ClassLoader classLoader = getClass().getClassLoader();
        Naming naming = new Jsr77Naming();
        AbstractName testName = naming.createRootName(new Artifact("test", "stuff", "", "ear"), "gbean", NameFactory.CORBA_SERVICE) ;
        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;
View Full Code Here

Examples of org.apache.geronimo.corba.security.config.ConfigAdapter

    public void testCORBABean() throws Exception {
        ClassLoader classLoader = getClass().getClassLoader();
        Naming naming = new Jsr77Naming();
        AbstractName testName = naming.createRootName(new Artifact("test", "stuff", "", "ear"), "gbean", NameFactory.CORBA_SERVICE) ;
        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;
View Full Code Here

Examples of org.auraframework.adapter.ConfigAdapter

        DefinitionAccess access = def.getAccess();
        if (access.isGlobal() || !access.requiresAuthentication()) {
            return null;
        }

        ConfigAdapter configAdapter = Aura.getConfigAdapter();
        String referencingNamespace = null;
        if (referencingDescriptor != null) {
            String prefix = referencingDescriptor.getPrefix();
            if (configAdapter.isUnsecuredPrefix(prefix)) {
                return null;
            }

            referencingNamespace = referencingDescriptor.getNamespace();

            // The caller is in a system namespace let them through
            if (configAdapter.isPrivilegedNamespace(referencingNamespace)) {
                return null;
            }
        }

        DefDescriptor<?> desc = def.getDescriptor();

        String namespace;
        String target;
        if (def instanceof AttributeDef) {
            AttributeDef attributeDef = (AttributeDef) def;
            DefDescriptor<? extends RootDefinition> parentDescriptor = attributeDef.getParentDescriptor();
            namespace = parentDescriptor.getNamespace();
            target = String.format("%s:%s.%s", namespace, parentDescriptor.getName(), desc.getName());
        } else {
            namespace = desc.getNamespace();
            target = String.format("%s:%s", namespace, desc.getName());
        }

        // Cache key is of the form "referencingNamespace>defNamespace:defName[.subDefName].defTypeOrdinal"
        DefType defType = desc.getDefType();
        String key = String.format("%s>%s.%d", referencingNamespace == null ? "" : referencingNamespace, target,
                defType.ordinal());
        String status = accessCheckCache.getIfPresent(key);
        if (status == null) {
            status = "";

            // Protect against re-entry
            accessCheckCache.put(key, status);

            // System.out.printf("** MDR.miss.assertAccess() cache miss for: %s\n", key);

            DefDescriptor<? extends Definition> descriptor = def.getDescriptor();
            if (!configAdapter.isUnsecuredNamespace(namespace)
                    && !configAdapter.isUnsecuredPrefix(descriptor.getPrefix())) {
                if (referencingNamespace == null || referencingNamespace.isEmpty()) {
                    status = String
                            .format("Access to %s '%s' disallowed by MasterDefRegistry.assertAccess(): referencing namespace was empty or null",
                                    defType, target);
                } else if (!referencingNamespace.equals(namespace)) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.