[ApacheDS] Internal directory operations
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > Apache Server configuration support > Apache Directory Project > [ApacheDS] Internal directory operations




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    [ApacheDS] Internal directory operations  
Martin Alderson


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
07-23-07 06:11 PM

Hi all,

I'm looking for some advice on how to interact with an embedded ApacheDS =
server from a Quartz scheduled job.  This job will periodically add/modify =
an entry.

I had been using something like DirectoryService.getInstance().getConfigura=
tion().getPartitionNexus().modify(...) but I need this operation to go =
through the interceptor chain.

I think I need to get a JNDI context using (new InitialDirContext(env)) =
where env contains some credentials.  I guess I need the credentials of =
the admin user for this.  Is there any way for the server to know the =
operation is coming from the same process so it can automatically use the =
admin users credentials as stored in the directory?  If not how should I =
get the admin credentials?

Thinking about it, I guess this is tied in to having the admin user =
credentials specified in the configuration file which also seems bad to =
me.  Couldn't this be scrapped and have a way to authenticate as the admin =
user automatically from within the same process?

Thanks for any comments,

Martin







[ Post a follow-up to this message ]



    Re: [ApacheDS] Internal directory operations  
Alex Karasulu


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
07-24-07 06:11 AM

Hi Martin,

Sorry for not getting to this sooner...

On 7/23/07, Martin Alderson <Martin.Alderson-OEzMonE/5tgd9SLi6J12Iip2UmYkHbXO@public.gmane.o
rg> wrote:
>
> Hi all,
>
> I'm looking for some advice on how to interact with an embedded ApacheDS
> server from a Quartz scheduled job.  This job will periodically add/modify
> an entry.
>
> I had been using something like DirectoryService.getInstance().getConfigur
ation().getPartitionNexus().modify(...)
> but I need this operation to go through the interceptor chain.


Aye.  The best way to interact would be to actually get a JNDI context from
inside the job
using the JNDI InitialContextFactory for the server's CoreContextFactory.
It's the proxy
objects that pipe calls in from the JNDI contexts into the InterceptorChain.

I think I need to get a JNDI context using (new InitialDirContext(env))
> where env contains some credentials.  I guess I need the credentials of th
e
> admin user for this.  Is there any way for the server to know the operatio
n
> is coming from the same process so it can automatically use the admin user
s
> credentials as stored in the directory?  If not how should I get the admin
> credentials?


Good question.  I don't think there is a way that the moment.  There has
been some past
discussions about this but nothing conclusive.  Other services have the
admin credentials
provided in their configuration which is bad bad and more bad.  We need to
figure something
out here.  I'd be glad to help out on it but these next few days are going
to be really hard
for me.

Thinking about it, I guess this is tied in to having the admin user
> credentials specified in the configuration file which also seems bad to
> me.


Heh thinking the same here.

Couldn't this be scrapped and have a way to authenticate as the admin user
> automatically from within the same process?


Yeah this is something we need to do. I have not figured out any good means
to do
this at the present moment.  I guess if we had the security manager stuff in
place we could
find a way to determine if certain code can just run as admin.  The problem
is that any
user can add a SP and execute it to gain admin access without using a
security manager.

We have to figure something out here.  Sorry for not having a clear solution
in mind.

Alex






[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 10:20 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register