Configuring Modeshape AuthenticationProvider
djg2002 Mar 26, 2012 12:08 PMRE: http://stackoverflow.com/questions/9872703/configuring-modeshape-authenticationprovider answered by Randall
My full config (intentionally simple) is below. I don't think Spring is the issue as I'd expect Modeshape to instantiate the CustomSecurityContext class, but I'm not seeing any errors saying 'Unable to initialize authentication provider
'.
One thing is we're using LogBack under slf4j - do you thinkg your log4j messages are getting lost?
Anyway, it seems everything is still going via anonymous access as I am able to work with the default workspace, and create workspaces, but when I call getAccessibleWorkspaces() I don't get anything but the default workspace name returned.
<?xml version="1.0" encoding="UTF-8"?>
<configuration xmlns:mode="http://www.modeshape.org/1.0"
xmlns:jcr="http://www.jcp.org/jcr/1.0">
<mode:repositories>
<mode:repository jcr:name="tbuk_repository" mode:source="file_system_source">
<mode:authenticationProviders>
<mode:authenticationProvider jcr:name="customModeshapeAuthenticationProvider"
mode:classname="com.uk.tech.jcr.security.CustomSecurityContext" />
</mode:authenticationProviders>
<mode:options jcr:primaryType="mode:options">
<jaasLoginConfigName jcr:primaryType="mode:option" mode:value="modeshape-jcr" />
</mode:options>
</mode:repository>
</mode:repositories>
<mode:sources jcr:primaryType="nt:unstructured">
<mode:source jcr:name="file_system_source"
mode:classname="org.modeshape.connector.filesystem.FileSystemSource"
mode:workspaceRootPath="c:/tbuk"
mode:temporaryStoragePath="c:/tbuk/temp"
mode:defaultWorkspaceName="tbuk_workspace"
mode:creatingWorkspacesAllowed="true"
mode:updatesAllowed="true"
mode:extraPropertiesBehavior="store"
mode:retryLimit="3" />
</mode:sources>
</configuration>