<?xml version="1.0"?>
<!DOCTYPE mbeans-descriptors PUBLIC
 "-//Apache Software Foundation//DTD Model MBeans Configuration File"
 "http://jakarta.apache.org/commons/dtds/mbeans-descriptors.dtd">

<!--
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - JOnAS: Java(TM) Open Application Server
    - Copyright (C) 2009 Bull S.A.
    - Contact: jonas-team@ow2.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
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - $Id: mbeans-descriptors.xml 18852 2009-10-09 14:31:22Z danesa $
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-->

<mbeans-descriptors>
    
    <!-- JOnAS Memory Security Realm ======================================================================= -->
    <mbean name="JResourceMemory" description="Memory Realm Management"
        className="org.ow2.jonas.security.internal.realm.factory.JResourceMemoryMBean"
        domain="JOnAS" group="JonasManaged"
        type="org.ow2.jonas.security.internal.realm.factory.JResourceMemory">
        
    	<!-- Common JResource attributes =============================================================== -->
        <attribute name="Name"
            description="realm name"
            type="java.lang.String" writeable="false" />
            
    	<!-- Specific Memory realm operations =============================================================== -->
        <operation name="clearCache"
            description="clear the cache"
            impact="ACTION">
        </operation>
            
        <operation name="listRoles"
            description="Get the roles"
            impact="ACTION"
            returnType="[Ljava.lang.String;">
        </operation>
        
        <operation name="listGroups"
            description="Get the groups"
            impact="ACTION"
            returnType="[Ljava.lang.String;">
        </operation>
        
        <operation name="addUser"
            description="Add a user with a given principal and credential"
            impact="ACTION">
            <parameter name="username"
                description="the name of the use" type="java.lang.String" />
            <parameter name="password"
                description="the password of the use" type="java.lang.String" />
        </operation>
        
        <operation name="addGroup"
            description="Add a group with a given name"
            impact="ACTION">
            <parameter name="groupname"
                description="the name of the group" type="java.lang.String" />
        </operation>
        
        <operation name="addRole"
            description="Add a role with a given name"
            impact="ACTION">
            <parameter name="rolename"
                description="the name of the role" type="java.lang.String" />
        </operation>
        
        <operation name="removeUser"
            description="Remove a user with a given principal"
            impact="ACTION">
            <parameter name="username"
                description="name of the user to remove" type="java.lang.String" />
        </operation>
        
        <operation name="removeGroup"
            description="Remove a group with a given name"
            impact="ACTION">
            <parameter name="groupname"
                description="name of the group to remove" type="java.lang.String" />
        </operation>
        
        <operation name="removeRole"
            description="Remove a role with a given name"
            impact="ACTION">
            <parameter name="rolename"
                description="name of the role to remove" type="java.lang.String" />
        </operation>
        
    	<!-- Common JResource operations =============================================================== -->
        <operation name="saveConfig"
            description="save configuration"
            impact="ACTION">
        </operation>
    </mbean>
    

    <!-- JOnAS Datasource Security Realm ======================================================================= -->
    <mbean name="JResourceDS" description="Datasource Realm Management"
        className="org.ow2.jonas.security.internal.realm.factory.JResourceDSMBean"
        domain="JOnAS" group="JonasManaged"
        type="org.ow2.jonas.security.internal.realm.factory.JResourceDS">

    	<!-- Common JResource attributes =============================================================== -->
        <attribute name="Name"
            description="realm name"
            type="java.lang.String" writeable="false" />

    	<!-- Specific Datasource attributes =============================================================== -->
        <attribute name="DsName"
            description="Datasource name"
            type="java.lang.String" writeable="true" />

        <attribute name="RoleTable"
            description="Name of table that containes the username/role"
            type="java.lang.String" writeable="true" />

        <attribute name="RoleTableRolenameCol"
            description="Name of the role column in the roles table"
            type="java.lang.String" writeable="true" />

        <attribute name="RoleTableUsernameCol"
            description="Name of the username column in the roles table"
            type="java.lang.String" writeable="true" />
            
        <attribute name="UserTable"
            description="Name of table that containes the username/password"
            type="java.lang.String" writeable="true" />

        <attribute name="UserTablePasswordCol"
            description="Name of the password column in the user table"
            type="java.lang.String" writeable="true" />

        <attribute name="UserTableUsernameCol"
            description="Name of the username column in the user table"
            type="java.lang.String" writeable="true" />
            
        <attribute name="Algorithm"
            description="algorithme used for password encoding"
            type="java.lang.String" writeable="true" />
            
        <operation name="saveConfig"
            description="save configuration"
            impact="ACTION">
        </operation>
    </mbean>
    

    <!-- JOnAS LDAP Security Realm ======================================================================= -->
    <mbean name="JResourceLDAP" description="LDAP Realm Management"
        className="org.ow2.jonas.security.internal.realm.factory.JResourceLDAPMBean"
        domain="JOnAS" group="JonasManaged"
        type="org.ow2.jonas.security.internal.realm.factory.JResourceLDAP">

    	<!-- Common JResource attributes =============================================================== -->
        <attribute name="Name"
            description="realm name"
            type="java.lang.String" writeable="false" />
            
    	<!-- Specific LDAP attributes =============================================================== -->
        <attribute name="AuthenticationMode"
            description="mode for validate the authentication of this LDAP realm"
            type="java.lang.String" writeable="true" />
            
        <attribute name="BaseDN"
            description="DN used for the lookup of this LDAP realm"
            type="java.lang.String" writeable="true" />

        <attribute name="InitialContextFactory"
            description="initial context factory of this LDAP realm"
            type="java.lang.String" writeable="true" />

        <attribute name="Language"
            description="preferred language to use"
            type="java.lang.String" writeable="true" />

        <attribute name="ProviderUrl"
            description="Url of the ldap server"
            type="java.lang.String" writeable="true" />

        <attribute name="Referral"
            description="specifies how to process the referrals encountered by the service provider"
            type="java.lang.String" writeable="true" />

        <attribute name="RoleDN"
            description="used in addition to the base DN when searching and loading roles"
            type="java.lang.String" writeable="true" />

        <attribute name="RoleNameAttribute"
            description="role name when performing a lookup on a role"
            type="java.lang.String" writeable="true" />

        <attribute name="RoleSearchFilter"
            description="filter used when searching the role"
            type="java.lang.String" writeable="true" />

        <attribute name="SecurityAuthentication"
            description="used during the authentication to the LDAP server"
            type="java.lang.String" writeable="true" />

        <attribute name="SecurityCredentials"
            description="Credential(password) of the principal of this LDAP realm"
            type="java.lang.String" writeable="true" />

        <attribute name="SecurityPrincipal"
            description="DN of the Principal(username) of this LDAP realm"
            type="java.lang.String" writeable="true" />
            
        <attribute name="SecurityProtocol"
            description="security protocol to use for this LDAP realm"
            type="java.lang.String" writeable="true" />
            
        <attribute name="StateFactories"
            description="list of state factories of this LDAP realm"
            type="java.lang.String" writeable="true" />
            
        <attribute name="UserDN"
            description="DN used when searching the user DN. Overrides the base DN if defined"
            type="java.lang.String" writeable="true" />
            
        <attribute name="UserPasswordAttribute"
            description="used to get the password of this LDAP realm"
            type="java.lang.String" writeable="true" />
            
        <attribute name="UserRolesAttribute"
            description="used to get the user roles from the ldap server"
            type="java.lang.String" writeable="true" />
            
        <attribute name="UserSearchFilter"
            description="filter used when searching the user"
            type="java.lang.String" writeable="true" />
            
        <attribute name="Algorithm"
            description="default algorithm"
            type="java.lang.String" writeable="true" />

        <operation name="saveConfig"
            description="save configuration"
            impact="ACTION">
        </operation>
    </mbean>
</mbeans-descriptors>