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

<!--
/*
 * JOnAS: Java(TM) Open Application Server
 * Copyright (C) 1999 Bull S.A.
 * Contact: jonas-team@objectweb.org
 *
 * This library 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 any later version.
 *
 * This library 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 library; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
 * USA
 *
 * Initial developer(s): Florent Benoit
 *
 *
 * $Id$
 *
*/
-->


<!--
This is XML DTD for jonas realm deployment descriptor information.

<!DOCTYPE jonas-users PUBLIC
          "-//ObjectWeb//DTD JOnAS realm 1.0//EN"
          "http://www.objectweb.org/jonas/dtds/jonas-realm_1_0.dtd">
-->



<!--
The jonas-realm element is the root element of this deployment descriptor.
it contains the memory, datasource or ldap realm elements
-->
<!ELEMENT jonas-realm (jonas-memoryrealm*, jonas-dsrealm*, jonas-ldaprealm*)>



<!--

   -=  MEMORY REALM =-

-->



<!--
The jonas-memoryrealm element contains the memoryrealm element
-->
<!ELEMENT jonas-memoryrealm (memoryrealm*)>

<!--
The memoryrealm element contains the roles, groups and the users
-->
<!ELEMENT memoryrealm (roles?, groups?, users?)>

<!--
roles contains all the roles
-->
<!ELEMENT roles (role*)>

<!--
Define the element role
-->
<!ELEMENT role (#PCDATA)>

<!--
groups contains all the groups
-->
<!ELEMENT groups (group*)>

<!--
Define the element group
-->
<!ELEMENT group (#PCDATA)>

<!--
users contains all the users
-->
<!ELEMENT users (user*)>

<!--
Define the element group
-->
<!ELEMENT user (#PCDATA)>


<!--
Define attributes of the element role
-->

<!ATTLIST memoryrealm name ID #REQUIRED>

<!ATTLIST role name CDATA #REQUIRED>
<!ATTLIST role description CDATA #IMPLIED>

<!ATTLIST group name CDATA #REQUIRED>
<!ATTLIST group roles CDATA #IMPLIED>
<!ATTLIST group description CDATA #IMPLIED>

<!ATTLIST user name CDATA #REQUIRED>
<!ATTLIST user password CDATA #REQUIRED>
<!ATTLIST user roles CDATA #IMPLIED>
<!ATTLIST user groups CDATA #IMPLIED>
<!ATTLIST user description CDATA #IMPLIED>


<!--

   -=  Datasource REALM =-

-->

<!--
The jonas-dsrealm element contains the dsealm element
-->
<!ELEMENT jonas-dsrealm (dsrealm*)>


<!--
Define attributes of the element jdbcrealm
-->
<!ELEMENT dsrealm (#PCDATA)>

<!ATTLIST dsrealm name ID #REQUIRED>

<!ATTLIST dsrealm dsName CDATA #REQUIRED>
<!ATTLIST dsrealm userTable CDATA #IMPLIED>
<!ATTLIST dsrealm userTableUsernameCol CDATA #IMPLIED>
<!ATTLIST dsrealm userTablePasswordCol CDATA #IMPLIED>
<!ATTLIST dsrealm roleTable CDATA #IMPLIED>
<!ATTLIST dsrealm roleTableUsernameCol CDATA #IMPLIED>
<!ATTLIST dsrealm roleTableRolenameCol CDATA #IMPLIED>
<!ATTLIST dsrealm userPrincipalsQuery CDATA #IMPLIED>
<!ATTLIST dsrealm userRolesQuery CDATA #IMPLIED>
<!ATTLIST dsrealm algorithm CDATA #IMPLIED>


<!--

   -=  LDAP REALM =-

-->

<!--
The jonas-ldaprealm element contains the ldaprealm element
-->
<!ELEMENT jonas-ldaprealm (ldaprealm*)>


<!--
Define attributes of the element ldaprealm
-->
<!ELEMENT ldaprealm (#PCDATA)>


<!ATTLIST ldaprealm name ID #REQUIRED>

<!ATTLIST ldaprealm baseDN CDATA #REQUIRED>

<!ATTLIST ldaprealm initialContextFactory CDATA "com.sun.jndi.ldap.LdapCtxFactory">
<!ATTLIST ldaprealm providerUrl CDATA "ldap://localhost:389">
<!ATTLIST ldaprealm securityAuthentication (none|simple|strong|CRAM-MD5|DIGEST-MD5) "simple">
<!ATTLIST ldaprealm securityPrincipal CDATA #IMPLIED>
<!ATTLIST ldaprealm securityCredentials CDATA #IMPLIED>
<!ATTLIST ldaprealm securityProtocol CDATA #IMPLIED>
<!ATTLIST ldaprealm language CDATA #IMPLIED>
<!ATTLIST ldaprealm referral CDATA #IMPLIED>
<!ATTLIST ldaprealm stateFactories CDATA #IMPLIED>

<!ATTLIST ldaprealm authenticationMode (compare|bind) "bind">

<!ATTLIST ldaprealm userPasswordAttribute CDATA "userPassword">
<!ATTLIST ldaprealm userRolesAttribute CDATA "memberOf">

<!ATTLIST ldaprealm roleNameAttribute CDATA "cn">

<!ATTLIST ldaprealm userDN CDATA #IMPLIED>
<!ATTLIST ldaprealm userSearchFilter CDATA "uid={0}">

<!ATTLIST ldaprealm roleDN CDATA #IMPLIED>
<!ATTLIST ldaprealm roleSearchFilter CDATA "uniqueMember={0}">

<!ATTLIST ldaprealm algorithm CDATA #IMPLIED>