<?xml version="1.0" encoding="UTF-8"?>

<Services
  xmlns="urn:mace:shibboleth:2.0:services"
  xmlns:attribute-afp="urn:mace:shibboleth:2.0:afp"
  xmlns:attribute-authority="urn:mace:shibboleth:2.0:attribute:authority"
  xmlns:attribute-resolver="urn:mace:shibboleth:2.0:resolver"
  xmlns:resource="urn:mace:shibboleth:2.0:resource"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:grouper="http://grouper.internet2.edu/shibboleth/2.0"
  xmlns:psp="http://grouper.internet2.edu/psp"
  xmlns:psp-ldap-target="http://grouper.internet2.edu/psp-ldap-target"
  xsi:schemaLocation="urn:mace:shibboleth:2.0:services classpath:/schema/shibboleth-2.0-services.xsd 
                              urn:mace:shibboleth:2.0:afp classpath:/schema/shibboleth-2.0-afp.xsd                            
                              urn:mace:shibboleth:2.0:attribute:authority classpath:/schema/shibboleth-2.0-attribute-authority.xsd
                              urn:mace:shibboleth:2.0:resolver classpath:/schema/shibboleth-2.0-attribute-resolver.xsd                              
                              urn:mace:shibboleth:2.0:resource classpath:/schema/shibboleth-2.0-resource.xsd
                              http://grouper.internet2.edu/shibboleth/2.0 classpath:/schema/shibboleth-2.0-grouper.xsd
                              http://grouper.internet2.edu/psp classpath:/schema/psp.xsd
                              http://grouper.internet2.edu/psp-ldap-target classpath:/schema/psp-ldap-target.xsd">

  <!-- The attribute resolver. -->
  <Service
    id="psp.AttributeResolver"
    xsi:type="attribute-resolver:ShibbolethAttributeResolver">
    <ConfigurationResource
      file="/psp-resolver.xml"
      xsi:type="resource:ClasspathResource">
      <ResourceFilter
        xsi:type="grouper:ClasspathPropertyReplacement"
        xmlns="urn:mace:shibboleth:2.0:resource"
        propertyFile="/ldap.properties" />
    </ConfigurationResource>
  </Service>

  <!-- The simple attribute authority. -->
  <Service
    id="psp.AttributeAuthority"
    xsi:type="psp:SimpleAttributeAuthority"
    depends-on="psp.AttributeResolver"
    resolver="psp.AttributeResolver" />

  <!-- The provisioning service provider. -->
  <Service
    id="psp"
    xsi:type="psp:ProvisioningServiceProvider"
    depends-on="psp.AttributeAuthority"
    authority="psp.AttributeAuthority"
    logSpml="true"
    writeRequests="false"
    writeResponses="false"
    pathToOutputFile="">
    <ConfigurationResource
      file="/psp.xml"
      xsi:type="resource:ClasspathResource">
      <ResourceFilter
        xsi:type="grouper:ClasspathPropertyReplacement"
        xmlns="urn:mace:shibboleth:2.0:resource"
        propertyFile="/ldap.properties" />
    </ConfigurationResource>
  </Service>

  <!-- The ldap target. The ldapPoolIdSource is either "grouper" or "spring". -->
  <!-- If ldapPoolIdSource is "spring", the ldapPoolId must be the id of the ldap pool bean in the vt-ldap xml spring configuration. -->
  <!-- If ldapPoolIdSource is "grouper", the ldapPoolId must be the id of the LdapSourceAdapter in sources.xml -->
  <Service
    id="ldap"
    xsi:type="psp-ldap-target:LdapTarget"
    logSpml="true"
    ldapPoolId="ldap"
    ldapPoolIdSource="grouper">
    <!-- A <ConfigurationResource/> is required to instantiate the <Service/>, so supply a do-nothing resource. -->
    <ConfigurationResource
      file="/edu/internet2/middleware/psp/util/empty-bean.xml"
      xsi:type="resource:ClasspathResource" />
  </Service>

</Services>