DefaultSecurityManager sm = new DefaultSecurityManager();
sm.setAuthenticator(new Authenticator() {
@Override
public AuthenticationInfo authenticate(AuthenticationToken authenticationToken)
throws AuthenticationException {
return new SimpleAuthenticationInfo(new SimplePrincipalCollection(authenticationToken.getPrincipal(),
"openengsb"), authenticationToken.getCredentials());
}
});
SecurityUtils.setSecurityManager(sm);
ThreadContext.bind(sm);