[
https://issues.apache.org/jira/browse/DIRSERVER-746?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Emmanuel Lecharny resolved DIRSERVER-746.
-----------------------------------------
Resolution: Fixed
Thanks for the post Bastiaan. And sorry for the loooooong time it took to
respond.
Thanks for the report and for the patch. Nice catch !
I have somehow inverted the logic for this part : if we don't have an
AuthorizationService, or if it's not a correct interceptor, then an exception
is thrown (the Ldap Server is always supposed to set this kind of interceptor).
If no authorization service is needed, then a pass-through service mst be
created.
Here is the modified code :
...
Interceptor authzInterceptor = interceptorChain.get(
"authorizationService" );
if ( authzInterceptor == null )
{
log.error( "The Authorization service is null : this is not
allowed" );
throw new NamingException( "The Authorization service is null"
);
}
if ( !( authzInterceptor instanceof AuthorizationService) )
{
log.error( "The Authorization service is not set correctly :
'{}' is an incorect interceptor",
authzInterceptor.getClass().getName() );
throw new NamingException( "The Authorization service is
incorrectly set" );
}
AuthorizationService authzSrvc = ( AuthorizationService )
authzInterceptor;
authzSrvc.cacheNewGroup( upName, normName, attributes );
...
> DefaultDirectoryService.createBootstrapEntries() throws NullPointerException
> if no authorizationService is configured
> ---------------------------------------------------------------------------------------------------------------------
>
> Key: DIRSERVER-746
> URL: https://issues.apache.org/jira/browse/DIRSERVER-746
> Project: Directory ApacheDS
> Issue Type: Bug
> Components: core
> Reporter: Bastiaan Bakker
> Priority: Minor
> Attachments: apacheds-1.0-RC4-authorizationservice.patch
>
>
> DefaultDirectoryService.createBootstrapEntries() has a hardcoded dependency
> on AuthorizationService being configured as the 'authorizationService'
> interceptor. If one does not want to configure an authorizationService the
> code in question will throw a NullPointerException. Also if one does
> configure a different authorizationService implementation the code will throw
> a ClassCastException.
> Clearly the code should not assume an AuthorizationService instance has been
> configured as the 'authorizationService' interceptor.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.