Examples of SecurityProviderImpl


Examples of org.apache.jackrabbit.oak.security.SecurityProviderImpl

            NodeState base = target.getRoot();
            NodeBuilder builder = base.builder();

            String workspaceName =
                    source.getRepositoryConfig().getDefaultWorkspaceName();
            SecurityProviderImpl security = new SecurityProviderImpl(
                    mapSecurityConfig(config.getSecurityConfig()));

            // init target repository first
            new InitialContent().initialize(builder);
            if (initializer != null) {
                initializer.initialize(builder);
            }
            for (SecurityConfiguration sc : security.getConfigurations()) {
                sc.getWorkspaceInitializer().initialize(builder, workspaceName);
            }

            HashBiMap<String, String> uriToPrefix = HashBiMap.create();
            Map<Integer, String> idxToPrefix = newHashMap();
            copyNamespaces(builder, uriToPrefix, idxToPrefix);
            copyNodeTypes(builder, uriToPrefix.inverse());
            copyPrivileges(builder);

            // Triggers compilation of type information, which we need for
            // the type predicates used by the bulk  copy operations below.
            new TypeEditorProvider(false).getRootEditor(
                    base, builder.getNodeState(), builder, null);

            Map<String, String> versionablePaths = newHashMap();
            NodeState root = builder.getNodeState();
            copyWorkspace(builder, root, workspaceName, uriToPrefix, idxToPrefix, versionablePaths);
            copyVersionStore(builder, root, workspaceName, uriToPrefix, idxToPrefix, versionablePaths);

            logger.info("Applying default commit hooks");
            // TODO: default hooks?
            List<CommitHook> hooks = newArrayList();

            UserConfiguration userConf =
                    security.getConfiguration(UserConfiguration.class);
            String groupsPath = userConf.getParameters().getConfigValue(
                    UserConstants.PARAM_GROUP_PATH,
                    UserConstants.DEFAULT_GROUP_PATH);

            // hooks specific to the upgrade, need to run first
            hooks.add(new EditorHook(new CompositeEditorProvider(
                    new RestrictionEditorProvider(),
                    new GroupEditorProvider(groupsPath))));

            // security-related hooks
            for (SecurityConfiguration sc : security.getConfigurations()) {
                hooks.addAll(sc.getCommitHooks(workspaceName));
            }

            // type validation, reference and indexing hooks
            hooks.add(new EditorHook(new CompositeEditorProvider(
View Full Code Here

Examples of org.apache.jackrabbit.oak.security.SecurityProviderImpl

                .with(new ReferenceEditorProvider())
                .with(new ReferenceIndexProvider())
                .with(new PropertyIndexEditorProvider())
                .with(new PropertyIndexProvider())
                .with(new TypeEditorProvider())
                .with(securityProvider1 = new SecurityProviderImpl(getSecurityConfigParameters()));
        contentRepository1 = oak.createContentRepository();
        adminSession1 = login1(getAdminCredentials());
        root1 = adminSession1.getLatestRoot();
        userManager1 = securityProvider1.getConfiguration(UserConfiguration.class).getUserManager(root1, namePathMapper);
        aclMgr1 = securityProvider1.getConfiguration(AuthorizationConfiguration.class).getAccessControlManager(root1, namePathMapper);

        // make sure initial content is visible to ns2
        syncClusterNodes();

        oak = new Oak(ns2)
                .with(new InitialContent())
                .with(new ReferenceEditorProvider())
                .with(new ReferenceIndexProvider())
                .with(new PropertyIndexEditorProvider())
                .with(new PropertyIndexProvider())
                .with(new TypeEditorProvider())
                .with(securityProvider2 = new SecurityProviderImpl(getSecurityConfigParameters()));

        contentRepository2 = oak.createContentRepository();
        adminSession2 = login2(getAdminCredentials());
        root2 = adminSession2.getLatestRoot();
        userManager2 = securityProvider2.getConfiguration(UserConfiguration.class).getUserManager(root2, namePathMapper);
View Full Code Here

Examples of org.apache.jackrabbit.oak.security.SecurityProviderImpl

        with(new InitialContent());

        with(JcrConflictHandler.JCR_CONFLICT_HANDLER);
        with(new EditorHook(new VersionEditorProvider()));

        with(new SecurityProviderImpl());

        with(new ItemSaveValidatorProvider());
        with(new NameValidatorProvider());
        with(new NamespaceEditorProvider());
        with(new TypeEditorProvider());
View Full Code Here

Examples of org.apache.jackrabbit.oak.security.SecurityProviderImpl

        }
    }

    protected SecurityProvider getSecurityProvider() {
        if (securityProvider == null) {
            securityProvider = new SecurityProviderImpl(getSecurityConfigParameters());
        }
        return securityProvider;
    }
View Full Code Here

Examples of org.apache.jetspeed.security.impl.SecurityProviderImpl

        // atnProviders.add(ldapAtnProvider);
        AuthenticationProviderProxy atnProviderProxy = new AuthenticationProviderProxyImpl(atnProviders,
                "DefaultAuthenticator");

        // Need to override the AbstractSecurityTestcase behavior.
        securityProvider = new SecurityProviderImpl(atnProviderProxy, rsh, gsh, smh);
        ums = new UserManagerImpl(securityProvider);
        gms = new GroupManagerImpl(securityProvider);
        rms = new RoleManagerImpl(securityProvider);

        // Login module.
View Full Code Here

Examples of org.apache.jetspeed.security.impl.SecurityProviderImpl

        List atnProviders = new ArrayList();
        atnProviders.add(atnProvider);
       
      
        AuthenticationProviderProxy atnProviderProxy = (AuthenticationProviderProxy) ctx.getBean("org.apache.jetspeed.security.AuthenticationProviderProxy");
        securityProvider = new SecurityProviderImpl(atnProviderProxy, rsh, gsh, smh);
       
        securityProvider = (SecurityProvider) ctx.getBean("org.apache.jetspeed.security.SecurityProvider");
       
        ums = (UserManager) ctx.getBean("org.apache.jetspeed.security.UserManager");
        gms = (GroupManager) ctx.getBean("org.apache.jetspeed.security.GroupManager");
View Full Code Here

Examples of org.apache.jetspeed.security.impl.SecurityProviderImpl

        // atnProviders.add(ldapAtnProvider);
        AuthenticationProviderProxy atnProviderProxy = new AuthenticationProviderProxyImpl(atnProviders,
                "DefaultAuthenticator");

        // Need to override the AbstractSecurityTestcase behavior.
        securityProvider = new SecurityProviderImpl(atnProviderProxy, rsh, gsh, smh);
        ums = new UserManagerImpl(securityProvider);
        gms = new GroupManagerImpl(securityProvider);
        rms = new RoleManagerImpl(securityProvider);

        // Login module.
View Full Code Here

Examples of org.apache.jetspeed.security.impl.SecurityProviderImpl

        // atnProviders.add(ldapAtnProvider);
        AuthenticationProviderProxy atnProviderProxy = new AuthenticationProviderProxyImpl(atnProviders,
                "DefaultAuthenticator");

        // Need to override the AbstractSecurityTestcase behavior.
        securityProvider = new SecurityProviderImpl(atnProviderProxy, rsh, gsh, smh);
        ums = new UserManagerImpl(securityProvider);
        gms = new GroupManagerImpl(securityProvider);
        rms = new RoleManagerImpl(securityProvider);

        // Login module.
View Full Code Here

Examples of org.apache.jetspeed.security.impl.SecurityProviderImpl

        List atnProviders = new ArrayList();
        atnProviders.add(atnProvider);
       
      
        AuthenticationProviderProxy atnProviderProxy = (AuthenticationProviderProxy) ctx.getBean("org.apache.jetspeed.security.AuthenticationProviderProxy");
        securityProvider = new SecurityProviderImpl(atnProviderProxy, rsh, gsh, smh);
       
        securityProvider = (SecurityProvider) ctx.getBean("org.apache.jetspeed.security.SecurityProvider");
       
        ums = (UserManager) ctx.getBean("org.apache.jetspeed.security.UserManager");
        gms = (GroupManager) ctx.getBean("org.apache.jetspeed.security.GroupManager");
View Full Code Here

Examples of org.apache.jetspeed.security.impl.SecurityProviderImpl

        List atnProviders = new ArrayList();
        atnProviders.add(atnProvider);
       
      
        AuthenticationProviderProxy atnProviderProxy = (AuthenticationProviderProxy) ctx.getBean("org.apache.jetspeed.security.AuthenticationProviderProxy");
        securityProvider = new SecurityProviderImpl(atnProviderProxy, rsh, gsh, smh);
       
        securityProvider = (SecurityProvider) ctx.getBean("org.apache.jetspeed.security.SecurityProvider");
       
        ums = (UserManager) ctx.getBean("org.apache.jetspeed.security.UserManager");
        gms = (GroupManager) ctx.getBean("org.apache.jetspeed.security.GroupManager");
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.