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

    Copyright (C) 2009 eXo Platform SAS.
    
    This is free software; you can redistribute it and/or modify it
    under the terms of the GNU Lesser General Public License as
    published by the Free Software Foundation; either version 2.1 of
    the License, or (at your option) any later version.
    
    This software is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
    Lesser General Public License for more details.
    
    You should have received a copy of the GNU Lesser General Public
    License along with this software; if not, write to the Free
    Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
    02110-1301 USA, or see the FSF site: http://www.fsf.org.

-->

<jboss-identity xmlns="urn:picketlink:idm:config:v1_0_0_ga"
                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                xsi:schemaLocation="urn:picketlink:idm:config:v1_0_0_ga identity-config.xsd">
  <realms>
    <realm>
      <id>idm_realm</id>
      <repository-id-ref>DefaultPortalRepository</repository-id-ref>
      <identity-type-mappings>
        <user-mapping>USER</user-mapping>
      </identity-type-mappings>
      <options>
        <option>
          <name>template</name>
          <value>true</value>
        </option>
        <option>
          <name>oldCredentialEncoder.class</name>
          <value>${exo.plidm.password.oldClass:org.picketlink.idm.impl.credential.DatabaseReadingSaltEncoder}</value>
        </option>
        <option>
          <name>credentialEncoder.class</name>
          <value>${exo.plidm.password.class:org.exoplatform.web.security.hash.Argon2IdPasswordEncoder}</value>
        </option>
        <option>
          <name>credentialEncoder.hashAlgorithm</name>
          <value>${exo.plidm.password.hash:SHA-256}</value>
        </option>
        <option>
          <name>credentialEncoder.secureRandomAlgorithm</name>
          <value>${exo.plidm.password.secureRandomAlgorithm:SHA1PRNG}</value>
        </option>
      </options>
    </realm>
  </realms>
  <repositories>
    <repository>
      <id>DefaultPortalRepository</id>
      <class>org.picketlink.idm.impl.repository.WrapperIdentityStoreRepository</class>
      <external-config/>
      <default-identity-store-id>HibernateStore</default-identity-store-id>
      <default-attribute-store-id>HibernateStore</default-attribute-store-id>
    </repository>
  </repositories>
  <stores>
    <attribute-stores/>
    <identity-stores>
      <identity-store>
        <id>HibernateStore</id>
        <class>org.picketlink.idm.impl.store.hibernate.HibernateIdentityStoreImpl</class>
        <external-config/>
        <supported-relationship-types>
          <relationship-type>JBOSS_IDENTITY_MEMBERSHIP</relationship-type>
          <relationship-type>JBOSS_IDENTITY_ROLE</relationship-type>
        </supported-relationship-types>
        <supported-identity-object-types>
          <identity-object-type>
            <name>USER</name>
            <relationships/>
            <credentials>
              <credential-type>PASSWORD</credential-type>
            </credentials>
            <attributes/>
            <options/>
          </identity-object-type>
        </supported-identity-object-types>
        <options>
          <option>
            <name>hibernateSessionFactoryRegistryName</name>
            <value>hibernateSessionFactory</value>
          </option>
          <option>
            <name>populateRelationshipTypes</name>
            <value>true</value>
          </option>
          <option>
            <name>populateIdentityObjectTypes</name>
            <value>true</value>
          </option>
          <option>
            <name>allowNotDefinedIdentityObjectTypes</name>
            <value>true</value>
          </option>
          <option>
            <name>allowNotDefinedAttributes</name>
            <value>true</value>
          </option>
          <option>
            <name>allowNotCaseSensitiveSearch</name>
            <value>true</value>
          </option>
          <option>
            <name>isRealmAware</name>
            <value>true</value>
          </option>
          <option>
            <name>lazyStartOfHibernateTransaction</name>
            <value>true</value>
          </option>
        </options>
      </identity-store>
    </identity-stores>
  </stores>
  <options>
    <option>
      <name>defaultTemplate</name>
      <value>idm_realm</value>
    </option>
  </options>
</jboss-identity>