public Attributes lookup( LdapDN dn, String[] attrIds ) throws NamingException { return lookup( dn, attrIds, null ); }
public Attributes lookup( LdapDN name ) throws NamingException { return lookup( name, ( Collection ) null ); }
public void modify( NextInterceptor next, LdapDN name, ModificationItemImpl[] mods ) throws NamingException { Invocation invocation = InvocationStack.getInstance().peek(); PartitionNexusProxy proxy = invocation.getProxy(); Attributes oriEntry = proxy.lookup( name, PartitionNexusProxy.LOOKUP_BYPASS ); super.modify( next, name, mods ); notifyOnModify( name, mods, oriEntry ); }
userEntry = proxy.lookup( principalDn, new String[] { "userPassword" }, USERLOOKUP_BYPASS );
Attributes administrativeEntry = proxy.lookup( parentDn, new String[] { SUBENTRYACI_ATTR }, PartitionNexusProxy.LOOKUP_BYPASS ); Attribute subentryAci = administrativeEntry.get( SUBENTRYACI_ATTR );
public void modify( NextInterceptor next, LdapDN name, int modOp, Attributes mods ) throws NamingException { Invocation invocation = InvocationStack.getInstance().peek(); PartitionNexusProxy proxy = invocation.getProxy(); Attributes oriEntry = proxy.lookup( name, PartitionNexusProxy.LOOKUP_BYPASS ); super.modify( next, name, modOp, mods ); // package modifications in ModItem format for event delivery ModificationItemImpl[] modItems = new ModificationItemImpl[mods.size()]; NamingEnumeration list = mods.getAll(); for ( int ii = 0; ii < modItems.length; ii++ ) { modItems[ii] = new ModificationItemImpl( modOp, ( Attribute ) list.next() ); } notifyOnModify( name, modItems, oriEntry ); }
Attributes referral = invocation.getProxy().lookup( farthest, PartitionNexusProxy.LOOKUP_BYPASS ); Attribute refs = referral.get( REF_ATTR ); doReferralException( farthest, new LdapDN( normName.getUpName() ), refs );
Attributes referral = invocation.getProxy().lookup( farthest, PartitionNexusProxy.LOOKUP_BYPASS ); Attribute refs = referral.get( REF_ATTR ); doReferralException( farthest, new LdapDN( name.getUpName() ), refs );
Attributes referral = invocation.getProxy().lookup( farthest, PartitionNexusProxy.LOOKUP_BYPASS ); Attribute refs = referral.get( REF_ATTR ); doReferralException( farthest, new LdapDN( name.getUpName() ), refs );
entry = proxy.lookup( parentDn, PartitionNexusProxy.LOOKUP_BYPASS );
Attributes referral = invocation.getProxy().lookup( farthest, PartitionNexusProxy.LOOKUP_BYPASS ); Attribute refs = referral.get( REF_ATTR ); doReferralException( farthest, new LdapDN( normName.getUpName() ), refs );
public boolean hasEntry( NextInterceptor next, LdapDN name ) throws NamingException { Invocation invocation = InvocationStack.getInstance().peek(); PartitionNexusProxy proxy = invocation.getProxy(); Attributes entry = proxy.lookup( name, PartitionNexusProxy.LOOKUP_BYPASS ); LdapPrincipal principal = ( ( ServerContext ) invocation.getCaller() ).getPrincipal(); LdapDN principalDn = principal.getJndiName(); if ( isPrincipalAnAdministrator( principalDn ) || !enabled || name.toString().trim().equals( "" ) ) // no checks on the rootdse { return next.hasEntry( name ); } Set userGroups = groupCache.getGroups( principalDn.toNormName() ); Collection tuples = new HashSet(); addPerscriptiveAciTuples( proxy, tuples, name, entry ); addEntryAciTuples( tuples, entry ); addSubentryAciTuples( proxy, tuples, name, entry ); // check that we have browse access to the entry engine.checkPermission( proxy, userGroups, principalDn, principal.getAuthenticationLevel(), name, null, null, BROWSE_PERMS, tuples, entry ); return next.hasEntry( name ); }
Attributes referral = invocation.getProxy().lookup( farthest, PartitionNexusProxy.LOOKUP_BYPASS );
public Attributes lookup( NextInterceptor next, LdapDN name ) throws NamingException { Invocation invocation = InvocationStack.getInstance().peek(); PartitionNexusProxy proxy = invocation.getProxy(); Attributes entry = proxy.lookup( name, PartitionNexusProxy.LOOKUP_BYPASS ); LdapPrincipal user = ( ( ServerContext ) invocation.getCaller() ).getPrincipal(); LdapDN principalDn = (LdapDN)user.getJndiName(); principalDn.normalize( attrRegistry.getNormalizerMapping() ); if ( isPrincipalAnAdministrator( principalDn ) || !enabled ) { return next.lookup( name ); } checkLookupAccess( user, name, entry ); return next.lookup( name ); }
Attributes referral = invocation.getProxy().lookup( farthestSrc, PartitionNexusProxy.LOOKUP_BYPASS ); Attribute refs = referral.get( REF_ATTR );
public Attributes lookup( NextInterceptor next, LdapDN dn, String[] attrIds ) throws NamingException { Invocation invocation = InvocationStack.getInstance().peek(); LdapPrincipal principal = ( ( ServerContext ) invocation.getCaller() ).getPrincipal(); LdapDN principalDn = new LdapDN( principal.getName() ); principalDn.normalize( attrRegistry.getNormalizerMapping() ); if ( isPrincipalAnAdministrator( principalDn ) || !enabled ) { return next.lookup( dn, attrIds ); } PartitionNexusProxy proxy = invocation.getProxy(); Attributes entry = proxy.lookup( dn, PartitionNexusProxy.LOOKUP_BYPASS ); checkLookupAccess( principal, dn, entry ); return next.lookup( dn, attrIds ); }
Attributes entry = proxy.lookup( name, PartitionNexusProxy.LOOKUP_BYPASS ); LdapPrincipal principal = ( ( ServerContext ) invocation.getCaller() ).getPrincipal(); LdapDN principalDn = principal.getJndiName();
public boolean compare( NextInterceptor next, LdapDN name, String oid, Object value ) throws NamingException { // Access the principal requesting the operation, and bypass checks if it is the admin Invocation invocation = InvocationStack.getInstance().peek(); PartitionNexusProxy proxy = invocation.getProxy(); Attributes entry = proxy.lookup( name, PartitionNexusProxy.LOOKUP_BYPASS ); LdapPrincipal principal = ( ( ServerContext ) invocation.getCaller() ).getPrincipal(); LdapDN principalDn = principal.getJndiName(); if ( isPrincipalAnAdministrator( principalDn ) || !enabled ) { return next.compare( name, oid, value ); } Set userGroups = groupCache.getGroups( principalDn.toNormName() ); Collection tuples = new HashSet(); addPerscriptiveAciTuples( proxy, tuples, name, entry ); addEntryAciTuples( tuples, entry ); addSubentryAciTuples( proxy, tuples, name, entry ); engine.checkPermission( proxy, userGroups, principalDn, principal.getAuthenticationLevel(), name, null, null, READ_PERMS, tuples, entry ); engine.checkPermission( proxy, userGroups, principalDn, principal.getAuthenticationLevel(), name, oid, value, COMPARE_PERMS, tuples, entry ); return next.compare( name, oid, value ); }
entry = proxy.lookup( matched, PartitionNexusProxy.GETMATCHEDDN_BYPASS ); Set userGroups = groupCache.getGroups( principalDn.toString() ); Collection tuples = new HashSet();
Attributes entry = proxy.lookup( name, PartitionNexusProxy.LOOKUP_BYPASS ); LdapPrincipal principal = ( ( ServerContext ) invocation.getCaller() ).getPrincipal(); LdapDN principalDn = principal.getJndiName();