Examples of DirectoryPartitionNexusProxy


Examples of org.apache.ldap.server.partition.DirectoryPartitionNexusProxy

    public void testNoBypass() throws NamingException
    {
        Name dn = new LdapName( "ou=system" );
        Context ctx = new DeadContext();
        DirectoryService ds = new MockDirectoryService();
        DirectoryPartitionNexusProxy proxy = new DirectoryPartitionNexusProxy( ctx, ds );
        Invocation i = new Invocation( proxy, ctx, "lookup", new Object[]{ dn } );
        InvocationStack.getInstance().push( i );

        try
        {
View Full Code Here

Examples of org.apache.ldap.server.partition.DirectoryPartitionNexusProxy

    public void testSingleBypass() throws NamingException
    {
        Name dn = new LdapName( "ou=system" );
        Context ctx = new DeadContext();
        DirectoryService ds = new MockDirectoryService();
        DirectoryPartitionNexusProxy proxy = new DirectoryPartitionNexusProxy( ctx, ds );
        Invocation i = new Invocation( proxy, ctx, "lookup", new Object[]{ dn }, Collections.singleton( "0" ) );
        InvocationStack.getInstance().push( i );

        try
        {
View Full Code Here

Examples of org.apache.ldap.server.partition.DirectoryPartitionNexusProxy

    public void testAdjacentDoubleBypass() throws NamingException
    {
        Name dn = new LdapName( "ou=system" );
        Context ctx = new DeadContext();
        DirectoryService ds = new MockDirectoryService();
        DirectoryPartitionNexusProxy proxy = new DirectoryPartitionNexusProxy( ctx, ds );
        Collection bypass = new HashSet();
        bypass.add( "0" );
        bypass.add( "1" );
        Invocation i = new Invocation( proxy, ctx, "lookup", new Object[]{ dn }, bypass );
        InvocationStack.getInstance().push( i );
View Full Code Here

Examples of org.apache.ldap.server.partition.DirectoryPartitionNexusProxy

    public void testFrontAndBackDoubleBypass() throws NamingException
    {
        Name dn = new LdapName( "ou=system" );
        Context ctx = new DeadContext();
        DirectoryService ds = new MockDirectoryService();
        DirectoryPartitionNexusProxy proxy = new DirectoryPartitionNexusProxy( ctx, ds );
        Collection bypass = new HashSet();
        bypass.add( "0" );
        bypass.add( "4" );
        Invocation i = new Invocation( proxy, ctx, "lookup", new Object[]{ dn }, bypass );
        InvocationStack.getInstance().push( i );
View Full Code Here

Examples of org.apache.ldap.server.partition.DirectoryPartitionNexusProxy

    public void testDoubleBypass() throws NamingException
    {
        Name dn = new LdapName( "ou=system" );
        Context ctx = new DeadContext();
        DirectoryService ds = new MockDirectoryService();
        DirectoryPartitionNexusProxy proxy = new DirectoryPartitionNexusProxy( ctx, ds );
        Collection bypass = new HashSet();
        bypass.add( "1" );
        bypass.add( "3" );
        Invocation i = new Invocation( proxy, ctx, "lookup", new Object[]{ dn }, bypass );
        InvocationStack.getInstance().push( i );
View Full Code Here

Examples of org.apache.ldap.server.partition.DirectoryPartitionNexusProxy

    public void testCompleteBypass() throws NamingException
    {
        Name dn = new LdapName( "ou=system" );
        Context ctx = new DeadContext();
        DirectoryService ds = new MockDirectoryService();
        DirectoryPartitionNexusProxy proxy = new DirectoryPartitionNexusProxy( ctx, ds );
        Invocation i = new Invocation( proxy, ctx, "lookup", new Object[]{ dn },
                DirectoryPartitionNexusProxy.BYPASS_ALL_COLLECTION );
        InvocationStack.getInstance().push( i );

        try
View Full Code Here

Examples of org.apache.ldap.server.partition.DirectoryPartitionNexusProxy

     * correctly.
     */
    protected ServerContext( DirectoryService service, Hashtable env ) throws NamingException
    {
        // set references to cloned env and the proxy
        this.nexusProxy = new DirectoryPartitionNexusProxy( this, service );
       
        DirectoryServiceConfiguration cfg = service.getConfiguration();
       
        this.env = ( Hashtable ) cfg.getEnvironment().clone();
        this.env.putAll( env );
View Full Code Here

Examples of org.apache.ldap.server.partition.DirectoryPartitionNexusProxy

        {
            service.startup( this, env );
        }
        else if( cfg instanceof AddDirectoryPartitionConfiguration )
        {
            new DirectoryPartitionNexusProxy(
                    service.getJndiContext( principal, credential, authentication, providerUrl ),
                    service).addContextPartition( ( ( AddDirectoryPartitionConfiguration ) cfg ).getDirectoryPartitionConfiguration() );
        }
        else if( cfg instanceof RemoveDirectoryPartitionConfiguration )
        {
            new DirectoryPartitionNexusProxy(
                    service.getJndiContext( principal, credential, authentication, providerUrl ),
                    service).removeContextPartition( ( ( RemoveDirectoryPartitionConfiguration ) cfg ).getSuffix() );
        }
        else if( service == null )
        {
View Full Code Here

Examples of org.apache.ldap.server.partition.DirectoryPartitionNexusProxy

        // ---- lookup the principal entry's userPassword attribute

        LdapName principalDn = new LdapName( principal );
        Invocation invocation = InvocationStack.getInstance().peek();
        DirectoryPartitionNexusProxy proxy = invocation.getProxy();
        Attributes userEntry;

        try
        {
            userEntry = proxy.lookup( principalDn, new String[] {"userPassword"}, USERLOOKUP_BYPASS );
            if ( userEntry == null )
            {
                throw new LdapAuthenticationException( "Failed to lookup user for authentication: " + principal );
            }
        }
View Full Code Here

Examples of org.apache.ldap.server.partition.DirectoryPartitionNexusProxy

        // NOTE: entryACI are NOT considered in adds (it would be a security breech)
        addPerscriptiveAciTuples( invocation.getProxy(), tuples, normName, subentryAttrs );
        addSubentryAciTuples( invocation.getProxy(), tuples, normName, subentryAttrs );

        // check if entry scope permission is granted
        DirectoryPartitionNexusProxy proxy = invocation.getProxy();
        engine.checkPermission( proxy, userGroups, user.getJndiName(), user.getAuthenticationLevel(),
                normName, null, null, ADD_PERMS, tuples, subentryAttrs );

        // now we must check if attribute type and value scope permission is granted
        NamingEnumeration attributeList = entry.getAll();
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.