[jira] Updated: (DIRSERVER-1002) stopping server without
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 > [jira] Updated: (DIRSERVER-1002) stopping server without




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

    [jira] Updated: (DIRSERVER-1002) stopping server without  
Emmanuel Lecharny (JIRA)


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


 
07-27-07 06:11 PM


[ https://issues.apache.org/jira/brow...ls:all-tabpanel ]

Emmanuel Lecharny updated DIRSERVER-1002:
-----------------------------------------

Affects Version/s:     (was: 1.5.1)
1.5.0
Fix Version/s: 1.5.1

Changed the affected version (sadly, there is no 1.5.1-SNAPSHOT item ...), a
nd mark the fix o be delivered in 1.5.1

> stopping server without credentials results in NPE after server stops
> ---------------------------------------------------------------------
>
>                 Key: DIRSERVER-1002
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-1002
>             Project: Directory ApacheDS
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.5.0
>            Reporter: David Jencks
>             Fix For: 1.5.1
>
>
> This code:
>         Properties env = new Properties();
>         env.putAll(new ShutdownConfiguration().toJndiEnvironment());
>         env.put( Context.INITIAL_CONTEXT_FACTORY, ServerContextFactory.cla
ss.getName() );
>         //Shut it down
>         new InitialDirContext( env );
> results in, in AbstractContextFactory:
> line 115:
>             service.shutdown();
> which successfully shuts down the server without checking anything about a
uthentication/authorization
> line 146:
>         Context context = service.getJndiContext( principalDn, principal, 
credential, authentication, providerUrl );
> which calls DefaultDirectoryService...
>     public synchronized Context getJndiContext( LdapDN principalDn, String
 principal, byte[] credential,
>         String authentication, String rootDN ) throws NamingException
>     {
>         checkSecuritySettings( principal, credential, authentication );
>         if ( !started )
>         {
>             return new DeadContext();
>         }
> checkSecuritySettings gets to line 438:
>             if ( !startupConfiguration.isAllowAnonymousAccess() )
> which throws an NPE since the server is shut down, so startupConfiguration
 has been reset to null.
> So there are a lot of questions I don't know the answers to that I'd need 
to know which of the many ways to fix this would be most appropriate:
> - is this AbstractContextFactory accessed before or after all the server i
nterceptors? Or is it only accessed when no interceptors will be called?
> - is it appropriate to check security credentials and authorization to be 
able to shut down the server from the same vm?
> - If so, what code should be checking this authentication and authorizatio
n, because checkSecuritySettings doesn't check these, ever.
> I'd suspect the first step towards a solution would be to remove the checkSecurity
Settings method entirely, since AFAICT it currently serves only to pretend that some
 security checking is happening.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.







[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 09:28 PM.      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