Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languageruby
titlerepository-basic-authn.json
{
    "name" : "fedora-secured-repo",
    "jndiName" : "",
    "workspaces" : {
        "predefined" : ["default"],
        "default" : "default",
        "allowCreation" : true
    },
    "query" : {
        "enabled" : false
    },
    "storage" : {
        "cacheName" : "FedoraRepository",
        "cacheConfiguration" : "${fcrepo.infinispan.cache_configuration:config/infinispan/basic/infinispan.xml}",
        "binaryStorage" : {
            "type" : "cache",
            "dataCacheName" : "FedoraRepositoryBinaryData",
            "metadataCacheName" : "FedoraRepositoryMetaData"
        }
    },
    "security" : {
        "anonymous" : {
            "roles" : ["readonly","readwrite","admin"],
            "useOnFailedLogin" : false
        },
        "providers" : [
            { "classname" : "org.fcrepo.http.commons.session.BypassSecurityServletAuthenticationProviderauth.ServletContainerAuthenticationProvider" }
        ]
    },
    "node-types" : ["fedora-node-types.cnd"]
}

 

...

Code Block
languagexml
titlerepo.xml
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:context="http://www.springframework.org/schema/context"
  xsi:schemaLocation="
    http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
    http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd">

  <!-- Context that supports the actual ModeShape JCR itself -->

  <context:annotation-config />
  
  <context:component-scan base-package="org.fcrepo.kernel.services" />

  <bean name="modeshapeRepofactory" class="org.fcrepo.kernel.spring.ModeShapeRepositoryFactoryBean"
    depends-on="authenticationProvider">
    <property name="repositoryConfiguration" value="${fcrepo.modeshape.configuration:./repository-basic-authn.json}" />
  </bean>

  <bean name="authenticationProvider" class="org.fcrepo.auth.ServletContainerAuthenticationProvider">
    <property name="pep" ref="pep"/>
  </bean>
  
  <bean name="pep" class="org.fcrepo.auth.roles.basic.BasicRolesPEP"/>

  <bean class="org.modeshape.jcr.JcrRepositoryFactory" />

</beans>