You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@directory.apache.org by david jones <jo...@gmail.com> on 2011/09/27 14:53:35 UTC

getAdminSession question

For an embedded apacheds what is service.getAdminSession() doing compared to
getting a new InitialDirContext  (i.e ctx = new InitialDirContext(env))?
Is it something similar to getWiredContext which appears to just hardcode
the context user and password to defaults (i.e. pw = "secret"), or is
it independent of the admin's password?



-- 
David

Re: getAdminSession question

Posted by Kiran Ayyagari <ka...@apache.org>.
On Tue, Sep 27, 2011 at 8:53 AM, david jones <jo...@gmail.com> wrote:
> For an embedded apacheds what is service.getAdminSession() doing compared to
> getting a new InitialDirContext  (i.e ctx = new InitialDirContext(env))?
> Is it something similar to getWiredContext which appears to just hardcode
> the context user and password to defaults (i.e. pw = "secret"), or is
> it independent of the admin's password?
>
the AdminSession is the internal session which is associated with the
DN uid=admin,ou=system (irrespective of the password value, cause
this user details are read internally by the server)
Note that uid=admin,ou=system is a special user which is heavily used
by the server internally (it is always good to create a different user
and use it after granting the admin privileges)

And coming to the getWiredContext() it gives a JNDI handle to access
the directory where as getAdminSession() gives a CoreSession
which can be used to directly perform operations on DirectoryService
without going through a network layer

HTH
>
>
> --
> David
>



-- 
Kiran Ayyagari