diff --git a/doc/guide.html b/doc/guide.html index 1788cfe07..1a4178ea0 100644 --- a/doc/guide.html +++ b/doc/guide.html @@ -6,7 +6,7 @@ - ejabberd 3.0.0-prealpha + ejabberd 3.0.0-alpha-x Installation and Operation Guide @@ -76,7 +76,7 @@ BLOCKQUOTE.figure DIV.center DIV.center HR{display:none;}


- +
ejabberd 3.0.0-prealpha
ejabberd 3.0.0-alpha-x
 
Installation and Operation Guide

@@ -557,9 +557,10 @@ Serving one domain: Domain example.net is using the internal authentication method while domain example.com is using the LDAP server running on the domain localhost to perform authentication: -
{host_config, "example.net", [{auth_method,   internal}]}.
+
{host_config, "example.net", [{auth_method,   storage},
+                              {auth_storage,  mnesia}]}.
 
-{host_config, "example.com", [{auth_method,   ldap},
+{host_config, "example.com", [{auth_method,   ldap],
                               {ldap_servers,  ["localhost"]},
                               {ldap_uids,     [{"uid"}]},
                               {ldap_rootdn,   "dc=localdomain"},
@@ -568,7 +569,8 @@ domain localhost to perform authentication:
 
  • Domain example.net is using ODBC to perform authentication while domain example.com is using the LDAP servers running on the domains localhost and otherhost: -
    {host_config, "example.net", [{auth_method, odbc},
    +
    {host_config, "example.net", [{auth_method, storage},
    +                              {auth_storage, odbc},
                                   {odbc_server, "DSN=ejabberd;UID=ejabberd;PWD=ejabberd"}]}.
     
     {host_config, "example.com", [{auth_method,   ldap},
    @@ -1014,27 +1016,55 @@ you have to make the transports log and do XDB by themselves:
     

    3.1.4  Authentication

    The option auth_method defines the authentication methods that are used -for user authentication. The syntax is: -

    {auth_method, [Method, ...]}.

    The following authentication methods are supported by ejabberd: +for user authentication. +Usually only one method is defined, with this syntax: +

    {auth_method, Method}.

    +This full syntax can be used to specify one or more methods: +

    {auth_method, [Method1, Method2, ...]}.

    The following authentication methods are supported by ejabberd:

    • -internal (default) — See section 3.1.4. +database storage in internal Mnesia or ODBC — See section 3.1.4.
    • external — See section 3.1.4.
    • ldap — See section 3.2.5. -
    • odbc — See section 3.2.1, 3.2.3, -3.2.2 and 3.2.4.
    • anonymous — See section 3.1.4.
    • pam — See section 3.1.4. -

    Account creation is only supported by internal, external and odbc methods.

    -

    Internal

    -

    ejabberd uses its internal Mnesia database as the default authentication method. -The value internal will enable the internal authentication method.

    Examples: +

  • Account creation is only supported by the methods: +internal Mnesia storage, ODBC storage, and external.

    +

    Database Storage

    +

    You can configure ejabberd to use the database storage authentication method, +and store either in the internal Mnesia database or in an ODBC database. +The specific storage is configured with the option: +

    {auth_storage, mnesia|odbc}
    +

    When the storage is configured for ODBC, the ODBC server is +configured with the odbc_server option, see +3.2.1 for MySQL, 3.2.3 for PostgreSQL, 3.2.2 for MSSQL, and 3.2.4 for generic ODBC.

    Examples:

    External Script

    In this authentication method, when ejabberd starts, @@ -1054,9 +1084,9 @@ the CacheTimeInteger indicates the number of seconds that ejabberd can reuse the authentication information since the user last disconnected, to verify again the user authentication without querying again the extauth script. Note: caching should not be enabled in a host if internal auth is also enabled. -If caching is enabled, mod_last or mod_last_odbc must be enabled also in that vhost. +If caching is enabled, mod_last must be enabled also in that vhost.

    This example sets external authentication, the extauth script, and enables caching for 10 minutes: -

    {auth_method, [external]}.
    +

    {auth_method, external}.
     {extauth_program, "/etc/ejabberd/JabberAuth.class.php"}.
     {extauth_cache, 600}.
     

    @@ -1081,23 +1111,23 @@ login anonymous are both enabled. parameter (see section 3.1.2).

    Examples:

    PAM Authentication

    @@ -1116,7 +1146,7 @@ This option defines what type of information about the user ejabberd provides to the PAM service: only the username, or the user JID. Default is username.

    Example: -

    {auth_method, [pam]}.
    +

    {auth_method, pam}.
     {pam_service, "ejabberd"}.
     

    Though it is quite easy to set up PAM support in ejabberd, PAM itself introduces some security issues:

    3.2.1  MySQL

    @@ -1492,20 +1523,13 @@ You can modify this interval with this option:

    {odbc_start_interval, 30}.
     

    Authentication

    -

    The option value name may be misleading, as the auth_method name is used -for access to a relational database through ODBC, as well as through the native -MySQL interface. Anyway, the first configuration step is to define the odbc -auth_method. For example: -

    {auth_method, [odbc]}.
    -

    +

    See section 3.1.4.

    Storage

    MySQL also can be used to store information into from several ejabberd -modules. See section 3.3.1 to see which modules have a version -with the ‘_odbc’. This suffix indicates that the module can be used with -relational databases like MySQL. To enable storage to your database, just make -sure that your database is running well (see previous sections), and replace the -suffix-less or ldap module variant with the odbc module variant. Keep in mind -that you cannot have several variants of the same module loaded!

    +modules. +See section 3.3.1 to see which modules support an ODBC storage backend. +To configure the module to use ODBC as storage backend, add the option +{backend, odbc} to the module.

    3.2.2  Microsoft SQL Server

    Although this section will describe ejabberd’s configuration when you want to use Microsoft SQL Server, it does not describe Microsoft SQL Server’s @@ -1523,22 +1547,17 @@ enabled. This can be done, by using next commands:

    ./configure --enable-odbc --enable-mssql && make install
     

    Database Connection

    -

    The configuration of Database Connection for a Microsoft SQL Server -is the same as the configuration for -ODBC compatible servers (see section 3.2.4).

    +

    See section 3.1.4.

    Authentication

    The configuration of Authentication for a Microsoft SQL Server is the same as the configuration for ODBC compatible servers (see section 3.2.4).

    Storage

    Microsoft SQL Server also can be used to store information into from several -ejabberd modules. See section 3.3.1 to see which modules have -a version with the ‘_odbc’. This suffix indicates that the module can be used -with relational databases like Microsoft SQL Server. To enable storage to your -database, just make sure that your database is running well (see previous -sections), and replace the suffix-less or ldap module variant with the odbc -module variant. Keep in mind that you cannot have several variants of the same -module loaded!

    +ejabberd modules. +See section 3.3.1 to see which modules support an ODBC storage backend. +To configure the module to use ODBC as storage backend, add the option +{backend, odbc} to the module.

    3.2.3  PostgreSQL

    Although this section will describe ejabberd’s configuration when you want to use the native PostgreSQL driver, it does not describe PostgreSQL’s installation @@ -1582,20 +1601,13 @@ Specify in seconds: for example 28800 means 8 hours.

    {odbc_keepalive_interval, undefined}.
     

    Authentication

    -

    The option value name may be misleading, as the auth_method name is used -for access to a relational database through ODBC, as well as through the native -PostgreSQL interface. Anyway, the first configuration step is to define the odbc -auth_method. For example: -

    {auth_method, [odbc]}.
    -

    +

    See section 3.1.4.

    Storage

    PostgreSQL also can be used to store information into from several ejabberd -modules. See section 3.3.1 to see which modules have a version -with the ‘_odbc’. This suffix indicates that the module can be used with -relational databases like PostgreSQL. To enable storage to your database, just -make sure that your database is running well (see previous sections), and -replace the suffix-less or ldap module variant with the odbc module variant. -Keep in mind that you cannot have several variants of the same module loaded!

    +modules. +See section 3.3.1 to see which modules support an ODBC storage backend. +To configure the module to use ODBC as storage backend, add the option +{backend, odbc} to the module.

    3.2.4  ODBC Compatible

    Although this section will describe ejabberd’s configuration when you want to use the ODBC driver, it does not describe the installation and database creation @@ -1628,19 +1640,13 @@ Specify in seconds: for example 28800 means 8 hours.

    {odbc_keepalive_interval, undefined}.
     

    Authentication

    -

    The first configuration step is to define the odbc auth_method. For -example: -

    {auth_method, [odbc]}.
    -

    +

    See section 3.1.4.

    Storage

    An ODBC compatible database also can be used to store information into from -several ejabberd modules. See section 3.3.1 to see which -modules have a version with the ‘_odbc’. This suffix indicates that the module -can be used with ODBC compatible relational databases. To enable storage to your -database, just make sure that your database is running well (see previous -sections), and replace the suffix-less or ldap module variant with the odbc -module variant. Keep in mind that you cannot have several variants of the same -module loaded!

    +several ejabberd modules. +See section 3.3.1 to see which modules support an ODBC storage backend. +To configure the module to use ODBC as storage backend, add the option +{backend, odbc} to the module.

    3.2.5  LDAP

    ejabberd has built-in LDAP support. You can authenticate users against LDAP server and use LDAP directory as vCard storage. Shared rosters are not supported @@ -1894,33 +1900,26 @@ all entries end with a comma: mod_http_bindXMPP over Bosh service (HTTP Binding)  mod_http_fileserverSmall HTTP file server  mod_lastLast Activity (XEP-0012)  -mod_last_odbcLast Activity (XEP-0012)supported DB (*) mod_mucMulti-User Chat (XEP-0045mod_muc_logMulti-User Chat room loggingmod_muc mod_multicastMulticast Service (XEP-0033mod_offlineOffline message storage (XEP-0160)  -mod_offline_odbcOffline message storage (XEP-0160)supported DB (*) mod_pingXMPP Ping and periodic keepalives (XEP-0199mod_privacyBlocking Communication (XMPP IM)  -mod_privacy_odbcBlocking Communication (XMPP IM)supported DB (*) mod_privatePrivate XML Storage (XEP-0049)  -mod_private_odbcPrivate XML Storage (XEP-0049)supported DB (*) mod_proxy65SOCKS5 Bytestreams (XEP-0065mod_pubsubPub-Sub (XEP-0060), PEP (XEP-0163)mod_caps mod_pubsub_odbcPub-Sub (XEP-0060), PEP (XEP-0163)supported DB (*) and mod_caps mod_registerIn-Band Registration (XEP-0077mod_rosterRoster management (XMPP IM)  -mod_roster_odbcRoster management (XMPP IM)supported DB (*) mod_service_logCopy user messages to logger service  -mod_shared_rosterShared roster managementmod_roster or -  mod_roster_odbc +mod_shared_rosterShared roster managementmod_roster mod_sicServer IP Check (XEP-0279mod_statsStatistics Gathering (XEP-0039mod_timeEntity Time (XEP-0202mod_vcardvcard-temp (XEP-0054mod_vcard_ldapvcard-temp (XEP-0054)LDAP server -mod_vcard_odbcvcard-temp (XEP-0054)supported DB (*) -mod_vcard_xupdatevCard-Based Avatars (XEP-0153)mod_vcard or mod_vcard_odbc +mod_vcard_xupdatevCard-Based Avatars (XEP-0153)mod_vcard mod_versionSoftware Version (XEP-0092


    You can see which database backend each module needs by looking at the suffix:

    If you want to, -it is possible to use a relational database to store pieces of -information. You can do this by changing the module name to a name with an -_odbc suffix in ejabberd config file. You can use a relational -database for the following data:

    Those modules accept the option {backend, mnesia|odbc}, +and can store the tables in the configured backend:

    You can find more contributed modules on the ejabberd website. Please remember that these contributions might not work or @@ -2288,7 +2282,13 @@ discover when a disconnected user last accessed the server, to know when a connected user was last active on the server, or to query the uptime of the ejabberd server.

    Options:

    -{iqdisc, Discipline}
    This specifies +{backend, mnesia|odbc}
    +Specify the backend used to store the tables: last_activity. +The default value is mnesia. +If configured to odbc, then you must also configure in ejabberd +the database connection (see the subsections of 3.2). + +
    {iqdisc, Discipline}
    This specifies the processing discipline for Last activity (jabber:iq:last) IQ queries (see section 3.3.2).

    3.3.9  mod_muc

    @@ -2702,6 +2702,12 @@ When a user has too many offline messages, any new messages that he receive are and a resource-constraint error is returned to the sender. The default value is max_user_offline_messages. Then you can define an access rule with a syntax similar to +

    {backend, mnesia|odbc}
    +Specify the backend used to store the tables: offline_msg. +The default value is mnesia. +If configured to odbc, then you must also configure in ejabberd +the database connection (see the subsections of 3.2). + max_user_sessions (see 3.1.5).

    This example allows power users to have as much as 5000 offline messages, administrators up to 2000, @@ -2773,7 +2779,13 @@ subscription type (or globally). (from http://xmpp.org/rfcs/rfc3921.html#privacy)

    Options:

    -{iqdisc, Discipline}
    This specifies +{backend, mnesia|odbc}
    +Specify the backend used to store the tables: privacy_default_list, privacy_list and privacy_list_data. +The default value is mnesia. +If configured to odbc, then you must also configure in ejabberd +the database connection (see the subsections of 3.2). + +
    {iqdisc, Discipline}
    This specifies the processing discipline for Blocking Communication (jabber:iq:privacy) IQ queries (see section 3.3.2).

    3.3.15  mod_private

    @@ -2785,7 +2797,13 @@ it is valid XML. One typical usage for this namespace is the server-side storage of client-specific preferences; another is Bookmark Storage (XEP-0048).

    Options:

    -{iqdisc, Discipline}
    This specifies +{backend, mnesia|odbc}
    +Specify the backend used to store the tables: private_storage. +The default value is mnesia. +If configured to odbc, then you must also configure in ejabberd +the database connection (see the subsections of 3.2). + +
    {iqdisc, Discipline}
    This specifies the processing discipline for Private XML Storage (jabber:iq:private) IQ queries (see section 3.3.2).

    3.3.16  mod_proxy65

    @@ -3006,7 +3024,13 @@ Also define a registration timeout of one hour: RFC 3921: XMPP IM. It also supports Roster Versioning (XEP-0237).

    Options:

    -{iqdisc, Discipline}
    This specifies +{backend, mnesia|odbc}
    +Specify the backend used to store the tables: rosteritem and rostergroup. +The default value is mnesia. +If configured to odbc, then you must also configure in ejabberd +the database connection (see the subsections of 3.2). + +
    {iqdisc, Discipline}
    This specifies the processing discipline for Roster Management (jabber:iq:roster) IQ queries (see section 3.3.2).
    {versioning, false|true}
    Enables Roster Versioning. @@ -3184,8 +3208,14 @@ other users vCards, as defined in vcard-temp (
    +{backend, mnesia|odbc}
    +Specify the backend used to store the tables: vcard. +The default value is mnesia. +If configured to odbc, then you must also configure in ejabberd +the database connection (see the subsections of 3.2). -{host, HostName}
    This option defines the Jabber ID of the + +
    {host, HostName}
    This option defines the Jabber ID of the service. If the host option is not specified, the Jabber ID will be the hostname of the virtual host with the prefix ‘vjud.’. The keyword "@HOST@" is replaced at start time with the real virtual host name. @@ -3207,7 +3237,6 @@ users who added some information to their vCard. The default value is
    {search_all_hosts, true|false}
    If this option is set to true, search operations will apply to all virtual hosts. Otherwise only the current host will be searched. The default value is true. -This option is available in mod_vcard, but not available in mod_vcard_odbc.

    Examples: