Giter Club home page Giter Club logo

docs.ejabberd.im's Introduction

ejabberd Docs Source Code

The ejabberd Community Server has its source code available in the ejabberd git repository. Its documentation is published in the ejabberd Docs website, and its source code is available in the docs git repository.

This is a community effort and you are welcome to submit issues or pull requests in order to improve the docs and benefit the ejabberd community.

This documentation site is built using MkDocs and Material for MkDocs.

Installation

To build the site you need Python 3.6 or later, then install the dependencies:

pip

mkdir -p .venv
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

!!! info From now on, remember to run source .venv/bin/activate before running any mkdocs [...] command.

!!! tip You can freeze the dependencies to a file using pip freeze > requirements.txt.

Debian

You could install most dependencies using APT:

apt-get install mkdocs \
                mkdocs-material \
                mkdocs-material-extensions \
                mkdocs-redirects \
                python3-bs4

!!! warning Unfortunately Debian doesn't package mkdocs-with-pdf, so you should remove with-pdf plugin from mkdocs.yml.

Building

Now you can start a small webserver that builds the site dynamically:

mkdocs serve

or build the site into static html files in the site/ directory:

mkdocs build

Testing

To verify the internal URLs in the site:

TEST=true mkdocs serve

To verify the internal URLs and also the external links:

TEST=true TEST_EXTERNAL=true mkdocs serve

Updating content

Some pages in this documentation are extracted from a running ejabberd node:

To update those pages, install ejabberd, start it and run make all in this repository. This gets documentation from ejabberd, processes it to obtain markdown content and moves the files to this repository.

Additionally, there are several other pages that are markdown files copied from ejabberd git repository and docker-ejabberd git repository. Those repositories must be available next to docs.ejabberd.im before running make all.

Markdown Shorthands

When editing ejabberd source code to document top-level options, modules or API commands, there is some additional syntax supported to generate HTML URLs:

For example, this text in the ejabberd source code:

_`mod_muc_admin`_
_`bookmarks_to_pep`_ API
_`default_db`_
_`basic.md#captcha|CAPTCHA`_
https://xmpp.org/extensions/xep-0045.html[XEP-0045]

gets converted into this markdown:

[mod_muc_admin](../../admin/configuration/modules.md#mod_muc_admin)
[bookmarks_to_pep](../../developer/ejabberd-api/admin-api.md#bookmarks_to_pep) API
[default_db](toplevel.md#default_db)
[CAPTCHA](basic.md#captcha)
[XEP-0045](https://xmpp.org/extensions/xep-0045.html)

There are example usage of those shorthands in ejabberd, for example in mod_muc.erl.

docs.ejabberd.im's People

Contributors

alexeyshch avatar badlop avatar bkmgit avatar broatcast avatar cisiqo avatar daidoji avatar deerbear avatar ehuelsmann avatar f055 avatar jsautret avatar jubalh avatar kadekm avatar kianmeng avatar licaon-kter avatar metalhearf avatar mremond avatar neustradamus avatar nosnilmot avatar prefiks avatar scrogson avatar sonictherocketman avatar weiss avatar yadunandanbhat avatar yuvallanger avatar zinid avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

docs.ejabberd.im's Issues

New mysql authentication script

As a follow-up to #9, I have extended the python mysql external authentication script and added the following features to it:

  • Use custom password hash algorithm
  • Define custom SQL queries to make custom database layouts possible
  • Add support for changing password, registering, and unregistering

I have put the script into the repository rankenstein/ejabberd-auth-mysql. It would be nice if it could be linked among the external auth scripts.

undocumented shaper settings

After reading the newest blog post I noticed that the shaper options used in it aren't documented.

shaper:
  normal:
    rate: 3000
    burst_size: 20000

How do colons in untrusted input work with external authentication?

Is your feature request related to a problem? Please describe.
https://docs.ejabberd.im/developer/guide/#external shows colons separating fields in the external authentication protocol. The Password field is untrusted input, so how does the protocol work if the user sends a password that contains a colon? Is it possible for the User field to contain a colon? Or for the Server field to have a colon (e.g., an IPv6 address)? If either the User or Server field can have colons, how does the external authentication program tell where the boundary between fields is? If the Password field can have colons, I'm guessing the external authentication program should just treat everything after the third colon as part of the password?

Describe the solution you'd like
Clarifying the above questions in the documentation would be nice, to avoid bugs around untrusted input.

Describe alternatives you've considered
N/A

Additional context
N/A

Some simple documentation clarifications

Please clarify in the documentation:

  • Global options: Will c2s_{protocoll_options,ciphers,dhfile} provided defaults to the "listen" modules? Same for s2s_*

  • Listen-options: Are ciphers, dhfile, protocoll_options defaulting to the global c2s resp. s2s options?

  • What module/function is using s2s_starttls? Is this for outgoing messages, and thus needs to be defined here (as this is not a listening module)

  • Hat is the meaning of hosts in mod_http_upload, mod_muc, mod_mix and others?
    What is this used for? Can one use @HOST@ (without any prefix)?
    What is the benefit of listing more than one hosts / JIDs?

  • mod_pres_counter: interval: Unit of value us not documented.

  • Meaning of mod_register: access_from is unclear: Description lets assume this is for controlling registration of new accounts from s2s or existing c2s sessions. But This is not stated.

  • mod_stun has an option to enable TLS, but what ciphers, dhfile, and protocoll_options are used?

Many thanks in advance for improving the documentation :-)

Deprecation of mod_http_upload service_url

Original issue: processone/ejabberd#3187

Environment

https://www.process-one.net/downloads/downloads-action.php?file=/ejabberd/20.02/ejabberd-20.02-windows.exe

Windows 10 Pro x64 Version 1909

Description

I'm using mod_http_upload with service_url option. On ejabberd start, this deprecation message is written into the log:

2020-03-14 12:04:21.041 [warning] <0.105.0>@ejabberd_config_transformer:warn_deprecated_option:530 Option 'service_url' is deprecated. Use option 'external_secret' instead.

I don't find a deprecation hint in the documentation: https://docs.ejabberd.im/admin/configuration/#mod-http-upload

Please remove the deprecation log entry or mark the service_url option as deprecated in the documentation.

mod_stun: only deprecated `turn_ip` option is documented

The documentation of the ejabberd stun module still describes the option turn_ip: String.
https://docs.ejabberd.im/admin/configuration/listen/#ejabberd-stun-1

The ejabberd.yml example only includes the options turn_ipv4_address and turn_ipv6_address.
When starting ejabberd with turn_ip set, it logs a deprecation warning:

2020-09-04 17:48:37.648 [warning] <0.105.0>@ejabberd_config_transformer:warn_replaced_option:552 Option 'turn_ip' is deprecated and was automatically replaced by 'turn_ipv4_address'. Please adjust your configuration file accordingly. Hint: run `ejabberdctl dump-config` command to view current configuration as it is seen by ejabberd.

So please update the documentation.

Provide documentation for older ejabberd releases

ejabberd documentation's source code is available in this git repository. Then, admins have a human-readable online version at https://docs.ejabberd.im

But how can admins of old releases access old documentation versions? The admin of ejabberd 18.01 should not check the up-to-date online documentation, as there were changes in the configuration syntax.

Back when documentation was in LateX, the guide was included as pdf in each release, so each admin checked the exact documentation for his version.

Possible solutions:

  • Do nothing: only the admins of current version can access correct documentation; everyone else will fill tickets and forum posts asking why his not-up-to-date ejabberd complains about a configuration copied from online documentation
  • Do nothing, and redirect admins of old versions to https://web.archive.org/
  • Provide a docs/ dir with each release, so it's included in the packages. Apparently this is what Erlang/OTP does
  • Perform a backup of docs site for each release, and host them in a "Docs archive" section. Either in html, or pdf

Anchors dont' work without page reload

Lets say I go here:

https://docs.ejabberd.im/admin/configuration/

Click on a sub-topic such as "Basic Configuration"

the internal anchors dont' work (on Chrome anyhow).

I found that if I right-click the link and open in new tab it will work.

The page reload behavior suggests that some javascript or CSS is responsible for it workg at page reload time. but it is a pretty frustrating user experience that internal anchors dont' work.

SQL injection vulnerability in Python MySQL auth script

I am new to ejabberd and I don’t know it this is the right place to report this issue.

It seems to me that the script linked here has an SQL injection vulnerability in line 75.The parameter in_user comes from the client and thus needs to be escaped:

dbcur.execute("SELECT %s,%s FROM %s WHERE %s = %%s"%(db_username_field, db_password_field, db_table, db_username_field), (in_user))

Unknown option 'mam' of module 'mod_muc' since ejabberd 18.06

https://docs.ejabberd.im/admin/configuration/#mod-muc

It should be stated that the option mam has been depcrecated since version 18.06:

11:19:19.241 [error] Unknown option 'mam' of module 'mod_muc', available options are: user_presence_shaper, user_message_shaper, room_shaper, access_register, default_room_options, max_users, max_user_conferences, max_rooms_discoitems, max_roo m_desc, hosts, access, regexp_room_id, max_users_admin_threshold, max_room_id, host, access_persistent, queue_type, max_users_presence, max_room_name, name, history_size, ram_db_type, db_type, access_create, min_presence_interval, min_message_ interval, access_admin

src/mod_mam.erl:224: variable 'Opt' is unbound

When compiling, I got this error:

src/mod_mam.erl:224: variable 'Opt' is unbound
ERROR: compile failed while processing /Users/david/Documents/HSWEB/mobile/apps/HiLois/ejabberd/ejabberd: rebar_abort
make: *** [deps/.built] Error 1

unknown option 'c2s_auth_block_lifetime' for module 'mod_fail2ban'

mod_fail2ban fails with the following config:

mod_fail2ban:
  c2s_auth_block_lifetime: 7200
  c2s_max_auth_failures: 50

Error with ejabberd 17.04:

[error] unknown option 'c2s_auth_block_lifetime' for module 'mod_fail2ban' will be likely ignored, available options are: 'access', 'c2s_auth_ban_lifetime', 'c2s_max_auth_failures'

SQL and virtual hosts

We have more virtual hosts on one ejabberd server.
Since it is written to use an external database if the usage/load gets higher, we decided to use mysql/mariadb.

Following the 'official' way https://www.process-one.net/blog/install-and-configure-mariadb-with-ejabberd/
I noticed very fast, that this is not working for more then one virtual host.
The schema can not decide between them.

After digging arround I found the mysql.new.sql and I was lucky ... in the first moments.
But then I noticed that this is, up to now, not the official way.

So what should I do with my 21 (and growing) virtual hosts???

Using the 'unofficial' mysql.new.sql schema or different databases for each virtual host?

Btw. I use version 23.01-1 because it is the default package in debian 12 bookworm.

The documentation at https://docs.ejabberd.im/tutorials/mysql/
also shows the 'old' way and it is not explained how to use an own database per virtual host.
The new schema is not mentioned. Should we use it or not?

Please let the users know how to do it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.