Old Release

This documentation covers an old version of Fedora. Looking for another version? See all documentation.

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

Basic file-based repository, with basic access roles authorization enabled.  Querying is OFF.

ParameterSuggested valuesNotes
Modeshape configurationminimal-Dfcrepo.modeshape.configuration=classpath:./repository-basic-authn.json
Infinispan configurationfile 
Is a federated component required?No 
Is a sequencing component required?No 

Is an authorization layer required?

Yes 
Is versioning required?No 
repository-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.auth.ServletContainerAuthenticationProvider" }
        ]
    },
    "node-types" : ["fedora-node-types.cnd"]
}
repo.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>

  • No labels