Platform Explorer / Nuxeo Platform LTS 2015 7.10

Contribution org.nuxeo.ecm.directory.sql.storage--directories

This contribution is part of XML component org.nuxeo.ecm.directory.sql.storage inside nuxeo-runtime-7.10-HF06.jar /opt/tmp/tmp-explorer/nuxeo-cap-7.10-tomcat/nxserver/config/default-sql-directories-bundle.xml

Extension point

Extension point directories of component SQLDirectoryFactory.

Contributed items

  • <directory name="userDirectory">
    
          <schema>user</schema>
    
          <dataSource>jdbc/nxsqldirectory</dataSource>
    
          <table>users</table>
          <idField>username</idField>
          <passwordField>password</passwordField>
          <passwordHashAlgorithm>SSHA</passwordHashAlgorithm>
          <autoincrementIdField>false</autoincrementIdField>
          <computeMultiTenantId>false</computeMultiTenantId>
          <dataFile>users.csv</dataFile>
          <createTablePolicy>on_missing_columns</createTablePolicy>
          <querySizeLimit>50</querySizeLimit>
    
          <!-- comment <cache* /> tags to disable the cache -->
          <cacheEntryName>sql-user-entry-cache</cacheEntryName>
          <cacheEntryWithoutReferencesName>sql-user-entry-cache-without-references</cacheEntryWithoutReferencesName>
    
          <references>
            <inverseReference directory="groupDirectory" dualReferenceField="members" field="groups"/>
          </references>
    
        </directory>
  • <directory name="groupDirectory">
    
          <schema>group</schema>
          <dataSource>jdbc/nxsqldirectory</dataSource>
          <table>groups</table>
          <idField>groupname</idField>
          <dataFile>groups.csv</dataFile>
          <createTablePolicy>on_missing_columns</createTablePolicy>
          <autoincrementIdField>false</autoincrementIdField>
    
          <!-- comment <cache* /> tags to disable the cache -->
          <cacheEntryName>sql-group-entry-cache</cacheEntryName>
          <cacheEntryWithoutReferencesName>sql-group-entry-cache-without-references</cacheEntryWithoutReferencesName>
    
          <references>
            <tableReference dataFile="user2group.csv" directory="userDirectory" field="members" schema="user2group" sourceColumn="groupId" table="user2group" targetColumn="userId"/>
            <!-- Warning ! From Nuxeo 5.3.1, a wrong setting has been fixed. See
            http://jira.nuxeo.org/browse/NXP-4401 . Nuxeo upgrades would need a fix in the
            database (inverting parentGroupId and childGroupId in the group2group)  -->
            <tableReference directory="groupDirectory" field="subGroups" schema="group2group" sourceColumn="parentGroupId" table="group2group" targetColumn="childGroupId"/>
            <inverseReference directory="groupDirectory" dualReferenceField="subGroups" field="parentGroups"/>
          </references>
    
        </directory>
  • <directory name="digestauth">
          <cacheEntryName>sql-digestauth-entry-cache</cacheEntryName>
          <cacheEntryWithoutReferencesName>sql-digestauth-entry-cache-without-references</cacheEntryWithoutReferencesName>
          <schema>digestauth</schema>
          <table>digestauth</table>
          <autoincrementIdField>false</autoincrementIdField>
          <dataSource>java:/nxsqldirectory</dataSource>
          <idField>username</idField>
          <passwordField>password</passwordField>
          <createTablePolicy>on_missing_columns</createTablePolicy>
        </directory>

XML source

<extension point="directories" target="org.nuxeo.ecm.directory.sql.SQLDirectoryFactory">

    <directory name="userDirectory">

      <schema>user</schema>

      <dataSource>jdbc/nxsqldirectory</dataSource>

      <table>users</table>
      <idField>username</idField>
      <passwordField>password</passwordField>
      <passwordHashAlgorithm>SSHA</passwordHashAlgorithm>
      <autoincrementIdField>false</autoincrementIdField>
      <computeMultiTenantId>false</computeMultiTenantId>
      <dataFile>users.csv</dataFile>
      <createTablePolicy>on_missing_columns</createTablePolicy>
      <querySizeLimit>50</querySizeLimit>

      <!-- comment <cache* /> tags to disable the cache -->
      <cacheEntryName>sql-user-entry-cache</cacheEntryName>
      <cacheEntryWithoutReferencesName>sql-user-entry-cache-without-references</cacheEntryWithoutReferencesName>

      <references>
        <inverseReference directory="groupDirectory" dualReferenceField="members" field="groups"/>
      </references>

    </directory>

    <directory name="groupDirectory">

      <schema>group</schema>
      <dataSource>jdbc/nxsqldirectory</dataSource>
      <table>groups</table>
      <idField>groupname</idField>
      <dataFile>groups.csv</dataFile>
      <createTablePolicy>on_missing_columns</createTablePolicy>
      <autoincrementIdField>false</autoincrementIdField>

      <!-- comment <cache* /> tags to disable the cache -->
      <cacheEntryName>sql-group-entry-cache</cacheEntryName>
      <cacheEntryWithoutReferencesName>sql-group-entry-cache-without-references</cacheEntryWithoutReferencesName>

      <references>
        <tableReference dataFile="user2group.csv" directory="userDirectory" field="members" schema="user2group" sourceColumn="groupId" table="user2group" targetColumn="userId"/>
        <!-- Warning ! From Nuxeo 5.3.1, a wrong setting has been fixed. See
        http://jira.nuxeo.org/browse/NXP-4401 . Nuxeo upgrades would need a fix in the
        database (inverting parentGroupId and childGroupId in the group2group)  -->
        <tableReference directory="groupDirectory" field="subGroups" schema="group2group" sourceColumn="parentGroupId" table="group2group" targetColumn="childGroupId"/>
        <inverseReference directory="groupDirectory" dualReferenceField="subGroups" field="parentGroups"/>
      </references>

    </directory>

    <directory name="digestauth">
      <cacheEntryName>sql-digestauth-entry-cache</cacheEntryName>
      <cacheEntryWithoutReferencesName>sql-digestauth-entry-cache-without-references</cacheEntryWithoutReferencesName>
      <schema>digestauth</schema>
      <table>digestauth</table>
      <autoincrementIdField>false</autoincrementIdField>
      <dataSource>java:/nxsqldirectory</dataSource>
      <idField>username</idField>
      <passwordField>password</passwordField>
      <createTablePolicy>on_missing_columns</createTablePolicy>
    </directory>

  </extension>