Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Merge branch 'master' of github.com:fcrepo/fcrepo

  • Loading branch information...
ajs6f committed May 31, 2012
2 parents 0f1e2f6 + 0087436 commit c1ff32b0b89f5557cfae8fa916833b8d5c46129c
Showing with 3,673 additions and 2,620 deletions.
  1. +19 −6 fcrepo-common/src/main/java/org/fcrepo/utilities/FileUtils.java
  2. +3 −5 fcrepo-installer/src/main/resources/config/spring/fesl/module/policy-enforcement.xml
  3. +6 −0 fcrepo-installer/src/main/resources/config/spring/fesl/web/config-attribute-finder.xml
  4. +13 −1 fcrepo-installer/src/main/resources/config/spring/fesl/web/config-melcoe-pep.xml
  5. +7 −0 fcrepo-installer/src/main/resources/config/spring/fesl/web/config-pdp.xml
  6. +1 −0 fcrepo-installer/src/main/resources/config/spring/fesl/web/config-policy-index.xml
  7. +14 −20 fcrepo-installer/src/main/resources/config/spring/fesl/web/jaxrs.xml
  8. +70 −31 fcrepo-installer/src/main/resources/config/spring/policy-enforcement.xml
  9. +33 −0 fcrepo-installer/src/main/resources/config/spring/web/jaxrs/describe-jaxrs.xml
  10. +44 −0 fcrepo-installer/src/main/resources/config/spring/web/jaxrs/objects-jaxrs.xml
  11. +33 −0 fcrepo-installer/src/main/resources/config/spring/web/jaxrs/schema-jaxrs.xml
  12. +32 −0 fcrepo-installer/src/main/resources/config/spring/web/jaxrs/upload-jaxrs.xml
  13. +6 −2 fcrepo-integrationtest/fcrepo-integrationtest-configA/pom.xml
  14. +4 −1 fcrepo-integrationtest/fcrepo-integrationtest-configB/pom.xml
  15. +5 −1 fcrepo-integrationtest/fcrepo-integrationtest-configC/pom.xml
  16. +341 −0 ...ontest/fcrepo-integrationtest-core/src/main/java/org/fcrepo/test/api/TestExternalDatastreams.java
  17. +20 −16 ...po-integrationtest/fcrepo-integrationtest-core/src/main/java/org/fcrepo/test/api/TestRESTAPI.java
  18. +10 −9 ...egrationtest/fcrepo-integrationtest-core/src/main/java/org/fcrepo/test/api/TestXACMLPolicies.java
  19. +127 −70 ...ationtest/fcrepo-integrationtest-core/src/main/java/org/fcrepo/test/fesl/policy/TestPolicies.java
  20. +56 −0 ...t-core/src/main/resources/XACMLTestPolicies/fesl-test-policies/deny-unallowed-file-resolution.xml
  21. +1 −1 ...fcrepo-integrationtest-core/src/main/resources/XACMLTestPolicies/junit/deny-apia-by-testroleB.xml
  22. +1 −1 ...fcrepo-integrationtest-core/src/main/resources/XACMLTestPolicies/junit/deny-apia-by-testuser2.xml
  23. +1 −1 ...fcrepo-integrationtest-core/src/main/resources/XACMLTestPolicies/junit/deny-apia-by-testuser3.xml
  24. +1 −1 ...fcrepo-integrationtest-core/src/main/resources/XACMLTestPolicies/junit/deny-apia-by-testuser4.xml
  25. +1 −1 ...epo-integrationtest-core/src/main/resources/XACMLTestPolicies/junit/deny-apia-except-by-owner.xml
  26. +1 −1 ...integrationtest-core/src/main/resources/XACMLTestPolicies/junit/deny-apia-except-by-testroleC.xml
  27. +1 −1 ...ontest-core/src/main/resources/XACMLTestPolicies/junit/deny-modifyObject-if-restricted-cmodel.xml
  28. +1 −1 ...repo-integrationtest-core/src/main/resources/XACMLTestPolicies/junit/permit-apim-by-testroleA.xml
  29. +1 −1 ...repo-integrationtest-core/src/main/resources/XACMLTestPolicies/junit/permit-apim-by-testuser1.xml
  30. +39 −0 ...ontest-core/src/main/resources/XACMLTestPolicies/test-policies/deny-unallowed-file-resolution.xml
  31. +100 −0 ...tegrationtest/fcrepo-integrationtest-core/src/main/resources/config/spring/policy-enforcement.xml
  32. +20 −0 fcrepo-integrationtest/fcrepo-integrationtest-core/src/main/resources/scripts/installer-run.xml
  33. +13 −13 ...o-security/fcrepo-security-jaas/src/main/java/org/fcrepo/server/security/jaas/AuthFilterJAAS.java
  34. +12 −12 .../fcrepo-security-pdp/src/main/java/org/fcrepo/server/security/xacml/pdp/data/PolicyIndexBase.java
  35. +1 −1 ...fcrepo-security-pdp/src/main/java/org/fcrepo/server/security/xacml/pdp/data/XPathPolicyIndex.java
  36. +2 −2 ...-security-pdp/src/main/java/org/fcrepo/server/security/xacml/pdp/finder/policy/PolicyManager.java
  37. +40 −32 ...repo-security-pdp/src/main/java/org/fcrepo/server/security/xacml/util/RIRelationshipResolver.java
  38. +3 −1 ...security-pdp/src/test/java/org/fcrepo/server/security/xacml/test/TestFedoraRIAttributeFinder.java
  39. +1 −1 ...ity/fcrepo-security-pdp/src/test/java/org/fcrepo/server/security/xacml/test/TestXacmlRequest.java
  40. +4 −11 .../fcrepo-security-pep/src/main/java/org/fcrepo/server/security/xacml/pep/EvaluationEngineImpl.java
  41. +47 −3 ...ity-pep/src/main/java/org/fcrepo/server/security/xacml/pep/{module → impl}/FESLAuthorization.java
  42. +108 −0 ...urity-pep/src/main/java/org/fcrepo/server/security/xacml/pep/impl/FESLPolicyEnforcementPoint.java
  43. +49 −54 fcrepo-security/fcrepo-security-pep/src/main/java/org/fcrepo/server/security/xacml/pep/rest/PEP.java
  44. +0 −13 ...-security-pep/src/main/java/org/fcrepo/server/security/xacml/pep/rest/filters/DescribeFilter.java
  45. +0 −13 ...ecurity-pep/src/main/java/org/fcrepo/server/security/xacml/pep/rest/filters/GetNextPIDFilter.java
  46. +0 −13 ...y-pep/src/main/java/org/fcrepo/server/security/xacml/pep/rest/filters/GetObjectHistoryFilter.java
  47. +0 −8 ...repo-security-pep/src/main/java/org/fcrepo/server/security/xacml/pep/rest/filters/NoopFilter.java
  48. +12 −253 ...o-security-pep/src/main/java/org/fcrepo/server/security/xacml/pep/rest/filters/ObjectsFilter.java
  49. +249 −0 ...pep/src/main/java/org/fcrepo/server/security/xacml/pep/rest/filters/ObjectsRESTFilterMatcher.java
  50. +2 −17 ...repo-security-pep/src/main/java/org/fcrepo/server/security/xacml/pep/rest/filters/RESTFilter.java
  51. +2 −2 ...-security-pep/src/main/java/org/fcrepo/server/security/xacml/pep/rest/filters/RISearchFilter.java
  52. +46 −0 ...p/src/main/java/org/fcrepo/server/security/xacml/pep/rest/filters/ResponseHandlingRESTFilter.java
  53. +0 −492 ...po-security-pep/src/main/java/org/fcrepo/server/security/xacml/pep/rest/filters/SearchFilter.java
  54. +0 −8 ...-pep/src/main/java/org/fcrepo/server/security/xacml/pep/rest/objectshandlers/AddRelationship.java
  55. +91 −61 ...rity-pep/src/main/java/org/fcrepo/server/security/xacml/pep/rest/objectshandlers/FindObjects.java
  56. +0 −9 ...src/main/java/org/fcrepo/server/security/xacml/pep/rest/objectshandlers/GetDatastreamHistory.java
  57. +0 −8 ...pep/src/main/java/org/fcrepo/server/security/xacml/pep/rest/objectshandlers/GetDissemination.java
  58. +0 −7 ...pep/src/main/java/org/fcrepo/server/security/xacml/pep/rest/objectshandlers/GetRelationships.java
  59. +2 −1 ...-pep/src/main/java/org/fcrepo/server/security/xacml/pep/rest/objectshandlers/ListDatastreams.java
  60. +0 −8 ...ep/src/main/java/org/fcrepo/server/security/xacml/pep/rest/objectshandlers/PurgeRelationship.java
  61. +0 −8 ...ecurity-pep/src/main/java/org/fcrepo/server/security/xacml/pep/rest/objectshandlers/Validate.java
  62. +8 −12 fcrepo-server/pom.xml
  63. +4 −4 fcrepo-server/src/main/java/org/fcrepo/server/Context.java
  64. +4 −4 fcrepo-server/src/main/java/org/fcrepo/server/MultiValueMap.java
  65. +13 −9 fcrepo-server/src/main/java/org/fcrepo/server/ReadOnlyContext.java
  66. +12 −5 fcrepo-server/src/main/java/org/fcrepo/server/Server.java
  67. +3 −2 fcrepo-server/src/main/java/org/fcrepo/server/resourceIndex/ResourceIndexModule.java
  68. +7 −1 fcrepo-server/src/main/java/org/fcrepo/server/rest/BaseRestResource.java
  69. +46 −27 fcrepo-server/src/main/java/org/fcrepo/server/rest/DatastreamResource.java
  70. +67 −20 fcrepo-server/src/main/java/org/fcrepo/server/rest/DefaultSerializer.java
  71. +284 −0 fcrepo-server/src/main/java/org/fcrepo/server/rest/DescribeRepositoryResource.java
  72. +0 −164 fcrepo-server/src/main/java/org/fcrepo/server/rest/FedoraObjectSearchResource.java
  73. +219 −24 ...ver/src/main/java/org/fcrepo/server/rest/{FedoraObjectResource.java → FedoraObjectsResource.java}
  74. +20 −11 fcrepo-server/src/main/java/org/fcrepo/server/rest/MethodResource.java
  75. +18 −9 fcrepo-server/src/main/java/org/fcrepo/server/rest/RelationshipResource.java
  76. +2 −3 fcrepo-server/src/main/java/org/fcrepo/server/rest/RestHelper.java
  77. +10 −1 fcrepo-server/src/main/java/org/fcrepo/server/rest/RestParam.java
  78. +42 −0 fcrepo-server/src/main/java/org/fcrepo/server/rest/SchemaResource.java
  79. +44 −0 fcrepo-server/src/main/java/org/fcrepo/server/rest/cxf/WadlGenerator.java
  80. +14 −21 fcrepo-server/src/main/java/org/fcrepo/server/security/AttributeFinderModule.java
  81. +14 −29 fcrepo-server/src/main/java/org/fcrepo/server/security/ContextAttributeFinderModule.java
  82. +11 −0 fcrepo-server/src/main/java/org/fcrepo/server/security/ContextRegistry.java
  83. +16 −280 fcrepo-server/src/main/java/org/fcrepo/server/security/DefaultAuthorization.java
  84. +0 −14 fcrepo-server/src/main/java/org/fcrepo/server/security/PolicyEnforcementPoint.java
  85. +0 −459 fcrepo-server/src/main/java/org/fcrepo/server/security/PolicyEnforcementPointImpl.java
  86. +199 −61 fcrepo-server/src/main/java/org/fcrepo/server/security/PolicyFinderModule.java
  87. +54 −0 fcrepo-server/src/main/java/org/fcrepo/server/security/PolicyLoader.java
  88. +34 −20 fcrepo-server/src/main/java/org/fcrepo/server/security/PolicyParser.java
  89. +26 −14 fcrepo-server/src/main/java/org/fcrepo/server/security/ResourceAttributeFinderModule.java
  90. +219 −0 fcrepo-server/src/main/java/org/fcrepo/server/security/impl/AbstractPolicyEnforcementPoint.java
  91. +155 −0 fcrepo-server/src/main/java/org/fcrepo/server/security/impl/DefaultPolicyEnforcementPoint.java
  92. +33 −0 fcrepo-server/src/main/java/org/fcrepo/server/security/impl/HashtableContextRegistry.java
  93. +68 −0 fcrepo-server/src/main/java/org/fcrepo/server/security/impl/OverridingPolicyLoader.java
  94. +46 −0 fcrepo-server/src/main/java/org/fcrepo/server/security/impl/SimplePolicyLoader.java
  95. +5 −0 fcrepo-server/src/main/java/org/fcrepo/server/security/servletfilters/FilterRestApiAuthn.java
  96. +3 −1 fcrepo-server/src/main/java/org/fcrepo/server/storage/translation/FOXMLDODeserializer.java
  97. +47 −14 fcrepo-server/src/main/java/org/fcrepo/server/storage/types/Datastream.java
  98. +12 −6 fcrepo-server/src/main/java/org/fcrepo/server/upload/UploadResource.java
  99. +83 −83 fcrepo-server/src/main/resources/xsd/datastreamProfile.xsd
  100. +63 −0 fcrepo-server/src/main/resources/xsd/findObjects.xsd
  101. +11 −3 fcrepo-server/src/main/resources/xsd/listDatastreams.xsd
  102. +3 −3 fcrepo-webapp/fcrepo-webapp-fedora/pom.xml
  103. +0 −19 fcrepo-webapp/fcrepo-webapp-fedora/src/main/webapp/WEB-INF/applicationContext.xml
  104. +57 −47 fcrepo-webapp/fcrepo-webapp-fedora/src/main/webapp/WEB-INF/web.xml
  105. +1 −28 pom.xml
@@ -11,27 +11,26 @@
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;

import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Properties;
import java.util.Set;
import java.util.Map.Entry;

public class FileUtils {

private static final int BUFF_SIZE = 100000;

/**
* A static 100K buffer used by the copy operation.
*/
private static final byte[] buffer = new byte[BUFF_SIZE];

/**
* Copy an InputStream to an OutputStream.
* Copy an InputStream to an OutputStream.
* While this method will automatically close the destination OutputStream,
* the caller is responsible for closing the source InputStream.
*
*
* @param source
* @param destination
* @return <code>true</code> if the operation was successful;
@@ -151,6 +150,18 @@ public static boolean delete(String file) {
return delete(new File(file));
}

public static boolean deleteContents(File dir) {
boolean result = true;
if (dir.exists()) {
for (File f : dir.listFiles()) {
result &= f.delete();
}
} else {
dir.mkdirs();
}
return result;
}

/**
* Move a file or directory. Initally attempts to move the File using
* java.io.File.renameTo(). However, should this operation fail (e.g. when
@@ -237,6 +248,7 @@ public static FileFilter getSuffixFileFilter(String suffix) {
this.filenamePrefix = filenamePrefix;
}

@Override
public boolean accept(File file) {
String filename = file.getName();
return filename.startsWith(filenamePrefix);
@@ -252,6 +264,7 @@ public boolean accept(File file) {
this.filenameSuffix = filenameSuffix;
}

@Override
public boolean accept(File file) {
String filename = file.getName();
return filename.endsWith(filenameSuffix);
@@ -6,9 +6,7 @@
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">

<bean id="org.fcrepo.server.security.Authorization"
class="org.fcrepo.server.security.xacml.pep.module.FESLAuthorization"
autowire-candidate="true">
</bean>
<!--
Intentionally empty to overwrite the legacy PEP and Authorization module definitions
-->
</beans>
@@ -147,6 +147,12 @@
</map>
</property>
</bean>
<bean id="org.fcrepo.server.security.ContextAttributeFinderModule"
class="org.fcrepo.server.security.ContextAttributeFinderModule"
autowire-candidate="true">
<constructor-arg><ref bean="org.fcrepo.server.security.ContextRegistry" /></constructor-arg>
</bean>

<!--
<AttributeFinder name="org.fcrepo.server.security.xacml.pdp.finder.attribute.LDAPAttributeFinder">
<map>
@@ -62,7 +62,7 @@
</bean>

<bean id="org.fcrepo.server.security.xacml.util.RelationshipResolver" class="org.fcrepo.server.security.xacml.util.RIRelationshipResolver">
<!-- relationships from object to its parent -->
<constructor-arg><ref bean="org.fcrepo.server.Server" /></constructor-arg>
<constructor-arg>
<map>
<entry key="xacml-parent-relationship-1" value="info:fedora/fedora-system:def/relations-external#isMemberOf" />
@@ -76,5 +76,17 @@
</map>
</constructor-arg>
</bean>

<bean id="org.fcrepo.server.security.PolicyEnforcementPoint"
class="org.fcrepo.server.security.xacml.pep.impl.FESLPolicyEnforcementPoint"
autowire-candidate="true" init-method="init">
<constructor-arg><ref bean="MelcoePDPConfig" /></constructor-arg>
<constructor-arg><ref bean="org.fcrepo.server.security.ContextRegistry" /></constructor-arg>
</bean>
<bean id="org.fcrepo.server.security.Authorization"
class="org.fcrepo.server.security.xacml.pep.impl.FESLAuthorization"
autowire-candidate="true">
<constructor-arg><ref bean="org.fcrepo.server.security.PolicyEnforcementPoint" /></constructor-arg>
</bean>

</beans>
@@ -12,6 +12,9 @@

<bean id="PolicyCombiningAlgorithm" class="org.fcrepo.server.security.xacml.pdp.HierarchicalLowestChildDenyOverridesPolicyAlg" />

<bean id="org.fcrepo.server.security.ContextRegistry"
class="org.fcrepo.server.security.impl.HashtableContextRegistry" />

<util:set id="policyFinderModules">
<bean id="GenericPolicyFinderModule"
class="org.fcrepo.server.security.xacml.pdp.finder.policy.GenericPolicyFinderModule">
@@ -23,6 +26,10 @@
<bean id="CurrentEnvModule" class="com.sun.xacml.finder.impl.CurrentEnvModule"/>
<bean id="SelectorModule" class="com.sun.xacml.finder.impl.SelectorModule"/>
<ref bean="FedoraRIAttributeFinder" />
<bean id="org.fcrepo.server.security.ContextAttributeFinderModule"
class="org.fcrepo.server.security.ContextAttributeFinderModule">
<constructor-arg><ref bean="org.fcrepo.server.security.ContextRegistry" /></constructor-arg>
</bean>
</util:list>
<util:list id="resourceFinderModules">
</util:list>
@@ -59,6 +59,7 @@
<entry key="urn:oasis:names:tc:xacml:1.0:resource:resource-id" value="http://www.w3.org/2001/XMLSchema#anyURI"/>
<entry key="urn:fedora:names:fedora:2.1:resource:object:pid" value="http://www.w3.org/2001/XMLSchema#string"/>
<entry key="urn:fedora:names:fedora:2.1:resource:datastream:id" value="http://www.w3.org/2001/XMLSchema#string"/>
<entry key="urn:fedora:names:fedora:2.1:resource:datastream:fileUri" value="http://www.w3.org/2001/XMLSchema#string"/>
</util:map>
<util:map id="org.fcrepo.server.security.xacml.pdp.data.actionAttributes">
<!--
@@ -12,12 +12,15 @@
http://www.springframework.org/schema/util/spring-util-2.5.xsd
http://www.springframework.org/schema/security
http://www.springframework.org/schema/security/spring-security-3.0.xsd">

<bean id="objectsFilterMatcher" class="org.fcrepo.server.security.xacml.pep.rest.filters.ObjectsRESTFilterMatcher">
<constructor-arg ref="handlers-rest" />
<constructor-arg ref="NoopFilter" />
</bean>
<!-- FeSL Authz bean (REST) -->
<bean id="PEPFilter" class="org.fcrepo.server.security.xacml.pep.rest.PEP"
lazy-init="true" init-method="init">
<property name="contextHandler" ref="org.fcrepo.server.security.xacml.pep.ContextHandler" />
<property name="filters">
<constructor-arg><ref bean="objectsFilterMatcher" /></constructor-arg>
<constructor-arg>
<map>
<entry key="/describe" value-ref="DescribeFilter" />
<entry key="/get" value-ref="GetFilter" />
@@ -44,7 +47,8 @@
<!-- handler for REST API - each individual API operation is mapped below in handlers-objects -->
<entry key="/objects" value-ref="ObjectsFilter" />
</map>
</property>
</constructor-arg>
<property name="contextHandler" ref="org.fcrepo.server.security.xacml.pep.ContextHandler" />
</bean>

<!--
@@ -99,7 +103,7 @@
<bean id="ListMethodsFilter" class="org.fcrepo.server.security.xacml.pep.rest.filters.ListMethodsFilter">
<property name="contextHandler" ref="org.fcrepo.server.security.xacml.pep.ContextHandler" />
</bean>
<bean id="SearchFilter" class="org.fcrepo.server.security.xacml.pep.rest.filters.SearchFilter">
<bean id="SearchFilter" class="org.fcrepo.server.security.xacml.pep.rest.objectshandlers.FindObjects">
<property name="contextUtil" ref="org.fcrepo.server.security.xacml.util.ContextUtil" />
<property name="contextHandler" ref="org.fcrepo.server.security.xacml.pep.ContextHandler" />
</bean>
@@ -123,6 +127,9 @@
</entry>
-->

<bean id="ObjectsFilter" class="org.fcrepo.server.security.xacml.pep.rest.filters.ObjectsFilter">
</bean>

<bean id="UploadFilter" class="org.fcrepo.server.security.xacml.pep.rest.filters.UploadFilter">
<property name="contextHandler" ref="org.fcrepo.server.security.xacml.pep.ContextHandler" />
</bean>
@@ -132,18 +139,8 @@

<!-- handler for REST API - each individual API operation is mapped below in handlers-objects -->
<util:map id="handlers-rest">
<entry key="findObjects">
<bean class="org.fcrepo.server.security.xacml.pep.rest.objectshandlers.FindObjects">
<property name="contextUtil" ref="org.fcrepo.server.security.xacml.util.ContextUtil" />
<property name="contextHandler" ref="org.fcrepo.server.security.xacml.pep.ContextHandler" />
</bean>
</entry>
<entry key="resumeFindObjects">
<bean class="org.fcrepo.server.security.xacml.pep.rest.objectshandlers.FindObjects">
<property name="contextUtil" ref="org.fcrepo.server.security.xacml.util.ContextUtil" />
<property name="contextHandler" ref="org.fcrepo.server.security.xacml.pep.ContextHandler" />
</bean>
</entry>
<entry key="findObjects" value-ref="SearchFilter" />
<entry key="resumeFindObjects" value-ref="SearchFilter" />
<entry key="getDatastreamDissemination">
<bean class="org.fcrepo.server.security.xacml.pep.rest.objectshandlers.GetDatastreamDissemination">
<property name="contextHandler" ref="org.fcrepo.server.security.xacml.pep.ContextHandler" />
@@ -261,8 +258,5 @@
</bean>
</entry>
</util:map>
<bean id="ObjectsFilter" class="org.fcrepo.server.security.xacml.pep.rest.filters.ObjectsFilter">
<constructor-arg ref="handlers-rest" />
</bean>

</beans>
@@ -2,29 +2,77 @@
<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"
xmlns:util="http://www.springframework.org/schema/util"
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">
<bean id="org.fcrepo.server.security.ContextAttributeFinderModule"
class="org.fcrepo.server.security.ContextAttributeFinderModule"
factory-method="getInstance" autowire-candidate="true">
</bean>
<bean id="org.fcrepo.server.security.ResourceAttributeFinderModule"
class="org.fcrepo.server.security.ResourceAttributeFinderModule"
factory-method="getInstance" autowire-candidate="true">
<property name="ownerIdSeparator" value="," />
<property name="DOManager">
<ref bean="org.fcrepo.server.storage.DOManager" />
</property>
http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util-2.5.xsd">

<bean id="org.fcrepo.server.security.ContextRegistry"
class="org.fcrepo.server.security.impl.HashtableContextRegistry" />

<util:set id="policyFinderModules">
<bean id="LegacyPolicyFinderModule"
class="org.fcrepo.server.security.PolicyFinderModule">
<constructor-arg><ref bean="org.fcrepo.server.Server" /></constructor-arg>
<constructor-arg>
<bean class="org.fcrepo.server.security.impl.SimplePolicyLoader">
<constructor-arg><ref bean="org.fcrepo.server.storage.DOManager" /></constructor-arg>
</bean>
</constructor-arg>
<constructor-arg><ref bean="org.fcrepo.server.security.AuthorizationConfiguration" /></constructor-arg>
</bean>
</util:set>

<bean id="org.fcrepo.server.security.ContextAttributeFinderModule"
class="org.fcrepo.server.security.ContextAttributeFinderModule"
autowire-candidate="true">
<constructor-arg><ref bean="org.fcrepo.server.security.ContextRegistry" /></constructor-arg>
</bean>
<bean id="org.fcrepo.server.security.ResourceAttributeFinderModule"
class="org.fcrepo.server.security.ResourceAttributeFinderModule"
factory-method="getInstance" autowire-candidate="true">
<property name="ownerIdSeparator" value="," />
<property name="DOManager">
<ref bean="org.fcrepo.server.storage.DOManager" />
</property>
<property name="legacyConfiguration">
<ref bean="org.fcrepo.server.security.AuthorizationConfiguration" />
</property>
</bean>
<!-- TESTONLY
<bean id="org.fcrepo.server.security.TestAttributeFinderModule"
class="org.fcrepo.server.security.TestAttributeFinderModule"
factory-method="getInstance" autowire-candidate="true">
</bean>
<bean id="org.fcrepo.server.security.TestAttributeFinderModule"
class="org.fcrepo.server.security.TestAttributeFinderModule"
factory-method="getInstance" autowire-candidate="true">
</bean>
/TESTONLY -->

<util:list id="attributeFinderModules">
<ref bean="org.fcrepo.server.security.ContextAttributeFinderModule" />
<ref bean="org.fcrepo.server.security.ResourceAttributeFinderModule" />
<!-- Uncomment the bean below to enable the use of relationship index triples in XACML policies -->
<!--
<ref bean="org.fcrepo.server.security.xacml.pdp.finder.attribute.RITriplesAttributeFinder" />
-->
<!-- TESTONLY
<ref bean="org.fcrepo.server.security.TestAttributeFinderModule" />
/TESTONLY -->
</util:list>

<util:list id="resourceFinderModules">
</util:list>

<bean id="PDPConfigurationFactory" class="org.fcrepo.server.security.PDPConfigurationFactory" />

<bean id="LegacyPDPConfig" factory-bean="PDPConfigurationFactory" factory-method="getPDPConfig">
<constructor-arg ref="attributeFinderModules" />
<constructor-arg ref="policyFinderModules" />
<constructor-arg ref="resourceFinderModules" />
</bean>

<!-- Uncomment the bean below to enable the use of relationship index triples in XACML policies -->
<!--
<bean id="org.fcrepo.server.security.xacml.pdp.finder.attribute.RITriplesAttributeFinder"
class="org.fcrepo.server.security.xacml.pdp.finder.attribute.RITriplesAttributeFinder"
@@ -46,20 +94,11 @@
</bean>
-->
<bean id="org.fcrepo.server.security.PolicyEnforcementPoint"
class="org.fcrepo.server.security.PolicyEnforcementPointImpl"
factory-method="getInstance" autowire-candidate="true">
<property name="attributeFinderModules">
<list>
<ref bean="org.fcrepo.server.security.ResourceAttributeFinderModule" />
<ref bean="org.fcrepo.server.security.ContextAttributeFinderModule" />
<!-- Uncomment the bean below to enable the use of relationship index triples in XACML policies -->
<!--
<ref bean="org.fcrepo.server.security.xacml.pdp.finder.attribute.RITriplesAttributeFinder" />
-->
<!-- TESTONLY
<ref bean="org.fcrepo.server.security.TestAttributeFinderModule" />
/TESTONLY -->
</list>
</property>
class="org.fcrepo.server.security.impl.DefaultPolicyEnforcementPoint"
init-method="init"
autowire-candidate="true">
<constructor-arg><ref bean="LegacyPDPConfig" /></constructor-arg>
<constructor-arg><ref bean="org.fcrepo.server.security.ContextRegistry" /></constructor-arg>
<constructor-arg><ref bean="org.fcrepo.server.security.AuthorizationConfiguration" /></constructor-arg>
</bean>
</beans>
@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:sec="http://www.springframework.org/schema/security"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:tx="http://www.springframework.org/schema/tx" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:jaxrs="http://cxf.apache.org/jaxrs" xmlns:fedora-types-mtom="http://fedora-commons.org/2011/07/definitions/types/"
xmlns:fedora-types="http://www.fedora.info/definitions/1/0/types/"
xmlns:fedora-api-mtom="http://fedora-commons.org/2011/07/definitions/api/"
xmlns:fedora-api="http://www.fedora.info/definitions/1/0/api/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:cxf="http://cxf.apache.org/core"
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
http://cxf.apache.org/jaxrs http://cxf.apache.org/schemas/jaxrs.xsd
http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd">

<context:annotation-config />

<import resource="classpath:META-INF/cxf/cxf.xml"/>
<import resource="classpath:META-INF/cxf/cxf-servlet.xml" />

<jaxrs:server serviceName="describeService" address="/">
<jaxrs:serviceBeans>
<ref bean="DescribeRepositoryResource" />
</jaxrs:serviceBeans>
<jaxrs:providers>
<bean class="org.fcrepo.server.rest.cxf.WadlGenerator" />
</jaxrs:providers>
</jaxrs:server>
<bean id="DescribeRepositoryResource" class="org.fcrepo.server.rest.DescribeRepositoryResource">
<constructor-arg ref="org.fcrepo.server.Server" />
</bean>

</beans>

0 comments on commit c1ff32b

Please sign in to comment.
You can’t perform that action at this time.